tx · 3XHBoMsryPB4XqoSBmRCwemQaYrZJVxh7GPM5GTDUU92 3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5: -0.01800000 Waves 2023.09.20 10:59 [2763426] smart account 3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5 > SELF 0.00000000 Waves
{ "type": 13, "id": "3XHBoMsryPB4XqoSBmRCwemQaYrZJVxh7GPM5GTDUU92", "fee": 1800000, "feeAssetId": null, "timestamp": 1695196848650, "version": 2, "chainId": 84, "sender": "3MsVsEgTUxTm6ETYkHGaqMhMhiY2Nb3yDN5", "senderPublicKey": "2LmNyaN5YAXdg9C5vsXcTLU66hsW2KUNPsN7KcHBYhUo", "proofs": [ "ynwD6S3bD28TGqZk4dLFqbPVzoUY8FJgLysFxnaTWVwy4wdBfroNr78sq6QY9jUwSqA2CCE4CxfEdYTU54yK8dm" ], "script": "base64:BgIgCAISAwoBCBIDCgEIEgMKAQgSAwoBCBIDCgEIEgMKAQgEAA5kQXBwU2luY2VTdGFydADA9/eMqjEAClhUTkFzc2V0SUQBIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkABFDb2xsZWN0RmVlQWRkcmVzcwkApwgBASBSg9mgi9eQkjsz5eBARHIbc7Hg/F4fmB0sxZ6ySMfiIAEJY291bnRkYXlzAAQHVFNfRGlmZgkAZQIIBQlsYXN0QmxvY2sJdGltZXN0YW1wBQ5kQXBwU2luY2VTdGFydAQJZGF5bnVtYmVyCQBrAwABBQdUU19EaWZmAIC4mSkFCWRheW51bWJlcgYBaQEMUmVnaXN0ZXJQYWlyAQxFbnRlckFzc2V0SUQEBHBtdDEJAQV2YWx1ZQEJAJEDAggFAWkIcGF5bWVudHMAAAQEcG10MgkBBXZhbHVlAQkAkQMCCAUBaQhwYXltZW50cwABBApjdXJyZW50S2V5CQDYBAEICAUBaQZjYWxsZXIFYnl0ZXMEBVdBVkVTCQEBIQEJAQlpc0RlZmluZWQBCAUEcG10Mgdhc3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JAKwCAgkArAICAgtCYWxhbmNlX29mXwkA2AQBBQpYVE5Bc3NldElEAgFfBQxFbnRlckFzc2V0SUQFFU5ld0Fzc2V0SG9sZGluZ0luUGFpcgkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIFDlVzZXJMUFdvcnRoWFROBQpYVE5Bc3NldElECQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgUQVXNlckxQV29ydGhBc3NldAkA2QQBBQxFbnRlckFzc2V0SUQFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlY6C12", "height": 2763426, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BV2X9VMoKP45Cpbpe6GEM4vv3phP4ww5vBa1yDcYSoqQ Next: 3z8sdR9ciaTmCUsfmhEMJMjGpGctNEmPGtRittZ7UN7D Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | let D = fraction(B, C, (C + A.amount)) | |
81 | 81 | let E = (B - D) | |
82 | 82 | let F = 3 | |
83 | - | let G = ((E * F) / 1000) | |
84 | - | let H = ((E - G) - G) | |
85 | - | let I = { | |
86 | - | let J = getInteger(this, ((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b))) | |
87 | - | if ($isInstanceOf(J, "Int")) | |
83 | + | let G = d() | |
84 | + | let H = ((E * F) / 1000) | |
85 | + | let I = ((E - H) - H) | |
86 | + | let J = { | |
87 | + | let K = getInteger(this, ((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b))) | |
88 | + | if ($isInstanceOf(K, "Int")) | |
88 | 89 | then { | |
89 | - | let | |
90 | - | | |
90 | + | let L = K | |
91 | + | L | |
91 | 92 | } | |
92 | 93 | else 0 | |
93 | 94 | } | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
95 | + | let M = ((J + H) + H) | |
96 | + | let N = { | |
97 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
98 | + | if ($isInstanceOf(K, "Int")) | |
98 | 99 | then { | |
99 | - | let | |
100 | - | | |
100 | + | let L = K | |
101 | + | L | |
101 | 102 | } | |
102 | 103 | else 0 | |
103 | 104 | } | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
105 | + | let O = (C + A.amount) | |
106 | + | let P = { | |
107 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
108 | + | if ($isInstanceOf(K, "Int")) | |
108 | 109 | then { | |
109 | - | let | |
110 | - | | |
110 | + | let L = K | |
111 | + | L | |
111 | 112 | } | |
112 | 113 | else 0 | |
113 | 114 | } | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | if ($isInstanceOf( | |
115 | + | let Q = ((B - E) + H) | |
116 | + | let R = { | |
117 | + | let K = getIntegerValue(this, ("Total_of_Pair_Txns_" + h)) | |
118 | + | if ($isInstanceOf(K, "Int")) | |
118 | 119 | then { | |
119 | - | let | |
120 | - | | |
120 | + | let L = K | |
121 | + | L | |
121 | 122 | } | |
122 | 123 | else 0 | |
123 | 124 | } | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | if ($isInstanceOf( | |
125 | + | let S = (R + 1) | |
126 | + | let T = { | |
127 | + | let K = getIntegerValue(this, ((((toString(G) + "_Day_Volume_") + toBase58String(b)) + "_") + h)) | |
128 | + | if ($isInstanceOf(K, "Int")) | |
128 | 129 | then { | |
129 | - | let | |
130 | - | | |
130 | + | let L = K | |
131 | + | L | |
131 | 132 | } | |
132 | 133 | else 0 | |
133 | 134 | } | |
134 | - | let | |
135 | + | let U = (T + A.amount) | |
135 | 136 | if ((h == toBase58String(b))) | |
136 | 137 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach Whitelisted Asset as an attachment Token in payment[1].") | |
137 | 138 | else if ((z != h)) | |
148 | 149 | then throw((("Your Attached Asset Amount is very low. Attach More " + h) + " Tokens to Claim the minimum Amount of 0.1 dollar atleast.")) | |
149 | 150 | else if ((E > B)) | |
150 | 151 | then throw((("Pool Only has a Liquidity of " + toString((B / pow(10, 0, 6, 0, 0, CEILING)))) + " XTN. Add Liquidity into Pool.")) | |
151 | - | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b)), | |
152 | + | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b)), M), IntegerEntry(((((toString(G) + "_Day_Volume_") + toBase58String(b)) + "_") + h), U), IntegerEntry(("Total_of_Pair_Txns_" + h), S), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), O), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), Q), ScriptTransfer(g.caller, I, b), ScriptTransfer(c, H, b)] | |
152 | 153 | } | |
153 | 154 | ||
154 | 155 | ||
161 | 162 | else throw((("Only " + toBase58String(b)) + " XTN Token is required as an Attached payment[1].")) | |
162 | 163 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
163 | 164 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
164 | - | let | |
165 | - | let E = (C - | |
165 | + | let V = fraction(B, C, (B + A.amount)) | |
166 | + | let E = (C - V) | |
166 | 167 | let z = getString(this, ("Pair_UV_" + h)) | |
167 | 168 | let F = 3 | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | if ($isInstanceOf( | |
169 | + | let H = ((E * F) / 1000) | |
170 | + | let I = ((E - H) - H) | |
171 | + | let W = { | |
172 | + | let K = getInteger(this, ("Total_Swap_Fee_Collected_" + h)) | |
173 | + | if ($isInstanceOf(K, "Int")) | |
173 | 174 | then { | |
174 | - | let | |
175 | - | | |
175 | + | let L = K | |
176 | + | L | |
176 | 177 | } | |
177 | 178 | else 0 | |
178 | 179 | } | |
179 | - | let | |
180 | - | let | |
181 | - | let | |
182 | - | if ($isInstanceOf( | |
180 | + | let X = ((W + H) + H) | |
181 | + | let N = { | |
182 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
183 | + | if ($isInstanceOf(K, "Int")) | |
183 | 184 | then { | |
184 | - | let | |
185 | - | | |
185 | + | let L = K | |
186 | + | L | |
186 | 187 | } | |
187 | 188 | else 0 | |
188 | 189 | } | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
190 | + | let O = ((C - E) + H) | |
191 | + | let P = { | |
192 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
193 | + | if ($isInstanceOf(K, "Int")) | |
193 | 194 | then { | |
194 | - | let | |
195 | - | | |
195 | + | let L = K | |
196 | + | L | |
196 | 197 | } | |
197 | 198 | else 0 | |
198 | 199 | } | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | if ($isInstanceOf( | |
200 | + | let Q = (B + A.amount) | |
201 | + | let R = { | |
202 | + | let K = getIntegerValue(this, ("Total_of_Pair_Txns_" + h)) | |
203 | + | if ($isInstanceOf(K, "Int")) | |
203 | 204 | then { | |
204 | - | let | |
205 | - | | |
205 | + | let L = K | |
206 | + | L | |
206 | 207 | } | |
207 | 208 | else 0 | |
208 | 209 | } | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
210 | + | let S = (R + 1) | |
211 | + | let T = { | |
212 | + | let K = getIntegerValue(this, ((((toString(d()) + "_Day_Volume_") + h) + "_") + toBase58String(b))) | |
213 | + | if ($isInstanceOf(K, "Int")) | |
213 | 214 | then { | |
214 | - | let | |
215 | - | | |
215 | + | let L = K | |
216 | + | L | |
216 | 217 | } | |
217 | 218 | else 0 | |
218 | 219 | } | |
219 | - | let | |
220 | + | let U = (T + A.amount) | |
220 | 221 | if ((z != h)) | |
221 | 222 | then throw("Pair is not available in Whitelisted Asset.") | |
222 | 223 | else if ((h == toBase58String(b))) | |
231 | 232 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
232 | 233 | else if ((E > C)) | |
233 | 234 | then throw((("Pool Only has a Liquidity of " + toString(C)) + " Tokens. Add Liquidity into Pool.")) | |
234 | - | else [IntegerEntry(("Total_Swap_Fee_Collected_" + h), | |
235 | + | else [IntegerEntry(("Total_Swap_Fee_Collected_" + h), X), IntegerEntry(((((toString(d()) + "_Day_Volume_") + h) + "_") + toBase58String(b)), U), IntegerEntry(("Total_of_Pair_Txns_" + h), S), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), O), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), Q), ScriptTransfer(g.caller, I, fromBase58String(h)), ScriptTransfer(c, H, fromBase58String(h))] | |
235 | 236 | } | |
236 | 237 | ||
237 | 238 | ||
242 | 243 | let i = value(g.payments[0]) | |
243 | 244 | let j = value(g.payments[1]) | |
244 | 245 | let z = getString(this, ("Pair_UV_" + h)) | |
245 | - | let | |
246 | + | let Y = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + h)), "LP Token is Missing or May be not Generated.")) | |
246 | 247 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
247 | 248 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
248 | - | let | |
249 | - | let q = | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | if ($isInstanceOf( | |
249 | + | let Z = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
250 | + | let q = Z.decimals | |
251 | + | let aa = B | |
252 | + | let ab = C | |
253 | + | let ac = pow((((aa * 1000000) / ab) * pow(10, 0, q, 0, 0, CEILING)), 0, 1, 0, 0, CEILING) | |
254 | + | let ad = (6 + q) | |
255 | + | let ae = (ad / 2) | |
256 | + | let af = fraction(ac, i.amount, pow(10, 0, ad, 0, 0, CEILING)) | |
257 | + | let ag = pow((fraction(i.amount, 1, pow(10, 0, q, 0, 0, CEILING)) * fraction(j.amount, 1, pow(10, 0, 6, 0, 0, CEILING))), 0, 5, 1, ae, DOWN) | |
258 | + | let ah = { | |
259 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
260 | + | if ($isInstanceOf(K, "Int")) | |
260 | 261 | then { | |
261 | - | let | |
262 | - | | |
262 | + | let L = K | |
263 | + | L | |
263 | 264 | } | |
264 | 265 | else 0 | |
265 | 266 | } | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | if ($isInstanceOf( | |
267 | + | let ai = (ah + j.amount) | |
268 | + | let aj = { | |
269 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
270 | + | if ($isInstanceOf(K, "Int")) | |
270 | 271 | then { | |
271 | - | let | |
272 | - | | |
272 | + | let L = K | |
273 | + | L | |
273 | 274 | } | |
274 | 275 | else 0 | |
275 | 276 | } | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | if ($isInstanceOf( | |
277 | + | let ak = (aj + i.amount) | |
278 | + | let al = { | |
279 | + | let K = getIntegerValue(this, ("Total_LP_" + h)) | |
280 | + | if ($isInstanceOf(K, "Int")) | |
280 | 281 | then { | |
281 | - | let | |
282 | - | | |
282 | + | let L = K | |
283 | + | L | |
283 | 284 | } | |
284 | 285 | else 0 | |
285 | 286 | } | |
286 | - | let | |
287 | + | let am = (al + ag) | |
287 | 288 | if ((z != h)) | |
288 | 289 | then throw("Pair is not available in Whitelisted Asset.") | |
289 | 290 | else if ((h == toBase58String(b))) | |
300 | 301 | then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = XTN Token.") | |
301 | 302 | else if ((5000000 > j.amount)) | |
302 | 303 | then throw("please attach atleast 5 XTN in payment[2] & Equivalent worth of Token in payment[1]") | |
303 | - | else if ((j.amount != | |
304 | - | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString( | |
305 | - | else if ((1 > | |
306 | - | then throw((("LP Token Outcome is going below " + toString( | |
307 | - | else [IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), | |
304 | + | else if ((j.amount != af)) | |
305 | + | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString(af)) + "] or ") + toString(fraction(af, 1, 1000000))) + ".") + takeRight(toString(af), 6)) + " XTN.")) | |
306 | + | else if ((1 > ag)) | |
307 | + | then throw((("LP Token Outcome is going below " + toString(ae)) + " Decimals. Please Attach min. 1 LP token or 5 XTN Atleast.")) | |
308 | + | else [IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), ai), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), ak), IntegerEntry(("Total_LP_" + h), am), Reissue(Y, ag, true), ScriptTransfer(g.caller, ag, Y)] | |
308 | 309 | } | |
309 | 310 | ||
310 | 311 | ||
316 | 317 | then g.payments[0] | |
317 | 318 | else throw("No payment attached, Please Attach LP Token as payment[1].") | |
318 | 319 | let z = getString(this, ("Pair_UV_" + h)) | |
319 | - | let | |
320 | - | let | |
321 | - | let q = | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
320 | + | let an = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + h)), "LP Token is Missing or not Generated.")) | |
321 | + | let Z = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
322 | + | let q = Z.decimals | |
323 | + | let ad = (6 + q) | |
324 | + | let ae = (ad / 2) | |
325 | + | let ao = getIntegerValue(this, ("Total_LP_" + h)) | |
326 | + | let ap = pow(fraction(A.amount, pow(10, 0, 8, 0, 0, CEILING), ao), 6, 1, 0, 6, CEILING) | |
326 | 327 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
327 | 328 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | if ($isInstanceOf( | |
329 | + | let aq = fraction(B, ap, pow(10, 0, 8, 0, 0, CEILING)) | |
330 | + | let ar = fraction(C, ap, pow(10, 0, 8, 0, 0, CEILING)) | |
331 | + | let ah = { | |
332 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
333 | + | if ($isInstanceOf(K, "Int")) | |
333 | 334 | then { | |
334 | - | let | |
335 | - | | |
335 | + | let L = K | |
336 | + | L | |
336 | 337 | } | |
337 | 338 | else 0 | |
338 | 339 | } | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if ($isInstanceOf( | |
340 | + | let ai = (ah - aq) | |
341 | + | let aj = { | |
342 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
343 | + | if ($isInstanceOf(K, "Int")) | |
343 | 344 | then { | |
344 | - | let | |
345 | - | | |
345 | + | let L = K | |
346 | + | L | |
346 | 347 | } | |
347 | 348 | else 0 | |
348 | 349 | } | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
350 | + | let ak = (aj - ar) | |
351 | + | let al = { | |
352 | + | let K = getIntegerValue(this, ("Total_LP_" + h)) | |
353 | + | if ($isInstanceOf(K, "Int")) | |
353 | 354 | then { | |
354 | - | let | |
355 | - | | |
355 | + | let L = K | |
356 | + | L | |
356 | 357 | } | |
357 | 358 | else 0 | |
358 | 359 | } | |
359 | - | let | |
360 | + | let am = (al - A.amount) | |
360 | 361 | if ((z != h)) | |
361 | 362 | then throw("Pair is not available in Whitelist.") | |
362 | 363 | else if ((fromBase58String(h) == b)) | |
363 | 364 | then throw("Don't choose XTN AssetID as Input, Only Whitelisted Asset as Input String & Attach LP Tokens as payment[1]") | |
364 | - | else if ((A.assetId != | |
365 | + | else if ((A.assetId != an)) | |
365 | 366 | then throw("Wrong Asset is attached in payment[1] or LP Token Not Found or Missing.") | |
366 | - | else if ((1 > | |
367 | + | else if ((1 > ap)) | |
367 | 368 | then throw("Your LP Token amount % is very low to convert.") | |
368 | - | else if ((1 > | |
369 | + | else if ((1 > aq)) | |
369 | 370 | then throw("Your LP Token conversion amount is very low to convert or less than 0.000001 XTN.") | |
370 | - | else if ((1 > | |
371 | + | else if ((1 > ar)) | |
371 | 372 | then throw("Your LP Token conversion amount is very low to convert or less than fraction value of Token.") | |
372 | - | else [IntegerEntry("Withdraw_LP_Percentage", | |
373 | + | else [IntegerEntry("Withdraw_LP_Percentage", ap), Burn(an, A.amount), IntegerEntry(("Total_LP_" + h), am), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), ai), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), ak), ScriptTransfer(g.caller, aq, b), ScriptTransfer(g.caller, ar, fromBase58String(h))] | |
373 | 374 | } | |
374 | 375 | ||
375 | 376 | ||
376 | - | @Verifier( | |
377 | - | func | |
377 | + | @Verifier(as) | |
378 | + | func at () = sigVerify(as.bodyBytes, as.proofs[0], as.senderPublicKey) | |
378 | 379 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1694928600000 | |
5 | 5 | ||
6 | 6 | let b = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
7 | 7 | ||
8 | 8 | let c = addressFromPublicKey(base58'6Z73KxcX3sugpiStpSRXxKxTmWqCaLVwFeM6kwyiKVDR') | |
9 | 9 | ||
10 | 10 | func d () = { | |
11 | 11 | let e = (lastBlock.timestamp - a) | |
12 | 12 | let f = fraction(1, e, 86400000) | |
13 | 13 | f | |
14 | 14 | } | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | @Callable(g) | |
18 | 18 | func RegisterPair (h) = { | |
19 | 19 | let i = value(g.payments[0]) | |
20 | 20 | let j = value(g.payments[1]) | |
21 | 21 | let k = toBase58String(g.caller.bytes) | |
22 | 22 | let l = !(isDefined(j.assetId)) | |
23 | 23 | let m = getString(this, ("Pair_UV_" + h)) | |
24 | 24 | let n = fromBase58String(h) | |
25 | 25 | let o = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
26 | 26 | let p = o.name | |
27 | 27 | let q = o.decimals | |
28 | 28 | let r = fraction((q + 6), 1, 2) | |
29 | 29 | let s = (1 * pow(10, 0, r, 0, 0, CEILING)) | |
30 | 30 | let t = fraction(i.amount, j.amount, s) | |
31 | 31 | let u = sqrt(t, r, r, CEILING) | |
32 | 32 | let v = Issue((("LP-" + take(p, 8)) + "-XTN"), (((("LP-" + p) + "-XTN") + " is a Liquidity Provider Token Issued Against ") + h), u, r, true) | |
33 | 33 | let w = calculateAssetId(v) | |
34 | 34 | if ((m == h)) | |
35 | 35 | then throw("Pair Already Exist in List.") | |
36 | 36 | else if ((size(g.payments) != 2)) | |
37 | 37 | then throw("Two attached assets expected as payment. Kindly Attach payment1 = WAVES Token & payment2 = Token you want to List.") | |
38 | 38 | else if ((i.assetId != b)) | |
39 | 39 | then throw("Incorrect asset attached as payment[1], please attach XTN only.") | |
40 | 40 | else if ((100000 > i.amount)) | |
41 | 41 | then throw((((("You attached only " + toString(fraction(i.amount, 1, 100000000))) + ".") + toString(fraction(i.amount, 1, 10000000))) + " WAVES for Listing in payment[1], please attach 10 WAVES.")) | |
42 | 42 | else if ((j.assetId != n)) | |
43 | 43 | then throw("Input String & Attached AssetID in payment2 is not matching.") | |
44 | 44 | else if ((l == true)) | |
45 | 45 | then throw("You Attached WAVES Asset ID for Listing, please attach Tokens You want to list in payment[2].") | |
46 | 46 | else [StringEntry(("Pair_UV_" + h), h), IntegerEntry(("Listing_Fee_" + h), i.amount), ScriptTransfer(g.caller, u, b), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), i.amount), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), j.amount), IntegerEntry(("Total_of_Pair_Txns_" + h), 0), IntegerEntry(((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b)), 0), IntegerEntry(("Total_Swap_Fee_Collected_" + h), 0), IntegerEntry(((((toString(d()) + "_Day_Volume_") + h) + "_") + toBase58String(b)), 0), IntegerEntry(((((toString(d()) + "_Day_Volume_") + toBase58String(b)) + "_") + h), 0), v, StringEntry(("LP_" + h), toBase58String(w)), IntegerEntry(("Total_LP_" + h), u)] | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(g) | |
52 | 52 | func IssueLPToken (h) = { | |
53 | 53 | let x = valueOrErrorMessage(getString(this, "LP_Admin_Rights"), "LP Admin Rights are Not Included into Smart Contract. Deploy Admin Rights First.") | |
54 | 54 | let y = toBase58String(g.caller.bytes) | |
55 | 55 | let z = valueOrErrorMessage(getString(this, ("Pair_UV_" + h)), "Asset not Found in Whitelisted Token") | |
56 | 56 | let o = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
57 | 57 | let p = o.name | |
58 | 58 | let q = o.decimals | |
59 | 59 | let s = (1 * pow(10, 0, fraction((q + 6), 1, 2), 0, 0, CEILING)) | |
60 | 60 | let v = Issue((("LP-" + take(p, 8)) + "-XTN"), (((("LP-" + p) + "-XTN") + " is a Liquidity Provider Token Issued Against ") + h), s, fraction((q + 6), 1, 2), true) | |
61 | 61 | let w = calculateAssetId(v) | |
62 | 62 | if ((x != y)) | |
63 | 63 | then throw((("Your are not allowded to Issue LP Token. Only " + x) + " can issue the LP Token.")) | |
64 | 64 | else if ((z != h)) | |
65 | 65 | then throw("Pair is not available in List.") | |
66 | 66 | else [v, StringEntry(("LP_" + h), toBase58String(w)), IntegerEntry(("Total_LP_" + h), s)] | |
67 | 67 | } | |
68 | 68 | ||
69 | 69 | ||
70 | 70 | ||
71 | 71 | @Callable(g) | |
72 | 72 | func SwapAssetToXTNPairEntry (h) = { | |
73 | 73 | let y = toBase58String(g.caller.bytes) | |
74 | 74 | let A = if ((size(g.payments) == 1)) | |
75 | 75 | then g.payments[0] | |
76 | 76 | else throw("Whitelisted Token is required as Attached payment[1].") | |
77 | 77 | let z = getString(this, ("Pair_UV_" + h)) | |
78 | 78 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
79 | 79 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
80 | 80 | let D = fraction(B, C, (C + A.amount)) | |
81 | 81 | let E = (B - D) | |
82 | 82 | let F = 3 | |
83 | - | let G = ((E * F) / 1000) | |
84 | - | let H = ((E - G) - G) | |
85 | - | let I = { | |
86 | - | let J = getInteger(this, ((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b))) | |
87 | - | if ($isInstanceOf(J, "Int")) | |
83 | + | let G = d() | |
84 | + | let H = ((E * F) / 1000) | |
85 | + | let I = ((E - H) - H) | |
86 | + | let J = { | |
87 | + | let K = getInteger(this, ((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b))) | |
88 | + | if ($isInstanceOf(K, "Int")) | |
88 | 89 | then { | |
89 | - | let | |
90 | - | | |
90 | + | let L = K | |
91 | + | L | |
91 | 92 | } | |
92 | 93 | else 0 | |
93 | 94 | } | |
94 | - | let | |
95 | - | let | |
96 | - | let | |
97 | - | if ($isInstanceOf( | |
95 | + | let M = ((J + H) + H) | |
96 | + | let N = { | |
97 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
98 | + | if ($isInstanceOf(K, "Int")) | |
98 | 99 | then { | |
99 | - | let | |
100 | - | | |
100 | + | let L = K | |
101 | + | L | |
101 | 102 | } | |
102 | 103 | else 0 | |
103 | 104 | } | |
104 | - | let | |
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
105 | + | let O = (C + A.amount) | |
106 | + | let P = { | |
107 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
108 | + | if ($isInstanceOf(K, "Int")) | |
108 | 109 | then { | |
109 | - | let | |
110 | - | | |
110 | + | let L = K | |
111 | + | L | |
111 | 112 | } | |
112 | 113 | else 0 | |
113 | 114 | } | |
114 | - | let | |
115 | - | let | |
116 | - | let | |
117 | - | if ($isInstanceOf( | |
115 | + | let Q = ((B - E) + H) | |
116 | + | let R = { | |
117 | + | let K = getIntegerValue(this, ("Total_of_Pair_Txns_" + h)) | |
118 | + | if ($isInstanceOf(K, "Int")) | |
118 | 119 | then { | |
119 | - | let | |
120 | - | | |
120 | + | let L = K | |
121 | + | L | |
121 | 122 | } | |
122 | 123 | else 0 | |
123 | 124 | } | |
124 | - | let | |
125 | - | let | |
126 | - | let | |
127 | - | if ($isInstanceOf( | |
125 | + | let S = (R + 1) | |
126 | + | let T = { | |
127 | + | let K = getIntegerValue(this, ((((toString(G) + "_Day_Volume_") + toBase58String(b)) + "_") + h)) | |
128 | + | if ($isInstanceOf(K, "Int")) | |
128 | 129 | then { | |
129 | - | let | |
130 | - | | |
130 | + | let L = K | |
131 | + | L | |
131 | 132 | } | |
132 | 133 | else 0 | |
133 | 134 | } | |
134 | - | let | |
135 | + | let U = (T + A.amount) | |
135 | 136 | if ((h == toBase58String(b))) | |
136 | 137 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach Whitelisted Asset as an attachment Token in payment[1].") | |
137 | 138 | else if ((z != h)) | |
138 | 139 | then throw("Pair is not available in Whitelisted Asset.") | |
139 | 140 | else if ((A.assetId == b)) | |
140 | 141 | then throw("You can't Attach XTN as an Attached Payment. Only Whitelisted Tokens are accepted.") | |
141 | 142 | else if ((A.assetId != fromBase58String(h))) | |
142 | 143 | then throw(("Incorrect asset attached, please attach or send " + h)) | |
143 | 144 | else if ((B == 0)) | |
144 | 145 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
145 | 146 | else if ((C == 0)) | |
146 | 147 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
147 | 148 | else if ((100000 > E)) | |
148 | 149 | then throw((("Your Attached Asset Amount is very low. Attach More " + h) + " Tokens to Claim the minimum Amount of 0.1 dollar atleast.")) | |
149 | 150 | else if ((E > B)) | |
150 | 151 | then throw((("Pool Only has a Liquidity of " + toString((B / pow(10, 0, 6, 0, 0, CEILING)))) + " XTN. Add Liquidity into Pool.")) | |
151 | - | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b)), | |
152 | + | else [IntegerEntry(((("Total_Swap_Fee_Collected_" + h) + "_") + toBase58String(b)), M), IntegerEntry(((((toString(G) + "_Day_Volume_") + toBase58String(b)) + "_") + h), U), IntegerEntry(("Total_of_Pair_Txns_" + h), S), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), O), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), Q), ScriptTransfer(g.caller, I, b), ScriptTransfer(c, H, b)] | |
152 | 153 | } | |
153 | 154 | ||
154 | 155 | ||
155 | 156 | ||
156 | 157 | @Callable(g) | |
157 | 158 | func SwapXTNToAssetPairEntry (h) = { | |
158 | 159 | let y = toBase58String(g.caller.bytes) | |
159 | 160 | let A = if ((size(g.payments) == 1)) | |
160 | 161 | then g.payments[0] | |
161 | 162 | else throw((("Only " + toBase58String(b)) + " XTN Token is required as an Attached payment[1].")) | |
162 | 163 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
163 | 164 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
164 | - | let | |
165 | - | let E = (C - | |
165 | + | let V = fraction(B, C, (B + A.amount)) | |
166 | + | let E = (C - V) | |
166 | 167 | let z = getString(this, ("Pair_UV_" + h)) | |
167 | 168 | let F = 3 | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | let | |
172 | - | if ($isInstanceOf( | |
169 | + | let H = ((E * F) / 1000) | |
170 | + | let I = ((E - H) - H) | |
171 | + | let W = { | |
172 | + | let K = getInteger(this, ("Total_Swap_Fee_Collected_" + h)) | |
173 | + | if ($isInstanceOf(K, "Int")) | |
173 | 174 | then { | |
174 | - | let | |
175 | - | | |
175 | + | let L = K | |
176 | + | L | |
176 | 177 | } | |
177 | 178 | else 0 | |
178 | 179 | } | |
179 | - | let | |
180 | - | let | |
181 | - | let | |
182 | - | if ($isInstanceOf( | |
180 | + | let X = ((W + H) + H) | |
181 | + | let N = { | |
182 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
183 | + | if ($isInstanceOf(K, "Int")) | |
183 | 184 | then { | |
184 | - | let | |
185 | - | | |
185 | + | let L = K | |
186 | + | L | |
186 | 187 | } | |
187 | 188 | else 0 | |
188 | 189 | } | |
189 | - | let | |
190 | - | let | |
191 | - | let | |
192 | - | if ($isInstanceOf( | |
190 | + | let O = ((C - E) + H) | |
191 | + | let P = { | |
192 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
193 | + | if ($isInstanceOf(K, "Int")) | |
193 | 194 | then { | |
194 | - | let | |
195 | - | | |
195 | + | let L = K | |
196 | + | L | |
196 | 197 | } | |
197 | 198 | else 0 | |
198 | 199 | } | |
199 | - | let | |
200 | - | let | |
201 | - | let | |
202 | - | if ($isInstanceOf( | |
200 | + | let Q = (B + A.amount) | |
201 | + | let R = { | |
202 | + | let K = getIntegerValue(this, ("Total_of_Pair_Txns_" + h)) | |
203 | + | if ($isInstanceOf(K, "Int")) | |
203 | 204 | then { | |
204 | - | let | |
205 | - | | |
205 | + | let L = K | |
206 | + | L | |
206 | 207 | } | |
207 | 208 | else 0 | |
208 | 209 | } | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | if ($isInstanceOf( | |
210 | + | let S = (R + 1) | |
211 | + | let T = { | |
212 | + | let K = getIntegerValue(this, ((((toString(d()) + "_Day_Volume_") + h) + "_") + toBase58String(b))) | |
213 | + | if ($isInstanceOf(K, "Int")) | |
213 | 214 | then { | |
214 | - | let | |
215 | - | | |
215 | + | let L = K | |
216 | + | L | |
216 | 217 | } | |
217 | 218 | else 0 | |
218 | 219 | } | |
219 | - | let | |
220 | + | let U = (T + A.amount) | |
220 | 221 | if ((z != h)) | |
221 | 222 | then throw("Pair is not available in Whitelisted Asset.") | |
222 | 223 | else if ((h == toBase58String(b))) | |
223 | 224 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input & Attach XTN as an attachment Token in payment[1].") | |
224 | 225 | else if ((A.assetId != b)) | |
225 | 226 | then throw("You can Attach XTN as an Attached Payment[1] to Swap XTN To Required Token. Any other asset else than XTN will be rejected.") | |
226 | 227 | else if ((100000 > A.amount)) | |
227 | 228 | then throw("Your Attached XTN Amount is very low. Attach Atleast 0.1 XTN to Claim the minimum Tokens.") | |
228 | 229 | else if ((B == 0)) | |
229 | 230 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
230 | 231 | else if ((C == 0)) | |
231 | 232 | then throw("Swap Pair Need to Add Liquidity first into Pool. Only After that Pair will be activated for Swapping.") | |
232 | 233 | else if ((E > C)) | |
233 | 234 | then throw((("Pool Only has a Liquidity of " + toString(C)) + " Tokens. Add Liquidity into Pool.")) | |
234 | - | else [IntegerEntry(("Total_Swap_Fee_Collected_" + h), | |
235 | + | else [IntegerEntry(("Total_Swap_Fee_Collected_" + h), X), IntegerEntry(((((toString(d()) + "_Day_Volume_") + h) + "_") + toBase58String(b)), U), IntegerEntry(("Total_of_Pair_Txns_" + h), S), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), O), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), Q), ScriptTransfer(g.caller, I, fromBase58String(h)), ScriptTransfer(c, H, fromBase58String(h))] | |
235 | 236 | } | |
236 | 237 | ||
237 | 238 | ||
238 | 239 | ||
239 | 240 | @Callable(g) | |
240 | 241 | func AddLiquidity (h) = { | |
241 | 242 | let y = toBase58String(g.caller.bytes) | |
242 | 243 | let i = value(g.payments[0]) | |
243 | 244 | let j = value(g.payments[1]) | |
244 | 245 | let z = getString(this, ("Pair_UV_" + h)) | |
245 | - | let | |
246 | + | let Y = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + h)), "LP Token is Missing or May be not Generated.")) | |
246 | 247 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
247 | 248 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
248 | - | let | |
249 | - | let q = | |
250 | - | let | |
251 | - | let | |
252 | - | let | |
253 | - | let | |
254 | - | let | |
255 | - | let | |
256 | - | let | |
257 | - | let | |
258 | - | let | |
259 | - | if ($isInstanceOf( | |
249 | + | let Z = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
250 | + | let q = Z.decimals | |
251 | + | let aa = B | |
252 | + | let ab = C | |
253 | + | let ac = pow((((aa * 1000000) / ab) * pow(10, 0, q, 0, 0, CEILING)), 0, 1, 0, 0, CEILING) | |
254 | + | let ad = (6 + q) | |
255 | + | let ae = (ad / 2) | |
256 | + | let af = fraction(ac, i.amount, pow(10, 0, ad, 0, 0, CEILING)) | |
257 | + | let ag = pow((fraction(i.amount, 1, pow(10, 0, q, 0, 0, CEILING)) * fraction(j.amount, 1, pow(10, 0, 6, 0, 0, CEILING))), 0, 5, 1, ae, DOWN) | |
258 | + | let ah = { | |
259 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
260 | + | if ($isInstanceOf(K, "Int")) | |
260 | 261 | then { | |
261 | - | let | |
262 | - | | |
262 | + | let L = K | |
263 | + | L | |
263 | 264 | } | |
264 | 265 | else 0 | |
265 | 266 | } | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | if ($isInstanceOf( | |
267 | + | let ai = (ah + j.amount) | |
268 | + | let aj = { | |
269 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
270 | + | if ($isInstanceOf(K, "Int")) | |
270 | 271 | then { | |
271 | - | let | |
272 | - | | |
272 | + | let L = K | |
273 | + | L | |
273 | 274 | } | |
274 | 275 | else 0 | |
275 | 276 | } | |
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | if ($isInstanceOf( | |
277 | + | let ak = (aj + i.amount) | |
278 | + | let al = { | |
279 | + | let K = getIntegerValue(this, ("Total_LP_" + h)) | |
280 | + | if ($isInstanceOf(K, "Int")) | |
280 | 281 | then { | |
281 | - | let | |
282 | - | | |
282 | + | let L = K | |
283 | + | L | |
283 | 284 | } | |
284 | 285 | else 0 | |
285 | 286 | } | |
286 | - | let | |
287 | + | let am = (al + ag) | |
287 | 288 | if ((z != h)) | |
288 | 289 | then throw("Pair is not available in Whitelisted Asset.") | |
289 | 290 | else if ((h == toBase58String(b))) | |
290 | 291 | then throw("Input can Never be a XTN AssetID. Enter Whitelisted AssetID in input as well as in payment[1] & Attach XTN as an attachment Token in payment[2].") | |
291 | 292 | else if ((size(g.payments) != 2)) | |
292 | 293 | then throw("Two attached assets expected as payment in 50%-50%. Kindly Attach payment1 = Token you want to add for Liquidity & payment2 = Equivalent Amount of XTN Token.") | |
293 | 294 | else if ((i.assetId == b)) | |
294 | 295 | then throw("You Attached XTN asset in payment[1], please attach only whitelisted Token in payment[1] along with XTN in payment[2].") | |
295 | 296 | else if ((i.assetId != fromBase58String(h))) | |
296 | 297 | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
297 | 298 | else if ((i.assetId != fromBase58String(h))) | |
298 | 299 | then throw("Incorrect asset attached for Liquidity in payment[1], please attach String Asset or Whitelisted Token only.") | |
299 | 300 | else if ((j.assetId != b)) | |
300 | 301 | then throw("Wrong Asset Attached in payments[2], Please attach payment[1] = Liquidity Token & payment[2] = XTN Token.") | |
301 | 302 | else if ((5000000 > j.amount)) | |
302 | 303 | then throw("please attach atleast 5 XTN in payment[2] & Equivalent worth of Token in payment[1]") | |
303 | - | else if ((j.amount != | |
304 | - | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString( | |
305 | - | else if ((1 > | |
306 | - | then throw((("LP Token Outcome is going below " + toString( | |
307 | - | else [IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), | |
304 | + | else if ((j.amount != af)) | |
305 | + | then throw((((((("Attached payment[2] qty is not matching as per attached payment[1].payment[2] must be as int [" + toString(af)) + "] or ") + toString(fraction(af, 1, 1000000))) + ".") + takeRight(toString(af), 6)) + " XTN.")) | |
306 | + | else if ((1 > ag)) | |
307 | + | then throw((("LP Token Outcome is going below " + toString(ae)) + " Decimals. Please Attach min. 1 LP token or 5 XTN Atleast.")) | |
308 | + | else [IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), ai), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), ak), IntegerEntry(("Total_LP_" + h), am), Reissue(Y, ag, true), ScriptTransfer(g.caller, ag, Y)] | |
308 | 309 | } | |
309 | 310 | ||
310 | 311 | ||
311 | 312 | ||
312 | 313 | @Callable(g) | |
313 | 314 | func RemoveLiquidity (h) = { | |
314 | 315 | let y = toBase58String(g.caller.bytes) | |
315 | 316 | let A = if ((size(g.payments) == 1)) | |
316 | 317 | then g.payments[0] | |
317 | 318 | else throw("No payment attached, Please Attach LP Token as payment[1].") | |
318 | 319 | let z = getString(this, ("Pair_UV_" + h)) | |
319 | - | let | |
320 | - | let | |
321 | - | let q = | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
325 | - | let | |
320 | + | let an = fromBase58String(valueOrErrorMessage(getString(this, ("LP_" + h)), "LP Token is Missing or not Generated.")) | |
321 | + | let Z = valueOrErrorMessage(assetInfo(fromBase58String(h)), (("Asset " + h) + " doesn't exist")) | |
322 | + | let q = Z.decimals | |
323 | + | let ad = (6 + q) | |
324 | + | let ae = (ad / 2) | |
325 | + | let ao = getIntegerValue(this, ("Total_LP_" + h)) | |
326 | + | let ap = pow(fraction(A.amount, pow(10, 0, 8, 0, 0, CEILING), ao), 6, 1, 0, 6, CEILING) | |
326 | 327 | let B = getIntegerValue(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
327 | 328 | let C = getIntegerValue(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | let | |
332 | - | if ($isInstanceOf( | |
329 | + | let aq = fraction(B, ap, pow(10, 0, 8, 0, 0, CEILING)) | |
330 | + | let ar = fraction(C, ap, pow(10, 0, 8, 0, 0, CEILING)) | |
331 | + | let ah = { | |
332 | + | let K = getInteger(this, ((("Balance_of_" + h) + "_") + toBase58String(b))) | |
333 | + | if ($isInstanceOf(K, "Int")) | |
333 | 334 | then { | |
334 | - | let | |
335 | - | | |
335 | + | let L = K | |
336 | + | L | |
336 | 337 | } | |
337 | 338 | else 0 | |
338 | 339 | } | |
339 | - | let | |
340 | - | let | |
341 | - | let | |
342 | - | if ($isInstanceOf( | |
340 | + | let ai = (ah - aq) | |
341 | + | let aj = { | |
342 | + | let K = getInteger(this, ((("Balance_of_" + toBase58String(b)) + "_") + h)) | |
343 | + | if ($isInstanceOf(K, "Int")) | |
343 | 344 | then { | |
344 | - | let | |
345 | - | | |
345 | + | let L = K | |
346 | + | L | |
346 | 347 | } | |
347 | 348 | else 0 | |
348 | 349 | } | |
349 | - | let | |
350 | - | let | |
351 | - | let | |
352 | - | if ($isInstanceOf( | |
350 | + | let ak = (aj - ar) | |
351 | + | let al = { | |
352 | + | let K = getIntegerValue(this, ("Total_LP_" + h)) | |
353 | + | if ($isInstanceOf(K, "Int")) | |
353 | 354 | then { | |
354 | - | let | |
355 | - | | |
355 | + | let L = K | |
356 | + | L | |
356 | 357 | } | |
357 | 358 | else 0 | |
358 | 359 | } | |
359 | - | let | |
360 | + | let am = (al - A.amount) | |
360 | 361 | if ((z != h)) | |
361 | 362 | then throw("Pair is not available in Whitelist.") | |
362 | 363 | else if ((fromBase58String(h) == b)) | |
363 | 364 | then throw("Don't choose XTN AssetID as Input, Only Whitelisted Asset as Input String & Attach LP Tokens as payment[1]") | |
364 | - | else if ((A.assetId != | |
365 | + | else if ((A.assetId != an)) | |
365 | 366 | then throw("Wrong Asset is attached in payment[1] or LP Token Not Found or Missing.") | |
366 | - | else if ((1 > | |
367 | + | else if ((1 > ap)) | |
367 | 368 | then throw("Your LP Token amount % is very low to convert.") | |
368 | - | else if ((1 > | |
369 | + | else if ((1 > aq)) | |
369 | 370 | then throw("Your LP Token conversion amount is very low to convert or less than 0.000001 XTN.") | |
370 | - | else if ((1 > | |
371 | + | else if ((1 > ar)) | |
371 | 372 | then throw("Your LP Token conversion amount is very low to convert or less than fraction value of Token.") | |
372 | - | else [IntegerEntry("Withdraw_LP_Percentage", | |
373 | + | else [IntegerEntry("Withdraw_LP_Percentage", ap), Burn(an, A.amount), IntegerEntry(("Total_LP_" + h), am), IntegerEntry(((("Balance_of_" + h) + "_") + toBase58String(b)), ai), IntegerEntry(((("Balance_of_" + toBase58String(b)) + "_") + h), ak), ScriptTransfer(g.caller, aq, b), ScriptTransfer(g.caller, ar, fromBase58String(h))] | |
373 | 374 | } | |
374 | 375 | ||
375 | 376 | ||
376 | - | @Verifier( | |
377 | - | func | |
377 | + | @Verifier(as) | |
378 | + | func at () = sigVerify(as.bodyBytes, as.proofs[0], as.senderPublicKey) | |
378 | 379 |
github/deemru/w8io/169f3d6 120.34 ms ◑