tx · 5LnkaJJ9WNL5z13vq4zLusQQmJu7Yi1AmF2iNDUi3Hrr

3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH:  -0.01400000 Waves

2019.12.05 17:22 [795544] smart account 3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH > SELF 0.00000000 Waves

{ "type": 13, "id": "5LnkaJJ9WNL5z13vq4zLusQQmJu7Yi1AmF2iNDUi3Hrr", "fee": 1400000, "feeAssetId": null, "timestamp": 1575555823395, "version": 1, "sender": "3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH", "senderPublicKey": "GrgrmWgq1Ts1ncMDtq8xzKMBnvc5xPxwkcsK9EN5RskZ", "proofs": [ "VvdDMQeiF1VcXZNFdzVzJ9LNfjFLJLPjSCs8BhKYseSYhaZ5DoKJ75oitiZjpQf4a8tbF1hBf7jfET4a2eHanYh" ], "script": "base64:AwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAEAAAADHBhc3N3b3JkSGFzaAIAAABAYzc4OGNkMWFhMzk0YjAzZWY3NWE3NGVkNzI0YWE1NTY1NmY2N2I3MzQwMWI1ZTIyMmZhZTM2MWM5YzE2ZjcwZQQAAAAKcGFzc1NlY3JldAkAAlwAAAABCQAB9wAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQMDCQAAAAAAAAIFAAAADHBhc3N3b3JkSGFzaAUAAAAKcGFzc1NlY3JldAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkHBgkAAAIAAAABBQAAAApwYXNzU2VjcmV0CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleY3kMPc=", "chainId": 84, "height": 795544, "spentComplexity": 0 } View: original | compacted Prev: 7ZTTgsACCTpLzeE8n5i1yj8TE3iVuFNLq7NzPZd1afkk Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-func getValue (json,key) = if ((key != "first_name"))
5- then throw("You cannot update this property")
6- else {
7- let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
8- let data = drop(json, ((keyIndex + size(key)) + 3))
9- data
10- }
11-
12-
13-func getJsonBeforeKey (json,key) = if ((key != "first_name"))
14- then throw("You cannot update this property")
15- else {
16- let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
17- let data = take(json, ((keyIndex + size(key)) + 3))
18- data
19- }
20-
21-
22-func getJsonAfterKey (json,key,oldValueSize) = if ((key != "first_name"))
23- then throw("You cannot update this property")
24- else {
25- let keyIndex = value(indexOf(json, (("\"" + key) + "\":")))
26- let data = takeRight(json, (size(json) - ((((keyIndex + size(key)) + 3) + oldValueSize) + 2)))
27- data
28- }
29-
30-
31-func getValueString (json) = take(drop(json, 1), value(indexOf(drop(json, 1), "\"")))
32-
33-
34-@Callable(i)
35-func testUpdateJsonKeyValue (jsonKey,key,newValue) = {
36- let valueJSON = match getString(this, jsonKey) {
37- case s: String =>
38- s
39- case _ =>
40- throw("The key doesn't exist")
41- }
42- let valueBeforeJson = getJsonBeforeKey(valueJSON, key)
43- let valueAfterJson = getJsonAfterKey(valueJSON, key, size(getValueString(getValue(valueJSON, key))))
44- let valueInJson = getValueString(getValue(valueJSON, key))
45- if ((valueInJson == newValue))
46- then throw("same value so no changes")
47- else WriteSet([DataEntry(jsonKey, ((((valueBeforeJson + "\"") + newValue) + "\"") + valueAfterJson))])
48- }
49-
50-
2+{-# CONTENT_TYPE EXPRESSION #-}
3+match tx {
4+ case t: TransferTransaction =>
5+ let passwordHash = "c788cd1aa394b03ef75a74ed724aa55656f67b73401b5e222fae361c9c16f70e"
6+ let passSecret = toBase16String(sha256(tx.proofs[1]))
7+ if (if ((passwordHash == passSecret))
8+ then sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
9+ else false)
10+ then true
11+ else throw(passSecret)
12+ case _ =>
13+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
14+}

github/deemru/w8io/026f985 
23.24 ms