tx · GSPPpSBysy66c8acxT4uWMQnCpKVByTHT4z8mtDwRht

3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH:  -0.01400000 Waves

2019.12.01 15:08 [789544] smart account 3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH > SELF 0.00000000 Waves

{ "type": 13, "id": "GSPPpSBysy66c8acxT4uWMQnCpKVByTHT4z8mtDwRht", "fee": 1400000, "feeAssetId": null, "timestamp": 1575202129861, "version": 1, "sender": "3MzFh27duAGxnMitPkGFPWCDHgyYZE3PUCH", "senderPublicKey": "GrgrmWgq1Ts1ncMDtq8xzKMBnvc5xPxwkcsK9EN5RskZ", "proofs": [ "3yyiEiK4jvwScAv9H8JWHxRn9Fz2eUkr1FWCj9mzicJ4r8xrFbmmxPsbD5wsmU3h9bDRQAsH58DusTUa3Kdm9F7v" ], "script": "base64:AAIDAAAAAAAAAAkIARIFCgMICAgAAAAEAQAAAANnZXQAAAACAAAABGpzb24AAAADa2V5AwkBAAAAAiE9AAAAAgUAAAADa2V5AgAAAApmaXJzdF9uYW1lCQAAAgAAAAECAAAAH1lvdSBjYW5ub3QgdXBkYXRlIHRoaXMgcHJvcGVydHkEAAAACGtleUluZGV4CQEAAAAFdmFsdWUAAAABCQAEswAAAAIFAAAABGpzb24JAAEsAAAAAgkAASwAAAACAgAAAAEiBQAAAANrZXkCAAAAAiI6BAAAAARkYXRhCQABMAAAAAIFAAAABGpzb24JAABkAAAAAgkAAGQAAAACBQAAAAhrZXlJbmRleAkAATEAAAABBQAAAANrZXkAAAAAAAAAAAMFAAAABGRhdGEBAAAAEGdldEpzb25CZWZvcmVLZXkAAAACAAAABGpzb24AAAADa2V5AwkBAAAAAiE9AAAAAgUAAAADa2V5AgAAAApmaXJzdF9uYW1lCQAAAgAAAAECAAAAH1lvdSBjYW5ub3QgdXBkYXRlIHRoaXMgcHJvcGVydHkEAAAACGtleUluZGV4CQEAAAAFdmFsdWUAAAABCQAEswAAAAIFAAAABGpzb24JAAEsAAAA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ZXkgZG9lc24ndCBleGlzdAQAAAAPdmFsdWVCZWZvcmVKc29uCQEAAAAQZ2V0SnNvbkJlZm9yZUtleQAAAAIFAAAACXZhbHVlSlNPTgUAAAADa2V5BAAAAA52YWx1ZUFmdGVySnNvbgkBAAAAD2dldEpzb25BZnRlcktleQAAAAMFAAAACXZhbHVlSlNPTgUAAAADa2V5CQABMQAAAAEJAQAAAA5nZXRWYWx1ZVN0cmluZwAAAAEJAQAAAANnZXQAAAACBQAAAAl2YWx1ZUpTT04FAAAAA2tleQQAAAALdmFsdWVJbkpzb24JAQAAAA5nZXRWYWx1ZVN0cmluZwAAAAEJAQAAAANnZXQAAAACBQAAAAl2YWx1ZUpTT04FAAAAA2tleQMJAAAAAAAAAgUAAAALdmFsdWVJbkpzb24FAAAACG5ld1ZhbHVlCQAAAgAAAAECAAAAGHNhbWUgdmFsdWUgc28gbm8gY2hhbmdlcwkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAHanNvbktleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAA92YWx1ZUJlZm9yZUpzb24CAAAAASIFAAAACG5ld1ZhbHVlAgAAAAEiBQAAAA52YWx1ZUFmdGVySnNvbgUAAAADbmlsAAAAAJIO/eU=", "chainId": 84, "height": 789544, "spentComplexity": 0 } View: original | compacted Prev: none Next: FVFYycKTKGy9mPknvnoiumLpxaoEq8vtXcFAQNKRdoad Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func a (b,c) = if ((c != "first_name"))
5+ then throw("You cannot update this property")
6+ else {
7+ let d = value(indexOf(b, (("\"" + c) + "\":")))
8+ let e = drop(b, ((d + size(c)) + 3))
9+ e
10+ }
11+
12+
13+func f (b,c) = if ((c != "first_name"))
14+ then throw("You cannot update this property")
15+ else {
16+ let d = value(indexOf(b, (("\"" + c) + "\":")))
17+ let e = take(b, ((d + size(c)) + 3))
18+ e
19+ }
20+
21+
22+func g (b,c,h) = if ((c != "first_name"))
23+ then throw("You cannot update this property")
24+ else {
25+ let d = value(indexOf(b, (("\"" + c) + "\":")))
26+ let e = takeRight(b, (size(b) - ((((d + size(c)) + 3) + h) + 2)))
27+ e
28+ }
29+
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"))
39+ then {
40+ let o = n
41+ o
42+ }
43+ else throw("The key doesn't exist")
44+ }
45+ let p = f(m, c)
46+ let q = g(m, c, size(i(a(m, c))))
47+ let r = i(a(m, c))
48+ if ((r == l))
49+ then throw("same value so no changes")
50+ else WriteSet([DataEntry(k, ((((p + "\"") + l) + "\"") + q))])
51+ }
52+
53+

github/deemru/w8io/169f3d6 
27.36 ms