tx · EUVo8k9EQrbzF22FqGngLPXDXhqEffZU92rX9pjgTR3Z 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS: -0.01100000 Waves 2023.03.24 21:05 [2504434] smart account 3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS > SELF 0.00000000 Waves
{ "type": 13, "id": "EUVo8k9EQrbzF22FqGngLPXDXhqEffZU92rX9pjgTR3Z", "fee": 1100000, "feeAssetId": null, "timestamp": 1679681158403, "version": 2, "chainId": 84, "sender": "3MvRWw2FPEimFCTGtK7qY9uAJbM7XJ4ZfJS", "senderPublicKey": "HP8sssVq1866F7CaPQJwgFrt6fsqhQjKwM84cL1wjD2a", "proofs": [ "2Jrxutx5Djpy3WFacmwWVUBZpa2NctNpuz8Juu8D1NRzzamoVku3xmKkSfud1T7NyPebng1SjBjVcaAHET7kbh8B" ], "script": "base64:BgIeCAISBwoFCAEIAQESAwoBCBIDCgEIEgcKBQgIAQEBJgALU0ZfUE9TX1RZUEUCAlNGAAtXWF9QT1NfVFlQRQICV1gABlNDQUxFOACAwtcvAApGRUVfU0NBTEU2AMCEPQAUa1NGUG9vbEFBc3NldEJhbGFuY2UCD0FfYXNzZXRfYmFsYW5jZQAUa1NGUG9vbEJBc3NldEJhbGFuY2UCD0JfYXNzZXRfYmFsYW5jZQAPa1NGUG9vbEFBc3NldElkAgpBX2Fzc2V0X2lkAA9rU0ZQb29sQkFzc2V0SWQCCkJfYXNzZXRfaWQADmtTRlBvb2xTaGFyZUlkAg5zaGFyZV9hc3NldF9pZAAOa1NGUG9vbFZlcnNpb24CB3ZlcnNpb24AEGtTRkZhcm1pbmdTdGFrZWQCFF9zaGFyZV90b2tlbnNfbG9ja2VkAA1rVXNlclBvc2l0aW9uAg5fdXNlcl9wb3NpdGlvbgARa1VzZXJQb3NpdGlvblR5cGUCE191c2VyX3Bvc2l0aW9uX3R5cGUAEGtVc2VyUG9zaXRpb25OdW0CFV91c2VyX3Bvc2l0aW9uX251bWJlc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pbml0TmV3UG9vbAUEdHlwZQhwb29sQWRkcgtpbkZlZU5vTG9hbglpbkZlZUxvYW4GY2FwRmVlAwMJAQIhPQIFBHR5cGUFC1NGX1BPU19UWVBFCQECIT0CBQR0eXBlBQtXWF9QT1NfVFlQRQcJAAIBAgpXcm9uZyB0eXBlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRVrQXhseUluRmVlV2l0aG91dExvYW4FC2luRmVlTm9Mb2FuCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIFCHBvb2xBZGRyBRJrQXhseUluRmVlV2l0aExvYW4FCWluRmVlTG9hbgkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICBQhwb29sQWRkcgULa0F4bHlDYXBGZWUFBmNhcEZlZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIFBWtQb29sBQhwb29sQWRkcgUEdHlwZQUDbmlsAQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleZNvLxE=", "height": 2504434, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EtvXmhtURw3Ua5nPr3xFosjxS35FNwQQbEN3i7DgGk7k Next: JDJUwqzx3X8AZzceH5WkHVYC7py7GgEWMUHWASuwdeaa Diff:
Old | New | Differences | |
---|---|---|---|
134 | 134 | let aj = ag._2 | |
135 | 135 | let ak = ag._3 | |
136 | 136 | let al = ag._4 | |
137 | - | let am = if (if ((ai > 0)) | |
137 | + | let am = getStringValue(H, "version") | |
138 | + | let an = if (if ((ai > 0)) | |
138 | 139 | then (aj > 0) | |
139 | 140 | else false) | |
140 | 141 | then { | |
141 | - | let an = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
142 | - | invoke(H, "replenishWithTwoTokensV2", [false, 0], an) | |
142 | + | let ao = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
143 | + | if ((am == "1.0.0")) | |
144 | + | then invoke(H, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], ao) | |
145 | + | else if ((am == "2.0.0")) | |
146 | + | then invoke(H, "replenishWithTwoTokensV2", [false, 0], ao) | |
147 | + | else throw("Wrong pool type") | |
143 | 148 | } | |
144 | 149 | else 0 | |
145 | - | if (( | |
150 | + | if ((an == an)) | |
146 | 151 | then { | |
147 | - | let | |
152 | + | let ap = if ((ak > 0)) | |
148 | 153 | then { | |
149 | - | let an = [AttachedPayment(S(al), ak)] | |
150 | - | let ap = [ab, ac, false, 0] | |
151 | - | invoke(H, "replenishWithOneTokenV2", ap, an) | |
154 | + | let ao = [AttachedPayment(S(al), ak)] | |
155 | + | if ((am == "1.0.0")) | |
156 | + | then { | |
157 | + | let aq = [toString(ab), toString(ac), "false", "0"] | |
158 | + | invoke(H, "callFunction", ["replenishWithOneToken", aq], ao) | |
159 | + | } | |
160 | + | else if ((am == "2.0.0")) | |
161 | + | then { | |
162 | + | let aq = [ab, ac, false, 0] | |
163 | + | invoke(H, "replenishWithOneTokenV2", [false, 0], ao) | |
164 | + | } | |
165 | + | else throw("Wrong pool type") | |
152 | 166 | } | |
153 | 167 | else 0 | |
154 | - | if (( | |
168 | + | if ((ap == ap)) | |
155 | 169 | then { | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | if ((0 >= | |
170 | + | let ar = B(fromBase58String(aa)) | |
171 | + | let as = (ar - ad) | |
172 | + | let at = fraction(as, (d - N(K, O)), d) | |
173 | + | let au = (as - at) | |
174 | + | if ((0 >= au)) | |
161 | 175 | then throw("amount of staked sharetokens must be > 0") | |
162 | 176 | else { | |
163 | - | let | |
164 | - | if (( | |
177 | + | let av = invoke(P(), "lockShareTokens", [K, 0], [AttachedPayment(fromBase58String(aa), au)]) | |
178 | + | if ((av == av)) | |
165 | 179 | then { | |
166 | - | let | |
167 | - | let | |
168 | - | [IntegerEntry((K + o), ( | |
180 | + | let aw = J(K) | |
181 | + | let ax = L(K, M) | |
182 | + | [IntegerEntry((K + o), (aw + au)), IntegerEntry((((((K + "_") + M) + "_") + toString(ax)) + l), au), StringEntry((((((K + "_") + M) + "_") + toString(ax)) + m), a), IntegerEntry((((K + "_") + M) + n), ax), ScriptTransfer(y, at, fromBase58String(aa))] | |
169 | 183 | } | |
170 | 184 | else throw("Strict value is not equal to itself.") | |
171 | 185 | } | |
176 | 190 | } | |
177 | 191 | ||
178 | 192 | ||
179 | - | func ax (M,K,O,U,V,W,X,Y,Z,aa,ab,ac) = { | |
180 | - | let ad = B(fromBase58String(aa)) | |
181 | - | let H = Address(fromBase58String(K)) | |
182 | - | let ae = fraction(c, U, Y) | |
183 | - | let af = fraction(c, W, Z) | |
184 | - | let ay = if ((af > ae)) | |
185 | - | then { | |
186 | - | let ah = fraction(Z, ae, c, CEILING) | |
187 | - | $Tuple4(U, ah, (W - ah), X) | |
188 | - | } | |
189 | - | else { | |
190 | - | let ah = fraction(Y, af, c, CEILING) | |
191 | - | $Tuple4(ah, W, (U - ah), V) | |
192 | - | } | |
193 | - | let ai = ay._1 | |
194 | - | let aj = ay._2 | |
195 | - | let ak = ay._3 | |
196 | - | let al = ay._4 | |
197 | - | let az = getStringValue(H, "version") | |
198 | - | let am = if (if ((ai > 0)) | |
199 | - | then (aj > 0) | |
200 | - | else false) | |
201 | - | then { | |
202 | - | let an = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
203 | - | if ((az == "1.0.0")) | |
204 | - | then invoke(H, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], an) | |
205 | - | else if ((az == "2.0.0")) | |
206 | - | then invoke(H, "replenishWithTwoTokensV2", [false, 0], an) | |
207 | - | else throw("Wrong pool type") | |
208 | - | } | |
209 | - | else 0 | |
210 | - | if ((am == am)) | |
211 | - | then { | |
212 | - | let ao = if ((ak > 0)) | |
213 | - | then { | |
214 | - | let an = [AttachedPayment(S(al), ak)] | |
215 | - | if ((az == "1.0.0")) | |
216 | - | then { | |
217 | - | let ap = [toString(ab), toString(ac), "false", "0"] | |
218 | - | invoke(H, "callFunction", ["replenishWithOneToken", ap], an) | |
219 | - | } | |
220 | - | else if ((az == "2.0.0")) | |
221 | - | then { | |
222 | - | let ap = [ab, ac, false, 0] | |
223 | - | invoke(H, "replenishWithOneTokenV2", [false, 0], an) | |
224 | - | } | |
225 | - | else throw("Wrong pool type") | |
226 | - | } | |
227 | - | else 0 | |
228 | - | if ((ao == ao)) | |
229 | - | then { | |
230 | - | let aq = B(fromBase58String(aa)) | |
231 | - | let ar = (aq - ad) | |
232 | - | let as = fraction(ar, (d - N(K, O)), d) | |
233 | - | let at = (ar - as) | |
234 | - | if ((0 >= at)) | |
235 | - | then throw("amount of staked sharetokens must be > 0") | |
236 | - | else { | |
237 | - | let au = invoke(P(), "lockShareTokens", [K, 0], [AttachedPayment(fromBase58String(aa), at)]) | |
238 | - | if ((au == au)) | |
239 | - | then { | |
240 | - | let av = J(K) | |
241 | - | let aw = L(K, M) | |
242 | - | [IntegerEntry((K + o), (av + at)), IntegerEntry((((((K + "_") + M) + "_") + toString(aw)) + l), at), StringEntry((((((K + "_") + M) + "_") + toString(aw)) + m), a), IntegerEntry((((K + "_") + M) + n), aw), ScriptTransfer(y, as, fromBase58String(aa))] | |
243 | - | } | |
244 | - | else throw("Strict value is not equal to itself.") | |
245 | - | } | |
246 | - | } | |
247 | - | else throw("Strict value is not equal to itself.") | |
248 | - | } | |
249 | - | else throw("Strict value is not equal to itself.") | |
250 | - | } | |
193 | + | func ay (M,K,O,U,V,W,X,Y,Z,aa,ab,ac) = nil | |
251 | 194 | ||
252 | 195 | ||
253 | 196 | @Callable(A) | |
254 | - | func replanish (K,aA | |
255 | - | let | |
256 | - | let | |
197 | + | func replanish (K,az,aA,ab,ac) = { | |
198 | + | let aB = valueOrErrorMessage(getString(this, (u + K)), "Pool is not inited") | |
199 | + | let aC = if ((aB == a)) | |
257 | 200 | then G(Address(fromBase58String(K))) | |
258 | - | else if (( | |
201 | + | else if ((aB == b)) | |
259 | 202 | then I(Address(fromBase58String(K))) | |
260 | 203 | else throw("Wrong pool type") | |
261 | - | let | |
262 | - | let | |
263 | - | let Y = | |
264 | - | let Z = | |
265 | - | let aa = | |
266 | - | let | |
267 | - | then if ((R(A.payments[0].assetId) != | |
204 | + | let aD = aC._1 | |
205 | + | let aE = aC._2 | |
206 | + | let Y = aC._3 | |
207 | + | let Z = aC._4 | |
208 | + | let aa = aC._5 | |
209 | + | let aF = if ((size(A.payments) == 2)) | |
210 | + | then if ((R(A.payments[0].assetId) != aD)) | |
268 | 211 | then throw("Wrong payment asset A") | |
269 | - | else if ((R(A.payments[1].assetId) != | |
212 | + | else if ((R(A.payments[1].assetId) != aE)) | |
270 | 213 | then throw("Wrong payment asset B") | |
271 | - | else $Tuple4(A.payments[0].amount, | |
214 | + | else $Tuple4(A.payments[0].amount, aD, A.payments[1].amount, aE) | |
272 | 215 | else if ((size(A.payments) == 1)) | |
273 | - | then if ((R(A.payments[0].assetId) == | |
274 | - | then $Tuple4(A.payments[0].amount, | |
275 | - | else if ((R(A.payments[0].assetId) == | |
276 | - | then $Tuple4(0, | |
216 | + | then if ((R(A.payments[0].assetId) == aD)) | |
217 | + | then $Tuple4(A.payments[0].amount, aD, 0, aE) | |
218 | + | else if ((R(A.payments[0].assetId) == aE)) | |
219 | + | then $Tuple4(0, aD, A.payments[0].amount, aE) | |
277 | 220 | else throw("Wrong payment") | |
278 | 221 | else throw("One or two payments expected") | |
279 | - | let U = | |
280 | - | let V = | |
281 | - | let W = | |
282 | - | let X = | |
283 | - | if (( | |
222 | + | let U = aF._1 | |
223 | + | let V = aF._2 | |
224 | + | let W = aF._3 | |
225 | + | let X = aF._4 | |
226 | + | if ((az > 0)) | |
284 | 227 | then { | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | if ($isInstanceOf( | |
289 | - | then | |
228 | + | let aG = makeString([aB, toString(A.caller), K, toString(U), V, toString(W), X, toString(Y), toString(Z), aa, toString(ab), toString(ac)], ",") | |
229 | + | let aH = { | |
230 | + | let aI = invoke(this, "createNewRequest", [aG], nil) | |
231 | + | if ($isInstanceOf(aI, "Int")) | |
232 | + | then aI | |
290 | 233 | else unit | |
291 | 234 | } | |
292 | - | if (( | |
235 | + | if ((aH == aH)) | |
293 | 236 | then { | |
294 | - | let | |
295 | - | let | |
237 | + | let aJ = [toString(A.caller), aa, aA, az, toString(this), "replanishFromLand", toString(valueOrErrorMessage(aH, "Can't create new request"))] | |
238 | + | let aK = reentrantInvoke(Q(), "flashPosition", aJ, nil) | |
296 | 239 | nil | |
297 | 240 | } | |
298 | 241 | else throw("Strict value is not equal to itself.") | |
299 | 242 | } | |
300 | - | else if (( | |
243 | + | else if ((aB == a)) | |
301 | 244 | then T(toString(A.caller), K, false, U, V, W, X, Y, Z, aa, ab, ac) | |
302 | 245 | else throw("Cant wx") | |
303 | 246 | } | |
305 | 248 | ||
306 | 249 | ||
307 | 250 | @Callable(A) | |
308 | - | func replanishFromLand ( | |
309 | - | let | |
310 | - | if (( | |
311 | - | then T( | |
251 | + | func replanishFromLand (aL) = { | |
252 | + | let aG = split(valueOrErrorMessage(getString(this, (aL + s)), ("No request with id " + aL)), ",") | |
253 | + | if ((aG[0] == a)) | |
254 | + | then T(aG[1], aG[2], true, parseIntValue(aG[3]), aG[4], parseIntValue(aG[5]), aG[6], parseIntValue(aG[7]), parseIntValue(aG[8]), aG[9], parseIntValue(aG[10]), parseIntValue(aG[11])) | |
312 | 255 | else throw("Cant wx") | |
313 | 256 | } | |
314 | 257 | ||
315 | 258 | ||
316 | 259 | ||
317 | 260 | @Callable(A) | |
318 | - | func createNewRequest ( | |
319 | - | let | |
320 | - | $Tuple2([StringEntry((toString( | |
261 | + | func createNewRequest (aM) = valueOrElse(z(A), { | |
262 | + | let aH = (valueOrElse(getInteger(this, t), 0) + 1) | |
263 | + | $Tuple2([StringEntry((toString(aH) + s), aM)], aH) | |
321 | 264 | }) | |
322 | 265 | ||
323 | 266 | ||
324 | 267 | ||
325 | 268 | @Callable(A) | |
326 | - | func initNewPool ( | |
327 | - | then ( | |
269 | + | func initNewPool (aB,H,aN,aO,aP) = if (if ((aB != a)) | |
270 | + | then (aB != b) | |
328 | 271 | else false) | |
329 | 272 | then throw("Wrong type") | |
330 | - | else [IntegerEntry((H + p), | |
273 | + | else [IntegerEntry((H + p), aN), IntegerEntry((H + q), aO), IntegerEntry((H + r), aP), StringEntry((u + H), aB)] | |
331 | 274 | ||
332 | 275 | ||
333 | - | @Verifier( | |
334 | - | func | |
276 | + | @Verifier(aQ) | |
277 | + | func aR () = sigVerify(aQ.bodyBytes, aQ.proofs[0], aQ.senderPublicKey) | |
335 | 278 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "SF" | |
5 | 5 | ||
6 | 6 | let b = "WX" | |
7 | 7 | ||
8 | 8 | let c = 100000000 | |
9 | 9 | ||
10 | 10 | let d = 1000000 | |
11 | 11 | ||
12 | 12 | let e = "A_asset_balance" | |
13 | 13 | ||
14 | 14 | let f = "B_asset_balance" | |
15 | 15 | ||
16 | 16 | let g = "A_asset_id" | |
17 | 17 | ||
18 | 18 | let h = "B_asset_id" | |
19 | 19 | ||
20 | 20 | let i = "share_asset_id" | |
21 | 21 | ||
22 | 22 | let j = "version" | |
23 | 23 | ||
24 | 24 | let k = "_share_tokens_locked" | |
25 | 25 | ||
26 | 26 | let l = "_user_position" | |
27 | 27 | ||
28 | 28 | let m = "_user_position_type" | |
29 | 29 | ||
30 | 30 | let n = "_user_position_number" | |
31 | 31 | ||
32 | 32 | let o = "_total_position" | |
33 | 33 | ||
34 | 34 | let p = "_axly_fee_without_loan" | |
35 | 35 | ||
36 | 36 | let q = "_axly_fee_with_loan" | |
37 | 37 | ||
38 | 38 | let r = "_axly_fee_cap" | |
39 | 39 | ||
40 | 40 | let s = "_request_id" | |
41 | 41 | ||
42 | 42 | let t = "requests_iter" | |
43 | 43 | ||
44 | 44 | let u = "pool_" | |
45 | 45 | ||
46 | 46 | let v = "axly_money_box" | |
47 | 47 | ||
48 | 48 | let w = "swopfi_farming_addr" | |
49 | 49 | ||
50 | 50 | let x = "lend_service_addr" | |
51 | 51 | ||
52 | 52 | let y = Address(fromBase58String(valueOrErrorMessage(getString(this, v), "No axly moneyBox address"))) | |
53 | 53 | ||
54 | 54 | func z (A) = if ((A.caller == this)) | |
55 | 55 | then unit | |
56 | 56 | else throw("Only contract itself can call this function") | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func B (C) = { | |
60 | 60 | let D = C | |
61 | 61 | if ($isInstanceOf(D, "ByteVector")) | |
62 | 62 | then { | |
63 | 63 | let E = D | |
64 | 64 | assetBalance(this, E) | |
65 | 65 | } | |
66 | 66 | else if ($isInstanceOf(D, "Unit")) | |
67 | 67 | then { | |
68 | 68 | let F = D | |
69 | 69 | wavesBalance(this).available | |
70 | 70 | } | |
71 | 71 | else throw("Match error") | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func G (H) = $Tuple5(valueOrErrorMessage(getString(H, g), "Can't get pool A asset id"), valueOrErrorMessage(getString(H, h), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(H, e), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(H, f), "Can't get pool B asset balance"), valueOrErrorMessage(getString(H, i), "Can't get share asset id")) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func I (H) = $Tuple5(valueOrErrorMessage(getString(H, g), "Can't get pool A asset id"), valueOrErrorMessage(getString(H, h), "Can't get pool B asset id"), valueOrErrorMessage(getInteger(H, e), "Can't get pool A asset balance"), valueOrErrorMessage(getInteger(H, f), "Can't get pool B asset balance"), valueOrErrorMessage(getString(H, i), "Can't get share asset id")) | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func J (K) = valueOrElse(getInteger(this, (K + o)), 0) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func L (K,M) = (valueOrElse(getInteger(this, (((K + "_") + M) + n)), 0) + 1) | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func N (K,O) = if (O) | |
88 | 88 | then getIntegerValue(this, (K + q)) | |
89 | 89 | else getIntegerValue(this, (K + p)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func P () = Address(fromBase58String(valueOrErrorMessage(getString(this, w), "Can't get swopfi farming addr"))) | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func Q () = Address(fromBase58String(valueOrErrorMessage(getString(this, x), "Can't get lend service addr"))) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func R (C) = { | |
99 | 99 | let D = C | |
100 | 100 | if ($isInstanceOf(D, "ByteVector")) | |
101 | 101 | then { | |
102 | 102 | let E = D | |
103 | 103 | toBase58String(E) | |
104 | 104 | } | |
105 | 105 | else if ($isInstanceOf(D, "Unit")) | |
106 | 106 | then { | |
107 | 107 | let F = D | |
108 | 108 | "WAVES" | |
109 | 109 | } | |
110 | 110 | else throw("Match error") | |
111 | 111 | } | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func S (C) = if ((C == "WAVES")) | |
115 | 115 | then unit | |
116 | 116 | else fromBase58String(C) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func T (M,K,O,U,V,W,X,Y,Z,aa,ab,ac) = { | |
120 | 120 | let ad = B(fromBase58String(aa)) | |
121 | 121 | let H = Address(fromBase58String(K)) | |
122 | 122 | let ae = fraction(c, U, Y) | |
123 | 123 | let af = fraction(c, W, Z) | |
124 | 124 | let ag = if ((af > ae)) | |
125 | 125 | then { | |
126 | 126 | let ah = fraction(Z, ae, c, CEILING) | |
127 | 127 | $Tuple4(U, ah, (W - ah), X) | |
128 | 128 | } | |
129 | 129 | else { | |
130 | 130 | let ah = fraction(Y, af, c, CEILING) | |
131 | 131 | $Tuple4(ah, W, (U - ah), V) | |
132 | 132 | } | |
133 | 133 | let ai = ag._1 | |
134 | 134 | let aj = ag._2 | |
135 | 135 | let ak = ag._3 | |
136 | 136 | let al = ag._4 | |
137 | - | let am = if (if ((ai > 0)) | |
137 | + | let am = getStringValue(H, "version") | |
138 | + | let an = if (if ((ai > 0)) | |
138 | 139 | then (aj > 0) | |
139 | 140 | else false) | |
140 | 141 | then { | |
141 | - | let an = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
142 | - | invoke(H, "replenishWithTwoTokensV2", [false, 0], an) | |
142 | + | let ao = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
143 | + | if ((am == "1.0.0")) | |
144 | + | then invoke(H, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], ao) | |
145 | + | else if ((am == "2.0.0")) | |
146 | + | then invoke(H, "replenishWithTwoTokensV2", [false, 0], ao) | |
147 | + | else throw("Wrong pool type") | |
143 | 148 | } | |
144 | 149 | else 0 | |
145 | - | if (( | |
150 | + | if ((an == an)) | |
146 | 151 | then { | |
147 | - | let | |
152 | + | let ap = if ((ak > 0)) | |
148 | 153 | then { | |
149 | - | let an = [AttachedPayment(S(al), ak)] | |
150 | - | let ap = [ab, ac, false, 0] | |
151 | - | invoke(H, "replenishWithOneTokenV2", ap, an) | |
154 | + | let ao = [AttachedPayment(S(al), ak)] | |
155 | + | if ((am == "1.0.0")) | |
156 | + | then { | |
157 | + | let aq = [toString(ab), toString(ac), "false", "0"] | |
158 | + | invoke(H, "callFunction", ["replenishWithOneToken", aq], ao) | |
159 | + | } | |
160 | + | else if ((am == "2.0.0")) | |
161 | + | then { | |
162 | + | let aq = [ab, ac, false, 0] | |
163 | + | invoke(H, "replenishWithOneTokenV2", [false, 0], ao) | |
164 | + | } | |
165 | + | else throw("Wrong pool type") | |
152 | 166 | } | |
153 | 167 | else 0 | |
154 | - | if (( | |
168 | + | if ((ap == ap)) | |
155 | 169 | then { | |
156 | - | let | |
157 | - | let | |
158 | - | let | |
159 | - | let | |
160 | - | if ((0 >= | |
170 | + | let ar = B(fromBase58String(aa)) | |
171 | + | let as = (ar - ad) | |
172 | + | let at = fraction(as, (d - N(K, O)), d) | |
173 | + | let au = (as - at) | |
174 | + | if ((0 >= au)) | |
161 | 175 | then throw("amount of staked sharetokens must be > 0") | |
162 | 176 | else { | |
163 | - | let | |
164 | - | if (( | |
177 | + | let av = invoke(P(), "lockShareTokens", [K, 0], [AttachedPayment(fromBase58String(aa), au)]) | |
178 | + | if ((av == av)) | |
165 | 179 | then { | |
166 | - | let | |
167 | - | let | |
168 | - | [IntegerEntry((K + o), ( | |
180 | + | let aw = J(K) | |
181 | + | let ax = L(K, M) | |
182 | + | [IntegerEntry((K + o), (aw + au)), IntegerEntry((((((K + "_") + M) + "_") + toString(ax)) + l), au), StringEntry((((((K + "_") + M) + "_") + toString(ax)) + m), a), IntegerEntry((((K + "_") + M) + n), ax), ScriptTransfer(y, at, fromBase58String(aa))] | |
169 | 183 | } | |
170 | 184 | else throw("Strict value is not equal to itself.") | |
171 | 185 | } | |
172 | 186 | } | |
173 | 187 | else throw("Strict value is not equal to itself.") | |
174 | 188 | } | |
175 | 189 | else throw("Strict value is not equal to itself.") | |
176 | 190 | } | |
177 | 191 | ||
178 | 192 | ||
179 | - | func ax (M,K,O,U,V,W,X,Y,Z,aa,ab,ac) = { | |
180 | - | let ad = B(fromBase58String(aa)) | |
181 | - | let H = Address(fromBase58String(K)) | |
182 | - | let ae = fraction(c, U, Y) | |
183 | - | let af = fraction(c, W, Z) | |
184 | - | let ay = if ((af > ae)) | |
185 | - | then { | |
186 | - | let ah = fraction(Z, ae, c, CEILING) | |
187 | - | $Tuple4(U, ah, (W - ah), X) | |
188 | - | } | |
189 | - | else { | |
190 | - | let ah = fraction(Y, af, c, CEILING) | |
191 | - | $Tuple4(ah, W, (U - ah), V) | |
192 | - | } | |
193 | - | let ai = ay._1 | |
194 | - | let aj = ay._2 | |
195 | - | let ak = ay._3 | |
196 | - | let al = ay._4 | |
197 | - | let az = getStringValue(H, "version") | |
198 | - | let am = if (if ((ai > 0)) | |
199 | - | then (aj > 0) | |
200 | - | else false) | |
201 | - | then { | |
202 | - | let an = [AttachedPayment(S(V), ai), AttachedPayment(S(X), aj)] | |
203 | - | if ((az == "1.0.0")) | |
204 | - | then invoke(H, "callFunction", ["replenishWithTwoTokens", ["false", "0"]], an) | |
205 | - | else if ((az == "2.0.0")) | |
206 | - | then invoke(H, "replenishWithTwoTokensV2", [false, 0], an) | |
207 | - | else throw("Wrong pool type") | |
208 | - | } | |
209 | - | else 0 | |
210 | - | if ((am == am)) | |
211 | - | then { | |
212 | - | let ao = if ((ak > 0)) | |
213 | - | then { | |
214 | - | let an = [AttachedPayment(S(al), ak)] | |
215 | - | if ((az == "1.0.0")) | |
216 | - | then { | |
217 | - | let ap = [toString(ab), toString(ac), "false", "0"] | |
218 | - | invoke(H, "callFunction", ["replenishWithOneToken", ap], an) | |
219 | - | } | |
220 | - | else if ((az == "2.0.0")) | |
221 | - | then { | |
222 | - | let ap = [ab, ac, false, 0] | |
223 | - | invoke(H, "replenishWithOneTokenV2", [false, 0], an) | |
224 | - | } | |
225 | - | else throw("Wrong pool type") | |
226 | - | } | |
227 | - | else 0 | |
228 | - | if ((ao == ao)) | |
229 | - | then { | |
230 | - | let aq = B(fromBase58String(aa)) | |
231 | - | let ar = (aq - ad) | |
232 | - | let as = fraction(ar, (d - N(K, O)), d) | |
233 | - | let at = (ar - as) | |
234 | - | if ((0 >= at)) | |
235 | - | then throw("amount of staked sharetokens must be > 0") | |
236 | - | else { | |
237 | - | let au = invoke(P(), "lockShareTokens", [K, 0], [AttachedPayment(fromBase58String(aa), at)]) | |
238 | - | if ((au == au)) | |
239 | - | then { | |
240 | - | let av = J(K) | |
241 | - | let aw = L(K, M) | |
242 | - | [IntegerEntry((K + o), (av + at)), IntegerEntry((((((K + "_") + M) + "_") + toString(aw)) + l), at), StringEntry((((((K + "_") + M) + "_") + toString(aw)) + m), a), IntegerEntry((((K + "_") + M) + n), aw), ScriptTransfer(y, as, fromBase58String(aa))] | |
243 | - | } | |
244 | - | else throw("Strict value is not equal to itself.") | |
245 | - | } | |
246 | - | } | |
247 | - | else throw("Strict value is not equal to itself.") | |
248 | - | } | |
249 | - | else throw("Strict value is not equal to itself.") | |
250 | - | } | |
193 | + | func ay (M,K,O,U,V,W,X,Y,Z,aa,ab,ac) = nil | |
251 | 194 | ||
252 | 195 | ||
253 | 196 | @Callable(A) | |
254 | - | func replanish (K,aA | |
255 | - | let | |
256 | - | let | |
197 | + | func replanish (K,az,aA,ab,ac) = { | |
198 | + | let aB = valueOrErrorMessage(getString(this, (u + K)), "Pool is not inited") | |
199 | + | let aC = if ((aB == a)) | |
257 | 200 | then G(Address(fromBase58String(K))) | |
258 | - | else if (( | |
201 | + | else if ((aB == b)) | |
259 | 202 | then I(Address(fromBase58String(K))) | |
260 | 203 | else throw("Wrong pool type") | |
261 | - | let | |
262 | - | let | |
263 | - | let Y = | |
264 | - | let Z = | |
265 | - | let aa = | |
266 | - | let | |
267 | - | then if ((R(A.payments[0].assetId) != | |
204 | + | let aD = aC._1 | |
205 | + | let aE = aC._2 | |
206 | + | let Y = aC._3 | |
207 | + | let Z = aC._4 | |
208 | + | let aa = aC._5 | |
209 | + | let aF = if ((size(A.payments) == 2)) | |
210 | + | then if ((R(A.payments[0].assetId) != aD)) | |
268 | 211 | then throw("Wrong payment asset A") | |
269 | - | else if ((R(A.payments[1].assetId) != | |
212 | + | else if ((R(A.payments[1].assetId) != aE)) | |
270 | 213 | then throw("Wrong payment asset B") | |
271 | - | else $Tuple4(A.payments[0].amount, | |
214 | + | else $Tuple4(A.payments[0].amount, aD, A.payments[1].amount, aE) | |
272 | 215 | else if ((size(A.payments) == 1)) | |
273 | - | then if ((R(A.payments[0].assetId) == | |
274 | - | then $Tuple4(A.payments[0].amount, | |
275 | - | else if ((R(A.payments[0].assetId) == | |
276 | - | then $Tuple4(0, | |
216 | + | then if ((R(A.payments[0].assetId) == aD)) | |
217 | + | then $Tuple4(A.payments[0].amount, aD, 0, aE) | |
218 | + | else if ((R(A.payments[0].assetId) == aE)) | |
219 | + | then $Tuple4(0, aD, A.payments[0].amount, aE) | |
277 | 220 | else throw("Wrong payment") | |
278 | 221 | else throw("One or two payments expected") | |
279 | - | let U = | |
280 | - | let V = | |
281 | - | let W = | |
282 | - | let X = | |
283 | - | if (( | |
222 | + | let U = aF._1 | |
223 | + | let V = aF._2 | |
224 | + | let W = aF._3 | |
225 | + | let X = aF._4 | |
226 | + | if ((az > 0)) | |
284 | 227 | then { | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | if ($isInstanceOf( | |
289 | - | then | |
228 | + | let aG = makeString([aB, toString(A.caller), K, toString(U), V, toString(W), X, toString(Y), toString(Z), aa, toString(ab), toString(ac)], ",") | |
229 | + | let aH = { | |
230 | + | let aI = invoke(this, "createNewRequest", [aG], nil) | |
231 | + | if ($isInstanceOf(aI, "Int")) | |
232 | + | then aI | |
290 | 233 | else unit | |
291 | 234 | } | |
292 | - | if (( | |
235 | + | if ((aH == aH)) | |
293 | 236 | then { | |
294 | - | let | |
295 | - | let | |
237 | + | let aJ = [toString(A.caller), aa, aA, az, toString(this), "replanishFromLand", toString(valueOrErrorMessage(aH, "Can't create new request"))] | |
238 | + | let aK = reentrantInvoke(Q(), "flashPosition", aJ, nil) | |
296 | 239 | nil | |
297 | 240 | } | |
298 | 241 | else throw("Strict value is not equal to itself.") | |
299 | 242 | } | |
300 | - | else if (( | |
243 | + | else if ((aB == a)) | |
301 | 244 | then T(toString(A.caller), K, false, U, V, W, X, Y, Z, aa, ab, ac) | |
302 | 245 | else throw("Cant wx") | |
303 | 246 | } | |
304 | 247 | ||
305 | 248 | ||
306 | 249 | ||
307 | 250 | @Callable(A) | |
308 | - | func replanishFromLand ( | |
309 | - | let | |
310 | - | if (( | |
311 | - | then T( | |
251 | + | func replanishFromLand (aL) = { | |
252 | + | let aG = split(valueOrErrorMessage(getString(this, (aL + s)), ("No request with id " + aL)), ",") | |
253 | + | if ((aG[0] == a)) | |
254 | + | then T(aG[1], aG[2], true, parseIntValue(aG[3]), aG[4], parseIntValue(aG[5]), aG[6], parseIntValue(aG[7]), parseIntValue(aG[8]), aG[9], parseIntValue(aG[10]), parseIntValue(aG[11])) | |
312 | 255 | else throw("Cant wx") | |
313 | 256 | } | |
314 | 257 | ||
315 | 258 | ||
316 | 259 | ||
317 | 260 | @Callable(A) | |
318 | - | func createNewRequest ( | |
319 | - | let | |
320 | - | $Tuple2([StringEntry((toString( | |
261 | + | func createNewRequest (aM) = valueOrElse(z(A), { | |
262 | + | let aH = (valueOrElse(getInteger(this, t), 0) + 1) | |
263 | + | $Tuple2([StringEntry((toString(aH) + s), aM)], aH) | |
321 | 264 | }) | |
322 | 265 | ||
323 | 266 | ||
324 | 267 | ||
325 | 268 | @Callable(A) | |
326 | - | func initNewPool ( | |
327 | - | then ( | |
269 | + | func initNewPool (aB,H,aN,aO,aP) = if (if ((aB != a)) | |
270 | + | then (aB != b) | |
328 | 271 | else false) | |
329 | 272 | then throw("Wrong type") | |
330 | - | else [IntegerEntry((H + p), | |
273 | + | else [IntegerEntry((H + p), aN), IntegerEntry((H + q), aO), IntegerEntry((H + r), aP), StringEntry((u + H), aB)] | |
331 | 274 | ||
332 | 275 | ||
333 | - | @Verifier( | |
334 | - | func | |
276 | + | @Verifier(aQ) | |
277 | + | func aR () = sigVerify(aQ.bodyBytes, aQ.proofs[0], aQ.senderPublicKey) | |
335 | 278 |
github/deemru/w8io/169f3d6 71.02 ms ◑