tx · AcQird1Wra3kVemomkMFpwck1PMSFu1Ki4JiJpANWboN 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o: -0.01000000 Waves 2022.05.01 21:42 [2032998] smart account 3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o > SELF 0.00000000 Waves
{ "type": 13, "id": "AcQird1Wra3kVemomkMFpwck1PMSFu1Ki4JiJpANWboN", "fee": 1000000, "feeAssetId": null, "timestamp": 1651430575883, "version": 2, "chainId": 84, "sender": "3MqQhA21mw1UHWmdGMV9M9xQL1cpC93LF8o", "senderPublicKey": "E3TwKTkJRoqHq8mpKDYP1GvftP8ECfnCUT5atXuMXq53", "proofs": [ "WSMwKgkPE6nD2qdx6eLi2mJZUVwFsdNCVjGEL54m2rhHjx4ZnmptCvL5rTyKswdeGPVwpNr1Kqu5FEAC27LKN3g" ], "script": "base64:AAIFAAAAAAAAAAoIAhIECgIICBIAAAAADAAAAAANUEFZTUVOVF9BU1NFVAEAAAAgrZ1IFoWReWfvw0p6hpnR3VDpBUk85P5AREeM4YPEwvQAAAAADFJFV0FSRF9BU1NFVAEAAAAgLTcTgdMkN12f4W9209EPk+8sLPTdia1cSlbofMkBchsAAAAABnBpeGVscwUAAAAMUkVXQVJEX0FTU0VUAAAAAAR4TUlOAAAAAAAAAAAAAAAAAAR4TUFYAAAAAAAAAASxAAAAAAR5TUlOAAAAAAAAAAAAAAAAAAR5TUFYAAAAAAAAAAJZAAAAAA1SRVdBUkRfQU1PVU5UAAAAAAAF9eEAAAAAAAxTVEFSVF9IRUlHSFQAAAAAAAAe8fQAAAAACkVORF9IRUlHSFQJAABkAAAAAgUAAAAMU1RBUlRfSEVJR0hUCQAAaAAAAAIAAAAAAAAABaAAAAAAAAAAAB4AAAAABmNvbG9ycwkABEwAAAACAgAAAAMwMDAJAARMAAAAAgIAAAADZmZmCQAETAAAAAICAAAABjAwMDAwMAkABEwAAAACAgAAAAZmZmZmZmYJAARMAAAAAgIAAAAGRkYwMjAwCQAETA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AAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA1SRVdBUkRfQU1PVU5UBQAAAAZwaXhlbHMFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAkAAAIAAAABAgAAAA5vdXQgb2YgY29udGV4dAkAAAIAAAABAgAAAAt3cm9uZyBjb2xvcgkAAAIAAAABAgAAABxnYW1lIGlzIG5vdCBhY3RpdmUgcmlnaHQgbm93AAAAAWkBAAAACHNodXRkb3duAAAAAAkAAAIAAAABAgAAAAR0ZXN0AAAAAON7H2U=", "height": 2032998, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8DQa5kJ3drKts1bo19DfwbRyJeLBtQe5JqEa3JaBnrMd Next: FJnJdb4yWC1X4dbHN8W6xkWRjy1Ww7dGS2HtcYV7jaCF Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = 601 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 100000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 2028020 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = (i + (1440 * 30)) | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"] | |
25 | 25 | ||
26 | - | let l = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"] | |
27 | - | ||
28 | - | func m (n) = { | |
29 | - | let o = a | |
30 | - | if ((size(n.payments) == 0)) | |
26 | + | func l (m) = { | |
27 | + | let n = a | |
28 | + | if ((size(m.payments) == 0)) | |
31 | 29 | then throw("Payment not attached") | |
32 | 30 | else { | |
33 | - | let | |
34 | - | let | |
35 | - | if ($isInstanceOf( | |
31 | + | let o = m.payments[0] | |
32 | + | let p = o.assetId | |
33 | + | if ($isInstanceOf(p, "ByteVector")) | |
36 | 34 | then { | |
37 | - | let | |
38 | - | if (( | |
39 | - | then ( | |
35 | + | let q = p | |
36 | + | if ((q == n)) | |
37 | + | then (o.amount == 1000000) | |
40 | 38 | else false | |
41 | 39 | } | |
42 | 40 | else throw("Wrong payment asset") | |
44 | 42 | } | |
45 | 43 | ||
46 | 44 | ||
47 | - | @Callable( | |
48 | - | func coordinates (s | |
49 | - | then ( | |
45 | + | @Callable(m) | |
46 | + | func coordinates (r,s) = if (if ((height > i)) | |
47 | + | then (j > height) | |
50 | 48 | else false) | |
51 | 49 | then { | |
52 | - | let | |
53 | - | if ( | |
50 | + | let t = containsElement(k, r) | |
51 | + | if (t) | |
54 | 52 | then { | |
55 | - | let | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | if (if ((( | |
60 | - | then (( | |
53 | + | let u = toBase58String(m.caller.bytes) | |
54 | + | let v = split(s, "_") | |
55 | + | let w = valueOrElse(parseInt(v[0]), 0) | |
56 | + | let x = valueOrElse(parseInt(v[1]), 0) | |
57 | + | if (if (((w % 8) != 0)) | |
58 | + | then ((x % 8) != 0) | |
61 | 59 | else false) | |
62 | 60 | then throw("not cool.") | |
63 | 61 | else { | |
64 | - | let | |
65 | - | let | |
66 | - | if (if (if (if (( | |
67 | - | then (e > | |
62 | + | let y = ((toString(w) + "_") + toString(x)) | |
63 | + | let z = (((u + "_") + y) + "_c") | |
64 | + | if (if (if (if ((w >= d)) | |
65 | + | then (e > w) | |
68 | 66 | else false) | |
69 | - | then ( | |
67 | + | then (x >= f) | |
70 | 68 | else false) | |
71 | - | then (g > | |
69 | + | then (g > x) | |
72 | 70 | else false) | |
73 | - | then if (m | |
74 | - | then [StringEntry( | |
71 | + | then if (l(m)) | |
72 | + | then [StringEntry(z, r), ScriptTransfer(m.caller, h, c)] | |
75 | 73 | else throw("Wrong payment amount or asset") | |
76 | 74 | else throw("out of context") | |
77 | 75 | } | |
82 | 80 | ||
83 | 81 | ||
84 | 82 | ||
85 | - | @Callable( | |
83 | + | @Callable(m) | |
86 | 84 | func shutdown () = throw("test") | |
87 | 85 | ||
88 | 86 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'CgidgEMbCKXXErgJXVyZCFRaK8SBNA73Jg8mNXALtVKh' | |
5 | 5 | ||
6 | 6 | let b = base58'43W4FcqA1rEpSmUGHoGiXvpSLfhadws9LS5j3SJsKxxS' | |
7 | 7 | ||
8 | 8 | let c = b | |
9 | 9 | ||
10 | 10 | let d = 0 | |
11 | 11 | ||
12 | 12 | let e = 1201 | |
13 | 13 | ||
14 | 14 | let f = 0 | |
15 | 15 | ||
16 | 16 | let g = 601 | |
17 | 17 | ||
18 | - | let h = | |
18 | + | let h = 100000000 | |
19 | 19 | ||
20 | - | let i = | |
20 | + | let i = 2028020 | |
21 | 21 | ||
22 | - | let j = | |
22 | + | let j = (i + (1440 * 30)) | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"] | |
25 | 25 | ||
26 | - | let l = ["000", "fff", "000000", "ffffff", "FF0200", "800080", "FF00FF", "008001", "FEFF00", "020080", "0800FF", "183937", "09FEFF", "7076E9", "C0C0C0", "C3103B", "ff0200", "ff00ff", "feff00", "0800ff", "09feff", "7076e9", "c0c0c0", "c3103b"] | |
27 | - | ||
28 | - | func m (n) = { | |
29 | - | let o = a | |
30 | - | if ((size(n.payments) == 0)) | |
26 | + | func l (m) = { | |
27 | + | let n = a | |
28 | + | if ((size(m.payments) == 0)) | |
31 | 29 | then throw("Payment not attached") | |
32 | 30 | else { | |
33 | - | let | |
34 | - | let | |
35 | - | if ($isInstanceOf( | |
31 | + | let o = m.payments[0] | |
32 | + | let p = o.assetId | |
33 | + | if ($isInstanceOf(p, "ByteVector")) | |
36 | 34 | then { | |
37 | - | let | |
38 | - | if (( | |
39 | - | then ( | |
35 | + | let q = p | |
36 | + | if ((q == n)) | |
37 | + | then (o.amount == 1000000) | |
40 | 38 | else false | |
41 | 39 | } | |
42 | 40 | else throw("Wrong payment asset") | |
43 | 41 | } | |
44 | 42 | } | |
45 | 43 | ||
46 | 44 | ||
47 | - | @Callable( | |
48 | - | func coordinates (s | |
49 | - | then ( | |
45 | + | @Callable(m) | |
46 | + | func coordinates (r,s) = if (if ((height > i)) | |
47 | + | then (j > height) | |
50 | 48 | else false) | |
51 | 49 | then { | |
52 | - | let | |
53 | - | if ( | |
50 | + | let t = containsElement(k, r) | |
51 | + | if (t) | |
54 | 52 | then { | |
55 | - | let | |
56 | - | let | |
57 | - | let | |
58 | - | let | |
59 | - | if (if ((( | |
60 | - | then (( | |
53 | + | let u = toBase58String(m.caller.bytes) | |
54 | + | let v = split(s, "_") | |
55 | + | let w = valueOrElse(parseInt(v[0]), 0) | |
56 | + | let x = valueOrElse(parseInt(v[1]), 0) | |
57 | + | if (if (((w % 8) != 0)) | |
58 | + | then ((x % 8) != 0) | |
61 | 59 | else false) | |
62 | 60 | then throw("not cool.") | |
63 | 61 | else { | |
64 | - | let | |
65 | - | let | |
66 | - | if (if (if (if (( | |
67 | - | then (e > | |
62 | + | let y = ((toString(w) + "_") + toString(x)) | |
63 | + | let z = (((u + "_") + y) + "_c") | |
64 | + | if (if (if (if ((w >= d)) | |
65 | + | then (e > w) | |
68 | 66 | else false) | |
69 | - | then ( | |
67 | + | then (x >= f) | |
70 | 68 | else false) | |
71 | - | then (g > | |
69 | + | then (g > x) | |
72 | 70 | else false) | |
73 | - | then if (m | |
74 | - | then [StringEntry( | |
71 | + | then if (l(m)) | |
72 | + | then [StringEntry(z, r), ScriptTransfer(m.caller, h, c)] | |
75 | 73 | else throw("Wrong payment amount or asset") | |
76 | 74 | else throw("out of context") | |
77 | 75 | } | |
78 | 76 | } | |
79 | 77 | else throw("wrong color") | |
80 | 78 | } | |
81 | 79 | else throw("game is not active right now") | |
82 | 80 | ||
83 | 81 | ||
84 | 82 | ||
85 | - | @Callable( | |
83 | + | @Callable(m) | |
86 | 84 | func shutdown () = throw("test") | |
87 | 85 | ||
88 | 86 |
github/deemru/w8io/169f3d6 55.79 ms ◑