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