tx · H1chrA1GmjAAzkypojKFU3CBJhjGjNunkdktdveX7294 3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp: -0.00100000 Waves 2024.11.11 23:45 [3367290] smart account 3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp > SELF 0.00000000 Waves
{ "type": 13, "id": "H1chrA1GmjAAzkypojKFU3CBJhjGjNunkdktdveX7294", "fee": 100000, "feeAssetId": null, "timestamp": 1731357964559, "version": 1, "sender": "3MzgLbskN82suZgkmqTvzQxDtZfjQfX1DLp", "senderPublicKey": "B5p5JF1Hn7k2YwGxQxgFre8bM5pd7N2c6wPdyKdLzzd6", "proofs": [ "3X1Yk7B6TBxidjJSwo7dxucte5L5nVQ5qWZR6GUEyznV968KSZBxYw836kREft1bBMBuEo48sPTS2khnV4agGZJ7" ], "script": "base64:CAIECAISAAABAWkBDWRpc2FibGVTY3JpcHQACQDMCAIJAQxCb29sZWFuRW50cnkCAg9zY3JpcHRfZGlzYWJsZWQGBQNuaWwAv+7OpA==", "chainId": 84, "height": 3367290, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6aLMzw8QnK8tXCmDdAWjHbJB38jttvpeRFViZYRv6ij7 Next: AFfBiZSRuhTTKBpXHj2DN1UCXccnAuVQ5KusNjHjuc8L Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | - | func checkAndIncrementCounter (b) = { | |
8 | - | let c = (b + "_hourlyTxCount") | |
9 | - | let d = (b + "_dailyTxCount") | |
10 | - | let e = (b + "_allowed") | |
11 | - | let f = { | |
12 | - | let g = getInteger(this, c) | |
13 | - | if ($isInstanceOf(g, "Int")) | |
14 | - | then { | |
15 | - | let h = g | |
16 | - | h | |
17 | - | } | |
18 | - | else 0 | |
19 | - | } | |
20 | - | let i = { | |
21 | - | let g = getInteger(this, d) | |
22 | - | if ($isInstanceOf(g, "Int")) | |
23 | - | then { | |
24 | - | let h = g | |
25 | - | h | |
26 | - | } | |
27 | - | else 0 | |
28 | - | } | |
29 | - | let j = 100 | |
30 | - | let k = 200 | |
31 | - | if ((f >= j)) | |
32 | - | then throw("Hourly limit exceeded") | |
33 | - | else if ((i >= k)) | |
34 | - | then throw("Daily limit exceeded") | |
35 | - | else { | |
36 | - | let l = (f + 1) | |
37 | - | let m = (i + 1) | |
38 | - | let n = [IntegerEntry(c, l), IntegerEntry(d, m), BooleanEntry(e, true)] | |
39 | - | let o = getInteger(this, c) | |
40 | - | let p = getInteger(this, d) | |
41 | - | let g = o | |
42 | - | if ($isInstanceOf(g, "Int")) | |
43 | - | then { | |
44 | - | let h = g | |
45 | - | let q = p | |
46 | - | if ($isInstanceOf(q, "Int")) | |
47 | - | then { | |
48 | - | let r = q | |
49 | - | if (if ((h == l)) | |
50 | - | then (r == m) | |
51 | - | else false) | |
52 | - | then n | |
53 | - | else throw("Data update failed") | |
54 | - | } | |
55 | - | else throw("Failed to get daily count") | |
56 | - | } | |
57 | - | else throw("Failed to get hourly count") | |
58 | - | } | |
59 | - | } | |
7 | + | func disableScript () = [BooleanEntry("script_disabled", true)] | |
60 | 8 | ||
61 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 8 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | - | func checkAndIncrementCounter (b) = { | |
8 | - | let c = (b + "_hourlyTxCount") | |
9 | - | let d = (b + "_dailyTxCount") | |
10 | - | let e = (b + "_allowed") | |
11 | - | let f = { | |
12 | - | let g = getInteger(this, c) | |
13 | - | if ($isInstanceOf(g, "Int")) | |
14 | - | then { | |
15 | - | let h = g | |
16 | - | h | |
17 | - | } | |
18 | - | else 0 | |
19 | - | } | |
20 | - | let i = { | |
21 | - | let g = getInteger(this, d) | |
22 | - | if ($isInstanceOf(g, "Int")) | |
23 | - | then { | |
24 | - | let h = g | |
25 | - | h | |
26 | - | } | |
27 | - | else 0 | |
28 | - | } | |
29 | - | let j = 100 | |
30 | - | let k = 200 | |
31 | - | if ((f >= j)) | |
32 | - | then throw("Hourly limit exceeded") | |
33 | - | else if ((i >= k)) | |
34 | - | then throw("Daily limit exceeded") | |
35 | - | else { | |
36 | - | let l = (f + 1) | |
37 | - | let m = (i + 1) | |
38 | - | let n = [IntegerEntry(c, l), IntegerEntry(d, m), BooleanEntry(e, true)] | |
39 | - | let o = getInteger(this, c) | |
40 | - | let p = getInteger(this, d) | |
41 | - | let g = o | |
42 | - | if ($isInstanceOf(g, "Int")) | |
43 | - | then { | |
44 | - | let h = g | |
45 | - | let q = p | |
46 | - | if ($isInstanceOf(q, "Int")) | |
47 | - | then { | |
48 | - | let r = q | |
49 | - | if (if ((h == l)) | |
50 | - | then (r == m) | |
51 | - | else false) | |
52 | - | then n | |
53 | - | else throw("Data update failed") | |
54 | - | } | |
55 | - | else throw("Failed to get daily count") | |
56 | - | } | |
57 | - | else throw("Failed to get hourly count") | |
58 | - | } | |
59 | - | } | |
7 | + | func disableScript () = [BooleanEntry("script_disabled", true)] | |
60 | 8 | ||
61 | 9 |
github/deemru/w8io/026f985 28.12 ms ◑