tx · 4ncEewfzv1YQiJ3Et4WJ1JtjeqPCE6sVbdY3hud2Y5NR 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6: -0.01000000 Waves 2021.12.04 18:22 [1819710] smart account 3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6 > SELF 0.00000000 Waves
{ "type": 13, "id": "4ncEewfzv1YQiJ3Et4WJ1JtjeqPCE6sVbdY3hud2Y5NR", "fee": 1000000, "feeAssetId": null, "timestamp": 1638631348167, "version": 2, "chainId": 84, "sender": "3MuVEuhXaTvF3ELakZksUP77a4bT8gPJtm6", "senderPublicKey": "2LizaCNygFYwGFKe34vvFHgJc4ckK7MpzRzziRNn56Cu", "proofs": [ "ZfUgfkd1YJ8rBZJTJTQXJzDmVfd9yAUUGzye5mffZS5bmT7zSvtpym6c9MJNEHUzkcvHRD2oiBqYHmh7KMScG2q" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAwAAAAAGbWFzdGVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUPUYGSQjhSwi99Mcha5hyYJjHFzCelkk9AAAAAAVzZXBhcgIAAAAFfHx8fHwAAAAACWluaXRwcmljZQIAAAAGMTAwMDAwAAAAAQAAAAFpAQAAAAVwYWludAAAAAEAAAAFaWRhdGEEAAAADGNhbGxlckFkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwaXh4eQkABLUAAAACBQAAAAVpZGF0YQUAAAAFc2VwYXIEAAAABm51bWJlcgkAAZcAAAABCQAETAAAAAIAAAAAAAAAAAUJAARMAAAAAgkAAZAAAAABBQAAAAVwaXh4eQUAAAADbmlsBAAAAAdyZWNvcmRzBQAAAANuaWwKAQAAAAd2YWxpZHh5AAAAAQAAAAF4BAAAAAckbWF0Y2gwCQAEtgAAAAEJAAGRAAAAAgUAAAAFcGl4eHkFAAAAAXgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAA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UAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAAACQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAABm1hc3RlcgkBAAAADXBhcnNlSW50VmFsdWUAAAABCQABkQAAAAIJAAGRAAAAAgUAAAADYWxsAAAAAAAAAAAEAAAAAAAAAAADBQAAAAR1bml0BQAAAANuaWwFAAAABHVuaXQAAAAAkIIJFg==", "height": 1819710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 84VoT8biS9VYSbVe9hzYEiqSdkDoBDzFG1HUWy5adPU Next: 5a1d92LuVrxUERLnykqnzdY7nV1B6zgtUUBEkRHoj6zA 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) = if ((h > k)) | |
51 | + | func q (k) = if (if ((h > k)) | |
52 | + | then (n(k) != false) | |
53 | + | else false) | |
52 | 54 | then { | |
53 | 55 | let l = parseInt(split(getStringValue(g[k]), b)[1]) | |
54 | 56 | if ($isInstanceOf(l, "Int")) |
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) = if ((h > k)) | |
51 | + | func q (k) = if (if ((h > k)) | |
52 | + | then (n(k) != false) | |
53 | + | else false) | |
52 | 54 | then { | |
53 | 55 | let l = parseInt(split(getStringValue(g[k]), b)[1]) | |
54 | 56 | if ($isInstanceOf(l, "Int")) | |
55 | 57 | then { | |
56 | 58 | let m = l | |
57 | 59 | parseIntValue(split(getStringValue(g[k]), b)[1]) | |
58 | 60 | } | |
59 | 61 | else 0 | |
60 | 62 | } | |
61 | 63 | else 0 | |
62 | 64 | ||
63 | 65 | let r = ((((q(0) + q(1)) + q(2)) + q(3)) + q(4)) | |
64 | 66 | let s = if ((size(d.payments) == 1)) | |
65 | 67 | then d.payments[0] | |
66 | 68 | else throw(("Attached payment is required: " + toString(r))) | |
67 | 69 | if (isDefined(s.assetId)) | |
68 | 70 | then throw("works with waves only") | |
69 | 71 | else if ((r > s.amount)) | |
70 | 72 | then throw(((("you give: " + toString(s.amount)) + ", but deal needs: ") + toString(r))) | |
71 | 73 | else { | |
72 | 74 | let t = [o(0), o(1), o(2), o(3), o(4)] | |
73 | 75 | $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 | 76 | } | |
75 | 77 | } | |
76 | 78 | ||
77 | 79 |
github/deemru/w8io/169f3d6 27.75 ms ◑