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