tx · 8fx9EmbZc9oYMAjNT1CFeXVtvxYshG1ZoBYjH22P8Jwo 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX: -0.01000000 Waves 2021.12.15 07:52 [1834910] smart account 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX > SELF 0.00000000 Waves
{ "type": 13, "id": "8fx9EmbZc9oYMAjNT1CFeXVtvxYshG1ZoBYjH22P8Jwo", "fee": 1000000, "feeAssetId": null, "timestamp": 1639543949246, "version": 2, "chainId": 84, "sender": "3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX", "senderPublicKey": "HUca7AqRs4Zs9sU1AFcufmBC4XpT4sN79aFScNRT4LxQ", "proofs": [ "24URNg8GxbKbk185hY5uxtjT1qG9vmFneYX4R8BXdBG5t9vV1UcZB3vSL51HSNGzdvTxdQ6Bryny5ivGwDmhmhj7" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAAYAAAAABXRva2VuAQAAACD7/f1CuDsROS4HrrpzuTX1nPj4tgHygebqJ8ua8SYIHwAAAAAGdG9rZW5kAAAAAAAF9eEAAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUX+pzJtA2DV6Pr0xhS8z4foIVUAfq2c0IAAAAAAp0ZWFtQWRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUACYJT8ivNONGpFPWk1FdqVPAxApBcmLaAAAAAAhkZWFkbGluZQAAAAF9vHYogAAAAAAMYnVybmRlYWRsaW5lAAAACMRZQFMAAAAAAwAAAAFpAQAAAAVyZXNldAAAAAAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAVidXJudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHZHJvcHBlZA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GF0YQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAp0ZWFtQWRyZXNzBQAAAAtjYWxsZXJQcmljZQUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACnNlbGxhbW91bnQFAAAABXRva2VuCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAFdG9rZW4FAAAACmJ1cm5hbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAABWJ1cm50CQAAZAAAAAIJAQAAABFAZXh0ck5hdGl2ZSgxMDU1KQAAAAECAAAABWJ1cm50BQAAAApidXJuYW1vdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAABHNvbGQJAAGkAAAAAQUAAAAOY2FsbGVyQnV5bGV2ZWwJAABkAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTUpAAAAAQkAASwAAAACAgAAAARzb2xkCQABpAAAAAEFAAAADmNhbGxlckJ1eWxldmVsBQAAAApzZWxsYW1vdW50CQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAZfZXJyb3IFAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAGX2Vycm9yBQAAAARtZXNzBQAAAANuaWwAAAAAztGlmw==", "height": 1834910, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8NrRa6CfD1vQ3pqb3eTncpsLcndRHfrmzkvSu64T8X1Q Next: none Diff:
Old | New | Differences | |
---|---|---|---|
9 | 9 | ||
10 | 10 | let d = Address(base58'3MovsLjXpJr9HD2vBqmAf7Gze6jwuRxX1fX') | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 1639544400000 | |
13 | 13 | ||
14 | 14 | let f = 9639404000000 | |
15 | 15 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'HxfxmhGzE6eXC2xStY7WMJfHrNd2GYrXWqM2YM72vqN6' | |
5 | 5 | ||
6 | 6 | let b = 100000000 | |
7 | 7 | ||
8 | 8 | let c = Address(base58'3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX') | |
9 | 9 | ||
10 | 10 | let d = Address(base58'3MovsLjXpJr9HD2vBqmAf7Gze6jwuRxX1fX') | |
11 | 11 | ||
12 | - | let e = | |
12 | + | let e = 1639544400000 | |
13 | 13 | ||
14 | 14 | let f = 9639404000000 | |
15 | 15 | ||
16 | 16 | @Callable(g) | |
17 | 17 | func reset () = [DeleteEntry(toBase58String(g.caller.bytes)), IntegerEntry("burnt", 0), IntegerEntry("dropped", 0), IntegerEntry("sold1", 0), IntegerEntry("sold2", 0), IntegerEntry("teamgift", 0), IntegerEntry("issued", (1000000000 * 100000000)), StringEntry("burningstage", "waiting"), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))] | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | ||
21 | 21 | @Callable(g) | |
22 | 22 | func free (h) = { | |
23 | 23 | let i = (1000 * b) | |
24 | 24 | let j = (10 * b) | |
25 | 25 | let k = fromBase58String(h) | |
26 | 26 | let l = Address(g.caller.bytes) | |
27 | 27 | let m = { | |
28 | 28 | let n = blockInfoByHeight(height) | |
29 | 29 | if ($isInstanceOf(n, "BlockInfo")) | |
30 | 30 | then { | |
31 | 31 | let o = n | |
32 | 32 | o.timestamp | |
33 | 33 | } | |
34 | 34 | else throw("Can't find block") | |
35 | 35 | } | |
36 | 36 | let p = assetBalance(c, a) | |
37 | 37 | let q = if (if ((m > f)) | |
38 | 38 | then (getStringValue("burningstage") == "waiting") | |
39 | 39 | else false) | |
40 | 40 | then p | |
41 | 41 | else 0 | |
42 | 42 | let r = if ((p > i)) | |
43 | 43 | then true | |
44 | 44 | else false | |
45 | 45 | if ((r == r)) | |
46 | 46 | then { | |
47 | 47 | let s = { | |
48 | 48 | let n = transferTransactionById(k) | |
49 | 49 | if ($isInstanceOf(n, "TransferTransaction")) | |
50 | 50 | then { | |
51 | 51 | let t = n | |
52 | 52 | true | |
53 | 53 | } | |
54 | 54 | else false | |
55 | 55 | } | |
56 | 56 | let u = { | |
57 | 57 | let n = transferTransactionById(k) | |
58 | 58 | if ($isInstanceOf(n, "TransferTransaction")) | |
59 | 59 | then { | |
60 | 60 | let t = n | |
61 | 61 | t.timestamp | |
62 | 62 | } | |
63 | 63 | else 9999999999999 | |
64 | 64 | } | |
65 | 65 | let v = { | |
66 | 66 | let n = transferTransactionById(k) | |
67 | 67 | if ($isInstanceOf(n, "TransferTransaction")) | |
68 | 68 | then { | |
69 | 69 | let t = n | |
70 | 70 | t.sender | |
71 | 71 | } | |
72 | 72 | else c | |
73 | 73 | } | |
74 | 74 | let w = if ((take(valueOrElse(getString(toBase58String(g.caller.bytes)), ""), 8) == "received")) | |
75 | 75 | then true | |
76 | 76 | else false | |
77 | 77 | let x = if (if (if (if ((u > e)) | |
78 | 78 | then true | |
79 | 79 | else (l != v)) | |
80 | 80 | then true | |
81 | 81 | else w) | |
82 | 82 | then true | |
83 | 83 | else !(r)) | |
84 | 84 | then false | |
85 | 85 | else true | |
86 | 86 | let y = if (s) | |
87 | 87 | then if ((u > e)) | |
88 | 88 | then ("transaction is out of time range: " + toString(u)) | |
89 | 89 | else ("" + (if ((l != v)) | |
90 | 90 | then ((("it is incorrect sender: " + toString(l)) + " / ") + toString(v)) | |
91 | 91 | else ("" + (if (w) | |
92 | 92 | then "allready received" | |
93 | 93 | else ("" + (if (x) | |
94 | 94 | then "received" | |
95 | 95 | else ("" + (if (!(r)) | |
96 | 96 | then "airdrop ended: them all burnt" | |
97 | 97 | else "")))))))) | |
98 | 98 | else "can`t find transaction" | |
99 | 99 | if ((q > 0)) | |
100 | 100 | then [StringEntry((toBase58String(g.caller.bytes) + "_error"), (("airdrop ended: last " + toString(fraction(q, 1, b))) + " burnt")), Burn(a, q), StringEntry("burningstage", "them all burnt"), IntegerEntry("burnt", (getIntegerValue("burnt") + q))] | |
101 | 101 | else if (x) | |
102 | 102 | then [ScriptTransfer(l, i, a), ScriptTransfer(d, j, a), StringEntry(toBase58String(g.caller.bytes), y), IntegerEntry("dropped", (getIntegerValue("dropped") + i)), IntegerEntry("teamgift", (getIntegerValue("teamgift") + j)), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))] | |
103 | 103 | else [StringEntry((toBase58String(g.caller.bytes) + "_error"), y)] | |
104 | 104 | } | |
105 | 105 | else throw("Strict value is not equal to itself.") | |
106 | 106 | } | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | ||
110 | 110 | @Callable(g) | |
111 | 111 | func buy () = { | |
112 | 112 | let p = assetBalance(c, a) | |
113 | 113 | let z = (1000 * b) | |
114 | 114 | let A = [0, (10 * z), (20 * z), 0] | |
115 | 115 | let B = [0, (1 * 100000000), (2 * 100000000), 0] | |
116 | 116 | let l = Address(g.caller.bytes) | |
117 | 117 | let C = valueOrElse(getString(toBase58String(g.caller.bytes)), "") | |
118 | 118 | let D = split(C, "|") | |
119 | 119 | let E = size(D) | |
120 | 120 | let F = B[E] | |
121 | 121 | let q = A[E] | |
122 | 122 | let G = if ((p >= (z + q))) | |
123 | 123 | then true | |
124 | 124 | else false | |
125 | 125 | let H = if (if ((E == 1)) | |
126 | 126 | then true | |
127 | 127 | else (E == 2)) | |
128 | 128 | then true | |
129 | 129 | else false | |
130 | 130 | let I = if ((size(g.payments) == 1)) | |
131 | 131 | then if (if (!(isDefined(g.payments[0].assetId))) | |
132 | 132 | then (g.payments[0].amount >= F) | |
133 | 133 | else false) | |
134 | 134 | then true | |
135 | 135 | else false | |
136 | 136 | else false | |
137 | 137 | let J = if (!(H)) | |
138 | 138 | then "not prooved for buy" | |
139 | 139 | else ("" + (if (!(I)) | |
140 | 140 | then "not enough payment" | |
141 | 141 | else ("" + (if (!(G)) | |
142 | 142 | then "you lost... not enough ballance" | |
143 | 143 | else "")))) | |
144 | 144 | let K = if ((E == 1)) | |
145 | 145 | then "received|bought1" | |
146 | 146 | else if ((E == 2)) | |
147 | 147 | then "received|bought1|bought2" | |
148 | 148 | else C | |
149 | 149 | let L = if (if (if (G) | |
150 | 150 | then H | |
151 | 151 | else false) | |
152 | 152 | then I | |
153 | 153 | else false) | |
154 | 154 | then true | |
155 | 155 | else false | |
156 | 156 | if (L) | |
157 | 157 | then [StringEntry(toBase58String(g.caller.bytes), K), ScriptTransfer(d, F, unit), ScriptTransfer(l, z, a), Burn(a, q), IntegerEntry("burnt", (getIntegerValue("burnt") + q)), IntegerEntry(("sold" + toString(E)), (getIntegerValue(("sold" + toString(E))) + z)), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))] | |
158 | 158 | else [StringEntry((toBase58String(g.caller.bytes) + "_error"), J)] | |
159 | 159 | } | |
160 | 160 | ||
161 | 161 |
github/deemru/w8io/026f985 43.09 ms ◑