tx · 82u5VUX7c5386UDHzoJ8j66gSVS68Rsb8SnMyUe3YFbC

3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq:  -0.01300000 Waves

2023.02.03 14:37 [2433393] smart account 3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq > SELF 0.00000000 Waves

{ "type": 13, "id": "82u5VUX7c5386UDHzoJ8j66gSVS68Rsb8SnMyUe3YFbC", "fee": 1300000, "feeAssetId": null, "timestamp": 1675424285874, "version": 1, "sender": "3N6LHjfGb6Fgcy7YsVcNxGyPTj49XbQAijq", "senderPublicKey": "2u2wYYcVBQv43Cc71zkhHPPitkqgg6dqTZ3nUMvYJ1uq", "proofs": [ "2LaN8RAynYnZamUpdCG3ibr32nuRkrVsAB8BYRdXF4bD7DpYdGnvQgFkteqzsmcwz9pbsjSumVWqfWEmoorkgqFy" ], "script": "base64:BgIXCAISBQoDAQgIEgUKAwEICBIDCgEIEgAUAANTRVACAl9fAAhmZWVTY2FsZQkAtgIBAKCNBgEPZ2V0U3RyaW5nT3JGYWlsAQNrZXkJARN2YWx1ZU9yRXJyb3JNZXNzYWdlAgkAnQgCBQR0aGlzBQNrZXkJAKwCAgIVTm8gZGF0YSBmb3IgdGhpcy5rZXk9BQNrZXkADHBvb2xEaXNhYmxlZAkAAgECDVBvb2wgZGlzYWJsZWQADHBvb2xOb3RFeGlzdAkAAgECEVBvb2wgaXMgbm90IGV4aXN0AA5zbGlwcGFnZVRvb0JpZwkAAgECE1NsaXBwYWdlIGlzIHRvbyBiaWcBE2tleU1hbmFnZXJQdWJsaWNLZXkAAhQlc19fbWFuYWdlclB1YmxpY0tleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBAmZjAAITJXNfX2ZhY3RvcnlDb250cmFjdAAPZmFjdG9yeUNvbnRyYWN0CQERQGV4dHJOYXRpdmUoMTA2MikBCQEPZ2V0U3RyaW5nT3JGYWlsAQk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gJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUPdGFyZ2V0UHVibGljS2V5HUQLjQ==", "chainId": 84, "height": 2433393, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9spceC5GdKUF8EFrx13Xapd9npas5JwbJQ5QyLxroBjP Next: sFW4Lnewh68RQPhByb6LEKLMUDmUhtSb7yMb6Koz9qP Diff:
OldNewDifferences
132132 let P = O._1
133133 let Q = O._2
134134 let S = {
135- let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil)
135+ let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", ["3MqGtuaL3yJbKHqUxnSihJmYroyPf6QDp1x_"], nil)
136136 if ($isInstanceOf(R, "Boolean"))
137137 then R
138138 else throw(($getType(R) + " couldn't be cast to Boolean"))
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", "feeLiquidityContractAddress"], a)
2929
3030
3131 func m () = makeString(["%s", "feeLiquidity"], a)
3232
3333
3434 func n () = makeString(["%s", "protocolFee"], a)
3535
3636
3737 func o (p) = {
3838 let q = p
3939 if ($isInstanceOf(q, "Int"))
4040 then {
4141 let r = q
4242 r
4343 }
4444 else throw("fail to cast into Int")
4545 }
4646
4747
4848 func s (t,u) = makeString(["%d%d", toString(t), toString(u)], a)
4949
5050
5151 func v () = {
5252 let q = getString(h())
5353 if ($isInstanceOf(q, "String"))
5454 then {
5555 let w = q
5656 fromBase58String(w)
5757 }
5858 else if ($isInstanceOf(q, "Unit"))
5959 then unit
6060 else throw("Match error")
6161 }
6262
6363
6464 func x () = {
6565 let q = getString(i())
6666 if ($isInstanceOf(q, "String"))
6767 then {
6868 let w = q
6969 fromBase58String(w)
7070 }
7171 else if ($isInstanceOf(q, "Unit"))
7272 then unit
7373 else throw("Match error")
7474 }
7575
7676
7777 func y (z) = {
7878 let q = v()
7979 if ($isInstanceOf(q, "ByteVector"))
8080 then {
8181 let A = q
8282 (z.callerPublicKey == A)
8383 }
8484 else if ($isInstanceOf(q, "Unit"))
8585 then (z.caller == this)
8686 else throw("Match error")
8787 }
8888
8989
9090 func B (z) = if (y(z))
9191 then true
9292 else throw("permission denied")
9393
9494
9595 func C (D) = if ((D == "WAVES"))
9696 then wavesBalance(this).available
9797 else assetBalance(this, fromBase58String(D))
9898
9999
100100 @Callable(z)
101101 func swapCalculateREADONLY (E,F,G) = {
102102 let H = value(getInteger(n()))
103103 let I = fraction(toBigInt(E), toBigInt(H), b)
104104 let J = fraction(toBigInt(E), toBigInt(H), b)
105105 let K = (toBigInt(E) - I)
106106 let L = (K - J)
107107 let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil)
108108 let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil)
109109 let O = if ((M != unit))
110110 then {
111111 let P = false
112112 let Q = {
113113 let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil)
114114 if ($isInstanceOf(R, "String"))
115115 then R
116116 else throw(($getType(R) + " couldn't be cast to String"))
117117 }
118118 $Tuple2(P, Q)
119119 }
120120 else if ((N != unit))
121121 then {
122122 let P = true
123123 let Q = {
124124 let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil)
125125 if ($isInstanceOf(R, "String"))
126126 then R
127127 else throw(($getType(R) + " couldn't be cast to String"))
128128 }
129129 $Tuple2(P, Q)
130130 }
131131 else f
132132 let P = O._1
133133 let Q = O._2
134134 let S = {
135- let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil)
135+ let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", ["3MqGtuaL3yJbKHqUxnSihJmYroyPf6QDp1x_"], nil)
136136 if ($isInstanceOf(R, "Boolean"))
137137 then R
138138 else throw(($getType(R) + " couldn't be cast to Boolean"))
139139 }
140140 let T = if (S)
141141 then true
142142 else e
143143 if ((T == T))
144144 then {
145145 let U = addressFromStringValue(valueOrElse(Q, ""))
146146 let V = {
147147 let R = invoke(U, "calculateAmountOutForSwapREADONLY", [L, P], nil)
148148 if ($isInstanceOf(R, "Int"))
149149 then R
150150 else throw(($getType(R) + " couldn't be cast to Int"))
151151 }
152152 $Tuple2(nil, V)
153153 }
154154 else throw("Strict value is not equal to itself.")
155155 }
156156
157157
158158
159159 @Callable(z)
160160 func swap (W,G,X) = {
161161 let Y = value(z.payments[0])
162162 let F = if ((Y.assetId == unit))
163163 then toBytes("WAVES")
164164 else value(Y.assetId)
165165 let E = value(Y.amount)
166166 let H = value(getInteger(n()))
167167 let I = fraction(toBigInt(E), toBigInt(H), b)
168168 let J = fraction(toBigInt(E), toBigInt(H), b)
169169 let K = (toBigInt(E) - I)
170170 let L = (K - J)
171171 let Z = [if ((size(z.payments) == 1))
172172 then true
173173 else throw("exactly 1 payment are expected")]
174174 if ((Z == Z))
175175 then {
176176 let M = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [F, G], nil)
177177 let N = invoke(k, "getLpAssetFromPoolAssetsREADONLY", [G, F], nil)
178178 let aa = if ((M != unit))
179179 then {
180180 let P = false
181181 let Q = {
182182 let R = invoke(k, "getPoolAddressFromLpAssetREADONLY", [M], nil)
183183 if ($isInstanceOf(R, "Address"))
184184 then R
185185 else throw(($getType(R) + " couldn't be cast to Address"))
186186 }
187187 $Tuple2(P, Q)
188188 }
189189 else if ((N != unit))
190190 then {
191191 let P = true
192192 let Q = invoke(k, "getPoolAddressFromLpAssetREADONLY", [N], nil)
193193 $Tuple2(P, Q)
194194 }
195195 else f
196196 let P = aa._1
197197 let Q = aa._2
198198 let S = {
199199 let R = invoke(k, "isPoolOneTokenOperationsDisabledREADONLY", [Q], nil)
200200 if ($isInstanceOf(R, "Boolean"))
201201 then R
202202 else throw(($getType(R) + " couldn't be cast to Boolean"))
203203 }
204204 let T = if (S)
205205 then true
206206 else e
207207 if ((T == T))
208208 then {
209209 let U = addressFromStringValue(valueOrElse(Q, ""))
210210 let V = {
211211 let R = invoke(U, "calculateAmountOutForSwapAndSendTokens", [L, P, W, X], [AttachedPayment(F, toInt(K))])
212212 if ($isInstanceOf(R, "Boolean"))
213213 then R
214214 else throw(($getType(R) + " couldn't be cast to Boolean"))
215215 }
216216 $Tuple2(nil, V)
217217 }
218218 else throw("Strict value is not equal to itself.")
219219 }
220220 else throw("Strict value is not equal to itself.")
221221 }
222222
223223
224224
225225 @Callable(z)
226226 func setManager (ab) = {
227227 let ac = B(z)
228228 if ((ac == ac))
229229 then {
230230 let ad = fromBase58String(ab)
231231 if ((ad == ad))
232232 then [StringEntry(i(), ab)]
233233 else throw("Strict value is not equal to itself.")
234234 }
235235 else throw("Strict value is not equal to itself.")
236236 }
237237
238238
239239
240240 @Callable(z)
241241 func confirmManager () = {
242242 let ae = x()
243243 let af = if (isDefined(ae))
244244 then true
245245 else throw("no pending manager")
246246 if ((af == af))
247247 then {
248248 let ag = if ((z.callerPublicKey == value(ae)))
249249 then true
250250 else throw("you are not pending manager")
251251 if ((ag == ag))
252252 then [StringEntry(h(), toBase58String(value(ae))), DeleteEntry(i())]
253253 else throw("Strict value is not equal to itself.")
254254 }
255255 else throw("Strict value is not equal to itself.")
256256 }
257257
258258
259259 @Verifier(ah)
260260 func ai () = {
261261 let aj = {
262262 let q = v()
263263 if ($isInstanceOf(q, "ByteVector"))
264264 then {
265265 let A = q
266266 A
267267 }
268268 else if ($isInstanceOf(q, "Unit"))
269269 then ah.senderPublicKey
270270 else throw("Match error")
271271 }
272272 sigVerify(ah.bodyBytes, ah.proofs[0], aj)
273273 }
274274

github/deemru/w8io/169f3d6 
62.24 ms