tx · H4cjs3n8JTZLZRkYi6Fen5WkDn8g1cQvqXCCtmSZc2PD 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr: -0.01700000 Waves 2024.12.19 16:02 [3421446] smart account 3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr > SELF 0.00000000 Waves
{ "type": 13, "id": "H4cjs3n8JTZLZRkYi6Fen5WkDn8g1cQvqXCCtmSZc2PD", "fee": 1700000, "feeAssetId": null, "timestamp": 1734613398459, "version": 2, "chainId": 84, "sender": "3N1ytAUyhtig9X6F2hHHs1jbzYxr47Yp8Fr", "senderPublicKey": "jXCTQV8PjX2uC9UHBFveupYy9cjhY7stHbzE9cptymw", "proofs": [ "55BCpepB7qy9N1HhU6b3cSWQN6WnRWxqd3TVNLHSQ75RJzHZ1K2yB6D2nyBNBdBgPRqU133LmGc7UUfBVst2Bi6g" ], "script": "base64:BwIrCAISAwoBCBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGBIECgICGDkACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIXbWVtZV9pbV9jYWxjdWxhdG9yLnJpZGUABW11bHQ4AIDC1y8BB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwAMU1RBVFVTX0VNUFRZAAAADFNUQVRVU19SRUFEWQABABVTVEFUVVNfVEFSR0VUX1JFQUNIRUQAAgASU1RBVFVTX1RSQU5TRkVSUkVEAAMAC2RlZmF1bHRMb2dvAqABPHN2ZyB3aWR0aD0nMzAnIGhlaWdodD0nMzAnIHhtbG5zPSdodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2Zyc+PGc+PGNpcmNsZSBjeD0nMTUnI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XN0AAMHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5BAhieUFkbWlucwkAAAIIBQJ0eAJpZAkA2QQBCQELdmFsdWVPckVsc2UCCQCdCAIFDmZhY3RvcnlBZGRyZXNzBQ5rZXlBbGxvd2VkVHhJZAIAAwUIYnlBZG1pbnMGBQdieU93bmVypmoN+g==", "height": 3421446, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8iJxrm1J7TrHqGtMqTx6KVxQei3cz27NSjEGmNQ7dk86 Next: Fu53ceFQTcghzj7mn1L1bYMtpi5GSRrBBRLsCFYzQptE Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | ||
27 | 27 | let m = 3 | |
28 | 28 | ||
29 | - | let n = " | |
29 | + | let n = "<svg width='30' height='30' xmlns='http://www.w3.org/2000/svg'><g><circle cx='15' cy='15' fill='#ccc' r='15'/><text stroke='#0' x='6' y='20'>iM</text></g></svg>" | |
30 | 30 | ||
31 | - | let o = " | |
31 | + | let o = "shutdown__flag" | |
32 | 32 | ||
33 | - | let p = " | |
33 | + | let p = "price__asset" | |
34 | 34 | ||
35 | - | let q = " | |
35 | + | let q = "listing__volume" | |
36 | 36 | ||
37 | - | let r = "setup__ | |
37 | + | let r = "setup__creationFee" | |
38 | 38 | ||
39 | - | let s = "setup__ | |
39 | + | let s = "setup__curveTarget" | |
40 | 40 | ||
41 | - | let t = " | |
41 | + | let t = "setup__virtualLiquidity" | |
42 | 42 | ||
43 | - | let u = " | |
43 | + | let u = "static_tokenIds" | |
44 | 44 | ||
45 | - | let v = " | |
45 | + | let v = "pool__contract__hash" | |
46 | 46 | ||
47 | - | let w = " | |
47 | + | let w = "last__empty_pool__index" | |
48 | 48 | ||
49 | - | func x (y) = makeString(["pool", toString(y)], a) | |
49 | + | let x = "first__empty__pool__index" | |
50 | + | ||
51 | + | func y (z) = makeString(["pool", toString(z)], a) | |
50 | 52 | ||
51 | 53 | ||
52 | - | func | |
54 | + | func A (i) = makeString(["pool", toString(i)], a) | |
53 | 55 | ||
54 | 56 | ||
55 | - | func | |
57 | + | func B (i) = makeString(["asset", toString(i)], a) | |
56 | 58 | ||
57 | 59 | ||
58 | - | func | |
60 | + | func C (z) = makeString(["pool", "status", toString(z)], a) | |
59 | 61 | ||
60 | 62 | ||
61 | - | let | |
63 | + | let D = "factory__address" | |
62 | 64 | ||
63 | - | let | |
64 | - | let | |
65 | - | if ($isInstanceOf( | |
65 | + | let E = { | |
66 | + | let F = getString(this, D) | |
67 | + | if ($isInstanceOf(F, "String")) | |
66 | 68 | then { | |
67 | - | let f = | |
69 | + | let f = F | |
68 | 70 | addressFromString(f) | |
69 | 71 | } | |
70 | - | else if ($isInstanceOf( | |
72 | + | else if ($isInstanceOf(F, "Unit")) | |
71 | 73 | then unit | |
72 | 74 | else throw("Match error") | |
73 | 75 | } | |
74 | 76 | ||
75 | - | let | |
77 | + | let G = valueOrErrorMessage(E, e("invalid factory address")) | |
76 | 78 | ||
77 | - | let | |
79 | + | let H = "wxswap__address" | |
78 | 80 | ||
79 | - | let | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
81 | + | let I = { | |
82 | + | let F = getString(G, H) | |
83 | + | if ($isInstanceOf(F, "String")) | |
82 | 84 | then { | |
83 | - | let f = | |
85 | + | let f = F | |
84 | 86 | addressFromString(f) | |
85 | 87 | } | |
86 | 88 | else unit | |
87 | 89 | } | |
88 | 90 | ||
89 | - | let | |
91 | + | let J = valueOrErrorMessage(I, e("invalid wx swap address")) | |
90 | 92 | ||
91 | - | let | |
93 | + | let K = "wxfee_address" | |
92 | 94 | ||
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
95 | + | let L = { | |
96 | + | let F = getString(G, K) | |
97 | + | if ($isInstanceOf(F, "String")) | |
96 | 98 | then { | |
97 | - | let f = | |
99 | + | let f = F | |
98 | 100 | addressFromString(f) | |
99 | 101 | } | |
100 | 102 | else unit | |
101 | 103 | } | |
102 | 104 | ||
103 | - | let | |
105 | + | let M = valueOrErrorMessage(L, e("invalid fee collector address")) | |
104 | 106 | ||
105 | - | let | |
107 | + | let N = "userpools_address" | |
106 | 108 | ||
107 | - | let | |
108 | - | let | |
109 | - | if ($isInstanceOf( | |
109 | + | let O = { | |
110 | + | let F = getString(G, N) | |
111 | + | if ($isInstanceOf(F, "String")) | |
110 | 112 | then { | |
111 | - | let f = | |
113 | + | let f = F | |
112 | 114 | addressFromString(f) | |
113 | 115 | } | |
114 | 116 | else unit | |
115 | 117 | } | |
116 | 118 | ||
117 | - | let | |
119 | + | let P = valueOrErrorMessage(O, e("invalid user_pools dapp address")) | |
118 | 120 | ||
119 | - | let | |
121 | + | let Q = "assetstore_address" | |
120 | 122 | ||
121 | - | let Q = valueOrElse(getInteger(F, v), 0) | |
123 | + | let R = { | |
124 | + | let F = getString(G, Q) | |
125 | + | if ($isInstanceOf(F, "String")) | |
126 | + | then { | |
127 | + | let f = F | |
128 | + | addressFromString(f) | |
129 | + | } | |
130 | + | else unit | |
131 | + | } | |
122 | 132 | ||
123 | - | let | |
133 | + | let S = valueOrErrorMessage(R, e("invalid asset_store dapp address")) | |
124 | 134 | ||
125 | - | let | |
135 | + | let T = valueOrElse(getBoolean(G, o), false) | |
126 | 136 | ||
127 | - | let | |
137 | + | let U = valueOrElse(getInteger(G, w), 0) | |
128 | 138 | ||
129 | - | let | |
139 | + | let V = valueOrElse(getInteger(G, x), 0) | |
130 | 140 | ||
131 | - | func V (W) = if ((W == b)) | |
141 | + | let W = valueOrElse(getInteger(G, q), 0) | |
142 | + | ||
143 | + | let X = valueOrElse(getInteger(G, r), 0) | |
144 | + | ||
145 | + | let Y = getBinary(G, v) | |
146 | + | ||
147 | + | func Z (aa) = if ((aa == b)) | |
132 | 148 | then unit | |
133 | - | else fromBase58String( | |
149 | + | else fromBase58String(aa) | |
134 | 150 | ||
135 | 151 | ||
136 | - | func | |
152 | + | func ab (aa) = if ((aa == unit)) | |
137 | 153 | then b | |
138 | - | else toBase58String(value( | |
154 | + | else toBase58String(value(aa)) | |
139 | 155 | ||
140 | 156 | ||
141 | - | func | |
157 | + | func ac (ad,i) = if ((ad == i)) | |
142 | 158 | then true | |
143 | 159 | else g("permission denied") | |
144 | 160 | ||
145 | 161 | ||
146 | - | func | |
162 | + | func ae (ad) = ac(ad, this) | |
147 | 163 | ||
148 | 164 | ||
149 | - | func | |
165 | + | func af (ad) = ac(ad, G) | |
150 | 166 | ||
151 | 167 | ||
152 | - | func | |
153 | - | let | |
154 | - | if ($isInstanceOf( | |
168 | + | func ag (i) = { | |
169 | + | let F = Y | |
170 | + | if ($isInstanceOf(F, "ByteVector")) | |
155 | 171 | then { | |
156 | - | let | |
157 | - | (scriptHash(i) == | |
172 | + | let ah = F | |
173 | + | (scriptHash(i) == ah) | |
158 | 174 | } | |
159 | 175 | else true | |
160 | 176 | } | |
161 | 177 | ||
162 | 178 | ||
163 | - | func | |
179 | + | func ai (aj) = isDefined(getInteger(G, A(aj))) | |
164 | 180 | ||
165 | 181 | ||
166 | - | func | |
182 | + | func ak (aj) = valueOrErrorMessage(getInteger(G, A(aj)), "pool doesn't exists") | |
167 | 183 | ||
168 | 184 | ||
169 | - | func | |
185 | + | func al (aj) = (valueOrElse(getInteger(G, C(ak(aj))), -1) == l) | |
170 | 186 | ||
171 | 187 | ||
172 | - | func | |
173 | - | let | |
174 | - | if ($isInstanceOf( | |
188 | + | func am (i,an) = { | |
189 | + | let F = an | |
190 | + | if ($isInstanceOf(F, "ByteVector")) | |
175 | 191 | then { | |
176 | - | let | |
177 | - | assetBalance(i, | |
192 | + | let ao = F | |
193 | + | assetBalance(i, ao) | |
178 | 194 | } | |
179 | 195 | else wavesBalance(i).available | |
180 | 196 | } | |
181 | 197 | ||
182 | 198 | ||
183 | - | @Callable( | |
184 | - | func init ( | |
185 | - | let | |
186 | - | if (( | |
187 | - | then [StringEntry( | |
199 | + | @Callable(ap) | |
200 | + | func init (aq) = { | |
201 | + | let ar = ae(ap.caller) | |
202 | + | if ((ar == ar)) | |
203 | + | then [StringEntry(D, aq)] | |
188 | 204 | else throw("Strict value is not equal to itself.") | |
189 | 205 | } | |
190 | 206 | ||
191 | 207 | ||
192 | 208 | ||
193 | - | @Callable( | |
194 | - | func addEmptyPool ( | |
195 | - | let | |
196 | - | let | |
197 | - | let | |
209 | + | @Callable(ap) | |
210 | + | func addEmptyPool (as,at) = { | |
211 | + | let au = addressFromPublicKey(as) | |
212 | + | let av = (U + 1) | |
213 | + | let aw = [if (!(T)) | |
198 | 214 | then true | |
199 | - | else g("not allowed (shutdown)"), if ( | |
215 | + | else g("not allowed (shutdown)"), if (ag(au)) | |
200 | 216 | then true | |
201 | - | else g("pool script is not allowed"), if (!( | |
217 | + | else g("pool script is not allowed"), if (!(ai(au))) | |
202 | 218 | then true | |
203 | 219 | else g("pool address is already registered")] | |
204 | - | if (( | |
220 | + | if ((aw == aw)) | |
205 | 221 | then { | |
206 | - | let | |
207 | - | $Tuple2(nil, | |
222 | + | let ax = [invoke(G, "integerEntry", [w, av], nil), invoke(G, "stringEntry", [y(av), toString(au)], nil), invoke(G, "integerEntry", [A(au), av], nil), invoke(G, "integerEntry", [C(av), j], nil)] | |
223 | + | $Tuple2(nil, ax) | |
208 | 224 | } | |
209 | 225 | else throw("Strict value is not equal to itself.") | |
210 | 226 | } | |
211 | 227 | ||
212 | 228 | ||
213 | 229 | ||
214 | - | @Callable( | |
215 | - | func createPool ( | |
216 | - | let | |
217 | - | let | |
230 | + | @Callable(ap) | |
231 | + | func createPool (as,at) = { | |
232 | + | let ay = (W + X) | |
233 | + | let aw = [if (!(T)) | |
218 | 234 | then true | |
219 | - | else g("Temporary shutdown"), | |
235 | + | else g("Temporary shutdown"), af(ap.caller), if (((U - V) > 0)) | |
220 | 236 | then true | |
221 | - | else g("No empty pool available"), if (( | |
237 | + | else g("No empty pool available"), if ((ap.payments[0].assetId == unit)) | |
222 | 238 | then true | |
223 | - | else g("Payment should be in WAVES"), if (( | |
239 | + | else g("Payment should be in WAVES"), if ((ap.payments[0].amount >= ay)) | |
224 | 240 | then true | |
225 | - | else g((("Payment should be greater or equal " + toString( | |
241 | + | else g((("Payment should be greater or equal " + toString(ay)) + " WAVELET")), if (isDefined(at[0])) | |
226 | 242 | then true | |
227 | - | else g("Token name is not provided"), if (isDefined( | |
243 | + | else g("Token name is not provided"), if (isDefined(at[1])) | |
228 | 244 | then true | |
229 | - | else g("Token description is not provided"), if (isDefined( | |
245 | + | else g("Token description is not provided"), if (isDefined(at[2])) | |
230 | 246 | then true | |
231 | - | else g("Token quantity is not provided"), if ((parseInt( | |
247 | + | else g("Token quantity is not provided"), if ((parseInt(at[2]) != unit)) | |
232 | 248 | then true | |
233 | 249 | else g("Token quantity should be a number")] | |
234 | - | if (( | |
250 | + | if ((aw == aw)) | |
235 | 251 | then { | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | if (( | |
252 | + | let az = (V + 1) | |
253 | + | let aA = getStringValue(G, y(az)) | |
254 | + | let aj = addressFromStringValue(aA) | |
255 | + | let aB = addressFromPublicKey(as) | |
256 | + | let aC = take(aA, 8) | |
257 | + | let aD = toString(aB) | |
258 | + | let aE = at[0] | |
259 | + | let aF = at[1] | |
260 | + | let aG = at[2] | |
261 | + | let aH = invoke(G, "initPoolInvoke", [aA, [aC, aD, aE, aF, aG]], [AttachedPayment(ap.payments[0].assetId, ap.payments[0].amount)]) | |
262 | + | if ((aH == aH)) | |
247 | 263 | then { | |
248 | - | let | |
249 | - | $Tuple2(nil, | |
264 | + | let ax = [invoke(G, "integerEntry", [x, az], nil), invoke(G, "integerEntry", [C(az), k], nil)] | |
265 | + | $Tuple2(nil, ax) | |
250 | 266 | } | |
251 | 267 | else throw("Strict value is not equal to itself.") | |
252 | 268 | } | |
255 | 271 | ||
256 | 272 | ||
257 | 273 | ||
258 | - | @Callable( | |
259 | - | func notifyStatusUpdate ( | |
260 | - | let | |
261 | - | let | |
274 | + | @Callable(ap) | |
275 | + | func notifyStatusUpdate (as,at) = { | |
276 | + | let aj = addressFromPublicKey(as) | |
277 | + | let aw = [if (ai(aj)) | |
262 | 278 | then true | |
263 | - | else g("pool not found"), | |
264 | - | if (( | |
279 | + | else g("pool not found"), af(ap.caller)] | |
280 | + | if ((aw == aw)) | |
265 | 281 | then { | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | $Tuple2(nil, | |
282 | + | let az = getIntegerValue(G, A(aj)) | |
283 | + | let aI = parseIntValue(at[0]) | |
284 | + | let ax = [invoke(G, "integerEntry", [C(az), aI], nil)] | |
285 | + | $Tuple2(nil, ax) | |
270 | 286 | } | |
271 | 287 | else throw("Strict value is not equal to itself.") | |
272 | 288 | } | |
273 | 289 | ||
274 | 290 | ||
275 | 291 | ||
276 | - | @Callable( | |
277 | - | func swapREADONLY ( | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
292 | + | @Callable(ap) | |
293 | + | func swapREADONLY (as,at) = { | |
294 | + | let aj = addressFromStringValue(at[0]) | |
295 | + | let aJ = at[1] | |
296 | + | let aK = at[2] | |
297 | + | let aL = parseIntValue(at[3]) | |
298 | + | let aw = [if (!(T)) | |
283 | 299 | then true | |
284 | - | else g("Temporary shutdown"), | |
285 | - | if (( | |
286 | - | then if ( | |
300 | + | else g("Temporary shutdown"), af(ap.caller)] | |
301 | + | if ((aw == aw)) | |
302 | + | then if (al(aj)) | |
287 | 303 | then { | |
288 | - | let | |
289 | - | let | |
290 | - | if ($isInstanceOf( | |
291 | - | then | |
292 | - | else throw(($getType( | |
304 | + | let aM = { | |
305 | + | let aN = invoke(J, "swapCalculateREADONLY", [aL, aJ, aK], nil) | |
306 | + | if ($isInstanceOf(aN, "Int")) | |
307 | + | then aN | |
308 | + | else throw(($getType(aN) + " couldn't be cast to Int")) | |
293 | 309 | } | |
294 | - | $Tuple2(nil, $Tuple2( | |
310 | + | $Tuple2(nil, $Tuple2(aM, "WxSwap")) | |
295 | 311 | } | |
296 | 312 | else { | |
297 | - | let | |
298 | - | let | |
299 | - | if ($isInstanceOf( | |
300 | - | then | |
301 | - | else throw(($getType( | |
313 | + | let aO = { | |
314 | + | let aN = invoke(aj, "swapReadOnly", [aJ, aK, aL], nil) | |
315 | + | if ($isInstanceOf(aN, "Int")) | |
316 | + | then aN | |
317 | + | else throw(($getType(aN) + " couldn't be cast to Int")) | |
302 | 318 | } | |
303 | - | $Tuple2(nil, $Tuple2( | |
319 | + | $Tuple2(nil, $Tuple2(aO, "iMemePool")) | |
304 | 320 | } | |
305 | 321 | else throw("Strict value is not equal to itself.") | |
306 | 322 | } | |
307 | 323 | ||
308 | 324 | ||
309 | 325 | ||
310 | - | @Callable( | |
311 | - | func swap ( | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
326 | + | @Callable(ap) | |
327 | + | func swap (as,at) = { | |
328 | + | let aB = addressFromPublicKey(as) | |
329 | + | let aj = addressFromStringValue(at[0]) | |
330 | + | let aK = at[1] | |
331 | + | let aP = Z(aK) | |
332 | + | let aQ = parseIntValue(at[2]) | |
333 | + | let aR = ap.payments[0].amount | |
334 | + | let aS = ap.payments[0].assetId | |
335 | + | let aw = [if (!(T)) | |
320 | 336 | then true | |
321 | - | else g("Temporary shutdown"), | |
337 | + | else g("Temporary shutdown"), af(ap.caller), if ((size(ap.payments) == 1)) | |
322 | 338 | then true | |
323 | 339 | else g("exactly one payment is expected")] | |
324 | - | if (( | |
340 | + | if ((aw == aw)) | |
325 | 341 | then { | |
326 | - | let | |
327 | - | if (( | |
342 | + | let aT = am(this, aP) | |
343 | + | if ((aT == aT)) | |
328 | 344 | then { | |
329 | - | let | |
330 | - | then invoke( | |
331 | - | else invoke( | |
332 | - | if (( | |
345 | + | let aU = if (al(aj)) | |
346 | + | then invoke(J, "swap", [aQ, aK, toString(this)], ap.payments) | |
347 | + | else invoke(aj, "swap", [aK, aQ], ap.payments) | |
348 | + | if ((aU == aU)) | |
333 | 349 | then { | |
334 | - | let | |
335 | - | if (( | |
336 | - | then [ScriptTransfer( | |
350 | + | let aV = am(this, aP) | |
351 | + | if ((aV == aV)) | |
352 | + | then [ScriptTransfer(aB, (aV - aT), aP)] | |
337 | 353 | else throw("Strict value is not equal to itself.") | |
338 | 354 | } | |
339 | 355 | else throw("Strict value is not equal to itself.") | |
345 | 361 | ||
346 | 362 | ||
347 | 363 | ||
348 | - | @Callable( | |
349 | - | func transferPool ( | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | then $Tuple2( | |
357 | - | else $Tuple2( | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
364 | + | @Callable(ap) | |
365 | + | func transferPool (as,at) = { | |
366 | + | let aB = addressFromPublicKey(as) | |
367 | + | let aj = addressFromStringValue(at[0]) | |
368 | + | let aW = split(getStringValue(aj, u), ",") | |
369 | + | let aX = Z(aW[0]) | |
370 | + | let aY = Z(aW[1]) | |
371 | + | let aZ = if ((aX == unit)) | |
372 | + | then $Tuple2(aY, aX) | |
373 | + | else $Tuple2(aX, aY) | |
374 | + | let ba = aZ._1 | |
375 | + | let bb = aZ._2 | |
376 | + | let bc = am(G, ba) | |
377 | + | if ((bc == bc)) | |
362 | 378 | then { | |
363 | - | let | |
364 | - | if (( | |
379 | + | let bd = am(G, bb) | |
380 | + | if ((bd == bd)) | |
365 | 381 | then { | |
366 | - | let | |
367 | - | if (( | |
382 | + | let be = invoke(G, "withdrawLiquidityFromPool", [aj.bytes], nil) | |
383 | + | if ((be == be)) | |
368 | 384 | then { | |
369 | - | let | |
370 | - | if (( | |
385 | + | let bf = am(G, ba) | |
386 | + | if ((bf == bf)) | |
371 | 387 | then { | |
372 | - | let | |
373 | - | if (( | |
388 | + | let bg = am(G, bb) | |
389 | + | if ((bg == bg)) | |
374 | 390 | then { | |
375 | - | let | |
376 | - | let | |
377 | - | if (if (( | |
378 | - | then ( | |
391 | + | let bh = (bf - bc) | |
392 | + | let bi = (bg - bd) | |
393 | + | if (if ((bh > 0)) | |
394 | + | then (bi > 0) | |
379 | 395 | else false) | |
380 | 396 | then { | |
381 | - | let | |
382 | - | let | |
383 | - | if (( | |
397 | + | let bj = fraction(bh, 20, 100) | |
398 | + | let bk = invoke(G, "burn", [ba, bj], nil) | |
399 | + | if ((bk == bk)) | |
384 | 400 | then { | |
385 | - | let | |
386 | - | let | |
387 | - | if (( | |
401 | + | let bl = fraction(bi, 20, 100) | |
402 | + | let bm = invoke(G, "transferWaves", [M.bytes, bl], nil) | |
403 | + | if ((bm == bm)) | |
388 | 404 | then { | |
389 | - | let bj = invoke(F, "createWxPool", [O.bytes, X(aW), (bd - bf), X(aX), (be - bh)], nil) | |
390 | - | if ((bj == bj)) | |
391 | - | then nil | |
405 | + | let bn = invoke(G, "registerAsset", [S.bytes, ab(ba), n, true], nil) | |
406 | + | if ((bn == bn)) | |
407 | + | then { | |
408 | + | let bo = invoke(G, "createWxPool", [P.bytes, ab(ba), (bh - bj), ab(bb), (bi - bl)], nil) | |
409 | + | if ((bo == bo)) | |
410 | + | then { | |
411 | + | let bp = invoke(G, "integerEntry", [C(ak(aj)), m], nil) | |
412 | + | if ((bp == bp)) | |
413 | + | then nil | |
414 | + | else throw("Strict value is not equal to itself.") | |
415 | + | } | |
416 | + | else throw("Strict value is not equal to itself.") | |
417 | + | } | |
392 | 418 | else throw("Strict value is not equal to itself.") | |
393 | 419 | } | |
394 | 420 | else throw("Strict value is not equal to itself.") | |
409 | 435 | } | |
410 | 436 | ||
411 | 437 | ||
412 | - | @Verifier( | |
413 | - | func | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
438 | + | @Verifier(bq) | |
439 | + | func br () = { | |
440 | + | let bs = "%s__adminAddressList" | |
441 | + | let bt = "%s__txId" | |
442 | + | let bu = split(valueOrElse(getString(G, bs), ""), "__") | |
443 | + | let bv = if ((size(bu) >= 3)) | |
418 | 444 | then false | |
419 | - | else sigVerify( | |
420 | - | let | |
421 | - | if ( | |
445 | + | else sigVerify(bq.bodyBytes, bq.proofs[0], bq.senderPublicKey) | |
446 | + | let bw = (bq.id == fromBase58String(valueOrElse(getString(G, bt), ""))) | |
447 | + | if (bw) | |
422 | 448 | then true | |
423 | - | else | |
449 | + | else bv | |
424 | 450 | } | |
425 | 451 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "WAVES" | |
7 | 7 | ||
8 | 8 | let c = "meme_im_calculator.ride" | |
9 | 9 | ||
10 | 10 | let d = 100000000 | |
11 | 11 | ||
12 | 12 | func e (f) = ((c + ": ") + f) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func g (f) = throw(e(f)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func h (i) = isDefined(addressFromString(i)) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | let j = 0 | |
22 | 22 | ||
23 | 23 | let k = 1 | |
24 | 24 | ||
25 | 25 | let l = 2 | |
26 | 26 | ||
27 | 27 | let m = 3 | |
28 | 28 | ||
29 | - | let n = " | |
29 | + | let n = "<svg width='30' height='30' xmlns='http://www.w3.org/2000/svg'><g><circle cx='15' cy='15' fill='#ccc' r='15'/><text stroke='#0' x='6' y='20'>iM</text></g></svg>" | |
30 | 30 | ||
31 | - | let o = " | |
31 | + | let o = "shutdown__flag" | |
32 | 32 | ||
33 | - | let p = " | |
33 | + | let p = "price__asset" | |
34 | 34 | ||
35 | - | let q = " | |
35 | + | let q = "listing__volume" | |
36 | 36 | ||
37 | - | let r = "setup__ | |
37 | + | let r = "setup__creationFee" | |
38 | 38 | ||
39 | - | let s = "setup__ | |
39 | + | let s = "setup__curveTarget" | |
40 | 40 | ||
41 | - | let t = " | |
41 | + | let t = "setup__virtualLiquidity" | |
42 | 42 | ||
43 | - | let u = " | |
43 | + | let u = "static_tokenIds" | |
44 | 44 | ||
45 | - | let v = " | |
45 | + | let v = "pool__contract__hash" | |
46 | 46 | ||
47 | - | let w = " | |
47 | + | let w = "last__empty_pool__index" | |
48 | 48 | ||
49 | - | func x (y) = makeString(["pool", toString(y)], a) | |
49 | + | let x = "first__empty__pool__index" | |
50 | + | ||
51 | + | func y (z) = makeString(["pool", toString(z)], a) | |
50 | 52 | ||
51 | 53 | ||
52 | - | func | |
54 | + | func A (i) = makeString(["pool", toString(i)], a) | |
53 | 55 | ||
54 | 56 | ||
55 | - | func | |
57 | + | func B (i) = makeString(["asset", toString(i)], a) | |
56 | 58 | ||
57 | 59 | ||
58 | - | func | |
60 | + | func C (z) = makeString(["pool", "status", toString(z)], a) | |
59 | 61 | ||
60 | 62 | ||
61 | - | let | |
63 | + | let D = "factory__address" | |
62 | 64 | ||
63 | - | let | |
64 | - | let | |
65 | - | if ($isInstanceOf( | |
65 | + | let E = { | |
66 | + | let F = getString(this, D) | |
67 | + | if ($isInstanceOf(F, "String")) | |
66 | 68 | then { | |
67 | - | let f = | |
69 | + | let f = F | |
68 | 70 | addressFromString(f) | |
69 | 71 | } | |
70 | - | else if ($isInstanceOf( | |
72 | + | else if ($isInstanceOf(F, "Unit")) | |
71 | 73 | then unit | |
72 | 74 | else throw("Match error") | |
73 | 75 | } | |
74 | 76 | ||
75 | - | let | |
77 | + | let G = valueOrErrorMessage(E, e("invalid factory address")) | |
76 | 78 | ||
77 | - | let | |
79 | + | let H = "wxswap__address" | |
78 | 80 | ||
79 | - | let | |
80 | - | let | |
81 | - | if ($isInstanceOf( | |
81 | + | let I = { | |
82 | + | let F = getString(G, H) | |
83 | + | if ($isInstanceOf(F, "String")) | |
82 | 84 | then { | |
83 | - | let f = | |
85 | + | let f = F | |
84 | 86 | addressFromString(f) | |
85 | 87 | } | |
86 | 88 | else unit | |
87 | 89 | } | |
88 | 90 | ||
89 | - | let | |
91 | + | let J = valueOrErrorMessage(I, e("invalid wx swap address")) | |
90 | 92 | ||
91 | - | let | |
93 | + | let K = "wxfee_address" | |
92 | 94 | ||
93 | - | let | |
94 | - | let | |
95 | - | if ($isInstanceOf( | |
95 | + | let L = { | |
96 | + | let F = getString(G, K) | |
97 | + | if ($isInstanceOf(F, "String")) | |
96 | 98 | then { | |
97 | - | let f = | |
99 | + | let f = F | |
98 | 100 | addressFromString(f) | |
99 | 101 | } | |
100 | 102 | else unit | |
101 | 103 | } | |
102 | 104 | ||
103 | - | let | |
105 | + | let M = valueOrErrorMessage(L, e("invalid fee collector address")) | |
104 | 106 | ||
105 | - | let | |
107 | + | let N = "userpools_address" | |
106 | 108 | ||
107 | - | let | |
108 | - | let | |
109 | - | if ($isInstanceOf( | |
109 | + | let O = { | |
110 | + | let F = getString(G, N) | |
111 | + | if ($isInstanceOf(F, "String")) | |
110 | 112 | then { | |
111 | - | let f = | |
113 | + | let f = F | |
112 | 114 | addressFromString(f) | |
113 | 115 | } | |
114 | 116 | else unit | |
115 | 117 | } | |
116 | 118 | ||
117 | - | let | |
119 | + | let P = valueOrErrorMessage(O, e("invalid user_pools dapp address")) | |
118 | 120 | ||
119 | - | let | |
121 | + | let Q = "assetstore_address" | |
120 | 122 | ||
121 | - | let Q = valueOrElse(getInteger(F, v), 0) | |
123 | + | let R = { | |
124 | + | let F = getString(G, Q) | |
125 | + | if ($isInstanceOf(F, "String")) | |
126 | + | then { | |
127 | + | let f = F | |
128 | + | addressFromString(f) | |
129 | + | } | |
130 | + | else unit | |
131 | + | } | |
122 | 132 | ||
123 | - | let | |
133 | + | let S = valueOrErrorMessage(R, e("invalid asset_store dapp address")) | |
124 | 134 | ||
125 | - | let | |
135 | + | let T = valueOrElse(getBoolean(G, o), false) | |
126 | 136 | ||
127 | - | let | |
137 | + | let U = valueOrElse(getInteger(G, w), 0) | |
128 | 138 | ||
129 | - | let | |
139 | + | let V = valueOrElse(getInteger(G, x), 0) | |
130 | 140 | ||
131 | - | func V (W) = if ((W == b)) | |
141 | + | let W = valueOrElse(getInteger(G, q), 0) | |
142 | + | ||
143 | + | let X = valueOrElse(getInteger(G, r), 0) | |
144 | + | ||
145 | + | let Y = getBinary(G, v) | |
146 | + | ||
147 | + | func Z (aa) = if ((aa == b)) | |
132 | 148 | then unit | |
133 | - | else fromBase58String( | |
149 | + | else fromBase58String(aa) | |
134 | 150 | ||
135 | 151 | ||
136 | - | func | |
152 | + | func ab (aa) = if ((aa == unit)) | |
137 | 153 | then b | |
138 | - | else toBase58String(value( | |
154 | + | else toBase58String(value(aa)) | |
139 | 155 | ||
140 | 156 | ||
141 | - | func | |
157 | + | func ac (ad,i) = if ((ad == i)) | |
142 | 158 | then true | |
143 | 159 | else g("permission denied") | |
144 | 160 | ||
145 | 161 | ||
146 | - | func | |
162 | + | func ae (ad) = ac(ad, this) | |
147 | 163 | ||
148 | 164 | ||
149 | - | func | |
165 | + | func af (ad) = ac(ad, G) | |
150 | 166 | ||
151 | 167 | ||
152 | - | func | |
153 | - | let | |
154 | - | if ($isInstanceOf( | |
168 | + | func ag (i) = { | |
169 | + | let F = Y | |
170 | + | if ($isInstanceOf(F, "ByteVector")) | |
155 | 171 | then { | |
156 | - | let | |
157 | - | (scriptHash(i) == | |
172 | + | let ah = F | |
173 | + | (scriptHash(i) == ah) | |
158 | 174 | } | |
159 | 175 | else true | |
160 | 176 | } | |
161 | 177 | ||
162 | 178 | ||
163 | - | func | |
179 | + | func ai (aj) = isDefined(getInteger(G, A(aj))) | |
164 | 180 | ||
165 | 181 | ||
166 | - | func | |
182 | + | func ak (aj) = valueOrErrorMessage(getInteger(G, A(aj)), "pool doesn't exists") | |
167 | 183 | ||
168 | 184 | ||
169 | - | func | |
185 | + | func al (aj) = (valueOrElse(getInteger(G, C(ak(aj))), -1) == l) | |
170 | 186 | ||
171 | 187 | ||
172 | - | func | |
173 | - | let | |
174 | - | if ($isInstanceOf( | |
188 | + | func am (i,an) = { | |
189 | + | let F = an | |
190 | + | if ($isInstanceOf(F, "ByteVector")) | |
175 | 191 | then { | |
176 | - | let | |
177 | - | assetBalance(i, | |
192 | + | let ao = F | |
193 | + | assetBalance(i, ao) | |
178 | 194 | } | |
179 | 195 | else wavesBalance(i).available | |
180 | 196 | } | |
181 | 197 | ||
182 | 198 | ||
183 | - | @Callable( | |
184 | - | func init ( | |
185 | - | let | |
186 | - | if (( | |
187 | - | then [StringEntry( | |
199 | + | @Callable(ap) | |
200 | + | func init (aq) = { | |
201 | + | let ar = ae(ap.caller) | |
202 | + | if ((ar == ar)) | |
203 | + | then [StringEntry(D, aq)] | |
188 | 204 | else throw("Strict value is not equal to itself.") | |
189 | 205 | } | |
190 | 206 | ||
191 | 207 | ||
192 | 208 | ||
193 | - | @Callable( | |
194 | - | func addEmptyPool ( | |
195 | - | let | |
196 | - | let | |
197 | - | let | |
209 | + | @Callable(ap) | |
210 | + | func addEmptyPool (as,at) = { | |
211 | + | let au = addressFromPublicKey(as) | |
212 | + | let av = (U + 1) | |
213 | + | let aw = [if (!(T)) | |
198 | 214 | then true | |
199 | - | else g("not allowed (shutdown)"), if ( | |
215 | + | else g("not allowed (shutdown)"), if (ag(au)) | |
200 | 216 | then true | |
201 | - | else g("pool script is not allowed"), if (!( | |
217 | + | else g("pool script is not allowed"), if (!(ai(au))) | |
202 | 218 | then true | |
203 | 219 | else g("pool address is already registered")] | |
204 | - | if (( | |
220 | + | if ((aw == aw)) | |
205 | 221 | then { | |
206 | - | let | |
207 | - | $Tuple2(nil, | |
222 | + | let ax = [invoke(G, "integerEntry", [w, av], nil), invoke(G, "stringEntry", [y(av), toString(au)], nil), invoke(G, "integerEntry", [A(au), av], nil), invoke(G, "integerEntry", [C(av), j], nil)] | |
223 | + | $Tuple2(nil, ax) | |
208 | 224 | } | |
209 | 225 | else throw("Strict value is not equal to itself.") | |
210 | 226 | } | |
211 | 227 | ||
212 | 228 | ||
213 | 229 | ||
214 | - | @Callable( | |
215 | - | func createPool ( | |
216 | - | let | |
217 | - | let | |
230 | + | @Callable(ap) | |
231 | + | func createPool (as,at) = { | |
232 | + | let ay = (W + X) | |
233 | + | let aw = [if (!(T)) | |
218 | 234 | then true | |
219 | - | else g("Temporary shutdown"), | |
235 | + | else g("Temporary shutdown"), af(ap.caller), if (((U - V) > 0)) | |
220 | 236 | then true | |
221 | - | else g("No empty pool available"), if (( | |
237 | + | else g("No empty pool available"), if ((ap.payments[0].assetId == unit)) | |
222 | 238 | then true | |
223 | - | else g("Payment should be in WAVES"), if (( | |
239 | + | else g("Payment should be in WAVES"), if ((ap.payments[0].amount >= ay)) | |
224 | 240 | then true | |
225 | - | else g((("Payment should be greater or equal " + toString( | |
241 | + | else g((("Payment should be greater or equal " + toString(ay)) + " WAVELET")), if (isDefined(at[0])) | |
226 | 242 | then true | |
227 | - | else g("Token name is not provided"), if (isDefined( | |
243 | + | else g("Token name is not provided"), if (isDefined(at[1])) | |
228 | 244 | then true | |
229 | - | else g("Token description is not provided"), if (isDefined( | |
245 | + | else g("Token description is not provided"), if (isDefined(at[2])) | |
230 | 246 | then true | |
231 | - | else g("Token quantity is not provided"), if ((parseInt( | |
247 | + | else g("Token quantity is not provided"), if ((parseInt(at[2]) != unit)) | |
232 | 248 | then true | |
233 | 249 | else g("Token quantity should be a number")] | |
234 | - | if (( | |
250 | + | if ((aw == aw)) | |
235 | 251 | then { | |
236 | - | let | |
237 | - | let | |
238 | - | let | |
239 | - | let | |
240 | - | let | |
241 | - | let | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | if (( | |
252 | + | let az = (V + 1) | |
253 | + | let aA = getStringValue(G, y(az)) | |
254 | + | let aj = addressFromStringValue(aA) | |
255 | + | let aB = addressFromPublicKey(as) | |
256 | + | let aC = take(aA, 8) | |
257 | + | let aD = toString(aB) | |
258 | + | let aE = at[0] | |
259 | + | let aF = at[1] | |
260 | + | let aG = at[2] | |
261 | + | let aH = invoke(G, "initPoolInvoke", [aA, [aC, aD, aE, aF, aG]], [AttachedPayment(ap.payments[0].assetId, ap.payments[0].amount)]) | |
262 | + | if ((aH == aH)) | |
247 | 263 | then { | |
248 | - | let | |
249 | - | $Tuple2(nil, | |
264 | + | let ax = [invoke(G, "integerEntry", [x, az], nil), invoke(G, "integerEntry", [C(az), k], nil)] | |
265 | + | $Tuple2(nil, ax) | |
250 | 266 | } | |
251 | 267 | else throw("Strict value is not equal to itself.") | |
252 | 268 | } | |
253 | 269 | else throw("Strict value is not equal to itself.") | |
254 | 270 | } | |
255 | 271 | ||
256 | 272 | ||
257 | 273 | ||
258 | - | @Callable( | |
259 | - | func notifyStatusUpdate ( | |
260 | - | let | |
261 | - | let | |
274 | + | @Callable(ap) | |
275 | + | func notifyStatusUpdate (as,at) = { | |
276 | + | let aj = addressFromPublicKey(as) | |
277 | + | let aw = [if (ai(aj)) | |
262 | 278 | then true | |
263 | - | else g("pool not found"), | |
264 | - | if (( | |
279 | + | else g("pool not found"), af(ap.caller)] | |
280 | + | if ((aw == aw)) | |
265 | 281 | then { | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | $Tuple2(nil, | |
282 | + | let az = getIntegerValue(G, A(aj)) | |
283 | + | let aI = parseIntValue(at[0]) | |
284 | + | let ax = [invoke(G, "integerEntry", [C(az), aI], nil)] | |
285 | + | $Tuple2(nil, ax) | |
270 | 286 | } | |
271 | 287 | else throw("Strict value is not equal to itself.") | |
272 | 288 | } | |
273 | 289 | ||
274 | 290 | ||
275 | 291 | ||
276 | - | @Callable( | |
277 | - | func swapREADONLY ( | |
278 | - | let | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
292 | + | @Callable(ap) | |
293 | + | func swapREADONLY (as,at) = { | |
294 | + | let aj = addressFromStringValue(at[0]) | |
295 | + | let aJ = at[1] | |
296 | + | let aK = at[2] | |
297 | + | let aL = parseIntValue(at[3]) | |
298 | + | let aw = [if (!(T)) | |
283 | 299 | then true | |
284 | - | else g("Temporary shutdown"), | |
285 | - | if (( | |
286 | - | then if ( | |
300 | + | else g("Temporary shutdown"), af(ap.caller)] | |
301 | + | if ((aw == aw)) | |
302 | + | then if (al(aj)) | |
287 | 303 | then { | |
288 | - | let | |
289 | - | let | |
290 | - | if ($isInstanceOf( | |
291 | - | then | |
292 | - | else throw(($getType( | |
304 | + | let aM = { | |
305 | + | let aN = invoke(J, "swapCalculateREADONLY", [aL, aJ, aK], nil) | |
306 | + | if ($isInstanceOf(aN, "Int")) | |
307 | + | then aN | |
308 | + | else throw(($getType(aN) + " couldn't be cast to Int")) | |
293 | 309 | } | |
294 | - | $Tuple2(nil, $Tuple2( | |
310 | + | $Tuple2(nil, $Tuple2(aM, "WxSwap")) | |
295 | 311 | } | |
296 | 312 | else { | |
297 | - | let | |
298 | - | let | |
299 | - | if ($isInstanceOf( | |
300 | - | then | |
301 | - | else throw(($getType( | |
313 | + | let aO = { | |
314 | + | let aN = invoke(aj, "swapReadOnly", [aJ, aK, aL], nil) | |
315 | + | if ($isInstanceOf(aN, "Int")) | |
316 | + | then aN | |
317 | + | else throw(($getType(aN) + " couldn't be cast to Int")) | |
302 | 318 | } | |
303 | - | $Tuple2(nil, $Tuple2( | |
319 | + | $Tuple2(nil, $Tuple2(aO, "iMemePool")) | |
304 | 320 | } | |
305 | 321 | else throw("Strict value is not equal to itself.") | |
306 | 322 | } | |
307 | 323 | ||
308 | 324 | ||
309 | 325 | ||
310 | - | @Callable( | |
311 | - | func swap ( | |
312 | - | let | |
313 | - | let | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | let | |
319 | - | let | |
326 | + | @Callable(ap) | |
327 | + | func swap (as,at) = { | |
328 | + | let aB = addressFromPublicKey(as) | |
329 | + | let aj = addressFromStringValue(at[0]) | |
330 | + | let aK = at[1] | |
331 | + | let aP = Z(aK) | |
332 | + | let aQ = parseIntValue(at[2]) | |
333 | + | let aR = ap.payments[0].amount | |
334 | + | let aS = ap.payments[0].assetId | |
335 | + | let aw = [if (!(T)) | |
320 | 336 | then true | |
321 | - | else g("Temporary shutdown"), | |
337 | + | else g("Temporary shutdown"), af(ap.caller), if ((size(ap.payments) == 1)) | |
322 | 338 | then true | |
323 | 339 | else g("exactly one payment is expected")] | |
324 | - | if (( | |
340 | + | if ((aw == aw)) | |
325 | 341 | then { | |
326 | - | let | |
327 | - | if (( | |
342 | + | let aT = am(this, aP) | |
343 | + | if ((aT == aT)) | |
328 | 344 | then { | |
329 | - | let | |
330 | - | then invoke( | |
331 | - | else invoke( | |
332 | - | if (( | |
345 | + | let aU = if (al(aj)) | |
346 | + | then invoke(J, "swap", [aQ, aK, toString(this)], ap.payments) | |
347 | + | else invoke(aj, "swap", [aK, aQ], ap.payments) | |
348 | + | if ((aU == aU)) | |
333 | 349 | then { | |
334 | - | let | |
335 | - | if (( | |
336 | - | then [ScriptTransfer( | |
350 | + | let aV = am(this, aP) | |
351 | + | if ((aV == aV)) | |
352 | + | then [ScriptTransfer(aB, (aV - aT), aP)] | |
337 | 353 | else throw("Strict value is not equal to itself.") | |
338 | 354 | } | |
339 | 355 | else throw("Strict value is not equal to itself.") | |
340 | 356 | } | |
341 | 357 | else throw("Strict value is not equal to itself.") | |
342 | 358 | } | |
343 | 359 | else throw("Strict value is not equal to itself.") | |
344 | 360 | } | |
345 | 361 | ||
346 | 362 | ||
347 | 363 | ||
348 | - | @Callable( | |
349 | - | func transferPool ( | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | let | |
356 | - | then $Tuple2( | |
357 | - | else $Tuple2( | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | if (( | |
364 | + | @Callable(ap) | |
365 | + | func transferPool (as,at) = { | |
366 | + | let aB = addressFromPublicKey(as) | |
367 | + | let aj = addressFromStringValue(at[0]) | |
368 | + | let aW = split(getStringValue(aj, u), ",") | |
369 | + | let aX = Z(aW[0]) | |
370 | + | let aY = Z(aW[1]) | |
371 | + | let aZ = if ((aX == unit)) | |
372 | + | then $Tuple2(aY, aX) | |
373 | + | else $Tuple2(aX, aY) | |
374 | + | let ba = aZ._1 | |
375 | + | let bb = aZ._2 | |
376 | + | let bc = am(G, ba) | |
377 | + | if ((bc == bc)) | |
362 | 378 | then { | |
363 | - | let | |
364 | - | if (( | |
379 | + | let bd = am(G, bb) | |
380 | + | if ((bd == bd)) | |
365 | 381 | then { | |
366 | - | let | |
367 | - | if (( | |
382 | + | let be = invoke(G, "withdrawLiquidityFromPool", [aj.bytes], nil) | |
383 | + | if ((be == be)) | |
368 | 384 | then { | |
369 | - | let | |
370 | - | if (( | |
385 | + | let bf = am(G, ba) | |
386 | + | if ((bf == bf)) | |
371 | 387 | then { | |
372 | - | let | |
373 | - | if (( | |
388 | + | let bg = am(G, bb) | |
389 | + | if ((bg == bg)) | |
374 | 390 | then { | |
375 | - | let | |
376 | - | let | |
377 | - | if (if (( | |
378 | - | then ( | |
391 | + | let bh = (bf - bc) | |
392 | + | let bi = (bg - bd) | |
393 | + | if (if ((bh > 0)) | |
394 | + | then (bi > 0) | |
379 | 395 | else false) | |
380 | 396 | then { | |
381 | - | let | |
382 | - | let | |
383 | - | if (( | |
397 | + | let bj = fraction(bh, 20, 100) | |
398 | + | let bk = invoke(G, "burn", [ba, bj], nil) | |
399 | + | if ((bk == bk)) | |
384 | 400 | then { | |
385 | - | let | |
386 | - | let | |
387 | - | if (( | |
401 | + | let bl = fraction(bi, 20, 100) | |
402 | + | let bm = invoke(G, "transferWaves", [M.bytes, bl], nil) | |
403 | + | if ((bm == bm)) | |
388 | 404 | then { | |
389 | - | let bj = invoke(F, "createWxPool", [O.bytes, X(aW), (bd - bf), X(aX), (be - bh)], nil) | |
390 | - | if ((bj == bj)) | |
391 | - | then nil | |
405 | + | let bn = invoke(G, "registerAsset", [S.bytes, ab(ba), n, true], nil) | |
406 | + | if ((bn == bn)) | |
407 | + | then { | |
408 | + | let bo = invoke(G, "createWxPool", [P.bytes, ab(ba), (bh - bj), ab(bb), (bi - bl)], nil) | |
409 | + | if ((bo == bo)) | |
410 | + | then { | |
411 | + | let bp = invoke(G, "integerEntry", [C(ak(aj)), m], nil) | |
412 | + | if ((bp == bp)) | |
413 | + | then nil | |
414 | + | else throw("Strict value is not equal to itself.") | |
415 | + | } | |
416 | + | else throw("Strict value is not equal to itself.") | |
417 | + | } | |
392 | 418 | else throw("Strict value is not equal to itself.") | |
393 | 419 | } | |
394 | 420 | else throw("Strict value is not equal to itself.") | |
395 | 421 | } | |
396 | 422 | else throw("Strict value is not equal to itself.") | |
397 | 423 | } | |
398 | 424 | else g("withdrawn amount from pool is too low") | |
399 | 425 | } | |
400 | 426 | else throw("Strict value is not equal to itself.") | |
401 | 427 | } | |
402 | 428 | else throw("Strict value is not equal to itself.") | |
403 | 429 | } | |
404 | 430 | else throw("Strict value is not equal to itself.") | |
405 | 431 | } | |
406 | 432 | else throw("Strict value is not equal to itself.") | |
407 | 433 | } | |
408 | 434 | else throw("Strict value is not equal to itself.") | |
409 | 435 | } | |
410 | 436 | ||
411 | 437 | ||
412 | - | @Verifier( | |
413 | - | func | |
414 | - | let | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
438 | + | @Verifier(bq) | |
439 | + | func br () = { | |
440 | + | let bs = "%s__adminAddressList" | |
441 | + | let bt = "%s__txId" | |
442 | + | let bu = split(valueOrElse(getString(G, bs), ""), "__") | |
443 | + | let bv = if ((size(bu) >= 3)) | |
418 | 444 | then false | |
419 | - | else sigVerify( | |
420 | - | let | |
421 | - | if ( | |
445 | + | else sigVerify(bq.bodyBytes, bq.proofs[0], bq.senderPublicKey) | |
446 | + | let bw = (bq.id == fromBase58String(valueOrElse(getString(G, bt), ""))) | |
447 | + | if (bw) | |
422 | 448 | then true | |
423 | - | else | |
449 | + | else bv | |
424 | 450 | } | |
425 | 451 |
github/deemru/w8io/169f3d6 154.71 ms ◑