tx · DqUYMbqMi7EP2SrhxKQHm8GASJtcNP2DRTLDQjHd2Jtw

3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq:  -0.01300000 Waves

2023.02.09 11:50 [2441880] smart account 3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq > SELF 0.00000000 Waves

{ "type": 13, "id": "DqUYMbqMi7EP2SrhxKQHm8GASJtcNP2DRTLDQjHd2Jtw", "fee": 1300000, "feeAssetId": null, "timestamp": 1675932658457, "version": 1, "sender": "3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq", "senderPublicKey": "2u2wYYcVBQv43Cc71zkhHPPitkqgg6dqTZ3nUMvYJ1uq", "proofs": [ "2Su297goi1hKGMMPvsquLR3k2d6AkjR5b5raEKyqBEfnxWmoCVt5FfZUxRrsUNJ872423m5K2ZHGHhEkYYE44MQ1" ], "script": "base64:BgIXCAISBQoDAQgIEgUKAwEICBIDCgEIEgAUAANTRVACAl9fAAhmZWVTY2FsZQkAtgIBAKCNBgEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQR0aGlzBQNrZXkJAKwCAgIVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQNrZXkADHBvb2xEaXNhYmxlZAkAAgECDVBvb2wgZGlzYWJsZWQADHBvb2xOb3RFeGlzdAkAAgECEVBvb2wgaXMgbm90IGV4aXN0AA5zbGlwcGFnZVRvb0JpZwkAAgECE1NsaXBwYWdlIGlzIHRvbyBiaWcBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAmZjAAITJXNfX2ZhY3RvcnlDb250cmFjdAAPZmFjdG9yeUNvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBCQEPZ2V0U3RyaW5nT3JGYWl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hbmFnZXIABAJwbQkBHXBlbmRpbmdNYW5hZ2VyUHVibGljS2V5T3JVbml0AAQFaGFzUE0DCQEJaXNEZWZpbmVkAQUCcG0GCQACAQISbm8gcGVuZGluZyBtYW5hZ2VyAwkAAAIFBWhhc1BNBQVoYXNQTQQHY2hlY2tQTQMJAAACCAUBaQ9jYWxsZXJQdWJsaWNLZXkJAQV2YWx1ZQEFAnBtBgkAAgECG3lvdSBhcmUgbm90IHBlbmRpbmcgbWFuYWdlcgMJAAACBQdjaGVja1BNBQdjaGVja1BNCQDMCAIJAQtTdHJpbmdFbnRyeQIJARNrZXlNYW5hZ2VyUHVibGljS2V5AAkA2AQBCQEFdmFsdWUBBQJwbQkAzAgCCQELRGVsZXRlRW50cnkBCQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkABQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXmuu4pQ", "chainId": 84, "height": 2441880, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GjoAa61M4wMsoaaCAQmkJrPFH7jnphpWm2td6uGXJE83 Next: 7RCQBYnNV6y55T3Yw8kRkD9BwgXFTZoxbCxHs5zGWRJC Diff:
OldNewDifferences
197197 else f
198198 let N = Y._1
199199 let O = Y._2
200- let Z = {
201- let P = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [O], nil)
202- if ($isInstanceOf(P, "Boolean"))
200+ let Q = {
201+ let P = invoke(k, "getPoolStatusREADONLY", [O], nil)
202+ if ($isInstanceOf(P, "Int"))
203203 then P
204- else throw(($getType(P) + " couldn't be cast to Boolean"))
204+ else throw(($getType(P) + " couldn't be cast to Int"))
205205 }
206- let R = if (Z)
206+ let R = if ((Q == 1))
207207 then true
208208 else e
209209 if ((R == R))
225225
226226
227227 @Callable(z)
228-func setManager (aa) = {
229- let ab = B(z)
230- if ((ab == ab))
228+func setManager (Z) = {
229+ let aa = B(z)
230+ if ((aa == aa))
231231 then {
232- let ac = fromBase58String(aa)
233- if ((ac == ac))
234- then [StringEntry(i(), aa)]
232+ let ab = fromBase58String(Z)
233+ if ((ab == ab))
234+ then [StringEntry(i(), Z)]
235235 else throw("Strict value is not equal to itself.")
236236 }
237237 else throw("Strict value is not equal to itself.")
241241
242242 @Callable(z)
243243 func confirmManager () = {
244- let ad = x()
245- let ae = if (isDefined(ad))
244+ let ac = x()
245+ let ad = if (isDefined(ac))
246246 then true
247247 else throw("no pending manager")
248- if ((ae == ae))
248+ if ((ad == ad))
249249 then {
250- let af = if ((z.callerPublicKey == value(ad)))
250+ let ae = if ((z.callerPublicKey == value(ac)))
251251 then true
252252 else throw("you are not pending manager")
253- if ((af == af))
254- then [StringEntry(h(), toBase58String(value(ad))), DeleteEntry(i())]
253+ if ((ae == ae))
254+ then [StringEntry(h(), toBase58String(value(ac))), DeleteEntry(i())]
255255 else throw("Strict value is not equal to itself.")
256256 }
257257 else throw("Strict value is not equal to itself.")
258258 }
259259
260260
261-@Verifier(ag)
262-func ah () = {
263- let ai = {
261+@Verifier(af)
262+func ag () = {
263+ let ah = {
264264 let q = v()
265265 if ($isInstanceOf(q, "ByteVector"))
266266 then {
268268 A
269269 }
270270 else if ($isInstanceOf(q, "Unit"))
271- then ag.senderPublicKey
271+ then af.senderPublicKey
272272 else throw("Match error")
273273 }
274- sigVerify(ag.bodyBytes, ag.proofs[0], ai)
274+ sigVerify(af.bodyBytes, af.proofs[0], ah)
275275 }
276276
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = toBigInt(100000)
77
88 func c (d) = valueOrErrorMessage(getString(this, d), ("No data for this.key=" + d))
99
1010
1111 let e = throw("Pool disabled")
1212
1313 let f = throw("Pool is not exist")
1414
1515 let g = throw("Slippage is too big")
1616
1717 func h () = "%s__managerPublicKey"
1818
1919
2020 func i () = "%s__pendingManagerPublicKey"
2121
2222
2323 func j () = "%s__factoryContract"
2424
2525
2626 let k = addressFromStringValue(c(j()))
2727
2828 func l () = makeString(["%s", "feeProtocolContractAddress"], a)
2929
3030
3131 let m = addressFromStringValue(c(l()))
3232
3333 func n () = makeString(["%s", "protocolFee"], a)
3434
3535
3636 func o (p) = {
3737 let q = p
3838 if ($isInstanceOf(q, "Int"))
3939 then {
4040 let r = q
4141 r
4242 }
4343 else throw("fail to cast into Int")
4444 }
4545
4646
4747 func s (t,u) = makeString(["%d%d", toString(t), toString(u)], a)
4848
4949
5050 func v () = {
5151 let q = getString(h())
5252 if ($isInstanceOf(q, "String"))
5353 then {
5454 let w = q
5555 fromBase58String(w)
5656 }
5757 else if ($isInstanceOf(q, "Unit"))
5858 then unit
5959 else throw("Match error")
6060 }
6161
6262
6363 func x () = {
6464 let q = getString(i())
6565 if ($isInstanceOf(q, "String"))
6666 then {
6767 let w = q
6868 fromBase58String(w)
6969 }
7070 else if ($isInstanceOf(q, "Unit"))
7171 then unit
7272 else throw("Match error")
7373 }
7474
7575
7676 func y (z) = {
7777 let q = v()
7878 if ($isInstanceOf(q, "ByteVector"))
7979 then {
8080 let A = q
8181 (z.callerPublicKey == A)
8282 }
8383 else if ($isInstanceOf(q, "Unit"))
8484 then (z.caller == this)
8585 else throw("Match error")
8686 }
8787
8888
8989 func B (z) = if (y(z))
9090 then true
9191 else throw("permission denied")
9292
9393
9494 func C (D) = if ((D == "WAVES"))
9595 then wavesBalance(this).available
9696 else assetBalance(this, fromBase58String(D))
9797
9898
9999 @Callable(z)
100100 func swapCalculateREADONLY (E,F,G) = {
101101 let H = value(getInteger(n()))
102102 let I = fraction(toBigInt(E), toBigInt(H), b)
103103 let J = if ((toInt(I) == 0))
104104 then toBigInt(1)
105105 else (toBigInt(E) - I)
106106 let K = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil)
107107 let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil)
108108 let M = if ((K != unit))
109109 then {
110110 let N = false
111111 let O = {
112112 let P = invoke(k, "getPoolAddressFromLpAssetREADONLY", [K], nil)
113113 if ($isInstanceOf(P, "String"))
114114 then P
115115 else throw(($getType(P) + " couldn't be cast to String"))
116116 }
117117 $Tuple2(N, O)
118118 }
119119 else if ((L != unit))
120120 then {
121121 let N = true
122122 let O = {
123123 let P = invoke(k, "getPoolAddressFromLpAssetREADONLY", [L], nil)
124124 if ($isInstanceOf(P, "String"))
125125 then P
126126 else throw(($getType(P) + " couldn't be cast to String"))
127127 }
128128 $Tuple2(N, O)
129129 }
130130 else f
131131 let N = M._1
132132 let O = M._2
133133 let Q = {
134134 let P = invoke(k, "getPoolStatusREADONLY", [O], nil)
135135 if ($isInstanceOf(P, "Int"))
136136 then P
137137 else throw(($getType(P) + " couldn't be cast to Int"))
138138 }
139139 let R = if ((Q == 1))
140140 then true
141141 else e
142142 if ((R == R))
143143 then {
144144 let S = addressFromStringValue(valueOrElse(O, ""))
145145 let T = {
146146 let P = invoke(S, "calculateAmountOutForSwapREADONLY", [toInt(J), N], nil)
147147 if ($isInstanceOf(P, "Int"))
148148 then P
149149 else throw(($getType(P) + " couldn't be cast to Int"))
150150 }
151151 $Tuple2(nil, T)
152152 }
153153 else throw("Strict value is not equal to itself.")
154154 }
155155
156156
157157
158158 @Callable(z)
159159 func swap (U,G,V) = {
160160 let W = value(z.payments[0])
161161 let F = if ((W.assetId == unit))
162162 then toBytes("WAVES")
163163 else value(W.assetId)
164164 let E = value(W.amount)
165165 let H = value(getInteger(n()))
166166 let I = fraction(toBigInt(E), toBigInt(H), b)
167167 let J = (toBigInt(E) - I)
168168 let X = [if ((size(z.payments) == 1))
169169 then true
170170 else throw("exactly 1 payment are expected")]
171171 if ((X == X))
172172 then {
173173 let K = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [toBase58String(F), G], nil)
174174 let L = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, toBase58String(F)], nil)
175175 let Y = if ((K != unit))
176176 then {
177177 let N = false
178178 let O = {
179179 let P = invoke(k, "getPoolAddressFromLpAssetREADONLY", [K], nil)
180180 if ($isInstanceOf(P, "String"))
181181 then P
182182 else throw(($getType(P) + " couldn't be cast to String"))
183183 }
184184 $Tuple2(N, O)
185185 }
186186 else if ((L != unit))
187187 then {
188188 let N = true
189189 let O = {
190190 let P = invoke(k, "getPoolAddressFromLpAssetREADONLY", [L], nil)
191191 if ($isInstanceOf(P, "String"))
192192 then P
193193 else throw(($getType(P) + " couldn't be cast to String"))
194194 }
195195 $Tuple2(N, O)
196196 }
197197 else f
198198 let N = Y._1
199199 let O = Y._2
200- let Z = {
201- let P = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [O], nil)
202- if ($isInstanceOf(P, "Boolean"))
200+ let Q = {
201+ let P = invoke(k, "getPoolStatusREADONLY", [O], nil)
202+ if ($isInstanceOf(P, "Int"))
203203 then P
204- else throw(($getType(P) + " couldn't be cast to Boolean"))
204+ else throw(($getType(P) + " couldn't be cast to Int"))
205205 }
206- let R = if (Z)
206+ let R = if ((Q == 1))
207207 then true
208208 else e
209209 if ((R == R))
210210 then {
211211 let S = addressFromStringValue(O)
212212 let T = {
213213 let P = invoke(S, "calculateAmountOutForSwapAndSendTokens", [toInt(J), N, U, V], [AttachedPayment(F, toInt(J))])
214214 if ($isInstanceOf(P, "Boolean"))
215215 then P
216216 else throw(($getType(P) + " couldn't be cast to Boolean"))
217217 }
218218 $Tuple2([ScriptTransfer(m, toInt(I), F)], T)
219219 }
220220 else throw("Strict value is not equal to itself.")
221221 }
222222 else throw("Strict value is not equal to itself.")
223223 }
224224
225225
226226
227227 @Callable(z)
228-func setManager (aa) = {
229- let ab = B(z)
230- if ((ab == ab))
228+func setManager (Z) = {
229+ let aa = B(z)
230+ if ((aa == aa))
231231 then {
232- let ac = fromBase58String(aa)
233- if ((ac == ac))
234- then [StringEntry(i(), aa)]
232+ let ab = fromBase58String(Z)
233+ if ((ab == ab))
234+ then [StringEntry(i(), Z)]
235235 else throw("Strict value is not equal to itself.")
236236 }
237237 else throw("Strict value is not equal to itself.")
238238 }
239239
240240
241241
242242 @Callable(z)
243243 func confirmManager () = {
244- let ad = x()
245- let ae = if (isDefined(ad))
244+ let ac = x()
245+ let ad = if (isDefined(ac))
246246 then true
247247 else throw("no pending manager")
248- if ((ae == ae))
248+ if ((ad == ad))
249249 then {
250- let af = if ((z.callerPublicKey == value(ad)))
250+ let ae = if ((z.callerPublicKey == value(ac)))
251251 then true
252252 else throw("you are not pending manager")
253- if ((af == af))
254- then [StringEntry(h(), toBase58String(value(ad))), DeleteEntry(i())]
253+ if ((ae == ae))
254+ then [StringEntry(h(), toBase58String(value(ac))), DeleteEntry(i())]
255255 else throw("Strict value is not equal to itself.")
256256 }
257257 else throw("Strict value is not equal to itself.")
258258 }
259259
260260
261-@Verifier(ag)
262-func ah () = {
263- let ai = {
261+@Verifier(af)
262+func ag () = {
263+ let ah = {
264264 let q = v()
265265 if ($isInstanceOf(q, "ByteVector"))
266266 then {
267267 let A = q
268268 A
269269 }
270270 else if ($isInstanceOf(q, "Unit"))
271- then ag.senderPublicKey
271+ then af.senderPublicKey
272272 else throw("Match error")
273273 }
274- sigVerify(ag.bodyBytes, ag.proofs[0], ai)
274+ sigVerify(af.bodyBytes, af.proofs[0], ah)
275275 }
276276

github/deemru/w8io/169f3d6 
42.15 ms