tx · Aih1LhYGq68JX9RdPJKvVgKfELsrNEUXsDNyR1HsT9zb 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr: -0.01800000 Waves 2024.12.20 18:22 [3423028] smart account 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr > SELF 0.00000000 Waves
{ "type": 13, "id": "Aih1LhYGq68JX9RdPJKvVgKfELsrNEUXsDNyR1HsT9zb", "fee": 1800000, "feeAssetId": null, "timestamp": 1734708233124, "version": 2, "chainId": 84, "sender": "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr", "senderPublicKey": "jXCTQV8PjX2uC9UHBFveupYy9cjhY7stHbzE9cptymw", "proofs": [ "2pkxXj4uPDipVvDBky6AeME6zkRDSDPT5UgcpFEMz7fZK4vTVQgGs7LX7mPdYTgGME8qy68ZpXhDbynKHouS29Pm" ], "script": "base64:BwIxCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGDoACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIXbWVtZV9pbV9jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8BB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwAMU1RBVFVTX0VNUFRZAAAADFNUQVRVU19SRUFEWQABABVTVEFUVVNfVEFSR0VUX1JFQUNIRUQAAgASU1RBVFVTX1RSQU5TRkVSUkVEAAMACWtTaHV0ZG93bgIOc2h1dGRvd25fX2ZsYWcAC2tQcmljZUFzc2V0AgxwcmljZV9fYXNzZXQADmtMaXN0aW5nVm9sdW1lAg9saXN0aW5nX192b2x1bWUADGtDcmVhdGlvbkZlZQISc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91bnQgZnJvbSBwb29sIGlzIHRvbyBsb3cJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABBNrZXlBZG1pbkFkZHJlc3NMaXN0AhQlc19fYWRtaW5BZGRyZXNzTGlzdAQOa2V5QWxsb3dlZFR4SWQCCCVzX190eElkBAlhZG1pbkxpc3QJALUJAgkBC3ZhbHVlT3JFbHNlAgkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUTa2V5QWRtaW5BZGRyZXNzTGlzdAIAAgJfXwQHYnlPd25lcgMJAGcCCQCQAwEFCWFkbWluTGlzdAADBwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQQIYnlBZG1pbnMJAAACCAUCdHgCaWQJANkEAQkBC3ZhbHVlT3JFbHNlAgkAnQgCBQ5mYWN0b3J5QWRkcmVzcwUOa2V5QWxsb3dlZFR4SWQCAAMFCGJ5QWRtaW5zBgUHYnlPd25lcvovWms=", "height": 3423028, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 36eQMJnqu2CeK2W9DQP5LGNxFxz69LQqPuB5SauwJwiD Next: 5y9zXER3ZSysS1Y88jSMq5m9CApPAEAecdscJPtxKFDC Diff:
Old | New | Differences | |
---|---|---|---|
366 | 366 | if ((outAssetBalanceBefore == outAssetBalanceBefore)) | |
367 | 367 | then { | |
368 | 368 | let swapAction = if (isPoolTargetReached(poolAddress)) | |
369 | - | then | |
369 | + | then reentrantInvoke(wxSwapAddress, "swap", [minimumAmount, priceAssetIdString, toString(this)], i.payments) | |
370 | 370 | else invoke(poolAddress, "swap", [priceAssetIdString, minimumAmount], i.payments) | |
371 | 371 | if ((swapAction == swapAction)) | |
372 | 372 | then { | |
391 | 391 | let poolTokensStringList = split(getStringValue(poolAddress, kPoolTokensList), ",") | |
392 | 392 | let asset1 = parseAssetId(poolTokensStringList[0]) | |
393 | 393 | let asset2 = parseAssetId(poolTokensStringList[1]) | |
394 | - | let $ | |
394 | + | let $t01248512577 = if ((asset1 == unit)) | |
395 | 395 | then $Tuple2(asset2, asset1) | |
396 | 396 | else $Tuple2(asset1, asset2) | |
397 | - | let poolAsset = $ | |
398 | - | let wavesAsset = $ | |
397 | + | let poolAsset = $t01248512577._1 | |
398 | + | let wavesAsset = $t01248512577._2 | |
399 | 399 | let poolAssetBalanceBefore = getBalance(factoryAddress, poolAsset) | |
400 | 400 | if ((poolAssetBalanceBefore == poolAssetBalanceBefore)) | |
401 | 401 | then { | |
402 | 402 | let wavesAssetBalanceBefore = getBalance(factoryAddress, wavesAsset) | |
403 | 403 | if ((wavesAssetBalanceBefore == wavesAssetBalanceBefore)) | |
404 | 404 | then { | |
405 | - | let withdrawInvoke = | |
405 | + | let withdrawInvoke = invoke(factoryAddress, "withdrawLiquidityFromPool", [poolAddress.bytes], nil) | |
406 | 406 | if ((withdrawInvoke == withdrawInvoke)) | |
407 | 407 | then { | |
408 | 408 | let poolAssetBalanceAfter = getBalance(factoryAddress, poolAsset) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let wavesString = "WAVES" | |
7 | 7 | ||
8 | 8 | let contractFilename = "meme_im_calculator.ride" | |
9 | 9 | ||
10 | 10 | let mult8 = 100000000 | |
11 | 11 | ||
12 | 12 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func throwErr (s) = throw(wrapErr(s)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func validateAddress (address) = isDefined(addressFromString(address)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let STATUS_EMPTY = 0 | |
22 | 22 | ||
23 | 23 | let STATUS_READY = 1 | |
24 | 24 | ||
25 | 25 | let STATUS_TARGET_REACHED = 2 | |
26 | 26 | ||
27 | 27 | let STATUS_TRANSFERRED = 3 | |
28 | 28 | ||
29 | 29 | let kShutdown = "shutdown__flag" | |
30 | 30 | ||
31 | 31 | let kPriceAsset = "price__asset" | |
32 | 32 | ||
33 | 33 | let kListingVolume = "listing__volume" | |
34 | 34 | ||
35 | 35 | let kCreationFee = "setup__creationFee" | |
36 | 36 | ||
37 | 37 | let kCurveTarget = "setup__curveTarget" | |
38 | 38 | ||
39 | 39 | let kVirtualLiquidity = "setup__virtualLiquidity" | |
40 | 40 | ||
41 | 41 | let kPoolTokensList = "static_tokenIds" | |
42 | 42 | ||
43 | 43 | let kPoolContractHash = "pool__contract__hash" | |
44 | 44 | ||
45 | 45 | let kLastEmptyPoolIndex = "last__empty_pool__index" | |
46 | 46 | ||
47 | 47 | let kFirstEmptyPoolIndex = "first__empty__pool__index" | |
48 | 48 | ||
49 | 49 | func kPoolAddressFromIndex (index) = makeString(["pool", toString(index)], separator) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func kPoolIndexFromAddress (address) = makeString(["pool", toString(address)], separator) | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func kPoolAsset (address) = makeString(["asset", toString(address)], separator) | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func kPoolStatus (index) = makeString(["pool", "status", toString(index)], separator) | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | let kFactoryAddress = "factory__address" | |
62 | 62 | ||
63 | 63 | let factoryAddressOption = match getString(this, kFactoryAddress) { | |
64 | 64 | case s: String => | |
65 | 65 | addressFromString(s) | |
66 | 66 | case _: Unit => | |
67 | 67 | unit | |
68 | 68 | case _ => | |
69 | 69 | throw("Match error") | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | let factoryAddress = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address")) | |
73 | 73 | ||
74 | 74 | let kWxSwapAddress = "wxswap__address" | |
75 | 75 | ||
76 | 76 | let wxSwapAddressOption = match getString(factoryAddress, kWxSwapAddress) { | |
77 | 77 | case s: String => | |
78 | 78 | addressFromString(s) | |
79 | 79 | case _ => | |
80 | 80 | unit | |
81 | 81 | } | |
82 | 82 | ||
83 | 83 | let wxSwapAddress = valueOrErrorMessage(wxSwapAddressOption, wrapErr("invalid wx swap address")) | |
84 | 84 | ||
85 | 85 | let kFeeCollectorAddress = "wxfee_address" | |
86 | 86 | ||
87 | 87 | let feeCollectorAddressOption = match getString(factoryAddress, kFeeCollectorAddress) { | |
88 | 88 | case s: String => | |
89 | 89 | addressFromString(s) | |
90 | 90 | case _ => | |
91 | 91 | unit | |
92 | 92 | } | |
93 | 93 | ||
94 | 94 | let feeCollectorAddress = valueOrErrorMessage(feeCollectorAddressOption, wrapErr("invalid fee collector address")) | |
95 | 95 | ||
96 | 96 | let kUserPoolsAddress = "userpools_address" | |
97 | 97 | ||
98 | 98 | let userPoolsAddressOption = match getString(factoryAddress, kUserPoolsAddress) { | |
99 | 99 | case s: String => | |
100 | 100 | addressFromString(s) | |
101 | 101 | case _ => | |
102 | 102 | unit | |
103 | 103 | } | |
104 | 104 | ||
105 | 105 | let userPoolsAddress = valueOrErrorMessage(userPoolsAddressOption, wrapErr("invalid user_pools dapp address")) | |
106 | 106 | ||
107 | 107 | let kAssetStoreAddress = "assetstore_address" | |
108 | 108 | ||
109 | 109 | let assetStoreAddressOption = match getString(factoryAddress, kAssetStoreAddress) { | |
110 | 110 | case s: String => | |
111 | 111 | addressFromString(s) | |
112 | 112 | case _ => | |
113 | 113 | unit | |
114 | 114 | } | |
115 | 115 | ||
116 | 116 | let assetStoreAddress = valueOrErrorMessage(assetStoreAddressOption, wrapErr("invalid asset_store dapp address")) | |
117 | 117 | ||
118 | 118 | let shutdown = valueOrElse(getBoolean(factoryAddress, kShutdown), false) | |
119 | 119 | ||
120 | 120 | let lastEmptyIndex = valueOrElse(getInteger(factoryAddress, kLastEmptyPoolIndex), 0) | |
121 | 121 | ||
122 | 122 | let firstEmptyIndex = valueOrElse(getInteger(factoryAddress, kFirstEmptyPoolIndex), 0) | |
123 | 123 | ||
124 | 124 | let listingVolume = valueOrElse(getInteger(factoryAddress, kListingVolume), 0) | |
125 | 125 | ||
126 | 126 | let creationFee = valueOrElse(getInteger(factoryAddress, kCreationFee), 0) | |
127 | 127 | ||
128 | 128 | let poolContractHash = getBinary(factoryAddress, kPoolContractHash) | |
129 | 129 | ||
130 | 130 | func parseAssetId (input) = if ((input == wavesString)) | |
131 | 131 | then unit | |
132 | 132 | else fromBase58String(input) | |
133 | 133 | ||
134 | 134 | ||
135 | 135 | func assetIdToString (input) = if ((input == unit)) | |
136 | 136 | then wavesString | |
137 | 137 | else toBase58String(value(input)) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func mustAddress (caller,address) = if ((caller == address)) | |
141 | 141 | then true | |
142 | 142 | else throwErr("permission denied") | |
143 | 143 | ||
144 | 144 | ||
145 | 145 | func mustThis (caller) = mustAddress(caller, this) | |
146 | 146 | ||
147 | 147 | ||
148 | 148 | func mustFactory (caller) = mustAddress(caller, factoryAddress) | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func checkContractScript (address) = match poolContractHash { | |
152 | 152 | case hash: ByteVector => | |
153 | 153 | (scriptHash(address) == hash) | |
154 | 154 | case _ => | |
155 | 155 | true | |
156 | 156 | } | |
157 | 157 | ||
158 | 158 | ||
159 | 159 | func isPoolExists (poolAddress) = isDefined(getInteger(factoryAddress, kPoolIndexFromAddress(poolAddress))) | |
160 | 160 | ||
161 | 161 | ||
162 | 162 | func getPoolId (poolAddress) = valueOrErrorMessage(getInteger(factoryAddress, kPoolIndexFromAddress(poolAddress)), "pool doesn't exists") | |
163 | 163 | ||
164 | 164 | ||
165 | 165 | func isPoolTargetReached (poolAddress) = { | |
166 | 166 | let poolStatus = valueOrElse(getInteger(factoryAddress, kPoolStatus(getPoolId(poolAddress))), -1) | |
167 | 167 | containsElement([STATUS_TARGET_REACHED, STATUS_TRANSFERRED], poolStatus) | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getBalance (address,assetId) = match assetId { | |
172 | 172 | case id: ByteVector => | |
173 | 173 | assetBalance(address, id) | |
174 | 174 | case _ => | |
175 | 175 | wavesBalance(address).available | |
176 | 176 | } | |
177 | 177 | ||
178 | 178 | ||
179 | 179 | func isWxSwapActive (amountAssetString,priceAssetString) = { | |
180 | 180 | let statusKey = makeString(["%s%s%s", "status", amountAssetString, priceAssetString], separator) | |
181 | 181 | let statusKeyReverse = makeString(["%s%s%s", "status", priceAssetString, amountAssetString], separator) | |
182 | 182 | let pairStatus = valueOrElse(getString(userPoolsAddress, statusKey), "") | |
183 | 183 | let reversePairStatus = valueOrElse(getString(userPoolsAddress, statusKeyReverse), "") | |
184 | 184 | if ((pairStatus == "active")) | |
185 | 185 | then true | |
186 | 186 | else (reversePairStatus == "active") | |
187 | 187 | } | |
188 | 188 | ||
189 | 189 | ||
190 | 190 | func genLogo (assetId) = { | |
191 | 191 | let $t054295712 = match assetId { | |
192 | 192 | case b: ByteVector => | |
193 | 193 | let name = match assetInfo(b) { | |
194 | 194 | case a: Asset => | |
195 | 195 | a.name | |
196 | 196 | case _ => | |
197 | 197 | "%" | |
198 | 198 | } | |
199 | 199 | $Tuple2(toString((toInt(b) % 360)), name) | |
200 | 200 | case _ => | |
201 | 201 | $Tuple2("200", "WAVES") | |
202 | 202 | } | |
203 | 203 | let color = $t054295712._1 | |
204 | 204 | let assetName = $t054295712._2 | |
205 | 205 | let logo = (((("<svg width='30' height='30' xmlns='http://www.w3.org/2000/svg'><circle cx='15' cy='15' fill='hsl(" + color) + ", 70%, 70%)' r='15'/><text x='50%' y='50%' text-anchor='middle' dominant-baseline='middle' font-size='18'>") + take(assetName, 1)) + "</text></svg>") | |
206 | 206 | logo | |
207 | 207 | } | |
208 | 208 | ||
209 | 209 | ||
210 | 210 | @Callable(i) | |
211 | 211 | func init (factoryAddressStr) = { | |
212 | 212 | let checkCaller = mustThis(i.caller) | |
213 | 213 | if ((checkCaller == checkCaller)) | |
214 | 214 | then [StringEntry(kFactoryAddress, factoryAddressStr)] | |
215 | 215 | else throw("Strict value is not equal to itself.") | |
216 | 216 | } | |
217 | 217 | ||
218 | 218 | ||
219 | 219 | ||
220 | 220 | @Callable(i) | |
221 | 221 | func addEmptyPool (callerPublicKey,args) = { | |
222 | 222 | let newPoolAddress = addressFromPublicKey(callerPublicKey) | |
223 | 223 | let newPoolIndex = (lastEmptyIndex + 1) | |
224 | 224 | let checks = [if (!(shutdown)) | |
225 | 225 | then true | |
226 | 226 | else throwErr("not allowed (shutdown)"), if (checkContractScript(newPoolAddress)) | |
227 | 227 | then true | |
228 | 228 | else throwErr("pool script is not allowed"), if (!(isPoolExists(newPoolAddress))) | |
229 | 229 | then true | |
230 | 230 | else throwErr("pool address is already registered")] | |
231 | 231 | if ((checks == checks)) | |
232 | 232 | then { | |
233 | 233 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kLastEmptyPoolIndex, newPoolIndex], nil), invoke(factoryAddress, "stringEntry", [kPoolAddressFromIndex(newPoolIndex), toString(newPoolAddress)], nil), invoke(factoryAddress, "integerEntry", [kPoolIndexFromAddress(newPoolAddress), newPoolIndex], nil), invoke(factoryAddress, "integerEntry", [kPoolStatus(newPoolIndex), STATUS_EMPTY], nil)] | |
234 | 234 | $Tuple2(nil, factoryActions) | |
235 | 235 | } | |
236 | 236 | else throw("Strict value is not equal to itself.") | |
237 | 237 | } | |
238 | 238 | ||
239 | 239 | ||
240 | 240 | ||
241 | 241 | @Callable(i) | |
242 | 242 | func createPool (callerPublicKey,args) = { | |
243 | 243 | let minPayment = (listingVolume + creationFee) | |
244 | 244 | let checks = [if (!(shutdown)) | |
245 | 245 | then true | |
246 | 246 | else throwErr("Temporary shutdown"), mustFactory(i.caller), if (((lastEmptyIndex - firstEmptyIndex) > 0)) | |
247 | 247 | then true | |
248 | 248 | else throwErr("No empty pool available"), if ((i.payments[0].assetId == unit)) | |
249 | 249 | then true | |
250 | 250 | else throwErr("Payment should be in WAVES"), if ((i.payments[0].amount >= minPayment)) | |
251 | 251 | then true | |
252 | 252 | else throwErr((("Payment should be greater or equal " + toString(minPayment)) + " WAVELET")), if (isDefined(args[0])) | |
253 | 253 | then true | |
254 | 254 | else throwErr("Token name is not provided"), if (isDefined(args[1])) | |
255 | 255 | then true | |
256 | 256 | else throwErr("Token description is not provided"), if (isDefined(args[2])) | |
257 | 257 | then true | |
258 | 258 | else throwErr("Token quantity is not provided"), if ((parseInt(args[2]) != unit)) | |
259 | 259 | then true | |
260 | 260 | else throwErr("Token quantity should be a number")] | |
261 | 261 | if ((checks == checks)) | |
262 | 262 | then { | |
263 | 263 | let poolIndex = (firstEmptyIndex + 1) | |
264 | 264 | let poolAddressString = getStringValue(factoryAddress, kPoolAddressFromIndex(poolIndex)) | |
265 | 265 | let poolAddress = addressFromStringValue(poolAddressString) | |
266 | 266 | let callerAddress = addressFromPublicKey(callerPublicKey) | |
267 | 267 | let poolDomain = take(poolAddressString, 8) | |
268 | 268 | let poolOwner = toString(callerAddress) | |
269 | 269 | let tokenName = args[0] | |
270 | 270 | let tokenDesc = args[1] | |
271 | 271 | let tokenQuantity = args[2] | |
272 | 272 | let initPoolInvoke = invoke(factoryAddress, "initPoolInvoke", [poolAddressString, [poolDomain, poolOwner, tokenName, tokenDesc, tokenQuantity]], [AttachedPayment(i.payments[0].assetId, i.payments[0].amount)]) | |
273 | 273 | if ((initPoolInvoke == initPoolInvoke)) | |
274 | 274 | then { | |
275 | 275 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kFirstEmptyPoolIndex, poolIndex], nil), invoke(factoryAddress, "integerEntry", [kPoolStatus(poolIndex), STATUS_READY], nil)] | |
276 | 276 | $Tuple2(nil, factoryActions) | |
277 | 277 | } | |
278 | 278 | else throw("Strict value is not equal to itself.") | |
279 | 279 | } | |
280 | 280 | else throw("Strict value is not equal to itself.") | |
281 | 281 | } | |
282 | 282 | ||
283 | 283 | ||
284 | 284 | ||
285 | 285 | @Callable(i) | |
286 | 286 | func notifyStatusUpdate (callerPublicKey,args) = { | |
287 | 287 | let poolAddress = addressFromPublicKey(callerPublicKey) | |
288 | 288 | let checks = [if (isPoolExists(poolAddress)) | |
289 | 289 | then true | |
290 | 290 | else throwErr("pool not found"), mustFactory(i.caller)] | |
291 | 291 | if ((checks == checks)) | |
292 | 292 | then { | |
293 | 293 | let poolIndex = getIntegerValue(factoryAddress, kPoolIndexFromAddress(poolAddress)) | |
294 | 294 | let newStatus = parseIntValue(args[0]) | |
295 | 295 | let factoryActions = [invoke(factoryAddress, "integerEntry", [kPoolStatus(poolIndex), newStatus], nil)] | |
296 | 296 | $Tuple2(nil, factoryActions) | |
297 | 297 | } | |
298 | 298 | else throw("Strict value is not equal to itself.") | |
299 | 299 | } | |
300 | 300 | ||
301 | 301 | ||
302 | 302 | ||
303 | 303 | @Callable(i) | |
304 | 304 | func isWxSwapActiveREADONLY (callerPublicKey,args) = { | |
305 | 305 | let amountAssetIdString = args[0] | |
306 | 306 | let priceAssetIdString = args[1] | |
307 | 307 | let checks = [mustFactory(i.caller)] | |
308 | 308 | if ((checks == checks)) | |
309 | 309 | then $Tuple2(nil, isWxSwapActive(amountAssetIdString, priceAssetIdString)) | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | ||
313 | 313 | ||
314 | 314 | ||
315 | 315 | @Callable(i) | |
316 | 316 | func swapREADONLY (callerPublicKey,args) = { | |
317 | 317 | let poolAddress = addressFromStringValue(args[0]) | |
318 | 318 | let amountAssetIdString = args[1] | |
319 | 319 | let priceAssetIdString = args[2] | |
320 | 320 | let amount = parseIntValue(args[3]) | |
321 | 321 | let checks = [if (!(shutdown)) | |
322 | 322 | then true | |
323 | 323 | else throwErr("Temporary shutdown"), mustFactory(i.caller)] | |
324 | 324 | if ((checks == checks)) | |
325 | 325 | then if (isPoolTargetReached(poolAddress)) | |
326 | 326 | then { | |
327 | 327 | let wxSwapResult = { | |
328 | 328 | let @ = invoke(wxSwapAddress, "swapCalculateREADONLY", [amount, amountAssetIdString, priceAssetIdString], nil) | |
329 | 329 | if ($isInstanceOf(@, "Int")) | |
330 | 330 | then @ | |
331 | 331 | else throw(($getType(@) + " couldn't be cast to Int")) | |
332 | 332 | } | |
333 | 333 | $Tuple2(nil, $Tuple2(wxSwapResult, "WxSwap")) | |
334 | 334 | } | |
335 | 335 | else { | |
336 | 336 | let poolSwapResult = { | |
337 | 337 | let @ = invoke(poolAddress, "swapReadOnly", [amountAssetIdString, priceAssetIdString, amount], nil) | |
338 | 338 | if ($isInstanceOf(@, "Int")) | |
339 | 339 | then @ | |
340 | 340 | else throw(($getType(@) + " couldn't be cast to Int")) | |
341 | 341 | } | |
342 | 342 | $Tuple2(nil, $Tuple2(poolSwapResult, "iMemePool")) | |
343 | 343 | } | |
344 | 344 | else throw("Strict value is not equal to itself.") | |
345 | 345 | } | |
346 | 346 | ||
347 | 347 | ||
348 | 348 | ||
349 | 349 | @Callable(i) | |
350 | 350 | func swap (callerPublicKey,args) = { | |
351 | 351 | let callerAddress = addressFromPublicKey(callerPublicKey) | |
352 | 352 | let poolAddress = addressFromStringValue(args[0]) | |
353 | 353 | let priceAssetIdString = args[1] | |
354 | 354 | let priceAssetId = parseAssetId(priceAssetIdString) | |
355 | 355 | let minimumAmount = parseIntValue(args[2]) | |
356 | 356 | let assetInAmount = i.payments[0].amount | |
357 | 357 | let assetInAssetId = i.payments[0].assetId | |
358 | 358 | let checks = [if (!(shutdown)) | |
359 | 359 | then true | |
360 | 360 | else throwErr("Temporary shutdown"), mustFactory(i.caller), if ((size(i.payments) == 1)) | |
361 | 361 | then true | |
362 | 362 | else throwErr("exactly one payment is expected")] | |
363 | 363 | if ((checks == checks)) | |
364 | 364 | then { | |
365 | 365 | let outAssetBalanceBefore = getBalance(this, priceAssetId) | |
366 | 366 | if ((outAssetBalanceBefore == outAssetBalanceBefore)) | |
367 | 367 | then { | |
368 | 368 | let swapAction = if (isPoolTargetReached(poolAddress)) | |
369 | - | then | |
369 | + | then reentrantInvoke(wxSwapAddress, "swap", [minimumAmount, priceAssetIdString, toString(this)], i.payments) | |
370 | 370 | else invoke(poolAddress, "swap", [priceAssetIdString, minimumAmount], i.payments) | |
371 | 371 | if ((swapAction == swapAction)) | |
372 | 372 | then { | |
373 | 373 | let outAssetBalanceAfter = getBalance(this, priceAssetId) | |
374 | 374 | if ((outAssetBalanceAfter == outAssetBalanceAfter)) | |
375 | 375 | then [ScriptTransfer(callerAddress, (outAssetBalanceAfter - outAssetBalanceBefore), priceAssetId)] | |
376 | 376 | else throw("Strict value is not equal to itself.") | |
377 | 377 | } | |
378 | 378 | else throw("Strict value is not equal to itself.") | |
379 | 379 | } | |
380 | 380 | else throw("Strict value is not equal to itself.") | |
381 | 381 | } | |
382 | 382 | else throw("Strict value is not equal to itself.") | |
383 | 383 | } | |
384 | 384 | ||
385 | 385 | ||
386 | 386 | ||
387 | 387 | @Callable(i) | |
388 | 388 | func transferPool (callerPublicKey,args) = { | |
389 | 389 | let callerAddress = addressFromPublicKey(callerPublicKey) | |
390 | 390 | let poolAddress = addressFromStringValue(args[0]) | |
391 | 391 | let poolTokensStringList = split(getStringValue(poolAddress, kPoolTokensList), ",") | |
392 | 392 | let asset1 = parseAssetId(poolTokensStringList[0]) | |
393 | 393 | let asset2 = parseAssetId(poolTokensStringList[1]) | |
394 | - | let $ | |
394 | + | let $t01248512577 = if ((asset1 == unit)) | |
395 | 395 | then $Tuple2(asset2, asset1) | |
396 | 396 | else $Tuple2(asset1, asset2) | |
397 | - | let poolAsset = $ | |
398 | - | let wavesAsset = $ | |
397 | + | let poolAsset = $t01248512577._1 | |
398 | + | let wavesAsset = $t01248512577._2 | |
399 | 399 | let poolAssetBalanceBefore = getBalance(factoryAddress, poolAsset) | |
400 | 400 | if ((poolAssetBalanceBefore == poolAssetBalanceBefore)) | |
401 | 401 | then { | |
402 | 402 | let wavesAssetBalanceBefore = getBalance(factoryAddress, wavesAsset) | |
403 | 403 | if ((wavesAssetBalanceBefore == wavesAssetBalanceBefore)) | |
404 | 404 | then { | |
405 | - | let withdrawInvoke = | |
405 | + | let withdrawInvoke = invoke(factoryAddress, "withdrawLiquidityFromPool", [poolAddress.bytes], nil) | |
406 | 406 | if ((withdrawInvoke == withdrawInvoke)) | |
407 | 407 | then { | |
408 | 408 | let poolAssetBalanceAfter = getBalance(factoryAddress, poolAsset) | |
409 | 409 | if ((poolAssetBalanceAfter == poolAssetBalanceAfter)) | |
410 | 410 | then { | |
411 | 411 | let wavesAssetBalanceAfter = getBalance(factoryAddress, wavesAsset) | |
412 | 412 | if ((wavesAssetBalanceAfter == wavesAssetBalanceAfter)) | |
413 | 413 | then { | |
414 | 414 | let poolAssetAmount = (poolAssetBalanceAfter - poolAssetBalanceBefore) | |
415 | 415 | let wavesAmount = (wavesAssetBalanceAfter - wavesAssetBalanceBefore) | |
416 | 416 | let logo = genLogo(poolAsset) | |
417 | 417 | if (if ((poolAssetAmount > 0)) | |
418 | 418 | then (wavesAmount > 0) | |
419 | 419 | else false) | |
420 | 420 | then { | |
421 | 421 | let burnAmount = fraction(poolAssetAmount, 20, 100) | |
422 | 422 | let burnAction = invoke(factoryAddress, "burn", [poolAsset, burnAmount], nil) | |
423 | 423 | if ((burnAction == burnAction)) | |
424 | 424 | then { | |
425 | 425 | let feeWavesAmount = fraction(wavesAmount, 20, 100) | |
426 | 426 | let feeAction = invoke(factoryAddress, "transferWaves", [feeCollectorAddress.bytes, feeWavesAmount], nil) | |
427 | 427 | if ((feeAction == feeAction)) | |
428 | 428 | then { | |
429 | 429 | let registerAssetAction = invoke(factoryAddress, "registerAsset", [assetStoreAddress.bytes, assetIdToString(poolAsset), logo, true], nil) | |
430 | 430 | if ((registerAssetAction == registerAssetAction)) | |
431 | 431 | then { | |
432 | 432 | let createWxPoolAction = invoke(factoryAddress, "createWxPool", [userPoolsAddress.bytes, assetIdToString(poolAsset), (poolAssetAmount - burnAmount), assetIdToString(wavesAsset), (wavesAmount - feeWavesAmount)], nil) | |
433 | 433 | if ((createWxPoolAction == createWxPoolAction)) | |
434 | 434 | then { | |
435 | 435 | let changeStatus = invoke(factoryAddress, "integerEntry", [kPoolStatus(getPoolId(poolAddress)), STATUS_TRANSFERRED], nil) | |
436 | 436 | if ((changeStatus == changeStatus)) | |
437 | 437 | then nil | |
438 | 438 | else throw("Strict value is not equal to itself.") | |
439 | 439 | } | |
440 | 440 | else throw("Strict value is not equal to itself.") | |
441 | 441 | } | |
442 | 442 | else throw("Strict value is not equal to itself.") | |
443 | 443 | } | |
444 | 444 | else throw("Strict value is not equal to itself.") | |
445 | 445 | } | |
446 | 446 | else throw("Strict value is not equal to itself.") | |
447 | 447 | } | |
448 | 448 | else throwErr("withdrawn amount from pool is too low") | |
449 | 449 | } | |
450 | 450 | else throw("Strict value is not equal to itself.") | |
451 | 451 | } | |
452 | 452 | else throw("Strict value is not equal to itself.") | |
453 | 453 | } | |
454 | 454 | else throw("Strict value is not equal to itself.") | |
455 | 455 | } | |
456 | 456 | else throw("Strict value is not equal to itself.") | |
457 | 457 | } | |
458 | 458 | else throw("Strict value is not equal to itself.") | |
459 | 459 | } | |
460 | 460 | ||
461 | 461 | ||
462 | 462 | @Verifier(tx) | |
463 | 463 | func verify () = { | |
464 | 464 | let keyAdminAddressList = "%s__adminAddressList" | |
465 | 465 | let keyAllowedTxId = "%s__txId" | |
466 | 466 | let adminList = split(valueOrElse(getString(factoryAddress, keyAdminAddressList), ""), "__") | |
467 | 467 | let byOwner = if ((size(adminList) >= 3)) | |
468 | 468 | then false | |
469 | 469 | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
470 | 470 | let byAdmins = (tx.id == fromBase58String(valueOrElse(getString(factoryAddress, keyAllowedTxId), ""))) | |
471 | 471 | if (byAdmins) | |
472 | 472 | then true | |
473 | 473 | else byOwner | |
474 | 474 | } | |
475 | 475 |
github/deemru/w8io/169f3d6 46.83 ms ◑