tx · E4KrhfLXtqvpnVEHnu45yJiJYEXXbWw3hwWUhifwPuhh

3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX:  -0.01000000 Waves

2021.12.13 10:15 [1832169] smart account 3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX > SELF 0.00000000 Waves

{ "type": 13, "id": "E4KrhfLXtqvpnVEHnu45yJiJYEXXbWw3hwWUhifwPuhh", "fee": 1000000, "feeAssetId": null, "timestamp": 1639379758634, "version": 2, "chainId": 84, "sender": "3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX", "senderPublicKey": "HUca7AqRs4Zs9sU1AFcufmBC4XpT4sN79aFScNRT4LxQ", "proofs": [ "4aCLxb89YW2cHDnVqddjCnQ8CuJbSzzMMMsPLuwEknAsFtxtsijHNkjnAwzwSof5i2GTCrxfH9pyoZG2eGKksPE4" ], "script": "base64:AAIFAAAAAAAAAAsIAhIAEgMKAQgSAAAAAAYAAAAABXRva2VuAQAAACDZi0CLArkkcZNdMZg+wWZc78jMPXwRedDDRg0bRciTFwAAAAAGdG9rZW5kAAAAAAAF9eEAAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUX+pzJtA2DV6Pr0xhS8z4foIVUAfq2c0IAAAAAAp0ZWFtQWRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUACYJT8ivNONGpFPWk1FdqVPAxApBcmLaAAAAAAhkZWFkbGluZQAAAAF9roOaAAAAAAAMYnVybmRlYWRsaW5lAAAACMRU9bEAAAAAAwAAAAFpAQAAAAVyZXNldAAAAAAJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAVidXJudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAAHZHJvcHBlZAAAAAA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Y2FsbGVyAAAABWJ5dGVzAgAAAAZfZXJyb3IFAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAGX2Vycm9yBQAAAARtZXNzBQAAAANuaWwAAAAADgD9sQ==", "height": 1832169, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 45TQ1ASm7ScBMWgse5qhMHiPExM6GBMNWhLisdQnZRvi Next: HgWPajucG6fmBLaeJ1Rbd5w8E838Fy2RjCBkGXmcJKva Diff:
OldNewDifferences
120120 }
121121 let p = assetBalance(c, a)
122122 let z = (1000 * b)
123- let A = (1 * 100000000)
124- let B = (2 * 100000000)
123+ let A = (10 * z)
124+ let B = (20 * z)
125+ let C = (1 * 100000000)
126+ let D = (2 * 100000000)
125127 let l = Address(g.caller.bytes)
126- let C = if ((p >= z))
128+ let E = valueOrElse(getString(toBase58String(g.caller.bytes)), "")
129+ let F = if ((take(E, 8) == "received"))
127130 then true
128131 else false
129- let D = valueOrElse(getString(toBase58String(g.caller.bytes)), "")
130- let E = if ((take(D, 8) == "received"))
131- then true
132- else false
133- let F = if (if (E)
134- then (size(split(D, "|")) == 1)
132+ let G = if (if (F)
133+ then (size(split(E, "|")) == 1)
135134 else false)
136135 then 0
137- else if (if (E)
138- then (size(split(D, "|")) == 2)
136+ else if (if (F)
137+ then (size(split(E, "|")) == 2)
139138 else false)
140139 then 1
141140 else 99
142- let G = if (if (E)
143- then if ((F == 0))
141+ let q = if ((G == 1))
142+ then A
143+ else if ((G == 2))
144+ then B
145+ else 0
146+ let H = if ((p >= (z + q)))
147+ then true
148+ else false
149+ let I = if (if (F)
150+ then if ((G == 0))
144151 then true
145- else (F == 1)
152+ else (G == 1)
146153 else false)
147154 then true
148155 else false
149- let H = if ((F == 0))
150- then A
151- else if ((F == 1))
152- then B
156+ let J = if ((G == 0))
157+ then C
158+ else if ((G == 1))
159+ then D
153160 else 0
154- let I = if ((size(g.payments) == 1))
161+ let K = if ((size(g.payments) == 1))
155162 then if (if (!(isDefined(g.payments[0].assetId)))
156- then (g.payments[0].amount >= H)
163+ then (g.payments[0].amount >= J)
157164 else false)
158165 then true
159166 else false
160167 else false
161- let J = if (!(G))
168+ let L = if (!(I))
162169 then "not prooved for buy"
163- else ("" + (if (!(I))
170+ else ("" + (if (!(K))
164171 then "not enough payment"
165- else ("" + (if (!(C))
166- then "ballance empty "
172+ else ("" + (if (!(H))
173+ then "you are lost... not enough ballance"
167174 else ""))))
168- let K = split(D, "|")
169- let L = if ((F == 0))
170- then (K[0] + "|bought1")
171- else if ((F == 1))
172- then (K[0] + "|bought1|bought2")
175+ let M = split(E, "|")
176+ let N = if ((G == 0))
177+ then (M[0] + "|bought1")
178+ else if ((G == 1))
179+ then (M[0] + "|bought1|bought2")
173180 else ""
174- let M = if (if (if (C)
175- then G
181+ let O = if (if (if (H)
182+ then I
176183 else false)
177- then I
184+ then K
178185 else false)
179186 then true
180187 else false
181- if (M)
182- then [StringEntry(toBase58String(g.caller.bytes), L), ScriptTransfer(d, H, unit), ScriptTransfer(l, z, a), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))]
183- else [StringEntry((toBase58String(g.caller.bytes) + "_error"), J)]
188+ if (O)
189+ then [StringEntry(toBase58String(g.caller.bytes), N), ScriptTransfer(d, J, unit), ScriptTransfer(l, z, a), Burn(a, q), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))]
190+ else [StringEntry((toBase58String(g.caller.bytes) + "_error"), L)]
184191 }
185192
186193
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'FeCdHqomybB47PWv1JVvfFpQ6WPmHGYgped6WAxpU7Nv'
55
66 let b = 100000000
77
88 let c = Address(base58'3MxfEq17wZjAWQfckWycU9o4oTkvf9nfNQX')
99
1010 let d = Address(base58'3MovsLjXpJr9HD2vBqmAf7Gze6jwuRxX1fX')
1111
1212 let e = 1639310400000
1313
1414 let f = 9639332000000
1515
1616 @Callable(g)
1717 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"))]
1818
1919
2020
2121 @Callable(g)
2222 func free (h) = {
2323 let i = (1000 * b)
2424 let j = (10 * b)
2525 let k = fromBase58String(h)
2626 let l = Address(g.caller.bytes)
2727 let m = {
2828 let n = blockInfoByHeight(height)
2929 if ($isInstanceOf(n, "BlockInfo"))
3030 then {
3131 let o = n
3232 o.timestamp
3333 }
3434 else throw("Can't find block")
3535 }
3636 let p = assetBalance(c, a)
3737 let q = if (if ((m > f))
3838 then (getStringValue("burningstage") == "waiting")
3939 else false)
4040 then p
4141 else 0
4242 let r = if ((p > i))
4343 then true
4444 else false
4545 if ((r == r))
4646 then {
4747 let s = {
4848 let n = transferTransactionById(k)
4949 if ($isInstanceOf(n, "TransferTransaction"))
5050 then {
5151 let t = n
5252 true
5353 }
5454 else false
5555 }
5656 let u = {
5757 let n = transferTransactionById(k)
5858 if ($isInstanceOf(n, "TransferTransaction"))
5959 then {
6060 let t = n
6161 t.timestamp
6262 }
6363 else 9999999999999
6464 }
6565 let v = {
6666 let n = transferTransactionById(k)
6767 if ($isInstanceOf(n, "TransferTransaction"))
6868 then {
6969 let t = n
7070 t.sender
7171 }
7272 else c
7373 }
7474 let w = if ((take(valueOrElse(getString(toBase58String(g.caller.bytes)), ""), 8) == "received"))
7575 then true
7676 else false
7777 let x = if (if (if (if ((u > e))
7878 then true
7979 else (l != v))
8080 then true
8181 else w)
8282 then true
8383 else !(r))
8484 then false
8585 else true
8686 let y = if (s)
8787 then if ((u > e))
8888 then ("transaction is out of time range: " + toString(u))
8989 else ("" + (if ((l != v))
9090 then ((("it is incorrect sender: " + toString(l)) + " / ") + toString(v))
9191 else ("" + (if (w)
9292 then "allready received"
9393 else ("" + (if (x)
9494 then "received"
9595 else ("" + (if (!(r))
9696 then (("airdrop ended: " + toString(getIntegerValue("burnt"))) + " burnt")
9797 else ""))))))))
9898 else "can`t find transaction"
9999 if ((q > 0))
100100 then [StringEntry((toBase58String(g.caller.bytes) + "_error"), (("airdrop ended: " + toString(getIntegerValue("burnt"))) + " burnt")), Burn(a, q), StringEntry("burningstage", "them all burnt"), IntegerEntry("burnt", (getIntegerValue("burnt") + q))]
101101 else if (x)
102102 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"))]
103103 else [StringEntry((toBase58String(g.caller.bytes) + "_error"), y)]
104104 }
105105 else throw("Strict value is not equal to itself.")
106106 }
107107
108108
109109
110110 @Callable(g)
111111 func buy () = {
112112 let m = {
113113 let n = blockInfoByHeight(height)
114114 if ($isInstanceOf(n, "BlockInfo"))
115115 then {
116116 let o = n
117117 o.timestamp
118118 }
119119 else throw("Can't find block")
120120 }
121121 let p = assetBalance(c, a)
122122 let z = (1000 * b)
123- let A = (1 * 100000000)
124- let B = (2 * 100000000)
123+ let A = (10 * z)
124+ let B = (20 * z)
125+ let C = (1 * 100000000)
126+ let D = (2 * 100000000)
125127 let l = Address(g.caller.bytes)
126- let C = if ((p >= z))
128+ let E = valueOrElse(getString(toBase58String(g.caller.bytes)), "")
129+ let F = if ((take(E, 8) == "received"))
127130 then true
128131 else false
129- let D = valueOrElse(getString(toBase58String(g.caller.bytes)), "")
130- let E = if ((take(D, 8) == "received"))
131- then true
132- else false
133- let F = if (if (E)
134- then (size(split(D, "|")) == 1)
132+ let G = if (if (F)
133+ then (size(split(E, "|")) == 1)
135134 else false)
136135 then 0
137- else if (if (E)
138- then (size(split(D, "|")) == 2)
136+ else if (if (F)
137+ then (size(split(E, "|")) == 2)
139138 else false)
140139 then 1
141140 else 99
142- let G = if (if (E)
143- then if ((F == 0))
141+ let q = if ((G == 1))
142+ then A
143+ else if ((G == 2))
144+ then B
145+ else 0
146+ let H = if ((p >= (z + q)))
147+ then true
148+ else false
149+ let I = if (if (F)
150+ then if ((G == 0))
144151 then true
145- else (F == 1)
152+ else (G == 1)
146153 else false)
147154 then true
148155 else false
149- let H = if ((F == 0))
150- then A
151- else if ((F == 1))
152- then B
156+ let J = if ((G == 0))
157+ then C
158+ else if ((G == 1))
159+ then D
153160 else 0
154- let I = if ((size(g.payments) == 1))
161+ let K = if ((size(g.payments) == 1))
155162 then if (if (!(isDefined(g.payments[0].assetId)))
156- then (g.payments[0].amount >= H)
163+ then (g.payments[0].amount >= J)
157164 else false)
158165 then true
159166 else false
160167 else false
161- let J = if (!(G))
168+ let L = if (!(I))
162169 then "not prooved for buy"
163- else ("" + (if (!(I))
170+ else ("" + (if (!(K))
164171 then "not enough payment"
165- else ("" + (if (!(C))
166- then "ballance empty "
172+ else ("" + (if (!(H))
173+ then "you are lost... not enough ballance"
167174 else ""))))
168- let K = split(D, "|")
169- let L = if ((F == 0))
170- then (K[0] + "|bought1")
171- else if ((F == 1))
172- then (K[0] + "|bought1|bought2")
175+ let M = split(E, "|")
176+ let N = if ((G == 0))
177+ then (M[0] + "|bought1")
178+ else if ((G == 1))
179+ then (M[0] + "|bought1|bought2")
173180 else ""
174- let M = if (if (if (C)
175- then G
181+ let O = if (if (if (H)
182+ then I
176183 else false)
177- then I
184+ then K
178185 else false)
179186 then true
180187 else false
181- if (M)
182- then [StringEntry(toBase58String(g.caller.bytes), L), ScriptTransfer(d, H, unit), ScriptTransfer(l, z, a), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))]
183- else [StringEntry((toBase58String(g.caller.bytes) + "_error"), J)]
188+ if (O)
189+ then [StringEntry(toBase58String(g.caller.bytes), N), ScriptTransfer(d, J, unit), ScriptTransfer(l, z, a), Burn(a, q), DeleteEntry((toBase58String(g.caller.bytes) + "_error"))]
190+ else [StringEntry((toBase58String(g.caller.bytes) + "_error"), L)]
184191 }
185192
186193

github/deemru/w8io/026f985 
43.66 ms