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