tx · 3m6Bc7ohHMZoqk32h7X4u7KgAQRJpKcABXZNzsF8KCTd

3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX:  -0.01000000 Waves

2021.12.12 20:15 [1831327] smart account 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX > SELF 0.00000000 Waves

{ "type": 13, "id": "3m6Bc7ohHMZoqk32h7X4u7KgAQRJpKcABXZNzsF8KCTd", "fee": 1000000, "feeAssetId": null, "timestamp": 1639329360433, "version": 2, "chainId": 84, "sender": "3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX", "senderPublicKey": "HUca7AqRs4Zs9sU1AFcufmBC4XpT4sN79aFScNRT4LxQ", "proofs": [ "idKEwq1nCztQSGMDyAhAtGHRmsTdoWtFrZrXQ15Eprx5VThNUNeZbcKsDM7kwWCeP7kszi6yYTvcJNdzoWmRsFz" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAAQAAAAABXRva2VuAQAAACC3J58vH5VvqrKqhwl3eYjLul0f2q7s7Aut9MtxiOp72AAAAAAGdG9rZW5kAAAAAAAF9eEAAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUX+pzJtA2DV6Pr0xhS8z4foIVUAfq2c0IAAAAAAp0ZWFtQWRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUACYJT8ivNONGpFPWk1FdqVPAxApBcmLaAAAAAwAAAAFpAQAAAAVyZXNldAAAAAAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAVidXJudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHZHJvcHBlZAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAFc29sZDE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RhdGFyZWNzAAAAAAAAAAAAAgAAAAh8Ym91Z2h0MQMJAAAAAAAAAgUAAAAOY2FsbGVyQnV5bGV2ZWwAAAAAAAAAAAEJAAEsAAAAAgkAAZEAAAACBQAAAAhkYXRhcmVjcwAAAAAAAAAAAAIAAAAQfGJvdWdodDF8Ym91Z2h0MgIAAAAABAAAAARkZWFsAwMDBQAAAAliYWxhbmNlb2sFAAAADGNhbGxlckNhbkJ1eQcFAAAABXBtdG9rBwYHAwUAAAAEZGVhbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAB25ld2RhdGEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAKdGVhbUFkcmVzcwUAAAALY2FsbGVyUHJpY2UFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAMY2FsbGVyQWRyZXNzBQAAAApzZWxsYW1vdW50BQAAAAV0b2tlbgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAGX2Vycm9yBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAABl9lcnJvcgUAAAAEbWVzcwUAAAADbmlsAAAAAHznuGU=", "height": 1831327, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2LuKF4SEHqb22WJMTpQmY2hRja5UDkD2RnyP1iSgRha3 Next: FJDmXpXbiARPnxxjfckzubLMHrKVkdmtQaFFo9GQBUm4 Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'GkDwhWL6fJffdmvUc6agDHvVZYWi6uX4VKX12eUU4FzV'
4+let a = base58'DKxej2DXCbLmBdgXLRhDk8XC1eQC7AfYmbHAnhGm9f3m'
55
66 let b = 100000000
77
2121 let i = fromBase58String(f)
2222 let j = Address(e.caller.bytes)
2323 let k = 1639310400000
24- let l = 1639328400000
24+ let l = 1639330200000
2525 let m = {
2626 let n = blockInfoByHeight(height)
2727 if ($isInstanceOf(n, "BlockInfo"))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'GkDwhWL6fJffdmvUc6agDHvVZYWi6uX4VKX12eUU4FzV'
4+let a = base58'DKxej2DXCbLmBdgXLRhDk8XC1eQC7AfYmbHAnhGm9f3m'
55
66 let b = 100000000
77
88 let c = Address(base58'3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX')
99
1010 let d = Address(base58'3MovsLjXpJr9HD2vBqmAf7Gze6jwuRxX1fX')
1111
1212 @Callable(e)
1313 func reset () = [DeleteEntry(toBase58String(e.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(e.caller.bytes) + "_error"))]
1414
1515
1616
1717 @Callable(e)
1818 func free (f) = {
1919 let g = (1000 * b)
2020 let h = (10 * b)
2121 let i = fromBase58String(f)
2222 let j = Address(e.caller.bytes)
2323 let k = 1639310400000
24- let l = 1639328400000
24+ let l = 1639330200000
2525 let m = {
2626 let n = blockInfoByHeight(height)
2727 if ($isInstanceOf(n, "BlockInfo"))
2828 then {
2929 let o = n
3030 o.timestamp
3131 }
3232 else throw("Can't find block")
3333 }
3434 let p = assetBalance(c, a)
3535 let q = if (if ((m > l))
3636 then (getStringValue("burningstage") == "waiting")
3737 else false)
3838 then ((p - g) - h)
3939 else 0
4040 let r = if ((p > g))
4141 then true
4242 else false
4343 if ((r == r))
4444 then {
4545 let s = {
4646 let n = transferTransactionById(i)
4747 if ($isInstanceOf(n, "TransferTransaction"))
4848 then {
4949 let t = n
5050 true
5151 }
5252 else false
5353 }
5454 let u = {
5555 let n = transferTransactionById(i)
5656 if ($isInstanceOf(n, "TransferTransaction"))
5757 then {
5858 let t = n
5959 t.timestamp
6060 }
6161 else 9999999999999
6262 }
6363 let v = {
6464 let n = transferTransactionById(i)
6565 if ($isInstanceOf(n, "TransferTransaction"))
6666 then {
6767 let t = n
6868 t.sender
6969 }
7070 else c
7171 }
7272 let w = if ((take(valueOrElse(getString(toBase58String(e.caller.bytes)), ""), 8) == "received"))
7373 then true
7474 else false
7575 let x = if (if (if (if ((u > k))
7676 then true
7777 else (j != v))
7878 then true
7979 else w)
8080 then true
8181 else !(r))
8282 then false
8383 else true
8484 let y = if (s)
8585 then if ((u > k))
8686 then ("transaction is out of time range: " + toString(u))
8787 else ("" + (if ((j != v))
8888 then ((("it is incorrect sender: " + toString(j)) + " / ") + toString(v))
8989 else ("" + (if (w)
9090 then getStringValue(toBase58String(e.caller.bytes))
9191 else ("" + (if (x)
9292 then "received"
9393 else ("" + (if (!(r))
9494 then (("airdrop ended: " + toString(getIntegerValue("burnt"))) + " burnt")
9595 else ""))))))))
9696 else "can`t find transaction"
9797 if ((q > 0))
9898 then [StringEntry(toBase58String(e.caller.bytes), y), Burn(a, q), StringEntry("burningstage", "them all burnt"), IntegerEntry("burnt", (getIntegerValue("burnt") + q))]
9999 else if (x)
100100 then [ScriptTransfer(j, g, a), ScriptTransfer(d, h, a), StringEntry(toBase58String(e.caller.bytes), y), IntegerEntry("dropped", (getIntegerValue("dropped") + g)), IntegerEntry("teamgift", (getIntegerValue("teamgift") + h)), DeleteEntry((toBase58String(e.caller.bytes) + "_error"))]
101101 else [StringEntry((toBase58String(e.caller.bytes) + "_error"), y)]
102102 }
103103 else throw("Strict value is not equal to itself.")
104104 }
105105
106106
107107
108108 @Callable(e)
109109 func buy () = {
110110 let m = {
111111 let n = blockInfoByHeight(height)
112112 if ($isInstanceOf(n, "BlockInfo"))
113113 then {
114114 let o = n
115115 o.timestamp
116116 }
117117 else throw("Can't find block")
118118 }
119119 let p = assetBalance(c, a)
120120 let z = (1000 * b)
121121 let A = (1 * 100000000)
122122 let B = (2 * 100000000)
123123 let j = Address(e.caller.bytes)
124124 let C = if ((p >= z))
125125 then true
126126 else false
127127 let D = valueOrElse(getString(toBase58String(e.caller.bytes)), "")
128128 let E = if ((take(D, 8) == "received"))
129129 then true
130130 else false
131131 let F = if (if (E)
132132 then (size(split(D, "|")) == 1)
133133 else false)
134134 then 0
135135 else if (if (E)
136136 then (size(split(D, "|")) == 2)
137137 else false)
138138 then 1
139139 else 99
140140 let G = if (if (E)
141141 then if ((F == 0))
142142 then true
143143 else (F == 1)
144144 else false)
145145 then true
146146 else false
147147 let H = if ((F == 0))
148148 then A
149149 else if ((F == 1))
150150 then B
151151 else 0
152152 let I = if ((size(e.payments) == 1))
153153 then if (if (!(isDefined(e.payments[0].assetId)))
154154 then (e.payments[0].amount >= H)
155155 else false)
156156 then true
157157 else false
158158 else false
159159 let J = if (!(G))
160160 then "not prooved for buy"
161161 else ("" + (if (!(I))
162162 then "not enough payment"
163163 else ("" + (if (!(C))
164164 then "ballance empty "
165165 else ""))))
166166 let K = split(D, "|")
167167 let L = if ((F == 0))
168168 then (K[0] + "|bought1")
169169 else if ((F == 1))
170170 then (K[0] + "|bought1|bought2")
171171 else ""
172172 let M = if (if (if (C)
173173 then G
174174 else false)
175175 then I
176176 else false)
177177 then true
178178 else false
179179 if (M)
180180 then [StringEntry(toBase58String(e.caller.bytes), L), ScriptTransfer(d, H, unit), ScriptTransfer(j, z, a), DeleteEntry((toBase58String(e.caller.bytes) + "_error"))]
181181 else [StringEntry((toBase58String(e.caller.bytes) + "_error"), J)]
182182 }
183183
184184

github/deemru/w8io/026f985 
26.02 ms