tx · E42CmHak6pQ53PTAtt1uLXrNPfu8nMMe7amDSmjhPXU4 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx: -0.01000000 Waves 2023.05.27 17:41 [2596498] smart account 3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx > SELF 0.00000000 Waves
{ "type": 13, "id": "E42CmHak6pQ53PTAtt1uLXrNPfu8nMMe7amDSmjhPXU4", "fee": 1000000, "feeAssetId": null, "timestamp": 1685198512061, "version": 2, "chainId": 84, "sender": "3N7eEzkCtBoWaNRe4ZuTPrChbnjBLKDb9Bx", "senderPublicKey": "2NK7BrUZMvnHzAoHnJfz3FuDBP5zYUNoxshB49AH2kbc", "proofs": [ "YRGTBj6ocotP3HGW5FYwaJ6adv4YTZw6fsm8NzXiRaqFJB27wNkLXaohhW99VLXREYeNL1MfvW2d6q9h31gQvPM" ], "script": "base64:BgISCAISAwoBCBIDCgEIEgQKAgEIDQAJc2VwYXJhdG9yAgEvABFrTGFzdEl0ZXJhdGlvbkxlbgIQbGFzdEl0ZXJhdGlvbkxlbgAQa0l0ZXJhdGlvbnNDb3VudAIPaXRlcmF0aW9uc0NvdW50ABFrSW5jcmVtZW50Q291bnRlcgIQaW5jcmVtZW50Q291bnRlcgAPa0N1cnJlbnRCYWxhbmNlAg5jdXJyZW50QmFsYW5jZQAJa0lzQWN0aXZlAghpc0FjdGl2ZQANTUFYX0lOQ1JFTUVOVABgABdjdXJyZW50TGFzdEl0ZXJhdGlvbkxlbgkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFBHRoaXMFEWtMYXN0SXRlcmF0aW9uTGVuAh9MYXN0IGl0ZXJhdGlvbiBzdG9yZSByZWFkIGVycm9yABZjdXJyZW50SXRlcmF0aW9uc0NvdW50CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUEdGhpcwUQa0l0ZXJhdGlvbnNDb3VudAIaSXRlcmF0aW9uIHN0b3JlIHJlYWQgZXJyb3IAF2N1c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29sZWFuRW50cnkCBQlrSXNBY3RpdmUHBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAhZTdG9yYWdlIGlzIGluY3JlbWVudGVkAWkBDmluY3JlbWVudFN0b3JlAgVyYW5nZQNrZXkDCQBnAgUFcmFuZ2UAAAQKc3RvcmVWYWx1ZQkArAICCQCsAgIJAKUIAQgFAWkMb3JpZ2luQ2FsbGVyBQlzZXBhcmF0b3IJAKQDAQUOY3VycmVudEJhbGFuY2UEA3JlcwkA/AcEBQR0aGlzAg5pbmNyZW1lbnRTdG9yZQkAzAgCCQBlAgUFcmFuZ2UAAQkAzAgCBQNrZXkFA25pbAUDbmlsAwkAAAIFA3JlcwUDcmVzCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICBQNrZXkFCXNlcGFyYXRvcgkApAMBCQBkAgUFcmFuZ2UFF2N1cnJlbnRJbmNyZW1lbnRDb3VudGVyBQpzdG9yZVZhbHVlBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4FA25pbADG/EQv", "height": 2596498, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J2fTNr5LcXEGcvGQx7E1FL5HEMgQ3xXZfg4KyvoqisoP Next: Huj8U4pda59oypqYfpm2Yck5SPxp7XYZvSQuN1XEpwwS Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "/" | |
5 | + | ||
6 | + | let b = "lastIterationLen" | |
7 | + | ||
8 | + | let c = "iterationsCount" | |
9 | + | ||
10 | + | let d = "incrementCounter" | |
11 | + | ||
12 | + | let e = "currentBalance" | |
13 | + | ||
14 | + | let f = "isActive" | |
15 | + | ||
16 | + | let g = 96 | |
17 | + | ||
18 | + | let h = valueOrErrorMessage(getInteger(this, b), "Last iteration store read error") | |
19 | + | ||
20 | + | let i = valueOrErrorMessage(getInteger(this, c), "Iteration store read error") | |
21 | + | ||
22 | + | let j = valueOrErrorMessage(getInteger(this, d), "Increment store read error") | |
23 | + | ||
24 | + | let k = valueOrErrorMessage(getInteger(this, e), "Balance store read error") | |
25 | + | ||
26 | + | let l = valueOrErrorMessage(getInteger(this, "usersCounter"), "Range store read error") | |
27 | + | ||
28 | + | let m = valueOrElse(getBoolean(this, f), false) | |
29 | + | ||
30 | + | @Callable(n) | |
31 | + | func enableMassIncrement (o) = if (m) | |
32 | + | then throw("Function blocked") | |
33 | + | else { | |
34 | + | let p = fraction(1, l, g) | |
35 | + | let q = (l % g) | |
36 | + | let r = getStringValue(this, ((o + a) + toString((l - 1)))) | |
37 | + | let s = split(r, a) | |
38 | + | let t = (parseIntValue(s[1]) + 1) | |
39 | + | [IntegerEntry(b, q), IntegerEntry(c, p), IntegerEntry(d, 0), IntegerEntry(e, t)] | |
40 | + | } | |
4 | 41 | ||
5 | 42 | ||
6 | - | @Callable(a) | |
7 | - | func foo (b) = if ((b > 0)) | |
43 | + | ||
44 | + | @Callable(n) | |
45 | + | func massIncrement (o) = if ((i != 0)) | |
8 | 46 | then { | |
9 | - | let c = reentrantInvoke(this, "foo", [(b - 1)], nil) | |
10 | - | if ((c == c)) | |
11 | - | then [IntegerEntry("value", b)] | |
47 | + | let u = reentrantInvoke(this, "incrementStore", [g, o], nil) | |
48 | + | if ((u == u)) | |
49 | + | then [IntegerEntry(d, (j + g)), IntegerEntry(c, (i - 1)), BooleanEntry(f, true)] | |
50 | + | else throw("Strict value is not equal to itself.") | |
51 | + | } | |
52 | + | else if (if ((i == 0)) | |
53 | + | then (h != 0) | |
54 | + | else false) | |
55 | + | then { | |
56 | + | let v = reentrantInvoke(this, "incrementStore", [h, o], nil) | |
57 | + | if ((v == v)) | |
58 | + | then [IntegerEntry(d, (j + h)), IntegerEntry(b, 0), BooleanEntry(f, false)] | |
59 | + | else throw("Strict value is not equal to itself.") | |
60 | + | } | |
61 | + | else throw("Storage is incremented") | |
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | @Callable(n) | |
66 | + | func incrementStore (l,o) = if ((l >= 0)) | |
67 | + | then { | |
68 | + | let w = ((toString(n.originCaller) + a) + toString(k)) | |
69 | + | let x = invoke(this, "incrementStore", [(l - 1), o], nil) | |
70 | + | if ((x == x)) | |
71 | + | then [StringEntry(((o + a) + toString((l + j))), w)] | |
12 | 72 | else throw("Strict value is not equal to itself.") | |
13 | 73 | } | |
14 | 74 | else nil |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "/" | |
5 | + | ||
6 | + | let b = "lastIterationLen" | |
7 | + | ||
8 | + | let c = "iterationsCount" | |
9 | + | ||
10 | + | let d = "incrementCounter" | |
11 | + | ||
12 | + | let e = "currentBalance" | |
13 | + | ||
14 | + | let f = "isActive" | |
15 | + | ||
16 | + | let g = 96 | |
17 | + | ||
18 | + | let h = valueOrErrorMessage(getInteger(this, b), "Last iteration store read error") | |
19 | + | ||
20 | + | let i = valueOrErrorMessage(getInteger(this, c), "Iteration store read error") | |
21 | + | ||
22 | + | let j = valueOrErrorMessage(getInteger(this, d), "Increment store read error") | |
23 | + | ||
24 | + | let k = valueOrErrorMessage(getInteger(this, e), "Balance store read error") | |
25 | + | ||
26 | + | let l = valueOrErrorMessage(getInteger(this, "usersCounter"), "Range store read error") | |
27 | + | ||
28 | + | let m = valueOrElse(getBoolean(this, f), false) | |
29 | + | ||
30 | + | @Callable(n) | |
31 | + | func enableMassIncrement (o) = if (m) | |
32 | + | then throw("Function blocked") | |
33 | + | else { | |
34 | + | let p = fraction(1, l, g) | |
35 | + | let q = (l % g) | |
36 | + | let r = getStringValue(this, ((o + a) + toString((l - 1)))) | |
37 | + | let s = split(r, a) | |
38 | + | let t = (parseIntValue(s[1]) + 1) | |
39 | + | [IntegerEntry(b, q), IntegerEntry(c, p), IntegerEntry(d, 0), IntegerEntry(e, t)] | |
40 | + | } | |
4 | 41 | ||
5 | 42 | ||
6 | - | @Callable(a) | |
7 | - | func foo (b) = if ((b > 0)) | |
43 | + | ||
44 | + | @Callable(n) | |
45 | + | func massIncrement (o) = if ((i != 0)) | |
8 | 46 | then { | |
9 | - | let c = reentrantInvoke(this, "foo", [(b - 1)], nil) | |
10 | - | if ((c == c)) | |
11 | - | then [IntegerEntry("value", b)] | |
47 | + | let u = reentrantInvoke(this, "incrementStore", [g, o], nil) | |
48 | + | if ((u == u)) | |
49 | + | then [IntegerEntry(d, (j + g)), IntegerEntry(c, (i - 1)), BooleanEntry(f, true)] | |
50 | + | else throw("Strict value is not equal to itself.") | |
51 | + | } | |
52 | + | else if (if ((i == 0)) | |
53 | + | then (h != 0) | |
54 | + | else false) | |
55 | + | then { | |
56 | + | let v = reentrantInvoke(this, "incrementStore", [h, o], nil) | |
57 | + | if ((v == v)) | |
58 | + | then [IntegerEntry(d, (j + h)), IntegerEntry(b, 0), BooleanEntry(f, false)] | |
59 | + | else throw("Strict value is not equal to itself.") | |
60 | + | } | |
61 | + | else throw("Storage is incremented") | |
62 | + | ||
63 | + | ||
64 | + | ||
65 | + | @Callable(n) | |
66 | + | func incrementStore (l,o) = if ((l >= 0)) | |
67 | + | then { | |
68 | + | let w = ((toString(n.originCaller) + a) + toString(k)) | |
69 | + | let x = invoke(this, "incrementStore", [(l - 1), o], nil) | |
70 | + | if ((x == x)) | |
71 | + | then [StringEntry(((o + a) + toString((l + j))), w)] | |
12 | 72 | else throw("Strict value is not equal to itself.") | |
13 | 73 | } | |
14 | 74 | else nil | |
15 | 75 | ||
16 | 76 |
github/deemru/w8io/026f985 25.29 ms ◑