tx · Am7vtFZ3czuhVuufhPS3aapWf7jn2tMBmPNq6KBmLtFs 3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH: -0.01400000 Waves 2019.12.01 15:13 [789550] smart account 3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH > SELF 0.00000000 Waves
{ "type": 13, "id": "Am7vtFZ3czuhVuufhPS3aapWf7jn2tMBmPNq6KBmLtFs", "fee": 1400000, "feeAssetId": null, "timestamp": 1575202502812, "version": 1, "sender": "3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH", "senderPublicKey": "GrgrmWgq1Ts1ncMDtq8xzKMBnvc5xPxwkcsK9EN5RskZ", "proofs": [ "4RAzFYJfHCa74rPfEeptTym3r7EHN5mQFvDTunpQWVvEXuhCyPjPXSFQCoAajhcsETrfcEapuJnFgtwPqctoCi7m" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAADAQAAAAhnZXRWYWx1ZQAAAAIAAAAEanNvbgAAAANrZXkDCQEAAAACIT0AAAACBQAAAANrZXkCAAAACmZpcnN0X25hbWUJAAACAAAAAQIAAAAfWW91IGNhbm5vdCB1cGRhdGUgdGhpcyBwcm9wZXJ0eQQAAAAIa2V5SW5kZXgJAQAAAAV2YWx1ZQAAAAEJAASzAAAAAgUAAAAEanNvbgkAASwAAAACCQABLAAAAAICAAAAASIFAAAAA2tleQIAAAACIjoEAAAABGRhdGEJAAEwAAAAAgUAAAAEanNvbgkAAGQAAAACCQAAZAAAAAIFAAAACGtleUluZGV4CQABMQAAAAEFAAAAA2tleQAAAAAAAAAAAwUAAAAEZGF0YQEAAAAQZ2V0SnNvbkJlZm9yZUtleQAAAAIAAAAEanNvbgAAAANrZXkDCQEAAAACIT0AAAACBQAAAANrZXkCAAAACmZpcnN0X25hbWUJAAACAAAAAQIAAAAfWW91IGNhbm5vdCB1cGRhdGUgdGhpcyBwcm9wZXJ0eQQAAAAIa2V5SW5kZXgJAQAAAAV2YWx1ZQAAAAEJAASzAAAAA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0ZXJKc29uCQEAAAAPZ2V0SnNvbkFmdGVyS2V5AAAAAwUAAAAJdmFsdWVKU09OBQAAAANrZXkJAAExAAAAAQkBAAAACGdldFZhbHVlAAAAAgUAAAAJdmFsdWVKU09OBQAAAANrZXkEAAAAC3ZhbHVlSW5Kc29uCQEAAAAIZ2V0VmFsdWUAAAACBQAAAAl2YWx1ZUpTT04FAAAAA2tleQMJAAAAAAAAAgUAAAALdmFsdWVJbkpzb24FAAAACG5ld1ZhbHVlCQAAAgAAAAECAAAAGHNhbWUgdmFsdWUgc28gbm8gY2hhbmdlcwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAHanNvbktleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAA92YWx1ZUJlZm9yZUpzb24CAAAAASIFAAAACG5ld1ZhbHVlAgAAAAEiBQAAAA52YWx1ZUFmdGVySnNvbgUAAAADbmlsAAAAAAk3sTc=", "chainId": 84, "height": 789550, "spentComplexity": 0 } View: original | compacted Prev: FVFYycKTKGy9mPknvnoiumLpxaoEq8vtXcFAQNKRdoad Next: 7ZTTgsACCTpLzeE8n5i1yj8TE3iVuFNLq7NzPZd1afkk Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | - | func i (b) = take(drop(b, 1), value(indexOf(drop(b, 1), "\""))) | |
32 | - | ||
33 | - | ||
34 | - | @Callable(j) | |
35 | - | func testUpdateJsonKeyValue (k,c,l) = { | |
36 | - | let m = { | |
37 | - | let n = getString(this, k) | |
38 | - | if ($isInstanceOf(n, "String")) | |
31 | + | @Callable(i) | |
32 | + | func testUpdateJsonKeyValue (j,c,k) = { | |
33 | + | let l = { | |
34 | + | let m = getString(this, j) | |
35 | + | if ($isInstanceOf(m, "String")) | |
39 | 36 | then { | |
40 | - | let | |
41 | - | | |
37 | + | let n = m | |
38 | + | n | |
42 | 39 | } | |
43 | 40 | else throw("The key doesn't exist") | |
44 | 41 | } | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | if (( | |
42 | + | let o = f(l, c) | |
43 | + | let p = g(l, c, size(a(l, c))) | |
44 | + | let q = a(l, c) | |
45 | + | if ((q == k)) | |
49 | 46 | then throw("same value so no changes") | |
50 | - | else WriteSet([DataEntry( | |
47 | + | else WriteSet([DataEntry(j, ((((o + "\"") + k) + "\"") + p))]) | |
51 | 48 | } | |
52 | 49 | ||
53 | 50 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func a (b,c) = if ((c != "first_name")) | |
5 | 5 | then throw("You cannot update this property") | |
6 | 6 | else { | |
7 | 7 | let d = value(indexOf(b, (("\"" + c) + "\":"))) | |
8 | 8 | let e = drop(b, ((d + size(c)) + 3)) | |
9 | 9 | e | |
10 | 10 | } | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func f (b,c) = if ((c != "first_name")) | |
14 | 14 | then throw("You cannot update this property") | |
15 | 15 | else { | |
16 | 16 | let d = value(indexOf(b, (("\"" + c) + "\":"))) | |
17 | 17 | let e = take(b, ((d + size(c)) + 3)) | |
18 | 18 | e | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func g (b,c,h) = if ((c != "first_name")) | |
23 | 23 | then throw("You cannot update this property") | |
24 | 24 | else { | |
25 | 25 | let d = value(indexOf(b, (("\"" + c) + "\":"))) | |
26 | 26 | let e = takeRight(b, (size(b) - ((((d + size(c)) + 3) + h) + 2))) | |
27 | 27 | e | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | ||
31 | - | func i (b) = take(drop(b, 1), value(indexOf(drop(b, 1), "\""))) | |
32 | - | ||
33 | - | ||
34 | - | @Callable(j) | |
35 | - | func testUpdateJsonKeyValue (k,c,l) = { | |
36 | - | let m = { | |
37 | - | let n = getString(this, k) | |
38 | - | if ($isInstanceOf(n, "String")) | |
31 | + | @Callable(i) | |
32 | + | func testUpdateJsonKeyValue (j,c,k) = { | |
33 | + | let l = { | |
34 | + | let m = getString(this, j) | |
35 | + | if ($isInstanceOf(m, "String")) | |
39 | 36 | then { | |
40 | - | let | |
41 | - | | |
37 | + | let n = m | |
38 | + | n | |
42 | 39 | } | |
43 | 40 | else throw("The key doesn't exist") | |
44 | 41 | } | |
45 | - | let | |
46 | - | let | |
47 | - | let | |
48 | - | if (( | |
42 | + | let o = f(l, c) | |
43 | + | let p = g(l, c, size(a(l, c))) | |
44 | + | let q = a(l, c) | |
45 | + | if ((q == k)) | |
49 | 46 | then throw("same value so no changes") | |
50 | - | else WriteSet([DataEntry( | |
47 | + | else WriteSet([DataEntry(j, ((((o + "\"") + k) + "\"") + p))]) | |
51 | 48 | } | |
52 | 49 | ||
53 | 50 |
github/deemru/w8io/169f3d6 36.09 ms ◑