tx · Ex3yP4fpy6K8gL1QAdsxKbXPJ9BvbET2VWDKGewvBKrA

3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq:  -0.01300000 Waves

2023.02.10 18:33 [2443722] smart account 3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq > SELF 0.00000000 Waves

{ "type": 13, "id": "Ex3yP4fpy6K8gL1QAdsxKbXPJ9BvbET2VWDKGewvBKrA", "fee": 1300000, "feeAssetId": null, "timestamp": 1676043206338, "version": 2, "chainId": 84, "sender": "3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq", "senderPublicKey": "2u2wYYcVBQv43Cc71zkhHPPitkqgg6dqTZ3nUMvYJ1uq", "proofs": [ "5odWGzUYizFaqr9d93K28MM63nBiPNmBi3fDQqpBZgucGJde531cLLVMYkbd74LeMo5DRh3Z24yi6J3vBjBecNRP" ], "script": "base64:BgIXCAISBQoDAQgIEgUKAwEICBIDCgEIEgAWAANTRVACAl9fAAhmZWVTY2FsZQkAtgIBAIDC1y8BD2dldFN0cmluZ09yRmFpbAEDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUEdGhpcwUDa2V5CQCsAgICFU5vIGRhdGEgZm9yIHRoaXMua2V5PQUDa2V5AAxwb29sRGlzYWJsZWQJAAIBAg1Qb29sIGRpc2FibGVkAAxwb29sTm90RXhpc3QJAAIBAhFQb29sIGlzIG5vdCBleGlzdAAOc2xpcHBhZ2VUb29CaWcJAAIBAhNTbGlwcGFnZSBpcyB0b28gYmlnARNrZXlNYW5hZ2VyUHVibGljS2V5AAIUJXNfX21hbmFnZXJQdWJsaWNLZXkBGmtleVBlbmRpbmdNYW5hZ2VyUHVibGljS2V5AAIbJXNfX3BlbmRpbmdNYW5hZ2VyUHVibGljS2V5AQJmYwACEyVzX19mYWN0b3J5Q29udHJhY3QAD2ZhY3RvcnlDb250cmFjdAkBEUBleHRyTmF0aXZlKDEwNjIpAQkBD2dldFN0cmluZ09yRmFpbAEJA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wgdG8gaXRzZWxmLgECdHgBBnZlcmlmeQAED3RhcmdldFB1YmxpY0tleQQHJG1hdGNoMAkBFm1hbmFnZXJQdWJsaWNLZXlPclVuaXQAAwkAAQIFByRtYXRjaDACCkJ5dGVWZWN0b3IEAnBrBQckbWF0Y2gwBQJwawMJAAECBQckbWF0Y2gwAgRVbml0CAUCdHgPc2VuZGVyUHVibGljS2V5CQACAQILTWF0Y2ggZXJyb3IJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFD3RhcmdldFB1YmxpY0tlef7Dwzs=", "height": 2443722, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HneYaxY5kQ5AcxHTqRmfH1avhNSsPk7m2sr4Hn7GFYiW Next: HekPHHP92aciJwYgQwZ4f8i2kX6Kdj6oEyD72yEJ3DgS Diff:
OldNewDifferences
223223 }
224224 $Tuple2(U, V)
225225 }
226- else f
226+ else throw(((((("pool is not exist: assetIn=" + I) + " assetOut=") + J) + " lpReverse=") + (if ((S == unit))
227+ then "unit"
228+ else ((value(S) + " lpNonReverse=") + (if ((R == unit))
229+ then "unit"
230+ else (value(R) + ""))))))
227231 let U = af._1
228232 let V = af._2
229233 let X = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "__"
55
66 let b = toBigInt(100000000)
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", "protocolFee"], a)
2929
3030
3131 func m () = makeString(["%s", "poolFee"], a)
3232
3333
3434 func n (o,d) = valueOrErrorMessage(getString(o, d), makeString(["mandatory ", toString(o), ".", d, " is not defined"], ""))
3535
3636
3737 let p = "%s__feeCollectorAddress"
3838
3939 let q = addressFromStringValue(n(k, p))
4040
4141 func r (s) = {
4242 let t = s
4343 if ($isInstanceOf(t, "Int"))
4444 then {
4545 let u = t
4646 u
4747 }
4848 else throw("fail to cast into Int")
4949 }
5050
5151
5252 func v (w,x) = makeString(["%d%d", toString(w), toString(x)], a)
5353
5454
5555 func y () = {
5656 let t = getString(h())
5757 if ($isInstanceOf(t, "String"))
5858 then {
5959 let z = t
6060 fromBase58String(z)
6161 }
6262 else if ($isInstanceOf(t, "Unit"))
6363 then unit
6464 else throw("Match error")
6565 }
6666
6767
6868 func A () = {
6969 let t = getString(i())
7070 if ($isInstanceOf(t, "String"))
7171 then {
7272 let z = t
7373 fromBase58String(z)
7474 }
7575 else if ($isInstanceOf(t, "Unit"))
7676 then unit
7777 else throw("Match error")
7878 }
7979
8080
8181 func B (C) = {
8282 let t = y()
8383 if ($isInstanceOf(t, "ByteVector"))
8484 then {
8585 let D = t
8686 (C.callerPublicKey == D)
8787 }
8888 else if ($isInstanceOf(t, "Unit"))
8989 then (C.caller == this)
9090 else throw("Match error")
9191 }
9292
9393
9494 func E (C) = if (B(C))
9595 then true
9696 else throw("permission denied")
9797
9898
9999 func F (G) = if ((G == "WAVES"))
100100 then wavesBalance(this).available
101101 else assetBalance(this, fromBase58String(G))
102102
103103
104104 @Callable(C)
105105 func swapCalculateREADONLY (H,I,J) = {
106106 let K = value(getInteger(l()))
107107 let L = fraction(toBigInt(H), toBigInt(K), b)
108108 let M = value(getInteger(m()))
109109 let N = fraction(toBigInt(H), toBigInt(M), b)
110110 let O = if ((toInt(L) == 0))
111111 then toBigInt(1)
112112 else L
113113 let P = if ((toInt(N) == 0))
114114 then toBigInt(1)
115115 else N
116116 let Q = ((toBigInt(H) - O) - N)
117117 let R = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [I, J], nil)
118118 let S = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [J, I], nil)
119119 let T = if ((R != unit))
120120 then {
121121 let U = false
122122 let V = {
123123 let W = invoke(k, "getPoolAddressFromLpAssetREADONLY", [R], nil)
124124 if ($isInstanceOf(W, "String"))
125125 then W
126126 else throw(($getType(W) + " couldn't be cast to String"))
127127 }
128128 $Tuple2(U, V)
129129 }
130130 else if ((S != unit))
131131 then {
132132 let U = true
133133 let V = {
134134 let W = invoke(k, "getPoolAddressFromLpAssetREADONLY", [S], nil)
135135 if ($isInstanceOf(W, "String"))
136136 then W
137137 else throw(($getType(W) + " couldn't be cast to String"))
138138 }
139139 $Tuple2(U, V)
140140 }
141141 else f
142142 let U = T._1
143143 let V = T._2
144144 let X = {
145145 let W = invoke(k, "getPoolStatusREADONLY", [V], nil)
146146 if ($isInstanceOf(W, "Int"))
147147 then W
148148 else throw(($getType(W) + " couldn't be cast to Int"))
149149 }
150150 let Y = if ((X == 1))
151151 then true
152152 else e
153153 if ((Y == Y))
154154 then {
155155 let Z = addressFromStringValue(valueOrElse(V, ""))
156156 let aa = {
157157 let W = invoke(Z, "calculateAmountOutForSwapREADONLY", [toInt(Q), U], nil)
158158 if ($isInstanceOf(W, "Int"))
159159 then W
160160 else throw(($getType(W) + " couldn't be cast to Int"))
161161 }
162162 $Tuple2(nil, aa)
163163 }
164164 else throw("Strict value is not equal to itself.")
165165 }
166166
167167
168168
169169 @Callable(C)
170170 func swap (ab,J,ac) = {
171171 let ad = value(C.payments[0])
172172 let I = if ((ad.assetId == unit))
173173 then "WAVES"
174174 else toBase58String(value(ad.assetId))
175175 let H = value(ad.amount)
176176 let K = value(getInteger(l()))
177177 let L = fraction(toBigInt(H), toBigInt(K), b)
178178 let M = value(getInteger(m()))
179179 let N = fraction(toBigInt(H), toBigInt(M), b)
180180 let O = if ((toInt(L) == 0))
181181 then toBigInt(1)
182182 else L
183183 let P = if ((toInt(N) == 0))
184184 then toBigInt(1)
185185 else N
186186 let Q = ((toBigInt(H) - O) - N)
187187 let ae = [if ((size(C.payments) == 1))
188188 then true
189189 else throw("exactly 1 payment are expected")]
190190 if ((ae == ae))
191191 then {
192192 let R = {
193193 let W = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [I, J], nil)
194194 if ($isInstanceOf(W, "String"))
195195 then W
196196 else unit
197197 }
198198 let S = {
199199 let W = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [J, I], nil)
200200 if ($isInstanceOf(W, "String"))
201201 then W
202202 else unit
203203 }
204204 let af = if ((R != unit))
205205 then {
206206 let U = false
207207 let V = {
208208 let W = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(R)], nil)
209209 if ($isInstanceOf(W, "String"))
210210 then W
211211 else throw(($getType(W) + " couldn't be cast to String"))
212212 }
213213 $Tuple2(U, V)
214214 }
215215 else if ((S != unit))
216216 then {
217217 let U = true
218218 let V = {
219219 let W = invoke(k, "getPoolAddressFromLpAssetREADONLY", [value(S)], nil)
220220 if ($isInstanceOf(W, "String"))
221221 then W
222222 else throw(($getType(W) + " couldn't be cast to String"))
223223 }
224224 $Tuple2(U, V)
225225 }
226- else f
226+ else throw(((((("pool is not exist: assetIn=" + I) + " assetOut=") + J) + " lpReverse=") + (if ((S == unit))
227+ then "unit"
228+ else ((value(S) + " lpNonReverse=") + (if ((R == unit))
229+ then "unit"
230+ else (value(R) + ""))))))
227231 let U = af._1
228232 let V = af._2
229233 let X = {
230234 let W = invoke(k, "getPoolStatusREADONLY", [V], nil)
231235 if ($isInstanceOf(W, "Int"))
232236 then W
233237 else throw(($getType(W) + " couldn't be cast to Int"))
234238 }
235239 let Y = if ((X == 1))
236240 then true
237241 else e
238242 if ((Y == Y))
239243 then {
240244 let Z = addressFromStringValue(V)
241245 let ag = if ((I == "WAVES"))
242246 then unit
243247 else fromBase58String(I)
244248 let ah = {
245249 let W = invoke(Z, "calculateAmountOutForSwapAndSendTokens", [toInt(Q), U, ab, ac], [AttachedPayment(ag, toInt(Q))])
246250 if ($isInstanceOf(W, "Int"))
247251 then W
248252 else throw(($getType(W) + " couldn't be cast to Int"))
249253 }
250254 $Tuple2([ScriptTransfer(q, toInt(O), ag), ScriptTransfer(Z, toInt(P), ag)], ah)
251255 }
252256 else throw("Strict value is not equal to itself.")
253257 }
254258 else throw("Strict value is not equal to itself.")
255259 }
256260
257261
258262
259263 @Callable(C)
260264 func setManager (ai) = {
261265 let aj = E(C)
262266 if ((aj == aj))
263267 then {
264268 let ak = fromBase58String(ai)
265269 if ((ak == ak))
266270 then [StringEntry(i(), ai)]
267271 else throw("Strict value is not equal to itself.")
268272 }
269273 else throw("Strict value is not equal to itself.")
270274 }
271275
272276
273277
274278 @Callable(C)
275279 func confirmManager () = {
276280 let al = A()
277281 let am = if (isDefined(al))
278282 then true
279283 else throw("no pending manager")
280284 if ((am == am))
281285 then {
282286 let an = if ((C.callerPublicKey == value(al)))
283287 then true
284288 else throw("you are not pending manager")
285289 if ((an == an))
286290 then [StringEntry(h(), toBase58String(value(al))), DeleteEntry(i())]
287291 else throw("Strict value is not equal to itself.")
288292 }
289293 else throw("Strict value is not equal to itself.")
290294 }
291295
292296
293297 @Verifier(ao)
294298 func ap () = {
295299 let aq = {
296300 let t = y()
297301 if ($isInstanceOf(t, "ByteVector"))
298302 then {
299303 let D = t
300304 D
301305 }
302306 else if ($isInstanceOf(t, "Unit"))
303307 then ao.senderPublicKey
304308 else throw("Match error")
305309 }
306310 sigVerify(ao.bodyBytes, ao.proofs[0], aq)
307311 }
308312

github/deemru/w8io/169f3d6 
78.99 ms