tx · 84VoT8biS9VYSbVe9hzYEiqSdkDoBDzFG1HUWy5adPU 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6: -0.01000000 Waves 2021.12.04 18:03 [1819691] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves
{ "type": 13, "id": "84VoT8biS9VYSbVe9hzYEiqSdkDoBDzFG1HUWy5adPU", "fee": 1000000, "feeAssetId": null, "timestamp": 1638630248780, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "4B1tzv8FNs75qHmYJUo8zqkHoxtEW19KxCTM1v9yQmTXF9ygaFmEkCTm7JSqwoKY9cYQgTawp3d5Wbfe2Jis6Aky" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAdyZWNvcmRzBQAAAANuaWwKAQAAAAd2YWxpZHh5AAAAAQAAAAF4BAAAAAckbWF0Y2gwCQAEtgAAAAEJAAGRAAAAAgUAAAAFcGl4eHkFAAAAAXgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGN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AAAAAAAAAQAAAAAAAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAGbWFzdGVyCQEAAAANcGFyc2VJbnRWYWx1ZQAAAAEJAAGRAAAAAgkAAZEAAAACBQAAAANhbGwAAAAAAAAAAAQAAAAAAAAAAAMFAAAABHVuaXQFAAAAA25pbAUAAAAEdW5pdAAAAAAqTMH4", "height": 1819691, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9cs1ZehTh3nTURunE8UBy53a2YL1wSHSHzvVQu5p8WgV Next: 4ncEewfzv1YQiJ3Et4WJ1JtjeqPCE6sVbdY3hud2Y5NR Diff:
Old | New | Differences | |
---|---|---|---|
48 | 48 | [g[k], makeString([f, toString((p + parseIntValue(c))), "color", "url"], b), "", toString(p)] | |
49 | 49 | } | |
50 | 50 | ||
51 | - | func q (k) = | |
52 | - | | |
53 | - | | |
54 | - | | |
55 | - | | |
56 | - | | |
57 | - | | |
58 | - | | |
59 | - | | |
60 | - | | |
61 | - | | |
51 | + | func q (k) = if ((h > k)) | |
52 | + | then { | |
53 | + | let l = parseInt(split(getStringValue(g[k]), b)[1]) | |
54 | + | if ($isInstanceOf(l, "Int")) | |
55 | + | then { | |
56 | + | let m = l | |
57 | + | parseIntValue(split(getStringValue(g[k]), b)[1]) | |
58 | + | } | |
59 | + | else 0 | |
60 | + | } | |
61 | + | else 0 | |
62 | 62 | ||
63 | 63 | let r = ((((q(0) + q(1)) + q(2)) + q(3)) + q(4)) | |
64 | 64 | let s = if ((size(d.payments) == 1)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = Address(base58'3MuW4t1jCXHt8WRsHVLUar32EnvJxZaQWAx') | |
5 | 5 | ||
6 | 6 | let b = "|||||" | |
7 | 7 | ||
8 | 8 | let c = "100000" | |
9 | 9 | ||
10 | 10 | @Callable(d) | |
11 | 11 | func paint (e) = { | |
12 | 12 | let f = toBase58String(d.caller.bytes) | |
13 | 13 | let g = split(e, b) | |
14 | 14 | let h = min([5, size(g)]) | |
15 | 15 | let i = nil | |
16 | 16 | func j (k) = { | |
17 | 17 | let l = parseInt(g[k]) | |
18 | 18 | if ($isInstanceOf(l, "Int")) | |
19 | 19 | then { | |
20 | 20 | let m = l | |
21 | 21 | if (if ((parseIntValue(g[k]) > -1)) | |
22 | 22 | then (1000 > parseIntValue(g[k])) | |
23 | 23 | else false) | |
24 | 24 | then parseInt(g[k]) | |
25 | 25 | else false | |
26 | 26 | } | |
27 | 27 | else false | |
28 | 28 | } | |
29 | 29 | ||
30 | 30 | func n (k) = { | |
31 | 31 | let l = getString(g[k]) | |
32 | 32 | if ($isInstanceOf(l, "String")) | |
33 | 33 | then { | |
34 | 34 | let m = l | |
35 | 35 | m | |
36 | 36 | } | |
37 | 37 | else false | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | func o (k) = if ((k > (h - 1))) | |
41 | 41 | then ["--", "--", "--", "0"] | |
42 | 42 | else if ((j(k) == false)) | |
43 | 43 | then ["--", "--", "--", "0"] | |
44 | 44 | else if ((n(k) == false)) | |
45 | 45 | then [g[k], makeString([f, c, "color", "url"], b), "", c] | |
46 | 46 | else { | |
47 | 47 | let p = parseIntValue(split(getStringValue(g[k]), b)[1]) | |
48 | 48 | [g[k], makeString([f, toString((p + parseIntValue(c))), "color", "url"], b), "", toString(p)] | |
49 | 49 | } | |
50 | 50 | ||
51 | - | func q (k) = | |
52 | - | | |
53 | - | | |
54 | - | | |
55 | - | | |
56 | - | | |
57 | - | | |
58 | - | | |
59 | - | | |
60 | - | | |
61 | - | | |
51 | + | func q (k) = if ((h > k)) | |
52 | + | then { | |
53 | + | let l = parseInt(split(getStringValue(g[k]), b)[1]) | |
54 | + | if ($isInstanceOf(l, "Int")) | |
55 | + | then { | |
56 | + | let m = l | |
57 | + | parseIntValue(split(getStringValue(g[k]), b)[1]) | |
58 | + | } | |
59 | + | else 0 | |
60 | + | } | |
61 | + | else 0 | |
62 | 62 | ||
63 | 63 | let r = ((((q(0) + q(1)) + q(2)) + q(3)) + q(4)) | |
64 | 64 | let s = if ((size(d.payments) == 1)) | |
65 | 65 | then d.payments[0] | |
66 | 66 | else throw(("Attached payment is required: " + toString(r))) | |
67 | 67 | if (isDefined(s.assetId)) | |
68 | 68 | then throw("works with waves only") | |
69 | 69 | else if ((r > s.amount)) | |
70 | 70 | then throw(((("you give: " + toString(s.amount)) + ", but deal needs: ") + toString(r))) | |
71 | 71 | else { | |
72 | 72 | let t = [o(0), o(1), o(2), o(3), o(4)] | |
73 | 73 | $Tuple2([StringEntry(t[0][0], t[0][1]), ScriptTransfer(a, parseIntValue(t[0][3]), unit), StringEntry(t[1][0], t[1][1]), ScriptTransfer(a, parseIntValue(t[1][3]), unit), StringEntry(t[2][0], t[2][1]), ScriptTransfer(a, parseIntValue(t[2][3]), unit), StringEntry(t[3][0], t[3][1]), ScriptTransfer(a, parseIntValue(t[3][3]), unit), StringEntry(t[4][0], t[4][1]), ScriptTransfer(a, parseIntValue(t[4][3]), unit)], unit) | |
74 | 74 | } | |
75 | 75 | } | |
76 | 76 | ||
77 | 77 |
github/deemru/w8io/169f3d6 50.48 ms ◑