tx · 9GDJqh7tMaqmqFFHYGC89reXt68bGsNyNuufFpxj1mEp 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS: -0.14000000 Waves 2022.10.18 17:28 [2277958] smart account 3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS > SELF 0.00000000 Waves
{ "type": 13, "id": "9GDJqh7tMaqmqFFHYGC89reXt68bGsNyNuufFpxj1mEp", "fee": 14000000, "feeAssetId": null, "timestamp": 1666103317671, "version": 2, "chainId": 84, "sender": "3MxWgDbE9EmjQj8b3LfFwa91FZizptyeQXS", "senderPublicKey": "C7xgcYqQ8qV8rmvzAjhQWq4cz82F6VJfXMNygvrTXsfW", "proofs": [ "5ok3inTw1mx5aWJDiaKiLpn8LENUaD54tsUqRnoki5hne2iazVeRu3zrh58QfwRB4hztFD8KBXutsz8DoDUJe4sD", "XR3GD7EE3qLqK52cHVcQkVwLfJ2iAidyMWEy51pZDJf3AVWQBKwyQTiCN2naUtAKaZANKp5FPGD5ZfxATsTqmsb" ], "script": "base64:BgJmCAISBAoCEQESBQoDCAEBEgUKAwEEARIECgIRCBIDCgEBEgYKBAgIAQgSBAoCCAESAwoBERIECgIRARIFCgMBCAgSBAoCCAESBQoDCAEBEgASABIECgIRBBIECgIBARIAEgASABIAWAAJUFJFQ0lTSU9OAMCEPQAFTUFYX0EAwIQ9AAxNQVhfQV9DSEFOR0UACgAIREVDSU1BTFMABgANTUlOX1JBTVBfVElNRQkAaQIAgKMFADwAB3ZlcnNpb24CBTMuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0Fzc2V0cwIJYXNzZXRfaWRzAA1rQXNzZXRCYWxhbmNlAghfYmFsYW5jZQAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAA1rU2hhcmVBc3NldElkAg5zaGFyZV9hc3NldF9pZAARa1NoYXJlQXNzZXRTdXBwbHkCEnNoYXJlX2Fzc2V0X3N1cHBseQAEa0ZlZQIKY29tbWl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pblB1YktleUludm9rZQMDBRNjYWxsVGFrZUludG9BY2NvdW50BQ1zaWduZWRCeUFkbWluBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnNwbNoh", "height": 2277958, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FMS6w7BGyn5VFdu3yVE6gM682UXaoiJv9wY2FB3oNUPp Next: Aykfwr5jGhNU1JhkCPYo8TqJ3CeJcoZe7MeXSiyMnhgb Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | ||
40 | 40 | let s = "_SWOP_amount" | |
41 | 41 | ||
42 | - | let t = " | |
42 | + | let t = "_GSwop_amount" | |
43 | 43 | ||
44 | - | let u = "admin_pub_ | |
44 | + | let u = "admin_pub_1" | |
45 | 45 | ||
46 | - | let v = "admin_pub_ | |
46 | + | let v = "admin_pub_2" | |
47 | 47 | ||
48 | - | let w = "admin_ | |
48 | + | let w = "admin_pub_3" | |
49 | 49 | ||
50 | - | let x = " | |
50 | + | let x = "admin_invoke_pub" | |
51 | 51 | ||
52 | - | let y = " | |
52 | + | let y = "money_box_address" | |
53 | 53 | ||
54 | - | let z = " | |
54 | + | let z = "governance_address" | |
55 | 55 | ||
56 | - | let B = " | |
56 | + | let B = "voting_address" | |
57 | 57 | ||
58 | - | let C = " | |
58 | + | let C = "farming_address" | |
59 | 59 | ||
60 | - | let E = | |
60 | + | let E = "lp_farming" | |
61 | 61 | ||
62 | - | func F (G) = { | |
63 | - | let H = getString(E, G) | |
64 | - | if ($isInstanceOf(H, "String")) | |
62 | + | let F = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
63 | + | ||
64 | + | func G (H) = { | |
65 | + | let I = getString(F, H) | |
66 | + | if ($isInstanceOf(I, "String")) | |
65 | 67 | then { | |
66 | - | let | |
67 | - | fromBase58String( | |
68 | + | let J = I | |
69 | + | fromBase58String(J) | |
68 | 70 | } | |
69 | 71 | else { | |
70 | - | let | |
71 | - | throw(( | |
72 | + | let K = I | |
73 | + | throw((H + "is empty")) | |
72 | 74 | } | |
73 | 75 | } | |
74 | 76 | ||
75 | 77 | ||
76 | - | let | |
78 | + | let L = G(u) | |
77 | 79 | ||
78 | - | let | |
80 | + | let M = G(v) | |
79 | 81 | ||
80 | - | let | |
82 | + | let N = G(w) | |
81 | 83 | ||
82 | - | let | |
84 | + | let O = G(x) | |
83 | 85 | ||
84 | - | let | |
86 | + | let P = Address(G(y)) | |
85 | 87 | ||
86 | - | let | |
88 | + | let Q = Address(G(z)) | |
87 | 89 | ||
88 | - | let | |
90 | + | let R = Address(G(p)) | |
89 | 91 | ||
90 | - | let | |
92 | + | let S = Address(G(B)) | |
91 | 93 | ||
92 | - | let | |
94 | + | let T = Address(G(C)) | |
93 | 95 | ||
94 | - | let | |
96 | + | let U = Address(G(E)) | |
95 | 97 | ||
96 | - | let | |
98 | + | let V = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
97 | 99 | ||
98 | - | let | |
100 | + | let W = [toBase58String(V)] | |
99 | 101 | ||
100 | - | let | |
102 | + | let X = getBooleanValue(this, j) | |
101 | 103 | ||
102 | - | let | |
104 | + | let Y = fromBase58String(getStringValue(this, l)) | |
103 | 105 | ||
104 | - | let | |
106 | + | let Z = getIntegerValue(this, m) | |
105 | 107 | ||
106 | - | let | |
108 | + | let aa = 1000000 | |
107 | 109 | ||
108 | - | let | |
110 | + | let ab = getIntegerValue(this, n) | |
109 | 111 | ||
110 | - | let | |
112 | + | let ac = fraction(40, aa, 100) | |
111 | 113 | ||
112 | - | let | |
114 | + | let ad = getIntegerValue(this, "initial_A") | |
113 | 115 | ||
114 | - | let | |
116 | + | let ae = getIntegerValue(this, "future_A") | |
115 | 117 | ||
116 | - | let | |
118 | + | let af = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
117 | 119 | ||
118 | - | let | |
120 | + | let ag = valueOrElse(getInteger(this, "future_A_time"), 0) | |
119 | 121 | ||
120 | - | let | |
122 | + | let ah = split(getStringValue(this, h), ",") | |
121 | 123 | ||
122 | - | let | |
124 | + | let ai = size(ah) | |
123 | 125 | ||
124 | - | func | |
126 | + | func aj (ak) = [BooleanEntry(j, false), StringEntry(k, ak)] | |
125 | 127 | ||
126 | 128 | ||
127 | - | func | |
129 | + | func al () = throw("DApp is already active") | |
128 | 130 | ||
129 | 131 | ||
130 | - | func | |
132 | + | func am () = if (X) | |
131 | 133 | then unit | |
132 | 134 | else throw("DApp is inactive at this moment") | |
133 | 135 | ||
134 | 136 | ||
135 | - | func | |
137 | + | func an (ao) = if (containsElement([L, M, N], ao.callerPublicKey)) | |
136 | 138 | then unit | |
137 | 139 | else throw("Only admin can call this function") | |
138 | 140 | ||
139 | 141 | ||
140 | - | func | |
142 | + | func ap (ao) = if ((this == ao.caller)) | |
141 | 143 | then unit | |
142 | 144 | else throw("Only contract itself can call this function") | |
143 | 145 | ||
144 | 146 | ||
145 | - | let | |
147 | + | let aq = toBigInt(2) | |
146 | 148 | ||
147 | - | let | |
149 | + | let ar = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
148 | 150 | ||
149 | - | let | |
151 | + | let as = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
150 | 152 | ||
151 | - | let | |
153 | + | let at = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
152 | 154 | ||
153 | - | let | |
155 | + | let au = height | |
154 | 156 | ||
155 | - | func | |
157 | + | func av (aw) = if (aw) | |
156 | 158 | then false | |
157 | 159 | else true | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
162 | + | func ax (ay) = { | |
163 | + | let az = { | |
164 | + | let I = ay | |
165 | + | if ($isInstanceOf(I, "Address")) | |
164 | 166 | then { | |
165 | - | let | |
166 | - | toString( | |
167 | + | let aA = I | |
168 | + | toString(aA) | |
167 | 169 | } | |
168 | - | else if ($isInstanceOf( | |
170 | + | else if ($isInstanceOf(I, "String")) | |
169 | 171 | then { | |
170 | - | let | |
171 | - | | |
172 | + | let aA = I | |
173 | + | aA | |
172 | 174 | } | |
173 | 175 | else throw("Unknow type of user Addr") | |
174 | 176 | } | |
175 | - | let aA = valueOrElse(getInteger(P, (ay + s)), 0) | |
176 | - | let aB = split(getStringValue(E, r), ",") | |
177 | - | let aC = split(getStringValue(E, q), ",") | |
178 | - | if (if ((aA >= parseIntValue(aB[0]))) | |
179 | - | then (parseIntValue(aB[1]) > aA) | |
177 | + | let aB = valueOrElse(getInteger(Q, (az + t)), 0) | |
178 | + | let aC = valueOrElse(getInteger(Q, (az + t)), aB) | |
179 | + | let aD = split(getStringValue(F, r), ",") | |
180 | + | let aE = split(getStringValue(F, q), ",") | |
181 | + | if (if ((aC >= parseIntValue(aD[0]))) | |
182 | + | then (parseIntValue(aD[1]) > aC) | |
180 | 183 | else false) | |
181 | - | then ( | |
182 | - | else if (if (( | |
183 | - | then (parseIntValue( | |
184 | + | then (aa - parseIntValue(aE[0])) | |
185 | + | else if (if ((aC >= parseIntValue(aD[1]))) | |
186 | + | then (parseIntValue(aD[2]) > aC) | |
184 | 187 | else false) | |
185 | - | then ( | |
186 | - | else if (if (( | |
187 | - | then (parseIntValue( | |
188 | + | then (aa - parseIntValue(aE[1])) | |
189 | + | else if (if ((aC >= parseIntValue(aD[2]))) | |
190 | + | then (parseIntValue(aD[3]) > aC) | |
188 | 191 | else false) | |
189 | - | then ( | |
190 | - | else if (if (( | |
191 | - | then (parseIntValue( | |
192 | + | then (aa - parseIntValue(aE[2])) | |
193 | + | else if (if ((aC >= parseIntValue(aD[3]))) | |
194 | + | then (parseIntValue(aD[4]) > aC) | |
192 | 195 | else false) | |
193 | - | then ( | |
194 | - | else if (( | |
195 | - | then ( | |
196 | - | else | |
196 | + | then (aa - parseIntValue(aE[3])) | |
197 | + | else if ((aC >= parseIntValue(aD[4]))) | |
198 | + | then (aa - parseIntValue(aE[4])) | |
199 | + | else aa | |
197 | 200 | } | |
198 | 201 | ||
199 | 202 | ||
200 | - | func | |
201 | - | let | |
202 | - | let | |
203 | - | if (( | |
203 | + | func aF () = { | |
204 | + | let aG = ag | |
205 | + | let aH = ae | |
206 | + | if ((aG > au)) | |
204 | 207 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | if (( | |
208 | - | then ( | |
209 | - | else ( | |
208 | + | let aI = ad | |
209 | + | let aJ = af | |
210 | + | if ((aH > aI)) | |
211 | + | then (aI + (((aH - aI) * (au - aJ)) / (aG - aJ))) | |
212 | + | else (aI - (((aI - aH) * (au - aJ)) / (aG - aJ))) | |
210 | 213 | } | |
211 | - | else | |
214 | + | else aH | |
212 | 215 | } | |
213 | 216 | ||
214 | 217 | ||
215 | - | func | |
216 | - | func | |
218 | + | func aK () = { | |
219 | + | func aL (aM,aN) = (aM :+ valueOrElse(getInteger(this, (aN + i)), 0)) | |
217 | 220 | ||
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | func | |
222 | - | then | |
223 | - | else | |
221 | + | let aO = ah | |
222 | + | let aP = size(aO) | |
223 | + | let aQ = nil | |
224 | + | func aR (aS,aT) = if ((aT >= aP)) | |
225 | + | then aS | |
226 | + | else aL(aS, aO[aT]) | |
224 | 227 | ||
225 | - | func | |
226 | - | then | |
228 | + | func aU (aS,aT) = if ((aT >= aP)) | |
229 | + | then aS | |
227 | 230 | else throw("List size exceeds 10") | |
228 | 231 | ||
229 | - | | |
232 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
230 | 233 | } | |
231 | 234 | ||
232 | 235 | ||
233 | - | func | |
236 | + | func aV (aW) = aW | |
234 | 237 | ||
235 | 238 | ||
236 | - | func | |
239 | + | func aX (aM,aY) = (aM + aY) | |
237 | 240 | ||
238 | 241 | ||
239 | - | func | |
240 | - | let | |
241 | - | if ($isInstanceOf( | |
242 | - | then | |
243 | - | else throw(($getType( | |
242 | + | func aZ (aW,ba) = { | |
243 | + | let bb = invoke(this, "D", [aW, ba], nil) | |
244 | + | if ($isInstanceOf(bb, "Int")) | |
245 | + | then bb | |
246 | + | else throw(($getType(bb) + " couldn't be cast to Int")) | |
244 | 247 | } | |
245 | 248 | ||
246 | 249 | ||
247 | - | func | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | func | |
253 | - | then | |
254 | - | else | |
250 | + | func bc (aW,ba) = { | |
251 | + | let bd = { | |
252 | + | let aO = aW | |
253 | + | let aP = size(aO) | |
254 | + | let aQ = 0 | |
255 | + | func aR (aS,aT) = if ((aT >= aP)) | |
256 | + | then aS | |
257 | + | else aX(aS, aO[aT]) | |
255 | 258 | ||
256 | - | func | |
257 | - | then | |
259 | + | func aU (aS,aT) = if ((aT >= aP)) | |
260 | + | then aS | |
258 | 261 | else throw("List size exceeds 10") | |
259 | 262 | ||
260 | - | | |
263 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
261 | 264 | } | |
262 | - | if (( | |
265 | + | if ((bd == 0)) | |
263 | 266 | then 0 | |
264 | 267 | else { | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | func | |
269 | - | then | |
268 | + | let be = (ba * ai) | |
269 | + | let bf = (toBigInt(be) * toBigInt(bd)) | |
270 | + | let bg = toBigInt((be - 1)) | |
271 | + | func bh (aM,ao) = if ((aM._2 == true)) | |
272 | + | then aM | |
270 | 273 | else { | |
271 | - | let | |
272 | - | func | |
273 | - | then (( | |
274 | - | else | |
274 | + | let bi = aM._1 | |
275 | + | func bj (bk,ao) = if ((ai > ao)) | |
276 | + | then ((bk * bi) / (toBigInt(aW[ao]) * toBigInt(ai))) | |
277 | + | else bk | |
275 | 278 | ||
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | func | |
281 | - | then | |
282 | - | else | |
279 | + | let bk = { | |
280 | + | let aO = ar | |
281 | + | let aP = size(aO) | |
282 | + | let aQ = bi | |
283 | + | func bl (aS,aT) = if ((aT >= aP)) | |
284 | + | then aS | |
285 | + | else bj(aS, aO[aT]) | |
283 | 286 | ||
284 | - | func | |
285 | - | then | |
287 | + | func bm (aS,aT) = if ((aT >= aP)) | |
288 | + | then aS | |
286 | 289 | else throw("List size exceeds 10") | |
287 | 290 | ||
288 | - | | |
291 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
289 | 292 | } | |
290 | - | let | |
291 | - | if (( | |
292 | - | then if ((1 >= toInt(( | |
293 | - | then $Tuple2( | |
294 | - | else $Tuple2( | |
295 | - | else if ((1 >= toInt(( | |
296 | - | then $Tuple2( | |
297 | - | else $Tuple2( | |
293 | + | let bn = fraction((bf + (toBigInt(ai) * bk)), bi, ((bg * bi) + (toBigInt((ai + 1)) * bk))) | |
294 | + | if ((bn > bi)) | |
295 | + | then if ((1 >= toInt((bn - bi)))) | |
296 | + | then $Tuple2(bn, true) | |
297 | + | else $Tuple2(bn, false) | |
298 | + | else if ((1 >= toInt((bi - bn)))) | |
299 | + | then $Tuple2(bn, true) | |
300 | + | else $Tuple2(bn, false) | |
298 | 301 | } | |
299 | 302 | ||
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | func | |
305 | - | then | |
306 | - | else | |
303 | + | let bo = { | |
304 | + | let aO = as | |
305 | + | let aP = size(aO) | |
306 | + | let aQ = $Tuple2(toBigInt(bd), false) | |
307 | + | func bl (aS,aT) = if ((aT >= aP)) | |
308 | + | then aS | |
309 | + | else bh(aS, aO[aT]) | |
307 | 310 | ||
308 | - | func | |
309 | - | then | |
311 | + | func bm (aS,aT) = if ((aT >= aP)) | |
312 | + | then aS | |
310 | 313 | else throw("List size exceeds 15") | |
311 | 314 | ||
312 | - | | |
315 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
313 | 316 | } | |
314 | - | let | |
315 | - | let | |
316 | - | if (( | |
317 | - | then throw(("get_D() not finished with " + toString( | |
318 | - | else toInt( | |
317 | + | let bn = bo._1 | |
318 | + | let bp = bo._2 | |
319 | + | if ((bp == false)) | |
320 | + | then throw(("get_D() not finished with " + toString(bn))) | |
321 | + | else toInt(bn) | |
319 | 322 | } | |
320 | 323 | } | |
321 | 324 | ||
322 | 325 | ||
323 | - | func | |
326 | + | func bq (aW,ba) = aZ(aV(aW), ba) | |
324 | 327 | ||
325 | 328 | ||
326 | - | func | |
329 | + | func br (bs,bt,bu,bv) = if (av((bs != bt))) | |
327 | 330 | then throw("same coin") | |
328 | - | else if ( | |
329 | - | then ( | |
331 | + | else if (av(if ((bt >= 0)) | |
332 | + | then (bs >= 0) | |
330 | 333 | else false)) | |
331 | 334 | then throw("below zero") | |
332 | - | else if ( | |
333 | - | then ( | |
335 | + | else if (av(if ((ai > bt)) | |
336 | + | then (ai > bs) | |
334 | 337 | else false)) | |
335 | 338 | then throw("above N_COINS") | |
336 | 339 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | func | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | then | |
346 | - | else | |
347 | - | if (if (( | |
348 | - | then ( | |
340 | + | let ba = aF() | |
341 | + | let bn = aZ(bv, ba) | |
342 | + | let be = (ba * ai) | |
343 | + | func bw (aM,ao) = { | |
344 | + | let bx = aM | |
345 | + | let by = bx._1 | |
346 | + | let bz = bx._2 | |
347 | + | let bA = if ((bs == ao)) | |
348 | + | then bu | |
349 | + | else bv[ao] | |
350 | + | if (if ((ao != bt)) | |
351 | + | then (ai > ao) | |
349 | 352 | else false) | |
350 | - | then $Tuple2(( | |
351 | - | else $Tuple2( | |
353 | + | then $Tuple2((by + bA), fraction(bz, toBigInt(bn), toBigInt((bA * ai)))) | |
354 | + | else $Tuple2(by, bz) | |
352 | 355 | } | |
353 | 356 | ||
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | func | |
359 | - | then | |
360 | - | else | |
357 | + | let bB = { | |
358 | + | let aO = ar | |
359 | + | let aP = size(aO) | |
360 | + | let aQ = $Tuple2(0, toBigInt(bn)) | |
361 | + | func aR (aS,aT) = if ((aT >= aP)) | |
362 | + | then aS | |
363 | + | else bw(aS, aO[aT]) | |
361 | 364 | ||
362 | - | func | |
363 | - | then | |
365 | + | func aU (aS,aT) = if ((aT >= aP)) | |
366 | + | then aS | |
364 | 367 | else throw("List size exceeds 10") | |
365 | 368 | ||
366 | - | | |
369 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
367 | 370 | } | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | func | |
373 | - | then | |
371 | + | let by = bB._1 | |
372 | + | let bC = bB._2 | |
373 | + | let bz = fraction(bC, toBigInt(bn), toBigInt((be * ai))) | |
374 | + | let bD = toBigInt(((by + (bn / be)) - bn)) | |
375 | + | func bE (aM,bF) = if ((aM._2 == true)) | |
376 | + | then aM | |
374 | 377 | else { | |
375 | - | let | |
376 | - | let | |
377 | - | if (( | |
378 | - | then if ((1 >= toInt(( | |
379 | - | then $Tuple2( | |
380 | - | else $Tuple2( | |
381 | - | else if ((1 >= toInt(( | |
382 | - | then $Tuple2( | |
383 | - | else $Tuple2( | |
378 | + | let bG = aM._1 | |
379 | + | let bH = (((bG * bG) + bz) / ((aq * bG) + bD)) | |
380 | + | if ((bH > bG)) | |
381 | + | then if ((1 >= toInt((bH - bG)))) | |
382 | + | then $Tuple2(bH, true) | |
383 | + | else $Tuple2(bH, false) | |
384 | + | else if ((1 >= toInt((bG - bH)))) | |
385 | + | then $Tuple2(bH, true) | |
386 | + | else $Tuple2(bH, false) | |
384 | 387 | } | |
385 | 388 | ||
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | func | |
391 | - | then | |
392 | - | else | |
389 | + | let bI = { | |
390 | + | let aO = at | |
391 | + | let aP = size(aO) | |
392 | + | let aQ = $Tuple2(toBigInt(bn), false) | |
393 | + | func bl (aS,aT) = if ((aT >= aP)) | |
394 | + | then aS | |
395 | + | else bE(aS, aO[aT]) | |
393 | 396 | ||
394 | - | func | |
395 | - | then | |
397 | + | func bm (aS,aT) = if ((aT >= aP)) | |
398 | + | then aS | |
396 | 399 | else throw("List size exceeds 16") | |
397 | 400 | ||
398 | - | | |
401 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
399 | 402 | } | |
400 | - | let | |
401 | - | let | |
402 | - | if (( | |
403 | - | then throw(("getY() not finished with " + toString( | |
404 | - | else toInt( | |
403 | + | let bH = bI._1 | |
404 | + | let bp = bI._2 | |
405 | + | if ((bp == false)) | |
406 | + | then throw(("getY() not finished with " + toString(bH))) | |
407 | + | else toInt(bH) | |
405 | 408 | } | |
406 | 409 | ||
407 | 410 | ||
408 | - | func | |
411 | + | func bJ (bK,bs,aW,bn) = if (av((bs >= 0))) | |
409 | 412 | then throw("i below zero") | |
410 | - | else if ( | |
413 | + | else if (av((ai > bs))) | |
411 | 414 | then throw("i above N_COINS") | |
412 | 415 | else { | |
413 | - | let | |
414 | - | func | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | then ( | |
416 | + | let be = (bK * ai) | |
417 | + | func bw (aM,ao) = { | |
418 | + | let bL = aM | |
419 | + | let by = bL._1 | |
420 | + | let bz = bL._2 | |
421 | + | let bA = if (if ((bs != ao)) | |
422 | + | then (ai > ao) | |
420 | 423 | else false) | |
421 | - | then | |
424 | + | then aW[ao] | |
422 | 425 | else 0 | |
423 | - | if (if (( | |
424 | - | then ( | |
426 | + | if (if ((ai > ao)) | |
427 | + | then (bs != ao) | |
425 | 428 | else false) | |
426 | - | then $Tuple2(( | |
427 | - | else $Tuple2( | |
429 | + | then $Tuple2((by + bA), fraction(bz, toBigInt(bn), toBigInt((bA * ai)))) | |
430 | + | else $Tuple2(by, bz) | |
428 | 431 | } | |
429 | 432 | ||
430 | - | let | |
431 | - | let | |
432 | - | let | |
433 | - | let | |
434 | - | func | |
435 | - | then | |
436 | - | else | |
433 | + | let bM = { | |
434 | + | let aO = ar | |
435 | + | let aP = size(aO) | |
436 | + | let aQ = $Tuple2(0, toBigInt(bn)) | |
437 | + | func aR (aS,aT) = if ((aT >= aP)) | |
438 | + | then aS | |
439 | + | else bw(aS, aO[aT]) | |
437 | 440 | ||
438 | - | func | |
439 | - | then | |
441 | + | func aU (aS,aT) = if ((aT >= aP)) | |
442 | + | then aS | |
440 | 443 | else throw("List size exceeds 10") | |
441 | 444 | ||
442 | - | | |
445 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
443 | 446 | } | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | func | |
449 | - | then | |
447 | + | let by = bM._1 | |
448 | + | let bC = bM._2 | |
449 | + | let bz = fraction(bC, toBigInt(bn), toBigInt((be * ai))) | |
450 | + | let bD = toBigInt(((by + (bn / be)) - bn)) | |
451 | + | func bN (aM,ao) = if ((aM._2 == true)) | |
452 | + | then aM | |
450 | 453 | else { | |
451 | - | let | |
452 | - | let | |
453 | - | if (( | |
454 | - | then if ((1 >= toInt(( | |
455 | - | then $Tuple2( | |
456 | - | else $Tuple2( | |
457 | - | else if ((1 >= toInt(( | |
458 | - | then $Tuple2( | |
459 | - | else $Tuple2( | |
454 | + | let bG = aM._1 | |
455 | + | let bH = (((bG * bG) + bz) / ((aq * bG) + bD)) | |
456 | + | if ((bH > bG)) | |
457 | + | then if ((1 >= toInt((bH - bG)))) | |
458 | + | then $Tuple2(bH, true) | |
459 | + | else $Tuple2(bH, false) | |
460 | + | else if ((1 >= toInt((bG - bH)))) | |
461 | + | then $Tuple2(bH, true) | |
462 | + | else $Tuple2(bH, false) | |
460 | 463 | } | |
461 | 464 | ||
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | func | |
467 | - | then | |
468 | - | else | |
465 | + | let bO = { | |
466 | + | let aO = at | |
467 | + | let aP = size(aO) | |
468 | + | let aQ = $Tuple2(toBigInt(bn), false) | |
469 | + | func bl (aS,aT) = if ((aT >= aP)) | |
470 | + | then aS | |
471 | + | else bN(aS, aO[aT]) | |
469 | 472 | ||
470 | - | func | |
471 | - | then | |
473 | + | func bm (aS,aT) = if ((aT >= aP)) | |
474 | + | then aS | |
472 | 475 | else throw("List size exceeds 16") | |
473 | 476 | ||
474 | - | | |
477 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
475 | 478 | } | |
476 | - | let | |
477 | - | let | |
478 | - | if (( | |
479 | - | then throw(("get_y_D() not finished with " + toString( | |
480 | - | else toInt( | |
479 | + | let bH = bO._1 | |
480 | + | let bp = bO._2 | |
481 | + | if ((bp == false)) | |
482 | + | then throw(("get_y_D() not finished with " + toString(bH))) | |
483 | + | else toInt(bH) | |
481 | 484 | } | |
482 | 485 | ||
483 | 486 | ||
484 | - | func | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | func | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | then (fraction( | |
499 | - | else ( | |
500 | - | $Tuple2(( | |
487 | + | func bP (aW,bQ,ao,bR) = { | |
488 | + | let bS = ax(bR) | |
489 | + | let ba = aF() | |
490 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
491 | + | let bU = Z | |
492 | + | let bV = aZ(aW, ba) | |
493 | + | let bW = (bV - fraction(bQ, bV, bU)) | |
494 | + | let bX = bJ(ba, ao, aW, bW) | |
495 | + | let bY = (aW[ao] - bX) | |
496 | + | func bZ (aM,ca) = { | |
497 | + | let cb = aM | |
498 | + | let cc = cb._1 | |
499 | + | let cd = cb._2 | |
500 | + | let ce = if ((cd == ao)) | |
501 | + | then (fraction(ca, bW, bV) - bX) | |
502 | + | else (ca - fraction(ca, bW, bV)) | |
503 | + | $Tuple2((cc :+ (ca - fraction(bT, ce, aa))), (cd + 1)) | |
501 | 504 | } | |
502 | 505 | ||
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | func | |
508 | - | then | |
509 | - | else | |
506 | + | let cf = { | |
507 | + | let aO = aW | |
508 | + | let aP = size(aO) | |
509 | + | let aQ = $Tuple2(nil, 0) | |
510 | + | func aR (aS,aT) = if ((aT >= aP)) | |
511 | + | then aS | |
512 | + | else bZ(aS, aO[aT]) | |
510 | 513 | ||
511 | - | func | |
512 | - | then | |
514 | + | func aU (aS,aT) = if ((aT >= aP)) | |
515 | + | then aS | |
513 | 516 | else throw("List size exceeds 10") | |
514 | 517 | ||
515 | - | | |
518 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
516 | 519 | } | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | $Tuple2( | |
520 | + | let cc = cf._1 | |
521 | + | let cd = cf._2 | |
522 | + | let cg = cc[ao] | |
523 | + | let ch = ((cg - bJ(ba, ao, cc, bW)) - 1) | |
524 | + | $Tuple2(ch, (bY - ch)) | |
522 | 525 | } | |
523 | 526 | ||
524 | 527 | ||
525 | - | func | |
526 | - | let | |
527 | - | if ($isInstanceOf( | |
528 | + | func ci (aN) = { | |
529 | + | let I = aN | |
530 | + | if ($isInstanceOf(I, "ByteVector")) | |
528 | 531 | then { | |
529 | - | let | |
530 | - | toBase58String( | |
532 | + | let cj = I | |
533 | + | toBase58String(cj) | |
531 | 534 | } | |
532 | - | else if ($isInstanceOf( | |
535 | + | else if ($isInstanceOf(I, "Unit")) | |
533 | 536 | then { | |
534 | - | let | |
537 | + | let ck = I | |
535 | 538 | "WAVES" | |
536 | 539 | } | |
537 | 540 | else throw("Match error") | |
538 | 541 | } | |
539 | 542 | ||
540 | 543 | ||
541 | - | func | |
542 | - | then $Tuple2("lockNeutrino", | |
543 | - | else $Tuple2("unlockNeutrino", | |
544 | + | func cl (cm,aN) = if (cm) | |
545 | + | then $Tuple2("lockNeutrino", R) | |
546 | + | else $Tuple2("unlockNeutrino", R) | |
544 | 547 | ||
545 | 548 | ||
546 | - | func | |
549 | + | func cn (cm,co,aN) = if (cm) | |
547 | 550 | then { | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | $Tuple4( | |
551 | + | let cp = cl(cm, aN) | |
552 | + | let cq = cp._1 | |
553 | + | let cr = cp._2 | |
554 | + | $Tuple4(cq, cr, nil, [AttachedPayment(aN, co)]) | |
552 | 555 | } | |
553 | 556 | else { | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | $Tuple4( | |
557 | + | let cs = cl(cm, aN) | |
558 | + | let cq = cs._1 | |
559 | + | let cr = cs._2 | |
560 | + | $Tuple4(cq, cr, [co, toBase58String(aN)], nil) | |
558 | 561 | } | |
559 | 562 | ||
560 | 563 | ||
561 | - | func | |
564 | + | func cm (co,ct) = if (containsElement(W, ct)) | |
562 | 565 | then { | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | invoke( | |
566 | + | let cu = cn(true, co, fromBase58String(ct)) | |
567 | + | let cq = cu._1 | |
568 | + | let cv = cu._2 | |
569 | + | let cw = cu._3 | |
570 | + | let cx = cu._4 | |
571 | + | invoke(cv, cq, cw, cx) | |
569 | 572 | } | |
570 | 573 | else 0 | |
571 | 574 | ||
572 | 575 | ||
573 | - | func | |
576 | + | func cy (co,ct) = if (containsElement(W, ct)) | |
574 | 577 | then { | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | invoke( | |
578 | + | let cz = cn(false, co, fromBase58String(ct)) | |
579 | + | let cq = cz._1 | |
580 | + | let cv = cz._2 | |
581 | + | let cw = cz._3 | |
582 | + | let cx = cz._4 | |
583 | + | invoke(cv, cq, cw, cx) | |
581 | 584 | } | |
582 | 585 | else 0 | |
583 | 586 | ||
584 | 587 | ||
585 | - | func | |
586 | - | let | |
587 | - | let | |
588 | - | if ($isInstanceOf( | |
588 | + | func cA (aN) = { | |
589 | + | let cB = { | |
590 | + | let I = aN | |
591 | + | if ($isInstanceOf(I, "ByteVector")) | |
589 | 592 | then { | |
590 | - | let | |
591 | - | if (( | |
592 | - | then getInteger( | |
593 | + | let cC = I | |
594 | + | if ((cC == V)) | |
595 | + | then getInteger(R, ((("rpd_balance_" + toBase58String(cC)) + "_") + toString(this))) | |
593 | 596 | else 0 | |
594 | 597 | } | |
595 | - | else if ($isInstanceOf( | |
598 | + | else if ($isInstanceOf(I, "Unit")) | |
596 | 599 | then 0 | |
597 | 600 | else throw("Match error") | |
598 | 601 | } | |
599 | - | let | |
600 | - | if ($isInstanceOf( | |
602 | + | let I = cB | |
603 | + | if ($isInstanceOf(I, "Int")) | |
601 | 604 | then { | |
602 | - | let | |
603 | - | | |
605 | + | let ao = I | |
606 | + | ao | |
604 | 607 | } | |
605 | 608 | else 0 | |
606 | 609 | } | |
607 | 610 | ||
608 | 611 | ||
609 | - | func | |
610 | - | let | |
611 | - | func | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | if ( | |
616 | - | then $Tuple2( | |
612 | + | func cD () = { | |
613 | + | let cE = aK() | |
614 | + | func cF (aM,aN) = { | |
615 | + | let cG = aM | |
616 | + | let cH = cG._1 | |
617 | + | let ao = cG._2 | |
618 | + | if (cH) | |
619 | + | then $Tuple2(cH, ao) | |
617 | 620 | else { | |
618 | - | let | |
619 | - | if (( | |
620 | - | then $Tuple2(true, | |
621 | - | else $Tuple2(false, ( | |
621 | + | let cI = (assetBalance(this, fromBase58String(aN)) + cA(fromBase58String(aN))) | |
622 | + | if ((cE[ao] > cI)) | |
623 | + | then $Tuple2(true, ao) | |
624 | + | else $Tuple2(false, (ao + 1)) | |
622 | 625 | } | |
623 | 626 | } | |
624 | 627 | ||
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | func | |
629 | - | then | |
630 | - | else | |
628 | + | let aO = ah | |
629 | + | let aP = size(aO) | |
630 | + | let aQ = $Tuple2(false, 0) | |
631 | + | func aR (aS,aT) = if ((aT >= aP)) | |
632 | + | then aS | |
633 | + | else cF(aS, aO[aT]) | |
631 | 634 | ||
632 | - | func | |
633 | - | then | |
635 | + | func aU (aS,aT) = if ((aT >= aP)) | |
636 | + | then aS | |
634 | 637 | else throw("List size exceeds 10") | |
635 | 638 | ||
636 | - | | |
639 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
637 | 640 | } | |
638 | 641 | ||
639 | 642 | ||
640 | - | func | |
643 | + | func cJ (ao) = aj(("Suspicious state with asset: " + ah[ao])) | |
641 | 644 | ||
642 | 645 | ||
643 | - | func | |
644 | - | func | |
646 | + | func cK (bR,cx) = { | |
647 | + | func cL (aM,cM) = (aM :+ ScriptTransfer(bR, cM.amount, cM.assetId)) | |
645 | 648 | ||
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | func | |
650 | - | then | |
651 | - | else | |
649 | + | let aO = cx | |
650 | + | let aP = size(aO) | |
651 | + | let aQ = nil | |
652 | + | func aR (aS,aT) = if ((aT >= aP)) | |
653 | + | then aS | |
654 | + | else cL(aS, aO[aT]) | |
652 | 655 | ||
653 | - | func | |
654 | - | then | |
656 | + | func aU (aS,aT) = if ((aT >= aP)) | |
657 | + | then aS | |
655 | 658 | else throw("List size exceeds 10") | |
656 | 659 | ||
657 | - | | |
660 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
658 | 661 | } | |
659 | 662 | ||
660 | 663 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (( | |
664 | + | func cN (cO) = { | |
665 | + | let cP = valueOrErrorMessage(getInteger(this, o), "No dAppThresholdCoef key") | |
666 | + | let cQ = 10000 | |
667 | + | let cR = max(cO) | |
668 | + | let cS = min(cO) | |
669 | + | let cT = fraction(cR, cQ, cS) | |
670 | + | if ((cT > (cP * cQ))) | |
668 | 671 | then throw("New balance in assets of the DApp is less than threshold") | |
669 | 672 | else false | |
670 | 673 | } | |
671 | 674 | ||
672 | 675 | ||
673 | - | func | |
674 | - | let | |
675 | - | if ((size( | |
676 | + | func cU (ah) = { | |
677 | + | let cV = split(ah, ",") | |
678 | + | if ((size(cV) > 10)) | |
676 | 679 | then throw("To many coins, max coins size 10") | |
677 | 680 | else { | |
678 | - | func | |
679 | - | let | |
680 | - | let | |
681 | - | if (( | |
681 | + | func cW (cX,aN) = { | |
682 | + | let cY = valueOrErrorMessage(fromBase58String(aN), ("fromBase58String: " + aN)) | |
683 | + | let cZ = valueOrErrorMessage(assetInfo(cY), ("assetInfo: " + aN)).decimals | |
684 | + | if ((cZ != d)) | |
682 | 685 | then throw("wrong decimals") | |
683 | 686 | else false | |
684 | 687 | } | |
685 | 688 | ||
686 | - | let | |
687 | - | let | |
688 | - | let | |
689 | - | func | |
690 | - | then | |
691 | - | else | |
689 | + | let aO = cV | |
690 | + | let aP = size(aO) | |
691 | + | let aQ = false | |
692 | + | func aR (aS,aT) = if ((aT >= aP)) | |
693 | + | then aS | |
694 | + | else cW(aS, aO[aT]) | |
692 | 695 | ||
693 | - | func | |
694 | - | then | |
696 | + | func aU (aS,aT) = if ((aT >= aP)) | |
697 | + | then aS | |
695 | 698 | else throw("List size exceeds 10") | |
696 | 699 | ||
697 | - | | |
700 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
698 | 701 | } | |
699 | 702 | } | |
700 | 703 | ||
701 | 704 | ||
702 | - | @Callable( | |
703 | - | func D ( | |
704 | - | let | |
705 | - | $Tuple2([IntegerEntry("D", | |
705 | + | @Callable(da) | |
706 | + | func D (aW,ba) = { | |
707 | + | let bn = bc(aW, ba) | |
708 | + | $Tuple2([IntegerEntry("D", bn)], bn) | |
706 | 709 | } | |
707 | 710 | ||
708 | 711 | ||
709 | 712 | ||
710 | - | @Callable( | |
711 | - | func init ( | |
713 | + | @Callable(da) | |
714 | + | func init (ah,aF,db) = if (!(isDataStorageUntouched(this))) | |
712 | 715 | then throw("Already initialized") | |
713 | - | else if ((0 >= | |
716 | + | else if ((0 >= aF)) | |
714 | 717 | then throw("Amp must be must > 0") | |
715 | - | else if ((0 >= | |
718 | + | else if ((0 >= db)) | |
716 | 719 | then throw("dApp Threshold Coef must be > 0") | |
717 | 720 | else { | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | if ( | |
721 | + | let dc = "s_Multi_USD" | |
722 | + | let dd = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
723 | + | let de = Issue(dc, dd, 0, 6, true) | |
724 | + | let df = calculateAssetId(de) | |
725 | + | if (cU(ah)) | |
723 | 726 | then throw() | |
724 | - | else [StringEntry(g, f), StringEntry(h, | |
727 | + | else [StringEntry(g, f), StringEntry(h, ah), IntegerEntry("initial_A", aF), IntegerEntry("future_A", aF), IntegerEntry(n, getIntegerValue(F, "base_fee_flat")), StringEntry(l, toBase58String(df)), IntegerEntry(m, 0), IntegerEntry(o, db), BooleanEntry(j, true), de] | |
725 | 728 | } | |
726 | 729 | ||
727 | 730 | ||
728 | 731 | ||
729 | - | @Callable( | |
730 | - | func addLiquidity ( | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
732 | + | @Callable(da) | |
733 | + | func addLiquidity (dg,dh,di) = valueOrElse(am(), { | |
734 | + | let ba = aF() | |
735 | + | let aW = aK() | |
736 | + | let bV = if ((Z == 0)) | |
734 | 737 | then 0 | |
735 | - | else | |
736 | - | let | |
737 | - | let | |
738 | - | func | |
739 | - | then throw(("payments size > " + toString( | |
740 | - | else if ((1 > | |
738 | + | else bq(aW, ba) | |
739 | + | let cx = da.payments | |
740 | + | let dj = size(cx) | |
741 | + | func dk (dl) = if ((dj > ai)) | |
742 | + | then throw(("payments size > " + toString(ai))) | |
743 | + | else if ((1 > dj)) | |
741 | 744 | then throw("payments size < 1") | |
742 | - | else if (if (( | |
743 | - | then ( | |
745 | + | else if (if ((Z == 0)) | |
746 | + | then (ai != dj) | |
744 | 747 | else false) | |
745 | 748 | then throw("initial deposit requires all coins") | |
746 | 749 | else { | |
747 | - | func | |
750 | + | func dm (aM,cM) = if (containsElement(ah, ci(cM.assetId))) | |
748 | 751 | then true | |
749 | 752 | else throw("Invalid asset in payment") | |
750 | 753 | ||
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | func | |
755 | - | then | |
756 | - | else | |
754 | + | let aO = cx | |
755 | + | let aP = size(aO) | |
756 | + | let aQ = false | |
757 | + | func aR (aS,aT) = if ((aT >= aP)) | |
758 | + | then aS | |
759 | + | else dm(aS, aO[aT]) | |
757 | 760 | ||
758 | - | func | |
759 | - | then | |
761 | + | func aU (aS,aT) = if ((aT >= aP)) | |
762 | + | then aS | |
760 | 763 | else throw("List size exceeds 10") | |
761 | 764 | ||
762 | - | | |
765 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
763 | 766 | } | |
764 | 767 | ||
765 | - | if (!( | |
768 | + | if (!(dk(dj))) | |
766 | 769 | then throw() | |
767 | 770 | else { | |
768 | - | let | |
769 | - | if ( | |
770 | - | then (cH | |
771 | + | let cH = cD() | |
772 | + | if (cH._1) | |
773 | + | then (cJ(cH._2) ++ cK(da.caller, cx)) | |
771 | 774 | else { | |
772 | - | func | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | func | |
777 | - | then ( | |
778 | - | else | |
775 | + | func cL (aM,aN) = { | |
776 | + | let dn = aM | |
777 | + | let cO = dn._1 | |
778 | + | let ao = dn._2 | |
779 | + | func do (dp,cM) = if ((ci(cM.assetId) == aN)) | |
780 | + | then (dp + cM.amount) | |
781 | + | else dp | |
779 | 782 | ||
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | func | |
785 | - | then | |
786 | - | else | |
783 | + | let dq = { | |
784 | + | let aO = cx | |
785 | + | let aP = size(aO) | |
786 | + | let aQ = aW[ao] | |
787 | + | func aR (aS,aT) = if ((aT >= aP)) | |
788 | + | then aS | |
789 | + | else do(aS, aO[aT]) | |
787 | 790 | ||
788 | - | func | |
789 | - | then | |
791 | + | func aU (aS,aT) = if ((aT >= aP)) | |
792 | + | then aS | |
790 | 793 | else throw("List size exceeds 10") | |
791 | 794 | ||
792 | - | | |
795 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
793 | 796 | } | |
794 | - | $Tuple2(( | |
797 | + | $Tuple2((cO :+ dq), (ao + 1)) | |
795 | 798 | } | |
796 | 799 | ||
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | func | |
802 | - | then | |
803 | - | else | |
800 | + | let dr = { | |
801 | + | let aO = ah | |
802 | + | let aP = size(aO) | |
803 | + | let aQ = $Tuple2(nil, 0) | |
804 | + | func aR (aS,aT) = if ((aT >= aP)) | |
805 | + | then aS | |
806 | + | else cL(aS, aO[aT]) | |
804 | 807 | ||
805 | - | func | |
806 | - | then | |
808 | + | func aU (aS,aT) = if ((aT >= aP)) | |
809 | + | then aS | |
807 | 810 | else throw("List size exceeds 10") | |
808 | 811 | ||
809 | - | | |
812 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
810 | 813 | } | |
811 | - | let | |
812 | - | let | |
813 | - | if ( | |
814 | + | let cO = dr._1 | |
815 | + | let ds = dr._2 | |
816 | + | if (cN(cO)) | |
814 | 817 | then throw() | |
815 | 818 | else { | |
816 | - | let | |
817 | - | if ( | |
819 | + | let bW = bq(cO, ba) | |
820 | + | if (av((bW > bV))) | |
818 | 821 | then throw("D1 > D0") | |
819 | 822 | else { | |
820 | - | let | |
821 | - | func | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | if (( | |
823 | + | let bS = ax(da.caller) | |
824 | + | func dt (aM,dp) = { | |
825 | + | let du = aM | |
826 | + | let dv = du._1 | |
827 | + | let dw = du._2 | |
828 | + | let ao = du._3 | |
829 | + | if ((Z > 0)) | |
827 | 830 | then { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | then ( | |
833 | - | else ( | |
834 | - | fraction( | |
831 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
832 | + | let dx = { | |
833 | + | let dy = fraction(bW, aW[ao], bV) | |
834 | + | let dz = if ((dy > dp)) | |
835 | + | then (dy - dp) | |
836 | + | else (dp - dy) | |
837 | + | fraction(bT, dz, aa) | |
835 | 838 | } | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | then | |
843 | - | else | |
844 | - | if (( | |
839 | + | let dA = fraction(dx, ac, aa) | |
840 | + | let dB = (dp - dx) | |
841 | + | let dC = (dp - dx) | |
842 | + | let dD = (dp - aW[ao]) | |
843 | + | let dE = (dx - dA) | |
844 | + | let dF = if ((dD > 0)) | |
845 | + | then cm((dD - dx), ah[ao]) | |
846 | + | else cy(dx, ah[ao]) | |
847 | + | if ((dF == dF)) | |
845 | 848 | then { | |
846 | - | let | |
847 | - | then invoke( | |
849 | + | let dG = if ((dE > 0)) | |
850 | + | then invoke(U, "airDrop", nil, [AttachedPayment(fromBase58String(ah[ao]), dE)]) | |
848 | 851 | else 0 | |
849 | - | if (( | |
850 | - | then $Tuple3(( | |
852 | + | if ((dG == dG)) | |
853 | + | then $Tuple3((dv :+ dC), (dw ++ [ScriptTransfer(P, dA, fromBase58String(ah[ao])), IntegerEntry((ah[ao] + i), dB)]), (ao + 1)) | |
851 | 854 | else throw("Strict value is not equal to itself.") | |
852 | 855 | } | |
853 | 856 | else throw("Strict value is not equal to itself.") | |
854 | 857 | } | |
855 | 858 | else { | |
856 | - | let | |
857 | - | if (( | |
858 | - | then $Tuple3(( | |
859 | + | let dF = cm(dp, ah[ao]) | |
860 | + | if ((dF == dF)) | |
861 | + | then $Tuple3((dv :+ dp), (dw :+ IntegerEntry((ah[ao] + i), dp)), (ao + 1)) | |
859 | 862 | else throw("Strict value is not equal to itself.") | |
860 | 863 | } | |
861 | 864 | } | |
862 | 865 | ||
863 | - | let | |
864 | - | let | |
865 | - | let | |
866 | - | let | |
867 | - | func | |
868 | - | then | |
869 | - | else | |
866 | + | let dH = { | |
867 | + | let aO = cO | |
868 | + | let aP = size(aO) | |
869 | + | let aQ = $Tuple3(nil, nil, 0) | |
870 | + | func bl (aS,aT) = if ((aT >= aP)) | |
871 | + | then aS | |
872 | + | else dt(aS, aO[aT]) | |
870 | 873 | ||
871 | - | func | |
872 | - | then | |
874 | + | func bm (aS,aT) = if ((aT >= aP)) | |
875 | + | then aS | |
873 | 876 | else throw("List size exceeds 10") | |
874 | 877 | ||
875 | - | | |
878 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
876 | 879 | } | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | then | |
882 | - | else fraction( | |
883 | - | if ( | |
880 | + | let dv = dH._1 | |
881 | + | let dw = dH._2 | |
882 | + | let dI = bq(dv, ba) | |
883 | + | let dJ = if ((Z == 0)) | |
884 | + | then bW | |
885 | + | else fraction(Z, (dI - bV), bV) | |
886 | + | if (av((dJ >= dg))) | |
884 | 887 | then throw("Slippage screwed you") | |
885 | - | else if ( | |
888 | + | else if (dh) | |
886 | 889 | then { | |
887 | - | let | |
888 | - | if (( | |
890 | + | let dK = invoke(this, "reissueShare", [dJ], nil) | |
891 | + | if ((dK == dK)) | |
889 | 892 | then { | |
890 | - | let | |
891 | - | if (( | |
892 | - | then ( | |
893 | + | let dL = invoke(T, "lockShareTokens", [toString(this), di], [AttachedPayment(Y, dJ)]) | |
894 | + | if ((dL == dL)) | |
895 | + | then (dw :+ IntegerEntry(m, (Z + dJ))) | |
893 | 896 | else throw("Strict value is not equal to itself.") | |
894 | 897 | } | |
895 | 898 | else throw("Strict value is not equal to itself.") | |
896 | 899 | } | |
897 | - | else ( | |
900 | + | else (dw ++ [Reissue(Y, dJ, true), ScriptTransfer(da.caller, dJ, Y), IntegerEntry(m, (Z + dJ))]) | |
898 | 901 | } | |
899 | 902 | } | |
900 | 903 | } | |
903 | 906 | ||
904 | 907 | ||
905 | 908 | ||
906 | - | @Callable( | |
907 | - | func calcMintAmount ( | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | if (( | |
912 | - | then $Tuple2(nil, | |
909 | + | @Callable(da) | |
910 | + | func calcMintAmount (cO,az) = { | |
911 | + | let ba = aF() | |
912 | + | let aW = aK() | |
913 | + | let bW = bq(cO, ba) | |
914 | + | if ((Z == 0)) | |
915 | + | then $Tuple2(nil, bW) | |
913 | 916 | else { | |
914 | - | let | |
915 | - | let | |
916 | - | func | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | then ( | |
925 | - | else ( | |
926 | - | fraction( | |
917 | + | let bV = bq(aW, ba) | |
918 | + | let bS = ax(az) | |
919 | + | func dM (aM,dp) = { | |
920 | + | let dN = aM | |
921 | + | let dv = dN._1 | |
922 | + | let ao = dN._2 | |
923 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
924 | + | let dx = { | |
925 | + | let dy = fraction(bW, aW[ao], bV) | |
926 | + | let dz = if ((dy > dp)) | |
927 | + | then (dy - dp) | |
928 | + | else (dp - dy) | |
929 | + | fraction(bT, dz, aa) | |
927 | 930 | } | |
928 | - | let | |
929 | - | $Tuple2(( | |
931 | + | let dC = (dp - dx) | |
932 | + | $Tuple2((dv :+ dC), (ao + 1)) | |
930 | 933 | } | |
931 | 934 | ||
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | func | |
937 | - | then | |
938 | - | else | |
935 | + | let dO = { | |
936 | + | let aO = cO | |
937 | + | let aP = size(aO) | |
938 | + | let aQ = $Tuple2(nil, 0) | |
939 | + | func aR (aS,aT) = if ((aT >= aP)) | |
940 | + | then aS | |
941 | + | else dM(aS, aO[aT]) | |
939 | 942 | ||
940 | - | func | |
941 | - | then | |
943 | + | func aU (aS,aT) = if ((aT >= aP)) | |
944 | + | then aS | |
942 | 945 | else throw("List size exceeds 10") | |
943 | 946 | ||
944 | - | | |
947 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
945 | 948 | } | |
946 | - | let | |
947 | - | let | |
948 | - | let | |
949 | - | let | |
950 | - | $Tuple2(nil, | |
949 | + | let dv = dO._1 | |
950 | + | let ds = dO._2 | |
951 | + | let dI = bq(dv, ba) | |
952 | + | let dP = fraction(Z, (dI - bV), bV) | |
953 | + | $Tuple2(nil, dP) | |
951 | 954 | } | |
952 | 955 | } | |
953 | 956 | ||
954 | 957 | ||
955 | 958 | ||
956 | - | @Callable( | |
957 | - | func reissueShare ( | |
959 | + | @Callable(da) | |
960 | + | func reissueShare (co) = valueOrElse(ap(da), [Reissue(Y, co, true)]) | |
958 | 961 | ||
959 | 962 | ||
960 | 963 | ||
961 | - | @Callable( | |
962 | - | func getDy ( | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | $Tuple2(nil, $Tuple2(( | |
964 | + | @Callable(da) | |
965 | + | func getDy (dQ,dR,dS,dT) = { | |
966 | + | let aW = aK() | |
967 | + | let dU = valueOrErrorMessage(indexOf(ah, dQ), "unknown token in") | |
968 | + | let dV = valueOrErrorMessage(indexOf(ah, dR), "unknown token out") | |
969 | + | let bu = (aW[dU] + dS) | |
970 | + | let bH = br(dU, dV, bu, aW) | |
971 | + | let ch = ((aW[dV] - bH) - 1) | |
972 | + | let bS = ax(Address(fromBase58String(dT))) | |
973 | + | let bT = fraction(fraction(ab, bS, aa, CEILING), ch, aa) | |
974 | + | $Tuple2(nil, $Tuple2((ch - bT), bT)) | |
972 | 975 | } | |
973 | 976 | ||
974 | 977 | ||
975 | 978 | ||
976 | - | @Callable( | |
977 | - | func exchange ( | |
979 | + | @Callable(da) | |
980 | + | func exchange (dW,dX) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
978 | 981 | then throw("size(payments) != 1") | |
979 | 982 | else { | |
980 | - | let | |
981 | - | if ( | |
982 | - | then (cH | |
983 | + | let cH = cD() | |
984 | + | if (cH._1) | |
985 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
983 | 986 | else { | |
984 | - | let | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | let | |
998 | - | if ( | |
987 | + | let cM = da.payments[0] | |
988 | + | let dY = ci(cM.assetId) | |
989 | + | let dZ = fromBase58String(dW) | |
990 | + | let dS = cM.amount | |
991 | + | let dU = valueOrErrorMessage(indexOf(ah, dY), "unknown token in") | |
992 | + | let dV = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
993 | + | let aW = aK() | |
994 | + | let bu = (aW[dU] + dS) | |
995 | + | let bH = br(dU, dV, bu, aW) | |
996 | + | let ea = ((aW[dV] - bH) - 1) | |
997 | + | let bS = ax(da.originCaller) | |
998 | + | let bT = fraction(ea, fraction(ab, bS, aa, CEILING), aa) | |
999 | + | let ch = (ea - bT) | |
1000 | + | let dA = fraction(bT, ac, aa) | |
1001 | + | if (av((ch >= dX))) | |
999 | 1002 | then throw("Exchange resulted in fewer coins than expected") | |
1000 | 1003 | else { | |
1001 | - | func | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1005 | - | if (( | |
1006 | - | then $Tuple2(( | |
1007 | - | else if (( | |
1008 | - | then $Tuple2(( | |
1009 | - | else $Tuple2(( | |
1004 | + | func eb (aM,ec) = { | |
1005 | + | let ed = aM | |
1006 | + | let cO = ed._1 | |
1007 | + | let ao = ed._2 | |
1008 | + | if ((ao == dU)) | |
1009 | + | then $Tuple2((cO :+ (ec + dS)), (ao + 1)) | |
1010 | + | else if ((ao == dV)) | |
1011 | + | then $Tuple2((cO :+ (ec - ea)), (ao + 1)) | |
1012 | + | else $Tuple2((cO :+ ec), (ao + 1)) | |
1010 | 1013 | } | |
1011 | 1014 | ||
1012 | - | let | |
1013 | - | let | |
1014 | - | let | |
1015 | - | let | |
1016 | - | func | |
1017 | - | then | |
1018 | - | else | |
1015 | + | let ee = { | |
1016 | + | let aO = aW | |
1017 | + | let aP = size(aO) | |
1018 | + | let aQ = $Tuple2(nil, 0) | |
1019 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1020 | + | then aS | |
1021 | + | else eb(aS, aO[aT]) | |
1019 | 1022 | ||
1020 | - | func | |
1021 | - | then | |
1023 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1024 | + | then aS | |
1022 | 1025 | else throw("List size exceeds 10") | |
1023 | 1026 | ||
1024 | - | | |
1027 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1025 | 1028 | } | |
1026 | - | let | |
1027 | - | let | |
1028 | - | if ( | |
1029 | + | let cO = ee._1 | |
1030 | + | let ao = ee._2 | |
1031 | + | if (cN(cO)) | |
1029 | 1032 | then throw() | |
1030 | 1033 | else { | |
1031 | - | let | |
1032 | - | if (( | |
1034 | + | let dL = cm(cM.amount, ci(cM.assetId)) | |
1035 | + | if ((dL == dL)) | |
1033 | 1036 | then { | |
1034 | - | let | |
1035 | - | if (( | |
1037 | + | let ef = cy(ea, dW) | |
1038 | + | if ((ef == ef)) | |
1036 | 1039 | then { | |
1037 | - | let | |
1038 | - | let | |
1039 | - | then invoke( | |
1040 | + | let dE = (bT - dA) | |
1041 | + | let dG = if ((dE > 0)) | |
1042 | + | then invoke(U, "airDrop", nil, [AttachedPayment(dZ, dE)]) | |
1040 | 1043 | else 0 | |
1041 | - | if (( | |
1042 | - | then $Tuple2([IntegerEntry(( | |
1044 | + | if ((dG == dG)) | |
1045 | + | then $Tuple2([IntegerEntry((dY + i), bu), IntegerEntry((dW + i), (aW[dV] - ea)), ScriptTransfer(da.caller, ch, dZ), ScriptTransfer(P, dA, dZ)], [ch, dZ]) | |
1043 | 1046 | else throw("Strict value is not equal to itself.") | |
1044 | 1047 | } | |
1045 | 1048 | else throw("Strict value is not equal to itself.") | |
1052 | 1055 | ||
1053 | 1056 | ||
1054 | 1057 | ||
1055 | - | @Callable( | |
1056 | - | func withdraw ( | |
1058 | + | @Callable(da) | |
1059 | + | func withdraw (eg) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
1057 | 1060 | then throw("size(payments) != 1") | |
1058 | 1061 | else { | |
1059 | - | let | |
1060 | - | let | |
1061 | - | if (( | |
1062 | + | let eh = da.payments[0].amount | |
1063 | + | let ei = da.payments[0].assetId | |
1064 | + | if ((Y != ei)) | |
1062 | 1065 | then throw("unknown payment token") | |
1063 | 1066 | else { | |
1064 | - | let | |
1065 | - | if ( | |
1066 | - | then (cH | |
1067 | + | let cH = cD() | |
1068 | + | if (cH._1) | |
1069 | + | then (cJ(cH._2) ++ cK(da.originCaller, da.payments)) | |
1067 | 1070 | else { | |
1068 | - | func | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | if ( | |
1071 | + | func dt (aM,ej) = { | |
1072 | + | let ek = aM | |
1073 | + | let dw = ek._1 | |
1074 | + | let ao = ek._2 | |
1075 | + | let el = fraction(ej, eh, Z) | |
1076 | + | if (av((el >= eg[ao]))) | |
1074 | 1077 | then throw("Withdrawal resulted in fewer coins than expected") | |
1075 | 1078 | else { | |
1076 | - | let | |
1077 | - | if (( | |
1078 | - | then $Tuple2(( | |
1079 | + | let ef = cy(el, ah[ao]) | |
1080 | + | if ((ef == ef)) | |
1081 | + | then $Tuple2((dw ++ [IntegerEntry((ah[ao] + i), (ej - el)), ScriptTransfer(da.originCaller, el, fromBase58String(ah[ao]))]), (ao + 1)) | |
1079 | 1082 | else throw("Strict value is not equal to itself.") | |
1080 | 1083 | } | |
1081 | 1084 | } | |
1082 | 1085 | ||
1083 | - | let | |
1084 | - | let | |
1085 | - | let | |
1086 | - | let | |
1087 | - | func | |
1088 | - | then | |
1089 | - | else | |
1086 | + | let em = { | |
1087 | + | let aO = aK() | |
1088 | + | let aP = size(aO) | |
1089 | + | let aQ = $Tuple2(nil, 0) | |
1090 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1091 | + | then aS | |
1092 | + | else dt(aS, aO[aT]) | |
1090 | 1093 | ||
1091 | - | func | |
1092 | - | then | |
1094 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1095 | + | then aS | |
1093 | 1096 | else throw("List size exceeds 10") | |
1094 | 1097 | ||
1095 | - | | |
1098 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1096 | 1099 | } | |
1097 | - | let | |
1098 | - | let | |
1099 | - | ( | |
1100 | + | let dw = em._1 | |
1101 | + | let ao = em._2 | |
1102 | + | (dw ++ [Burn(Y, eh), IntegerEntry(m, (Z - eh))]) | |
1100 | 1103 | } | |
1101 | 1104 | } | |
1102 | 1105 | }) | |
1103 | 1106 | ||
1104 | 1107 | ||
1105 | 1108 | ||
1106 | - | @Callable( | |
1107 | - | func withdrawWithUnlock ( | |
1109 | + | @Callable(da) | |
1110 | + | func withdrawWithUnlock (eg,en) = valueOrElse(am(), if ((0 >= en)) | |
1108 | 1111 | then throw("Unlock amount must be positive") | |
1109 | 1112 | else { | |
1110 | - | let | |
1111 | - | if ( | |
1112 | - | then (cH | |
1113 | + | let cH = cD() | |
1114 | + | if (cH._1) | |
1115 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
1113 | 1116 | else { | |
1114 | - | let | |
1115 | - | then if ((size( | |
1117 | + | let eh = if ((size(da.payments) > 0)) | |
1118 | + | then if ((size(da.payments) != 1)) | |
1116 | 1119 | then throw("size(payments) != 1") | |
1117 | 1120 | else { | |
1118 | - | let | |
1119 | - | if (( | |
1121 | + | let ei = da.payments[0].assetId | |
1122 | + | if ((Y != ei)) | |
1120 | 1123 | then throw("unknown payment token") | |
1121 | - | else | |
1124 | + | else da.payments[0].amount | |
1122 | 1125 | } | |
1123 | 1126 | else 0 | |
1124 | - | let | |
1125 | - | if (( | |
1127 | + | let eo = invoke(T, "withdrawShareTokens", [toString(this), en], nil) | |
1128 | + | if ((eo == eo)) | |
1126 | 1129 | then { | |
1127 | - | let | |
1128 | - | let | |
1129 | - | if (( | |
1130 | + | let ep = (eh + en) | |
1131 | + | let dF = invoke(this, "withdraw", [eg], [AttachedPayment(Y, ep)]) | |
1132 | + | if ((dF == dF)) | |
1130 | 1133 | then nil | |
1131 | 1134 | else throw("Strict value is not equal to itself.") | |
1132 | 1135 | } | |
1136 | 1139 | ||
1137 | 1140 | ||
1138 | 1141 | ||
1139 | - | @Callable( | |
1140 | - | func calcWithdrawOneCoin ( | |
1142 | + | @Callable(da) | |
1143 | + | func calcWithdrawOneCoin (eq,dW,az) = if ((0 >= eq)) | |
1141 | 1144 | then throw("Amount must be positive") | |
1142 | 1145 | else { | |
1143 | - | let | |
1144 | - | $Tuple2(nil, | |
1146 | + | let ao = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
1147 | + | $Tuple2(nil, bP(aK(), eq, ao, Address(fromBase58String(az)))._1) | |
1145 | 1148 | } | |
1146 | 1149 | ||
1147 | 1150 | ||
1148 | 1151 | ||
1149 | - | @Callable( | |
1150 | - | func withdrawOneCoin ( | |
1152 | + | @Callable(da) | |
1153 | + | func withdrawOneCoin (dW,er) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
1151 | 1154 | then throw("size(payments) != 1") | |
1152 | 1155 | else { | |
1153 | - | let | |
1154 | - | if ( | |
1155 | - | then (cH | |
1156 | + | let cH = cD() | |
1157 | + | if (cH._1) | |
1158 | + | then (cJ(cH._2) ++ cK(da.originCaller, da.payments)) | |
1156 | 1159 | else { | |
1157 | - | let | |
1158 | - | let | |
1159 | - | if (( | |
1160 | + | let eh = da.payments[0].amount | |
1161 | + | let ei = da.payments[0].assetId | |
1162 | + | if ((ei != Y)) | |
1160 | 1163 | then throw("unknown token") | |
1161 | 1164 | else { | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | let | |
1166 | - | let | |
1167 | - | let | |
1168 | - | if ( | |
1165 | + | let es = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
1166 | + | let dZ = fromBase58String(dW) | |
1167 | + | let aW = aK() | |
1168 | + | let et = bP(aW, eh, es, da.originCaller) | |
1169 | + | let ch = et._1 | |
1170 | + | let eu = et._2 | |
1171 | + | if (av((ch >= er))) | |
1169 | 1172 | then throw("Not enough coins removed") | |
1170 | 1173 | else { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | func | |
1174 | - | let | |
1175 | - | let | |
1176 | - | let | |
1177 | - | if (( | |
1178 | - | then $Tuple2(( | |
1179 | - | else $Tuple2(( | |
1174 | + | let dA = fraction(eu, ac, aa) | |
1175 | + | let ev = (ch + eu) | |
1176 | + | func eb (aM,ec) = { | |
1177 | + | let ew = aM | |
1178 | + | let cO = ew._1 | |
1179 | + | let ao = ew._2 | |
1180 | + | if ((ao == es)) | |
1181 | + | then $Tuple2((cO :+ (ec - ev)), (ao + 1)) | |
1182 | + | else $Tuple2((cO :+ ec), (ao + 1)) | |
1180 | 1183 | } | |
1181 | 1184 | ||
1182 | - | let | |
1183 | - | let | |
1184 | - | let | |
1185 | - | let | |
1186 | - | func | |
1187 | - | then | |
1188 | - | else | |
1185 | + | let ex = { | |
1186 | + | let aO = aW | |
1187 | + | let aP = size(aO) | |
1188 | + | let aQ = $Tuple2(nil, 0) | |
1189 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1190 | + | then aS | |
1191 | + | else eb(aS, aO[aT]) | |
1189 | 1192 | ||
1190 | - | func | |
1191 | - | then | |
1193 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1194 | + | then aS | |
1192 | 1195 | else throw("List size exceeds 10") | |
1193 | 1196 | ||
1194 | - | | |
1197 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1195 | 1198 | } | |
1196 | - | let | |
1197 | - | let | |
1198 | - | if ( | |
1199 | + | let cO = ex._1 | |
1200 | + | let ey = ex._2 | |
1201 | + | if (cN(cO)) | |
1199 | 1202 | then throw() | |
1200 | 1203 | else { | |
1201 | - | let | |
1202 | - | if (( | |
1204 | + | let ef = cy(ev, dW) | |
1205 | + | if ((ef == ef)) | |
1203 | 1206 | then { | |
1204 | - | let | |
1205 | - | let | |
1206 | - | then invoke( | |
1207 | + | let dE = (eu - dA) | |
1208 | + | let dG = if ((dE > 0)) | |
1209 | + | then invoke(U, "airDrop", nil, [AttachedPayment(dZ, dE)]) | |
1207 | 1210 | else 0 | |
1208 | - | if (( | |
1209 | - | then [ScriptTransfer( | |
1211 | + | if ((dG == dG)) | |
1212 | + | then [ScriptTransfer(da.originCaller, ch, dZ), IntegerEntry((ah[es] + i), (aW[es] - ev)), Burn(Y, eh), ScriptTransfer(P, dA, dZ), IntegerEntry(m, (Z - eh))] | |
1210 | 1213 | else throw("Strict value is not equal to itself.") | |
1211 | 1214 | } | |
1212 | 1215 | else throw("Strict value is not equal to itself.") | |
1218 | 1221 | ||
1219 | 1222 | ||
1220 | 1223 | ||
1221 | - | @Callable( | |
1222 | - | func withdrawOneCoinWithUnlock ( | |
1224 | + | @Callable(da) | |
1225 | + | func withdrawOneCoinWithUnlock (dW,er,en) = valueOrElse(am(), if ((0 >= en)) | |
1223 | 1226 | then throw("Unlock amount must be positive") | |
1224 | 1227 | else { | |
1225 | - | let | |
1226 | - | if ( | |
1227 | - | then (cH | |
1228 | + | let cH = cD() | |
1229 | + | if (cH._1) | |
1230 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
1228 | 1231 | else { | |
1229 | - | let | |
1230 | - | then if ((size( | |
1232 | + | let eh = if ((size(da.payments) > 0)) | |
1233 | + | then if ((size(da.payments) != 1)) | |
1231 | 1234 | then throw("size(payments) != 1") | |
1232 | 1235 | else { | |
1233 | - | let | |
1234 | - | if (( | |
1236 | + | let ei = da.payments[0].assetId | |
1237 | + | if ((Y != ei)) | |
1235 | 1238 | then throw("unknown payment token") | |
1236 | - | else | |
1239 | + | else da.payments[0].amount | |
1237 | 1240 | } | |
1238 | 1241 | else 0 | |
1239 | - | let | |
1240 | - | if (( | |
1242 | + | let eo = invoke(T, "withdrawShareTokens", [toString(this), en], nil) | |
1243 | + | if ((eo == eo)) | |
1241 | 1244 | then { | |
1242 | - | let | |
1243 | - | let | |
1244 | - | if (( | |
1245 | + | let ep = (eh + en) | |
1246 | + | let dF = invoke(this, "withdrawOneCoin", [dW, er], [AttachedPayment(Y, ep)]) | |
1247 | + | if ((dF == dF)) | |
1245 | 1248 | then nil | |
1246 | 1249 | else throw("Strict value is not equal to itself.") | |
1247 | 1250 | } | |
1251 | 1254 | ||
1252 | 1255 | ||
1253 | 1256 | ||
1254 | - | @Callable( | |
1255 | - | func A () = $Tuple2(nil, | |
1257 | + | @Callable(da) | |
1258 | + | func A () = $Tuple2(nil, aF()) | |
1256 | 1259 | ||
1257 | 1260 | ||
1258 | 1261 | ||
1259 | - | @Callable( | |
1262 | + | @Callable(da) | |
1260 | 1263 | func getVirtualPrice () = { | |
1261 | - | let | |
1262 | - | $Tuple2(nil, fraction( | |
1264 | + | let bn = aZ(aK(), aF()) | |
1265 | + | $Tuple2(nil, fraction(bn, a, Z)) | |
1263 | 1266 | } | |
1264 | 1267 | ||
1265 | 1268 | ||
1266 | 1269 | ||
1267 | - | @Callable( | |
1268 | - | func calcTokenAmount ( | |
1269 | - | let | |
1270 | - | let | |
1271 | - | let | |
1272 | - | func | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1277 | - | then | |
1278 | - | else -( | |
1279 | - | $Tuple2(( | |
1270 | + | @Callable(da) | |
1271 | + | func calcTokenAmount (ez,eA) = { | |
1272 | + | let ba = aF() | |
1273 | + | let eB = aK() | |
1274 | + | let bV = bq(eB, ba) | |
1275 | + | func eC (aM,ej) = { | |
1276 | + | let eD = aM | |
1277 | + | let cO = eD._1 | |
1278 | + | let ao = eD._2 | |
1279 | + | let dp = (ej + (if (eA) | |
1280 | + | then ez[ao] | |
1281 | + | else -(ez[ao]))) | |
1282 | + | $Tuple2((cO :+ dp), (ao + 1)) | |
1280 | 1283 | } | |
1281 | 1284 | ||
1282 | - | let | |
1283 | - | let | |
1284 | - | let | |
1285 | - | func | |
1286 | - | then | |
1287 | - | else | |
1285 | + | let cO = ( let aO = eB | |
1286 | + | let aP = size(aO) | |
1287 | + | let aQ = $Tuple2(nil, 0) | |
1288 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1289 | + | then aS | |
1290 | + | else eC(aS, aO[aT]) | |
1288 | 1291 | ||
1289 | - | func | |
1290 | - | then | |
1292 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1293 | + | then aS | |
1291 | 1294 | else throw("List size exceeds 10") | |
1292 | 1295 | ||
1293 | - | | |
1294 | - | let | |
1295 | - | let | |
1296 | - | then ( | |
1297 | - | else ( | |
1298 | - | $Tuple2(nil, fraction( | |
1296 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1297 | + | let bW = bq(cO, ba) | |
1298 | + | let eE = if (eA) | |
1299 | + | then (bW - bV) | |
1300 | + | else (bV - bW) | |
1301 | + | $Tuple2(nil, fraction(eE, Z, bV)) | |
1299 | 1302 | } | |
1300 | 1303 | ||
1301 | 1304 | ||
1302 | 1305 | ||
1303 | - | @Callable( | |
1304 | - | func rampA ( | |
1306 | + | @Callable(da) | |
1307 | + | func rampA (eF,eG) = valueOrElse(am(), valueOrElse(an(da), if (av((au >= (af + e)))) | |
1305 | 1308 | then throw("too often") | |
1306 | - | else if ( | |
1309 | + | else if (av((eG >= (au + e)))) | |
1307 | 1310 | then throw("insufficient time") | |
1308 | 1311 | else { | |
1309 | - | let | |
1310 | - | if ( | |
1311 | - | then (b > | |
1312 | + | let eH = aF() | |
1313 | + | if (av(if ((eF > 0)) | |
1314 | + | then (b > eF) | |
1312 | 1315 | else false)) | |
1313 | 1316 | then throw("out of base range") | |
1314 | - | else if ( | |
1315 | - | then (( | |
1317 | + | else if (av(if (if ((eF >= eH)) | |
1318 | + | then ((eH * c) >= eF) | |
1316 | 1319 | else false) | |
1317 | 1320 | then true | |
1318 | - | else if (( | |
1319 | - | then (( | |
1321 | + | else if ((eH > eF)) | |
1322 | + | then ((eF * c) >= eH) | |
1320 | 1323 | else false)) | |
1321 | 1324 | then throw("out of range") | |
1322 | - | else [IntegerEntry("initial_A", | |
1325 | + | else [IntegerEntry("initial_A", eH), IntegerEntry("future_A", eF), IntegerEntry("initial_A_time", au), IntegerEntry("future_A_time", eG)] | |
1323 | 1326 | })) | |
1324 | 1327 | ||
1325 | 1328 | ||
1326 | 1329 | ||
1327 | - | @Callable( | |
1328 | - | func stopRampA () = valueOrElse( | |
1329 | - | let | |
1330 | - | [IntegerEntry("initial_A", | |
1330 | + | @Callable(da) | |
1331 | + | func stopRampA () = valueOrElse(am(), valueOrElse(an(da), { | |
1332 | + | let eI = aF() | |
1333 | + | [IntegerEntry("initial_A", eI), IntegerEntry("future_A", eI), IntegerEntry("initial_A_time", au), IntegerEntry("future_A_time", au)] | |
1331 | 1334 | })) | |
1332 | 1335 | ||
1333 | 1336 | ||
1334 | 1337 | ||
1335 | - | @Callable( | |
1336 | - | func shutdown () = valueOrElse( | |
1338 | + | @Callable(da) | |
1339 | + | func shutdown () = valueOrElse(an(da), if (!(X)) | |
1337 | 1340 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, k), "the cause wasn't specified"))) | |
1338 | - | else | |
1341 | + | else aj("Paused by admin")) | |
1339 | 1342 | ||
1340 | 1343 | ||
1341 | 1344 | ||
1342 | - | @Callable( | |
1343 | - | func activate () = valueOrElse( | |
1344 | - | then | |
1345 | + | @Callable(da) | |
1346 | + | func activate () = valueOrElse(an(da), if (X) | |
1347 | + | then al() | |
1345 | 1348 | else [BooleanEntry(j, true), DeleteEntry(k)]) | |
1346 | 1349 | ||
1347 | 1350 | ||
1348 | 1351 | ||
1349 | - | @Callable( | |
1350 | - | func takeIntoAccountExtraFunds () = valueOrElse( | |
1352 | + | @Callable(da) | |
1353 | + | func takeIntoAccountExtraFunds () = valueOrElse(am(), if ((da.caller != P)) | |
1351 | 1354 | then throw("Only the wallet can call this function") | |
1352 | 1355 | else { | |
1353 | - | let | |
1354 | - | func | |
1355 | - | let | |
1356 | - | let | |
1357 | - | let | |
1358 | - | let | |
1359 | - | let | |
1360 | - | let | |
1361 | - | if ((0 > | |
1362 | - | then | |
1356 | + | let eB = aK() | |
1357 | + | func eJ (aM,aN) = { | |
1358 | + | let eK = aM | |
1359 | + | let eL = eK._1 | |
1360 | + | let ao = eK._2 | |
1361 | + | let eM = fromBase58String(aN) | |
1362 | + | let eN = (assetBalance(this, eM) + cA(eM)) | |
1363 | + | let eO = (eN - eB[ao]) | |
1364 | + | if ((0 > eO)) | |
1365 | + | then aj(("Enroll amount negative for asset" + aN)) | |
1363 | 1366 | else { | |
1364 | - | let | |
1365 | - | then invoke( | |
1367 | + | let dG = if ((eO > 0)) | |
1368 | + | then invoke(U, "airDrop", nil, [AttachedPayment(eM, eO)]) | |
1366 | 1369 | else 0 | |
1367 | - | if (( | |
1368 | - | then $Tuple2(( | |
1370 | + | if ((dG == dG)) | |
1371 | + | then $Tuple2((eL + eO), (ao + 1)) | |
1369 | 1372 | else throw("Strict value is not equal to itself.") | |
1370 | 1373 | } | |
1371 | 1374 | } | |
1372 | 1375 | ||
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | func | |
1378 | - | then | |
1379 | - | else | |
1376 | + | let ds = { | |
1377 | + | let aO = ah | |
1378 | + | let aP = size(aO) | |
1379 | + | let aQ = $Tuple2(0, 0) | |
1380 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1381 | + | then aS | |
1382 | + | else eJ(aS, aO[aT]) | |
1380 | 1383 | ||
1381 | - | func | |
1382 | - | then | |
1384 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1385 | + | then aS | |
1383 | 1386 | else throw("List size exceeds 10") | |
1384 | 1387 | ||
1385 | - | | |
1388 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1386 | 1389 | } | |
1387 | - | if (( | |
1390 | + | if ((ds._1 == 0)) | |
1388 | 1391 | then throw("No money to take") | |
1389 | 1392 | else nil | |
1390 | 1393 | }) | |
1391 | 1394 | ||
1392 | 1395 | ||
1393 | - | @Verifier( | |
1394 | - | func | |
1395 | - | let | |
1396 | - | let | |
1396 | + | @Verifier(eP) | |
1397 | + | func eQ () = { | |
1398 | + | let eR = { | |
1399 | + | let eS = if (sigVerify(eP.bodyBytes, eP.proofs[0], L)) | |
1397 | 1400 | then 1 | |
1398 | 1401 | else 0 | |
1399 | - | let | |
1402 | + | let eT = if (sigVerify(eP.bodyBytes, eP.proofs[1], M)) | |
1400 | 1403 | then 1 | |
1401 | 1404 | else 0 | |
1402 | - | let | |
1405 | + | let eU = if (sigVerify(eP.bodyBytes, eP.proofs[2], N)) | |
1403 | 1406 | then 1 | |
1404 | 1407 | else 0 | |
1405 | - | ((( | |
1408 | + | (((eS + eT) + eU) >= 2) | |
1406 | 1409 | } | |
1407 | - | let | |
1408 | - | if ($isInstanceOf( | |
1410 | + | let I = eP | |
1411 | + | if ($isInstanceOf(I, "InvokeScriptTransaction")) | |
1409 | 1412 | then { | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then ( | |
1413 | + | let dF = I | |
1414 | + | let eV = if ((dF.dApp == this)) | |
1415 | + | then (dF.function == "takeIntoAccountExtraFunds") | |
1413 | 1416 | else false | |
1414 | - | let | |
1417 | + | let eW = if (if (if (sigVerify(eP.bodyBytes, eP.proofs[0], L)) | |
1415 | 1418 | then true | |
1416 | - | else sigVerify( | |
1419 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], M)) | |
1417 | 1420 | then true | |
1418 | - | else sigVerify( | |
1421 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], N)) | |
1419 | 1422 | then true | |
1420 | - | else sigVerify( | |
1421 | - | if (if ( | |
1422 | - | then | |
1423 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], O) | |
1424 | + | if (if (eV) | |
1425 | + | then eW | |
1423 | 1426 | else false) | |
1424 | 1427 | then true | |
1425 | - | else | |
1428 | + | else eR | |
1426 | 1429 | } | |
1427 | - | else | |
1430 | + | else eR | |
1428 | 1431 | } | |
1429 | 1432 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = 1000000 | |
5 | 5 | ||
6 | 6 | let b = 1000000 | |
7 | 7 | ||
8 | 8 | let c = 10 | |
9 | 9 | ||
10 | 10 | let d = 6 | |
11 | 11 | ||
12 | 12 | let e = (86400 / 60) | |
13 | 13 | ||
14 | 14 | let f = "3.0.0" | |
15 | 15 | ||
16 | 16 | let g = "version" | |
17 | 17 | ||
18 | 18 | let h = "asset_ids" | |
19 | 19 | ||
20 | 20 | let i = "_balance" | |
21 | 21 | ||
22 | 22 | let j = "active" | |
23 | 23 | ||
24 | 24 | let k = "shutdown_cause" | |
25 | 25 | ||
26 | 26 | let l = "share_asset_id" | |
27 | 27 | ||
28 | 28 | let m = "share_asset_supply" | |
29 | 29 | ||
30 | 30 | let n = "commission" | |
31 | 31 | ||
32 | 32 | let o = "dAppThresholdCoef" | |
33 | 33 | ||
34 | 34 | let p = "staking_usdnnsbt_address" | |
35 | 35 | ||
36 | 36 | let q = "discounts" | |
37 | 37 | ||
38 | 38 | let r = "discount_values" | |
39 | 39 | ||
40 | 40 | let s = "_SWOP_amount" | |
41 | 41 | ||
42 | - | let t = " | |
42 | + | let t = "_GSwop_amount" | |
43 | 43 | ||
44 | - | let u = "admin_pub_ | |
44 | + | let u = "admin_pub_1" | |
45 | 45 | ||
46 | - | let v = "admin_pub_ | |
46 | + | let v = "admin_pub_2" | |
47 | 47 | ||
48 | - | let w = "admin_ | |
48 | + | let w = "admin_pub_3" | |
49 | 49 | ||
50 | - | let x = " | |
50 | + | let x = "admin_invoke_pub" | |
51 | 51 | ||
52 | - | let y = " | |
52 | + | let y = "money_box_address" | |
53 | 53 | ||
54 | - | let z = " | |
54 | + | let z = "governance_address" | |
55 | 55 | ||
56 | - | let B = " | |
56 | + | let B = "voting_address" | |
57 | 57 | ||
58 | - | let C = " | |
58 | + | let C = "farming_address" | |
59 | 59 | ||
60 | - | let E = | |
60 | + | let E = "lp_farming" | |
61 | 61 | ||
62 | - | func F (G) = { | |
63 | - | let H = getString(E, G) | |
64 | - | if ($isInstanceOf(H, "String")) | |
62 | + | let F = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
63 | + | ||
64 | + | func G (H) = { | |
65 | + | let I = getString(F, H) | |
66 | + | if ($isInstanceOf(I, "String")) | |
65 | 67 | then { | |
66 | - | let | |
67 | - | fromBase58String( | |
68 | + | let J = I | |
69 | + | fromBase58String(J) | |
68 | 70 | } | |
69 | 71 | else { | |
70 | - | let | |
71 | - | throw(( | |
72 | + | let K = I | |
73 | + | throw((H + "is empty")) | |
72 | 74 | } | |
73 | 75 | } | |
74 | 76 | ||
75 | 77 | ||
76 | - | let | |
78 | + | let L = G(u) | |
77 | 79 | ||
78 | - | let | |
80 | + | let M = G(v) | |
79 | 81 | ||
80 | - | let | |
82 | + | let N = G(w) | |
81 | 83 | ||
82 | - | let | |
84 | + | let O = G(x) | |
83 | 85 | ||
84 | - | let | |
86 | + | let P = Address(G(y)) | |
85 | 87 | ||
86 | - | let | |
88 | + | let Q = Address(G(z)) | |
87 | 89 | ||
88 | - | let | |
90 | + | let R = Address(G(p)) | |
89 | 91 | ||
90 | - | let | |
92 | + | let S = Address(G(B)) | |
91 | 93 | ||
92 | - | let | |
94 | + | let T = Address(G(C)) | |
93 | 95 | ||
94 | - | let | |
96 | + | let U = Address(G(E)) | |
95 | 97 | ||
96 | - | let | |
98 | + | let V = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p' | |
97 | 99 | ||
98 | - | let | |
100 | + | let W = [toBase58String(V)] | |
99 | 101 | ||
100 | - | let | |
102 | + | let X = getBooleanValue(this, j) | |
101 | 103 | ||
102 | - | let | |
104 | + | let Y = fromBase58String(getStringValue(this, l)) | |
103 | 105 | ||
104 | - | let | |
106 | + | let Z = getIntegerValue(this, m) | |
105 | 107 | ||
106 | - | let | |
108 | + | let aa = 1000000 | |
107 | 109 | ||
108 | - | let | |
110 | + | let ab = getIntegerValue(this, n) | |
109 | 111 | ||
110 | - | let | |
112 | + | let ac = fraction(40, aa, 100) | |
111 | 113 | ||
112 | - | let | |
114 | + | let ad = getIntegerValue(this, "initial_A") | |
113 | 115 | ||
114 | - | let | |
116 | + | let ae = getIntegerValue(this, "future_A") | |
115 | 117 | ||
116 | - | let | |
118 | + | let af = valueOrElse(getInteger(this, "initial_A_time"), 0) | |
117 | 119 | ||
118 | - | let | |
120 | + | let ag = valueOrElse(getInteger(this, "future_A_time"), 0) | |
119 | 121 | ||
120 | - | let | |
122 | + | let ah = split(getStringValue(this, h), ",") | |
121 | 123 | ||
122 | - | let | |
124 | + | let ai = size(ah) | |
123 | 125 | ||
124 | - | func | |
126 | + | func aj (ak) = [BooleanEntry(j, false), StringEntry(k, ak)] | |
125 | 127 | ||
126 | 128 | ||
127 | - | func | |
129 | + | func al () = throw("DApp is already active") | |
128 | 130 | ||
129 | 131 | ||
130 | - | func | |
132 | + | func am () = if (X) | |
131 | 133 | then unit | |
132 | 134 | else throw("DApp is inactive at this moment") | |
133 | 135 | ||
134 | 136 | ||
135 | - | func | |
137 | + | func an (ao) = if (containsElement([L, M, N], ao.callerPublicKey)) | |
136 | 138 | then unit | |
137 | 139 | else throw("Only admin can call this function") | |
138 | 140 | ||
139 | 141 | ||
140 | - | func | |
142 | + | func ap (ao) = if ((this == ao.caller)) | |
141 | 143 | then unit | |
142 | 144 | else throw("Only contract itself can call this function") | |
143 | 145 | ||
144 | 146 | ||
145 | - | let | |
147 | + | let aq = toBigInt(2) | |
146 | 148 | ||
147 | - | let | |
149 | + | let ar = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
148 | 150 | ||
149 | - | let | |
151 | + | let as = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] | |
150 | 152 | ||
151 | - | let | |
153 | + | let at = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] | |
152 | 154 | ||
153 | - | let | |
155 | + | let au = height | |
154 | 156 | ||
155 | - | func | |
157 | + | func av (aw) = if (aw) | |
156 | 158 | then false | |
157 | 159 | else true | |
158 | 160 | ||
159 | 161 | ||
160 | - | func | |
161 | - | let | |
162 | - | let | |
163 | - | if ($isInstanceOf( | |
162 | + | func ax (ay) = { | |
163 | + | let az = { | |
164 | + | let I = ay | |
165 | + | if ($isInstanceOf(I, "Address")) | |
164 | 166 | then { | |
165 | - | let | |
166 | - | toString( | |
167 | + | let aA = I | |
168 | + | toString(aA) | |
167 | 169 | } | |
168 | - | else if ($isInstanceOf( | |
170 | + | else if ($isInstanceOf(I, "String")) | |
169 | 171 | then { | |
170 | - | let | |
171 | - | | |
172 | + | let aA = I | |
173 | + | aA | |
172 | 174 | } | |
173 | 175 | else throw("Unknow type of user Addr") | |
174 | 176 | } | |
175 | - | let aA = valueOrElse(getInteger(P, (ay + s)), 0) | |
176 | - | let aB = split(getStringValue(E, r), ",") | |
177 | - | let aC = split(getStringValue(E, q), ",") | |
178 | - | if (if ((aA >= parseIntValue(aB[0]))) | |
179 | - | then (parseIntValue(aB[1]) > aA) | |
177 | + | let aB = valueOrElse(getInteger(Q, (az + t)), 0) | |
178 | + | let aC = valueOrElse(getInteger(Q, (az + t)), aB) | |
179 | + | let aD = split(getStringValue(F, r), ",") | |
180 | + | let aE = split(getStringValue(F, q), ",") | |
181 | + | if (if ((aC >= parseIntValue(aD[0]))) | |
182 | + | then (parseIntValue(aD[1]) > aC) | |
180 | 183 | else false) | |
181 | - | then ( | |
182 | - | else if (if (( | |
183 | - | then (parseIntValue( | |
184 | + | then (aa - parseIntValue(aE[0])) | |
185 | + | else if (if ((aC >= parseIntValue(aD[1]))) | |
186 | + | then (parseIntValue(aD[2]) > aC) | |
184 | 187 | else false) | |
185 | - | then ( | |
186 | - | else if (if (( | |
187 | - | then (parseIntValue( | |
188 | + | then (aa - parseIntValue(aE[1])) | |
189 | + | else if (if ((aC >= parseIntValue(aD[2]))) | |
190 | + | then (parseIntValue(aD[3]) > aC) | |
188 | 191 | else false) | |
189 | - | then ( | |
190 | - | else if (if (( | |
191 | - | then (parseIntValue( | |
192 | + | then (aa - parseIntValue(aE[2])) | |
193 | + | else if (if ((aC >= parseIntValue(aD[3]))) | |
194 | + | then (parseIntValue(aD[4]) > aC) | |
192 | 195 | else false) | |
193 | - | then ( | |
194 | - | else if (( | |
195 | - | then ( | |
196 | - | else | |
196 | + | then (aa - parseIntValue(aE[3])) | |
197 | + | else if ((aC >= parseIntValue(aD[4]))) | |
198 | + | then (aa - parseIntValue(aE[4])) | |
199 | + | else aa | |
197 | 200 | } | |
198 | 201 | ||
199 | 202 | ||
200 | - | func | |
201 | - | let | |
202 | - | let | |
203 | - | if (( | |
203 | + | func aF () = { | |
204 | + | let aG = ag | |
205 | + | let aH = ae | |
206 | + | if ((aG > au)) | |
204 | 207 | then { | |
205 | - | let | |
206 | - | let | |
207 | - | if (( | |
208 | - | then ( | |
209 | - | else ( | |
208 | + | let aI = ad | |
209 | + | let aJ = af | |
210 | + | if ((aH > aI)) | |
211 | + | then (aI + (((aH - aI) * (au - aJ)) / (aG - aJ))) | |
212 | + | else (aI - (((aI - aH) * (au - aJ)) / (aG - aJ))) | |
210 | 213 | } | |
211 | - | else | |
214 | + | else aH | |
212 | 215 | } | |
213 | 216 | ||
214 | 217 | ||
215 | - | func | |
216 | - | func | |
218 | + | func aK () = { | |
219 | + | func aL (aM,aN) = (aM :+ valueOrElse(getInteger(this, (aN + i)), 0)) | |
217 | 220 | ||
218 | - | let | |
219 | - | let | |
220 | - | let | |
221 | - | func | |
222 | - | then | |
223 | - | else | |
221 | + | let aO = ah | |
222 | + | let aP = size(aO) | |
223 | + | let aQ = nil | |
224 | + | func aR (aS,aT) = if ((aT >= aP)) | |
225 | + | then aS | |
226 | + | else aL(aS, aO[aT]) | |
224 | 227 | ||
225 | - | func | |
226 | - | then | |
228 | + | func aU (aS,aT) = if ((aT >= aP)) | |
229 | + | then aS | |
227 | 230 | else throw("List size exceeds 10") | |
228 | 231 | ||
229 | - | | |
232 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
230 | 233 | } | |
231 | 234 | ||
232 | 235 | ||
233 | - | func | |
236 | + | func aV (aW) = aW | |
234 | 237 | ||
235 | 238 | ||
236 | - | func | |
239 | + | func aX (aM,aY) = (aM + aY) | |
237 | 240 | ||
238 | 241 | ||
239 | - | func | |
240 | - | let | |
241 | - | if ($isInstanceOf( | |
242 | - | then | |
243 | - | else throw(($getType( | |
242 | + | func aZ (aW,ba) = { | |
243 | + | let bb = invoke(this, "D", [aW, ba], nil) | |
244 | + | if ($isInstanceOf(bb, "Int")) | |
245 | + | then bb | |
246 | + | else throw(($getType(bb) + " couldn't be cast to Int")) | |
244 | 247 | } | |
245 | 248 | ||
246 | 249 | ||
247 | - | func | |
248 | - | let | |
249 | - | let | |
250 | - | let | |
251 | - | let | |
252 | - | func | |
253 | - | then | |
254 | - | else | |
250 | + | func bc (aW,ba) = { | |
251 | + | let bd = { | |
252 | + | let aO = aW | |
253 | + | let aP = size(aO) | |
254 | + | let aQ = 0 | |
255 | + | func aR (aS,aT) = if ((aT >= aP)) | |
256 | + | then aS | |
257 | + | else aX(aS, aO[aT]) | |
255 | 258 | ||
256 | - | func | |
257 | - | then | |
259 | + | func aU (aS,aT) = if ((aT >= aP)) | |
260 | + | then aS | |
258 | 261 | else throw("List size exceeds 10") | |
259 | 262 | ||
260 | - | | |
263 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
261 | 264 | } | |
262 | - | if (( | |
265 | + | if ((bd == 0)) | |
263 | 266 | then 0 | |
264 | 267 | else { | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | func | |
269 | - | then | |
268 | + | let be = (ba * ai) | |
269 | + | let bf = (toBigInt(be) * toBigInt(bd)) | |
270 | + | let bg = toBigInt((be - 1)) | |
271 | + | func bh (aM,ao) = if ((aM._2 == true)) | |
272 | + | then aM | |
270 | 273 | else { | |
271 | - | let | |
272 | - | func | |
273 | - | then (( | |
274 | - | else | |
274 | + | let bi = aM._1 | |
275 | + | func bj (bk,ao) = if ((ai > ao)) | |
276 | + | then ((bk * bi) / (toBigInt(aW[ao]) * toBigInt(ai))) | |
277 | + | else bk | |
275 | 278 | ||
276 | - | let | |
277 | - | let | |
278 | - | let | |
279 | - | let | |
280 | - | func | |
281 | - | then | |
282 | - | else | |
279 | + | let bk = { | |
280 | + | let aO = ar | |
281 | + | let aP = size(aO) | |
282 | + | let aQ = bi | |
283 | + | func bl (aS,aT) = if ((aT >= aP)) | |
284 | + | then aS | |
285 | + | else bj(aS, aO[aT]) | |
283 | 286 | ||
284 | - | func | |
285 | - | then | |
287 | + | func bm (aS,aT) = if ((aT >= aP)) | |
288 | + | then aS | |
286 | 289 | else throw("List size exceeds 10") | |
287 | 290 | ||
288 | - | | |
291 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
289 | 292 | } | |
290 | - | let | |
291 | - | if (( | |
292 | - | then if ((1 >= toInt(( | |
293 | - | then $Tuple2( | |
294 | - | else $Tuple2( | |
295 | - | else if ((1 >= toInt(( | |
296 | - | then $Tuple2( | |
297 | - | else $Tuple2( | |
293 | + | let bn = fraction((bf + (toBigInt(ai) * bk)), bi, ((bg * bi) + (toBigInt((ai + 1)) * bk))) | |
294 | + | if ((bn > bi)) | |
295 | + | then if ((1 >= toInt((bn - bi)))) | |
296 | + | then $Tuple2(bn, true) | |
297 | + | else $Tuple2(bn, false) | |
298 | + | else if ((1 >= toInt((bi - bn)))) | |
299 | + | then $Tuple2(bn, true) | |
300 | + | else $Tuple2(bn, false) | |
298 | 301 | } | |
299 | 302 | ||
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | let | |
304 | - | func | |
305 | - | then | |
306 | - | else | |
303 | + | let bo = { | |
304 | + | let aO = as | |
305 | + | let aP = size(aO) | |
306 | + | let aQ = $Tuple2(toBigInt(bd), false) | |
307 | + | func bl (aS,aT) = if ((aT >= aP)) | |
308 | + | then aS | |
309 | + | else bh(aS, aO[aT]) | |
307 | 310 | ||
308 | - | func | |
309 | - | then | |
311 | + | func bm (aS,aT) = if ((aT >= aP)) | |
312 | + | then aS | |
310 | 313 | else throw("List size exceeds 15") | |
311 | 314 | ||
312 | - | | |
315 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
313 | 316 | } | |
314 | - | let | |
315 | - | let | |
316 | - | if (( | |
317 | - | then throw(("get_D() not finished with " + toString( | |
318 | - | else toInt( | |
317 | + | let bn = bo._1 | |
318 | + | let bp = bo._2 | |
319 | + | if ((bp == false)) | |
320 | + | then throw(("get_D() not finished with " + toString(bn))) | |
321 | + | else toInt(bn) | |
319 | 322 | } | |
320 | 323 | } | |
321 | 324 | ||
322 | 325 | ||
323 | - | func | |
326 | + | func bq (aW,ba) = aZ(aV(aW), ba) | |
324 | 327 | ||
325 | 328 | ||
326 | - | func | |
329 | + | func br (bs,bt,bu,bv) = if (av((bs != bt))) | |
327 | 330 | then throw("same coin") | |
328 | - | else if ( | |
329 | - | then ( | |
331 | + | else if (av(if ((bt >= 0)) | |
332 | + | then (bs >= 0) | |
330 | 333 | else false)) | |
331 | 334 | then throw("below zero") | |
332 | - | else if ( | |
333 | - | then ( | |
335 | + | else if (av(if ((ai > bt)) | |
336 | + | then (ai > bs) | |
334 | 337 | else false)) | |
335 | 338 | then throw("above N_COINS") | |
336 | 339 | else { | |
337 | - | let | |
338 | - | let | |
339 | - | let | |
340 | - | func | |
341 | - | let | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | then | |
346 | - | else | |
347 | - | if (if (( | |
348 | - | then ( | |
340 | + | let ba = aF() | |
341 | + | let bn = aZ(bv, ba) | |
342 | + | let be = (ba * ai) | |
343 | + | func bw (aM,ao) = { | |
344 | + | let bx = aM | |
345 | + | let by = bx._1 | |
346 | + | let bz = bx._2 | |
347 | + | let bA = if ((bs == ao)) | |
348 | + | then bu | |
349 | + | else bv[ao] | |
350 | + | if (if ((ao != bt)) | |
351 | + | then (ai > ao) | |
349 | 352 | else false) | |
350 | - | then $Tuple2(( | |
351 | - | else $Tuple2( | |
353 | + | then $Tuple2((by + bA), fraction(bz, toBigInt(bn), toBigInt((bA * ai)))) | |
354 | + | else $Tuple2(by, bz) | |
352 | 355 | } | |
353 | 356 | ||
354 | - | let | |
355 | - | let | |
356 | - | let | |
357 | - | let | |
358 | - | func | |
359 | - | then | |
360 | - | else | |
357 | + | let bB = { | |
358 | + | let aO = ar | |
359 | + | let aP = size(aO) | |
360 | + | let aQ = $Tuple2(0, toBigInt(bn)) | |
361 | + | func aR (aS,aT) = if ((aT >= aP)) | |
362 | + | then aS | |
363 | + | else bw(aS, aO[aT]) | |
361 | 364 | ||
362 | - | func | |
363 | - | then | |
365 | + | func aU (aS,aT) = if ((aT >= aP)) | |
366 | + | then aS | |
364 | 367 | else throw("List size exceeds 10") | |
365 | 368 | ||
366 | - | | |
369 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
367 | 370 | } | |
368 | - | let | |
369 | - | let | |
370 | - | let | |
371 | - | let | |
372 | - | func | |
373 | - | then | |
371 | + | let by = bB._1 | |
372 | + | let bC = bB._2 | |
373 | + | let bz = fraction(bC, toBigInt(bn), toBigInt((be * ai))) | |
374 | + | let bD = toBigInt(((by + (bn / be)) - bn)) | |
375 | + | func bE (aM,bF) = if ((aM._2 == true)) | |
376 | + | then aM | |
374 | 377 | else { | |
375 | - | let | |
376 | - | let | |
377 | - | if (( | |
378 | - | then if ((1 >= toInt(( | |
379 | - | then $Tuple2( | |
380 | - | else $Tuple2( | |
381 | - | else if ((1 >= toInt(( | |
382 | - | then $Tuple2( | |
383 | - | else $Tuple2( | |
378 | + | let bG = aM._1 | |
379 | + | let bH = (((bG * bG) + bz) / ((aq * bG) + bD)) | |
380 | + | if ((bH > bG)) | |
381 | + | then if ((1 >= toInt((bH - bG)))) | |
382 | + | then $Tuple2(bH, true) | |
383 | + | else $Tuple2(bH, false) | |
384 | + | else if ((1 >= toInt((bG - bH)))) | |
385 | + | then $Tuple2(bH, true) | |
386 | + | else $Tuple2(bH, false) | |
384 | 387 | } | |
385 | 388 | ||
386 | - | let | |
387 | - | let | |
388 | - | let | |
389 | - | let | |
390 | - | func | |
391 | - | then | |
392 | - | else | |
389 | + | let bI = { | |
390 | + | let aO = at | |
391 | + | let aP = size(aO) | |
392 | + | let aQ = $Tuple2(toBigInt(bn), false) | |
393 | + | func bl (aS,aT) = if ((aT >= aP)) | |
394 | + | then aS | |
395 | + | else bE(aS, aO[aT]) | |
393 | 396 | ||
394 | - | func | |
395 | - | then | |
397 | + | func bm (aS,aT) = if ((aT >= aP)) | |
398 | + | then aS | |
396 | 399 | else throw("List size exceeds 16") | |
397 | 400 | ||
398 | - | | |
401 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
399 | 402 | } | |
400 | - | let | |
401 | - | let | |
402 | - | if (( | |
403 | - | then throw(("getY() not finished with " + toString( | |
404 | - | else toInt( | |
403 | + | let bH = bI._1 | |
404 | + | let bp = bI._2 | |
405 | + | if ((bp == false)) | |
406 | + | then throw(("getY() not finished with " + toString(bH))) | |
407 | + | else toInt(bH) | |
405 | 408 | } | |
406 | 409 | ||
407 | 410 | ||
408 | - | func | |
411 | + | func bJ (bK,bs,aW,bn) = if (av((bs >= 0))) | |
409 | 412 | then throw("i below zero") | |
410 | - | else if ( | |
413 | + | else if (av((ai > bs))) | |
411 | 414 | then throw("i above N_COINS") | |
412 | 415 | else { | |
413 | - | let | |
414 | - | func | |
415 | - | let | |
416 | - | let | |
417 | - | let | |
418 | - | let | |
419 | - | then ( | |
416 | + | let be = (bK * ai) | |
417 | + | func bw (aM,ao) = { | |
418 | + | let bL = aM | |
419 | + | let by = bL._1 | |
420 | + | let bz = bL._2 | |
421 | + | let bA = if (if ((bs != ao)) | |
422 | + | then (ai > ao) | |
420 | 423 | else false) | |
421 | - | then | |
424 | + | then aW[ao] | |
422 | 425 | else 0 | |
423 | - | if (if (( | |
424 | - | then ( | |
426 | + | if (if ((ai > ao)) | |
427 | + | then (bs != ao) | |
425 | 428 | else false) | |
426 | - | then $Tuple2(( | |
427 | - | else $Tuple2( | |
429 | + | then $Tuple2((by + bA), fraction(bz, toBigInt(bn), toBigInt((bA * ai)))) | |
430 | + | else $Tuple2(by, bz) | |
428 | 431 | } | |
429 | 432 | ||
430 | - | let | |
431 | - | let | |
432 | - | let | |
433 | - | let | |
434 | - | func | |
435 | - | then | |
436 | - | else | |
433 | + | let bM = { | |
434 | + | let aO = ar | |
435 | + | let aP = size(aO) | |
436 | + | let aQ = $Tuple2(0, toBigInt(bn)) | |
437 | + | func aR (aS,aT) = if ((aT >= aP)) | |
438 | + | then aS | |
439 | + | else bw(aS, aO[aT]) | |
437 | 440 | ||
438 | - | func | |
439 | - | then | |
441 | + | func aU (aS,aT) = if ((aT >= aP)) | |
442 | + | then aS | |
440 | 443 | else throw("List size exceeds 10") | |
441 | 444 | ||
442 | - | | |
445 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
443 | 446 | } | |
444 | - | let | |
445 | - | let | |
446 | - | let | |
447 | - | let | |
448 | - | func | |
449 | - | then | |
447 | + | let by = bM._1 | |
448 | + | let bC = bM._2 | |
449 | + | let bz = fraction(bC, toBigInt(bn), toBigInt((be * ai))) | |
450 | + | let bD = toBigInt(((by + (bn / be)) - bn)) | |
451 | + | func bN (aM,ao) = if ((aM._2 == true)) | |
452 | + | then aM | |
450 | 453 | else { | |
451 | - | let | |
452 | - | let | |
453 | - | if (( | |
454 | - | then if ((1 >= toInt(( | |
455 | - | then $Tuple2( | |
456 | - | else $Tuple2( | |
457 | - | else if ((1 >= toInt(( | |
458 | - | then $Tuple2( | |
459 | - | else $Tuple2( | |
454 | + | let bG = aM._1 | |
455 | + | let bH = (((bG * bG) + bz) / ((aq * bG) + bD)) | |
456 | + | if ((bH > bG)) | |
457 | + | then if ((1 >= toInt((bH - bG)))) | |
458 | + | then $Tuple2(bH, true) | |
459 | + | else $Tuple2(bH, false) | |
460 | + | else if ((1 >= toInt((bG - bH)))) | |
461 | + | then $Tuple2(bH, true) | |
462 | + | else $Tuple2(bH, false) | |
460 | 463 | } | |
461 | 464 | ||
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | func | |
467 | - | then | |
468 | - | else | |
465 | + | let bO = { | |
466 | + | let aO = at | |
467 | + | let aP = size(aO) | |
468 | + | let aQ = $Tuple2(toBigInt(bn), false) | |
469 | + | func bl (aS,aT) = if ((aT >= aP)) | |
470 | + | then aS | |
471 | + | else bN(aS, aO[aT]) | |
469 | 472 | ||
470 | - | func | |
471 | - | then | |
473 | + | func bm (aS,aT) = if ((aT >= aP)) | |
474 | + | then aS | |
472 | 475 | else throw("List size exceeds 16") | |
473 | 476 | ||
474 | - | | |
477 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16) | |
475 | 478 | } | |
476 | - | let | |
477 | - | let | |
478 | - | if (( | |
479 | - | then throw(("get_y_D() not finished with " + toString( | |
480 | - | else toInt( | |
479 | + | let bH = bO._1 | |
480 | + | let bp = bO._2 | |
481 | + | if ((bp == false)) | |
482 | + | then throw(("get_y_D() not finished with " + toString(bH))) | |
483 | + | else toInt(bH) | |
481 | 484 | } | |
482 | 485 | ||
483 | 486 | ||
484 | - | func | |
485 | - | let | |
486 | - | let | |
487 | - | let | |
488 | - | let | |
489 | - | let | |
490 | - | let | |
491 | - | let | |
492 | - | let | |
493 | - | func | |
494 | - | let | |
495 | - | let | |
496 | - | let | |
497 | - | let | |
498 | - | then (fraction( | |
499 | - | else ( | |
500 | - | $Tuple2(( | |
487 | + | func bP (aW,bQ,ao,bR) = { | |
488 | + | let bS = ax(bR) | |
489 | + | let ba = aF() | |
490 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
491 | + | let bU = Z | |
492 | + | let bV = aZ(aW, ba) | |
493 | + | let bW = (bV - fraction(bQ, bV, bU)) | |
494 | + | let bX = bJ(ba, ao, aW, bW) | |
495 | + | let bY = (aW[ao] - bX) | |
496 | + | func bZ (aM,ca) = { | |
497 | + | let cb = aM | |
498 | + | let cc = cb._1 | |
499 | + | let cd = cb._2 | |
500 | + | let ce = if ((cd == ao)) | |
501 | + | then (fraction(ca, bW, bV) - bX) | |
502 | + | else (ca - fraction(ca, bW, bV)) | |
503 | + | $Tuple2((cc :+ (ca - fraction(bT, ce, aa))), (cd + 1)) | |
501 | 504 | } | |
502 | 505 | ||
503 | - | let | |
504 | - | let | |
505 | - | let | |
506 | - | let | |
507 | - | func | |
508 | - | then | |
509 | - | else | |
506 | + | let cf = { | |
507 | + | let aO = aW | |
508 | + | let aP = size(aO) | |
509 | + | let aQ = $Tuple2(nil, 0) | |
510 | + | func aR (aS,aT) = if ((aT >= aP)) | |
511 | + | then aS | |
512 | + | else bZ(aS, aO[aT]) | |
510 | 513 | ||
511 | - | func | |
512 | - | then | |
514 | + | func aU (aS,aT) = if ((aT >= aP)) | |
515 | + | then aS | |
513 | 516 | else throw("List size exceeds 10") | |
514 | 517 | ||
515 | - | | |
518 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
516 | 519 | } | |
517 | - | let | |
518 | - | let | |
519 | - | let | |
520 | - | let | |
521 | - | $Tuple2( | |
520 | + | let cc = cf._1 | |
521 | + | let cd = cf._2 | |
522 | + | let cg = cc[ao] | |
523 | + | let ch = ((cg - bJ(ba, ao, cc, bW)) - 1) | |
524 | + | $Tuple2(ch, (bY - ch)) | |
522 | 525 | } | |
523 | 526 | ||
524 | 527 | ||
525 | - | func | |
526 | - | let | |
527 | - | if ($isInstanceOf( | |
528 | + | func ci (aN) = { | |
529 | + | let I = aN | |
530 | + | if ($isInstanceOf(I, "ByteVector")) | |
528 | 531 | then { | |
529 | - | let | |
530 | - | toBase58String( | |
532 | + | let cj = I | |
533 | + | toBase58String(cj) | |
531 | 534 | } | |
532 | - | else if ($isInstanceOf( | |
535 | + | else if ($isInstanceOf(I, "Unit")) | |
533 | 536 | then { | |
534 | - | let | |
537 | + | let ck = I | |
535 | 538 | "WAVES" | |
536 | 539 | } | |
537 | 540 | else throw("Match error") | |
538 | 541 | } | |
539 | 542 | ||
540 | 543 | ||
541 | - | func | |
542 | - | then $Tuple2("lockNeutrino", | |
543 | - | else $Tuple2("unlockNeutrino", | |
544 | + | func cl (cm,aN) = if (cm) | |
545 | + | then $Tuple2("lockNeutrino", R) | |
546 | + | else $Tuple2("unlockNeutrino", R) | |
544 | 547 | ||
545 | 548 | ||
546 | - | func | |
549 | + | func cn (cm,co,aN) = if (cm) | |
547 | 550 | then { | |
548 | - | let | |
549 | - | let | |
550 | - | let | |
551 | - | $Tuple4( | |
551 | + | let cp = cl(cm, aN) | |
552 | + | let cq = cp._1 | |
553 | + | let cr = cp._2 | |
554 | + | $Tuple4(cq, cr, nil, [AttachedPayment(aN, co)]) | |
552 | 555 | } | |
553 | 556 | else { | |
554 | - | let | |
555 | - | let | |
556 | - | let | |
557 | - | $Tuple4( | |
557 | + | let cs = cl(cm, aN) | |
558 | + | let cq = cs._1 | |
559 | + | let cr = cs._2 | |
560 | + | $Tuple4(cq, cr, [co, toBase58String(aN)], nil) | |
558 | 561 | } | |
559 | 562 | ||
560 | 563 | ||
561 | - | func | |
564 | + | func cm (co,ct) = if (containsElement(W, ct)) | |
562 | 565 | then { | |
563 | - | let | |
564 | - | let | |
565 | - | let | |
566 | - | let | |
567 | - | let | |
568 | - | invoke( | |
566 | + | let cu = cn(true, co, fromBase58String(ct)) | |
567 | + | let cq = cu._1 | |
568 | + | let cv = cu._2 | |
569 | + | let cw = cu._3 | |
570 | + | let cx = cu._4 | |
571 | + | invoke(cv, cq, cw, cx) | |
569 | 572 | } | |
570 | 573 | else 0 | |
571 | 574 | ||
572 | 575 | ||
573 | - | func | |
576 | + | func cy (co,ct) = if (containsElement(W, ct)) | |
574 | 577 | then { | |
575 | - | let | |
576 | - | let | |
577 | - | let | |
578 | - | let | |
579 | - | let | |
580 | - | invoke( | |
578 | + | let cz = cn(false, co, fromBase58String(ct)) | |
579 | + | let cq = cz._1 | |
580 | + | let cv = cz._2 | |
581 | + | let cw = cz._3 | |
582 | + | let cx = cz._4 | |
583 | + | invoke(cv, cq, cw, cx) | |
581 | 584 | } | |
582 | 585 | else 0 | |
583 | 586 | ||
584 | 587 | ||
585 | - | func | |
586 | - | let | |
587 | - | let | |
588 | - | if ($isInstanceOf( | |
588 | + | func cA (aN) = { | |
589 | + | let cB = { | |
590 | + | let I = aN | |
591 | + | if ($isInstanceOf(I, "ByteVector")) | |
589 | 592 | then { | |
590 | - | let | |
591 | - | if (( | |
592 | - | then getInteger( | |
593 | + | let cC = I | |
594 | + | if ((cC == V)) | |
595 | + | then getInteger(R, ((("rpd_balance_" + toBase58String(cC)) + "_") + toString(this))) | |
593 | 596 | else 0 | |
594 | 597 | } | |
595 | - | else if ($isInstanceOf( | |
598 | + | else if ($isInstanceOf(I, "Unit")) | |
596 | 599 | then 0 | |
597 | 600 | else throw("Match error") | |
598 | 601 | } | |
599 | - | let | |
600 | - | if ($isInstanceOf( | |
602 | + | let I = cB | |
603 | + | if ($isInstanceOf(I, "Int")) | |
601 | 604 | then { | |
602 | - | let | |
603 | - | | |
605 | + | let ao = I | |
606 | + | ao | |
604 | 607 | } | |
605 | 608 | else 0 | |
606 | 609 | } | |
607 | 610 | ||
608 | 611 | ||
609 | - | func | |
610 | - | let | |
611 | - | func | |
612 | - | let | |
613 | - | let | |
614 | - | let | |
615 | - | if ( | |
616 | - | then $Tuple2( | |
612 | + | func cD () = { | |
613 | + | let cE = aK() | |
614 | + | func cF (aM,aN) = { | |
615 | + | let cG = aM | |
616 | + | let cH = cG._1 | |
617 | + | let ao = cG._2 | |
618 | + | if (cH) | |
619 | + | then $Tuple2(cH, ao) | |
617 | 620 | else { | |
618 | - | let | |
619 | - | if (( | |
620 | - | then $Tuple2(true, | |
621 | - | else $Tuple2(false, ( | |
621 | + | let cI = (assetBalance(this, fromBase58String(aN)) + cA(fromBase58String(aN))) | |
622 | + | if ((cE[ao] > cI)) | |
623 | + | then $Tuple2(true, ao) | |
624 | + | else $Tuple2(false, (ao + 1)) | |
622 | 625 | } | |
623 | 626 | } | |
624 | 627 | ||
625 | - | let | |
626 | - | let | |
627 | - | let | |
628 | - | func | |
629 | - | then | |
630 | - | else | |
628 | + | let aO = ah | |
629 | + | let aP = size(aO) | |
630 | + | let aQ = $Tuple2(false, 0) | |
631 | + | func aR (aS,aT) = if ((aT >= aP)) | |
632 | + | then aS | |
633 | + | else cF(aS, aO[aT]) | |
631 | 634 | ||
632 | - | func | |
633 | - | then | |
635 | + | func aU (aS,aT) = if ((aT >= aP)) | |
636 | + | then aS | |
634 | 637 | else throw("List size exceeds 10") | |
635 | 638 | ||
636 | - | | |
639 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
637 | 640 | } | |
638 | 641 | ||
639 | 642 | ||
640 | - | func | |
643 | + | func cJ (ao) = aj(("Suspicious state with asset: " + ah[ao])) | |
641 | 644 | ||
642 | 645 | ||
643 | - | func | |
644 | - | func | |
646 | + | func cK (bR,cx) = { | |
647 | + | func cL (aM,cM) = (aM :+ ScriptTransfer(bR, cM.amount, cM.assetId)) | |
645 | 648 | ||
646 | - | let | |
647 | - | let | |
648 | - | let | |
649 | - | func | |
650 | - | then | |
651 | - | else | |
649 | + | let aO = cx | |
650 | + | let aP = size(aO) | |
651 | + | let aQ = nil | |
652 | + | func aR (aS,aT) = if ((aT >= aP)) | |
653 | + | then aS | |
654 | + | else cL(aS, aO[aT]) | |
652 | 655 | ||
653 | - | func | |
654 | - | then | |
656 | + | func aU (aS,aT) = if ((aT >= aP)) | |
657 | + | then aS | |
655 | 658 | else throw("List size exceeds 10") | |
656 | 659 | ||
657 | - | | |
660 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
658 | 661 | } | |
659 | 662 | ||
660 | 663 | ||
661 | - | func | |
662 | - | let | |
663 | - | let | |
664 | - | let | |
665 | - | let | |
666 | - | let | |
667 | - | if (( | |
664 | + | func cN (cO) = { | |
665 | + | let cP = valueOrErrorMessage(getInteger(this, o), "No dAppThresholdCoef key") | |
666 | + | let cQ = 10000 | |
667 | + | let cR = max(cO) | |
668 | + | let cS = min(cO) | |
669 | + | let cT = fraction(cR, cQ, cS) | |
670 | + | if ((cT > (cP * cQ))) | |
668 | 671 | then throw("New balance in assets of the DApp is less than threshold") | |
669 | 672 | else false | |
670 | 673 | } | |
671 | 674 | ||
672 | 675 | ||
673 | - | func | |
674 | - | let | |
675 | - | if ((size( | |
676 | + | func cU (ah) = { | |
677 | + | let cV = split(ah, ",") | |
678 | + | if ((size(cV) > 10)) | |
676 | 679 | then throw("To many coins, max coins size 10") | |
677 | 680 | else { | |
678 | - | func | |
679 | - | let | |
680 | - | let | |
681 | - | if (( | |
681 | + | func cW (cX,aN) = { | |
682 | + | let cY = valueOrErrorMessage(fromBase58String(aN), ("fromBase58String: " + aN)) | |
683 | + | let cZ = valueOrErrorMessage(assetInfo(cY), ("assetInfo: " + aN)).decimals | |
684 | + | if ((cZ != d)) | |
682 | 685 | then throw("wrong decimals") | |
683 | 686 | else false | |
684 | 687 | } | |
685 | 688 | ||
686 | - | let | |
687 | - | let | |
688 | - | let | |
689 | - | func | |
690 | - | then | |
691 | - | else | |
689 | + | let aO = cV | |
690 | + | let aP = size(aO) | |
691 | + | let aQ = false | |
692 | + | func aR (aS,aT) = if ((aT >= aP)) | |
693 | + | then aS | |
694 | + | else cW(aS, aO[aT]) | |
692 | 695 | ||
693 | - | func | |
694 | - | then | |
696 | + | func aU (aS,aT) = if ((aT >= aP)) | |
697 | + | then aS | |
695 | 698 | else throw("List size exceeds 10") | |
696 | 699 | ||
697 | - | | |
700 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
698 | 701 | } | |
699 | 702 | } | |
700 | 703 | ||
701 | 704 | ||
702 | - | @Callable( | |
703 | - | func D ( | |
704 | - | let | |
705 | - | $Tuple2([IntegerEntry("D", | |
705 | + | @Callable(da) | |
706 | + | func D (aW,ba) = { | |
707 | + | let bn = bc(aW, ba) | |
708 | + | $Tuple2([IntegerEntry("D", bn)], bn) | |
706 | 709 | } | |
707 | 710 | ||
708 | 711 | ||
709 | 712 | ||
710 | - | @Callable( | |
711 | - | func init ( | |
713 | + | @Callable(da) | |
714 | + | func init (ah,aF,db) = if (!(isDataStorageUntouched(this))) | |
712 | 715 | then throw("Already initialized") | |
713 | - | else if ((0 >= | |
716 | + | else if ((0 >= aF)) | |
714 | 717 | then throw("Amp must be must > 0") | |
715 | - | else if ((0 >= | |
718 | + | else if ((0 >= db)) | |
716 | 719 | then throw("dApp Threshold Coef must be > 0") | |
717 | 720 | else { | |
718 | - | let | |
719 | - | let | |
720 | - | let | |
721 | - | let | |
722 | - | if ( | |
721 | + | let dc = "s_Multi_USD" | |
722 | + | let dd = ("ShareToken of SwopFi protocol for MultiStable USD pool at address " + toString(this)) | |
723 | + | let de = Issue(dc, dd, 0, 6, true) | |
724 | + | let df = calculateAssetId(de) | |
725 | + | if (cU(ah)) | |
723 | 726 | then throw() | |
724 | - | else [StringEntry(g, f), StringEntry(h, | |
727 | + | else [StringEntry(g, f), StringEntry(h, ah), IntegerEntry("initial_A", aF), IntegerEntry("future_A", aF), IntegerEntry(n, getIntegerValue(F, "base_fee_flat")), StringEntry(l, toBase58String(df)), IntegerEntry(m, 0), IntegerEntry(o, db), BooleanEntry(j, true), de] | |
725 | 728 | } | |
726 | 729 | ||
727 | 730 | ||
728 | 731 | ||
729 | - | @Callable( | |
730 | - | func addLiquidity ( | |
731 | - | let | |
732 | - | let | |
733 | - | let | |
732 | + | @Callable(da) | |
733 | + | func addLiquidity (dg,dh,di) = valueOrElse(am(), { | |
734 | + | let ba = aF() | |
735 | + | let aW = aK() | |
736 | + | let bV = if ((Z == 0)) | |
734 | 737 | then 0 | |
735 | - | else | |
736 | - | let | |
737 | - | let | |
738 | - | func | |
739 | - | then throw(("payments size > " + toString( | |
740 | - | else if ((1 > | |
738 | + | else bq(aW, ba) | |
739 | + | let cx = da.payments | |
740 | + | let dj = size(cx) | |
741 | + | func dk (dl) = if ((dj > ai)) | |
742 | + | then throw(("payments size > " + toString(ai))) | |
743 | + | else if ((1 > dj)) | |
741 | 744 | then throw("payments size < 1") | |
742 | - | else if (if (( | |
743 | - | then ( | |
745 | + | else if (if ((Z == 0)) | |
746 | + | then (ai != dj) | |
744 | 747 | else false) | |
745 | 748 | then throw("initial deposit requires all coins") | |
746 | 749 | else { | |
747 | - | func | |
750 | + | func dm (aM,cM) = if (containsElement(ah, ci(cM.assetId))) | |
748 | 751 | then true | |
749 | 752 | else throw("Invalid asset in payment") | |
750 | 753 | ||
751 | - | let | |
752 | - | let | |
753 | - | let | |
754 | - | func | |
755 | - | then | |
756 | - | else | |
754 | + | let aO = cx | |
755 | + | let aP = size(aO) | |
756 | + | let aQ = false | |
757 | + | func aR (aS,aT) = if ((aT >= aP)) | |
758 | + | then aS | |
759 | + | else dm(aS, aO[aT]) | |
757 | 760 | ||
758 | - | func | |
759 | - | then | |
761 | + | func aU (aS,aT) = if ((aT >= aP)) | |
762 | + | then aS | |
760 | 763 | else throw("List size exceeds 10") | |
761 | 764 | ||
762 | - | | |
765 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
763 | 766 | } | |
764 | 767 | ||
765 | - | if (!( | |
768 | + | if (!(dk(dj))) | |
766 | 769 | then throw() | |
767 | 770 | else { | |
768 | - | let | |
769 | - | if ( | |
770 | - | then (cH | |
771 | + | let cH = cD() | |
772 | + | if (cH._1) | |
773 | + | then (cJ(cH._2) ++ cK(da.caller, cx)) | |
771 | 774 | else { | |
772 | - | func | |
773 | - | let | |
774 | - | let | |
775 | - | let | |
776 | - | func | |
777 | - | then ( | |
778 | - | else | |
775 | + | func cL (aM,aN) = { | |
776 | + | let dn = aM | |
777 | + | let cO = dn._1 | |
778 | + | let ao = dn._2 | |
779 | + | func do (dp,cM) = if ((ci(cM.assetId) == aN)) | |
780 | + | then (dp + cM.amount) | |
781 | + | else dp | |
779 | 782 | ||
780 | - | let | |
781 | - | let | |
782 | - | let | |
783 | - | let | |
784 | - | func | |
785 | - | then | |
786 | - | else | |
783 | + | let dq = { | |
784 | + | let aO = cx | |
785 | + | let aP = size(aO) | |
786 | + | let aQ = aW[ao] | |
787 | + | func aR (aS,aT) = if ((aT >= aP)) | |
788 | + | then aS | |
789 | + | else do(aS, aO[aT]) | |
787 | 790 | ||
788 | - | func | |
789 | - | then | |
791 | + | func aU (aS,aT) = if ((aT >= aP)) | |
792 | + | then aS | |
790 | 793 | else throw("List size exceeds 10") | |
791 | 794 | ||
792 | - | | |
795 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
793 | 796 | } | |
794 | - | $Tuple2(( | |
797 | + | $Tuple2((cO :+ dq), (ao + 1)) | |
795 | 798 | } | |
796 | 799 | ||
797 | - | let | |
798 | - | let | |
799 | - | let | |
800 | - | let | |
801 | - | func | |
802 | - | then | |
803 | - | else | |
800 | + | let dr = { | |
801 | + | let aO = ah | |
802 | + | let aP = size(aO) | |
803 | + | let aQ = $Tuple2(nil, 0) | |
804 | + | func aR (aS,aT) = if ((aT >= aP)) | |
805 | + | then aS | |
806 | + | else cL(aS, aO[aT]) | |
804 | 807 | ||
805 | - | func | |
806 | - | then | |
808 | + | func aU (aS,aT) = if ((aT >= aP)) | |
809 | + | then aS | |
807 | 810 | else throw("List size exceeds 10") | |
808 | 811 | ||
809 | - | | |
812 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
810 | 813 | } | |
811 | - | let | |
812 | - | let | |
813 | - | if ( | |
814 | + | let cO = dr._1 | |
815 | + | let ds = dr._2 | |
816 | + | if (cN(cO)) | |
814 | 817 | then throw() | |
815 | 818 | else { | |
816 | - | let | |
817 | - | if ( | |
819 | + | let bW = bq(cO, ba) | |
820 | + | if (av((bW > bV))) | |
818 | 821 | then throw("D1 > D0") | |
819 | 822 | else { | |
820 | - | let | |
821 | - | func | |
822 | - | let | |
823 | - | let | |
824 | - | let | |
825 | - | let | |
826 | - | if (( | |
823 | + | let bS = ax(da.caller) | |
824 | + | func dt (aM,dp) = { | |
825 | + | let du = aM | |
826 | + | let dv = du._1 | |
827 | + | let dw = du._2 | |
828 | + | let ao = du._3 | |
829 | + | if ((Z > 0)) | |
827 | 830 | then { | |
828 | - | let | |
829 | - | let | |
830 | - | let | |
831 | - | let | |
832 | - | then ( | |
833 | - | else ( | |
834 | - | fraction( | |
831 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
832 | + | let dx = { | |
833 | + | let dy = fraction(bW, aW[ao], bV) | |
834 | + | let dz = if ((dy > dp)) | |
835 | + | then (dy - dp) | |
836 | + | else (dp - dy) | |
837 | + | fraction(bT, dz, aa) | |
835 | 838 | } | |
836 | - | let | |
837 | - | let | |
838 | - | let | |
839 | - | let | |
840 | - | let | |
841 | - | let | |
842 | - | then | |
843 | - | else | |
844 | - | if (( | |
839 | + | let dA = fraction(dx, ac, aa) | |
840 | + | let dB = (dp - dx) | |
841 | + | let dC = (dp - dx) | |
842 | + | let dD = (dp - aW[ao]) | |
843 | + | let dE = (dx - dA) | |
844 | + | let dF = if ((dD > 0)) | |
845 | + | then cm((dD - dx), ah[ao]) | |
846 | + | else cy(dx, ah[ao]) | |
847 | + | if ((dF == dF)) | |
845 | 848 | then { | |
846 | - | let | |
847 | - | then invoke( | |
849 | + | let dG = if ((dE > 0)) | |
850 | + | then invoke(U, "airDrop", nil, [AttachedPayment(fromBase58String(ah[ao]), dE)]) | |
848 | 851 | else 0 | |
849 | - | if (( | |
850 | - | then $Tuple3(( | |
852 | + | if ((dG == dG)) | |
853 | + | then $Tuple3((dv :+ dC), (dw ++ [ScriptTransfer(P, dA, fromBase58String(ah[ao])), IntegerEntry((ah[ao] + i), dB)]), (ao + 1)) | |
851 | 854 | else throw("Strict value is not equal to itself.") | |
852 | 855 | } | |
853 | 856 | else throw("Strict value is not equal to itself.") | |
854 | 857 | } | |
855 | 858 | else { | |
856 | - | let | |
857 | - | if (( | |
858 | - | then $Tuple3(( | |
859 | + | let dF = cm(dp, ah[ao]) | |
860 | + | if ((dF == dF)) | |
861 | + | then $Tuple3((dv :+ dp), (dw :+ IntegerEntry((ah[ao] + i), dp)), (ao + 1)) | |
859 | 862 | else throw("Strict value is not equal to itself.") | |
860 | 863 | } | |
861 | 864 | } | |
862 | 865 | ||
863 | - | let | |
864 | - | let | |
865 | - | let | |
866 | - | let | |
867 | - | func | |
868 | - | then | |
869 | - | else | |
866 | + | let dH = { | |
867 | + | let aO = cO | |
868 | + | let aP = size(aO) | |
869 | + | let aQ = $Tuple3(nil, nil, 0) | |
870 | + | func bl (aS,aT) = if ((aT >= aP)) | |
871 | + | then aS | |
872 | + | else dt(aS, aO[aT]) | |
870 | 873 | ||
871 | - | func | |
872 | - | then | |
874 | + | func bm (aS,aT) = if ((aT >= aP)) | |
875 | + | then aS | |
873 | 876 | else throw("List size exceeds 10") | |
874 | 877 | ||
875 | - | | |
878 | + | bm(bl(bl(bl(bl(bl(bl(bl(bl(bl(bl(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
876 | 879 | } | |
877 | - | let | |
878 | - | let | |
879 | - | let | |
880 | - | let | |
881 | - | then | |
882 | - | else fraction( | |
883 | - | if ( | |
880 | + | let dv = dH._1 | |
881 | + | let dw = dH._2 | |
882 | + | let dI = bq(dv, ba) | |
883 | + | let dJ = if ((Z == 0)) | |
884 | + | then bW | |
885 | + | else fraction(Z, (dI - bV), bV) | |
886 | + | if (av((dJ >= dg))) | |
884 | 887 | then throw("Slippage screwed you") | |
885 | - | else if ( | |
888 | + | else if (dh) | |
886 | 889 | then { | |
887 | - | let | |
888 | - | if (( | |
890 | + | let dK = invoke(this, "reissueShare", [dJ], nil) | |
891 | + | if ((dK == dK)) | |
889 | 892 | then { | |
890 | - | let | |
891 | - | if (( | |
892 | - | then ( | |
893 | + | let dL = invoke(T, "lockShareTokens", [toString(this), di], [AttachedPayment(Y, dJ)]) | |
894 | + | if ((dL == dL)) | |
895 | + | then (dw :+ IntegerEntry(m, (Z + dJ))) | |
893 | 896 | else throw("Strict value is not equal to itself.") | |
894 | 897 | } | |
895 | 898 | else throw("Strict value is not equal to itself.") | |
896 | 899 | } | |
897 | - | else ( | |
900 | + | else (dw ++ [Reissue(Y, dJ, true), ScriptTransfer(da.caller, dJ, Y), IntegerEntry(m, (Z + dJ))]) | |
898 | 901 | } | |
899 | 902 | } | |
900 | 903 | } | |
901 | 904 | } | |
902 | 905 | }) | |
903 | 906 | ||
904 | 907 | ||
905 | 908 | ||
906 | - | @Callable( | |
907 | - | func calcMintAmount ( | |
908 | - | let | |
909 | - | let | |
910 | - | let | |
911 | - | if (( | |
912 | - | then $Tuple2(nil, | |
909 | + | @Callable(da) | |
910 | + | func calcMintAmount (cO,az) = { | |
911 | + | let ba = aF() | |
912 | + | let aW = aK() | |
913 | + | let bW = bq(cO, ba) | |
914 | + | if ((Z == 0)) | |
915 | + | then $Tuple2(nil, bW) | |
913 | 916 | else { | |
914 | - | let | |
915 | - | let | |
916 | - | func | |
917 | - | let | |
918 | - | let | |
919 | - | let | |
920 | - | let | |
921 | - | let | |
922 | - | let | |
923 | - | let | |
924 | - | then ( | |
925 | - | else ( | |
926 | - | fraction( | |
917 | + | let bV = bq(aW, ba) | |
918 | + | let bS = ax(az) | |
919 | + | func dM (aM,dp) = { | |
920 | + | let dN = aM | |
921 | + | let dv = dN._1 | |
922 | + | let ao = dN._2 | |
923 | + | let bT = ((fraction(ab, bS, aa, CEILING) * ai) / (4 * (ai - 1))) | |
924 | + | let dx = { | |
925 | + | let dy = fraction(bW, aW[ao], bV) | |
926 | + | let dz = if ((dy > dp)) | |
927 | + | then (dy - dp) | |
928 | + | else (dp - dy) | |
929 | + | fraction(bT, dz, aa) | |
927 | 930 | } | |
928 | - | let | |
929 | - | $Tuple2(( | |
931 | + | let dC = (dp - dx) | |
932 | + | $Tuple2((dv :+ dC), (ao + 1)) | |
930 | 933 | } | |
931 | 934 | ||
932 | - | let | |
933 | - | let | |
934 | - | let | |
935 | - | let | |
936 | - | func | |
937 | - | then | |
938 | - | else | |
935 | + | let dO = { | |
936 | + | let aO = cO | |
937 | + | let aP = size(aO) | |
938 | + | let aQ = $Tuple2(nil, 0) | |
939 | + | func aR (aS,aT) = if ((aT >= aP)) | |
940 | + | then aS | |
941 | + | else dM(aS, aO[aT]) | |
939 | 942 | ||
940 | - | func | |
941 | - | then | |
943 | + | func aU (aS,aT) = if ((aT >= aP)) | |
944 | + | then aS | |
942 | 945 | else throw("List size exceeds 10") | |
943 | 946 | ||
944 | - | | |
947 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
945 | 948 | } | |
946 | - | let | |
947 | - | let | |
948 | - | let | |
949 | - | let | |
950 | - | $Tuple2(nil, | |
949 | + | let dv = dO._1 | |
950 | + | let ds = dO._2 | |
951 | + | let dI = bq(dv, ba) | |
952 | + | let dP = fraction(Z, (dI - bV), bV) | |
953 | + | $Tuple2(nil, dP) | |
951 | 954 | } | |
952 | 955 | } | |
953 | 956 | ||
954 | 957 | ||
955 | 958 | ||
956 | - | @Callable( | |
957 | - | func reissueShare ( | |
959 | + | @Callable(da) | |
960 | + | func reissueShare (co) = valueOrElse(ap(da), [Reissue(Y, co, true)]) | |
958 | 961 | ||
959 | 962 | ||
960 | 963 | ||
961 | - | @Callable( | |
962 | - | func getDy ( | |
963 | - | let | |
964 | - | let | |
965 | - | let | |
966 | - | let | |
967 | - | let | |
968 | - | let | |
969 | - | let | |
970 | - | let | |
971 | - | $Tuple2(nil, $Tuple2(( | |
964 | + | @Callable(da) | |
965 | + | func getDy (dQ,dR,dS,dT) = { | |
966 | + | let aW = aK() | |
967 | + | let dU = valueOrErrorMessage(indexOf(ah, dQ), "unknown token in") | |
968 | + | let dV = valueOrErrorMessage(indexOf(ah, dR), "unknown token out") | |
969 | + | let bu = (aW[dU] + dS) | |
970 | + | let bH = br(dU, dV, bu, aW) | |
971 | + | let ch = ((aW[dV] - bH) - 1) | |
972 | + | let bS = ax(Address(fromBase58String(dT))) | |
973 | + | let bT = fraction(fraction(ab, bS, aa, CEILING), ch, aa) | |
974 | + | $Tuple2(nil, $Tuple2((ch - bT), bT)) | |
972 | 975 | } | |
973 | 976 | ||
974 | 977 | ||
975 | 978 | ||
976 | - | @Callable( | |
977 | - | func exchange ( | |
979 | + | @Callable(da) | |
980 | + | func exchange (dW,dX) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
978 | 981 | then throw("size(payments) != 1") | |
979 | 982 | else { | |
980 | - | let | |
981 | - | if ( | |
982 | - | then (cH | |
983 | + | let cH = cD() | |
984 | + | if (cH._1) | |
985 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
983 | 986 | else { | |
984 | - | let | |
985 | - | let | |
986 | - | let | |
987 | - | let | |
988 | - | let | |
989 | - | let | |
990 | - | let | |
991 | - | let | |
992 | - | let | |
993 | - | let | |
994 | - | let | |
995 | - | let | |
996 | - | let | |
997 | - | let | |
998 | - | if ( | |
987 | + | let cM = da.payments[0] | |
988 | + | let dY = ci(cM.assetId) | |
989 | + | let dZ = fromBase58String(dW) | |
990 | + | let dS = cM.amount | |
991 | + | let dU = valueOrErrorMessage(indexOf(ah, dY), "unknown token in") | |
992 | + | let dV = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
993 | + | let aW = aK() | |
994 | + | let bu = (aW[dU] + dS) | |
995 | + | let bH = br(dU, dV, bu, aW) | |
996 | + | let ea = ((aW[dV] - bH) - 1) | |
997 | + | let bS = ax(da.originCaller) | |
998 | + | let bT = fraction(ea, fraction(ab, bS, aa, CEILING), aa) | |
999 | + | let ch = (ea - bT) | |
1000 | + | let dA = fraction(bT, ac, aa) | |
1001 | + | if (av((ch >= dX))) | |
999 | 1002 | then throw("Exchange resulted in fewer coins than expected") | |
1000 | 1003 | else { | |
1001 | - | func | |
1002 | - | let | |
1003 | - | let | |
1004 | - | let | |
1005 | - | if (( | |
1006 | - | then $Tuple2(( | |
1007 | - | else if (( | |
1008 | - | then $Tuple2(( | |
1009 | - | else $Tuple2(( | |
1004 | + | func eb (aM,ec) = { | |
1005 | + | let ed = aM | |
1006 | + | let cO = ed._1 | |
1007 | + | let ao = ed._2 | |
1008 | + | if ((ao == dU)) | |
1009 | + | then $Tuple2((cO :+ (ec + dS)), (ao + 1)) | |
1010 | + | else if ((ao == dV)) | |
1011 | + | then $Tuple2((cO :+ (ec - ea)), (ao + 1)) | |
1012 | + | else $Tuple2((cO :+ ec), (ao + 1)) | |
1010 | 1013 | } | |
1011 | 1014 | ||
1012 | - | let | |
1013 | - | let | |
1014 | - | let | |
1015 | - | let | |
1016 | - | func | |
1017 | - | then | |
1018 | - | else | |
1015 | + | let ee = { | |
1016 | + | let aO = aW | |
1017 | + | let aP = size(aO) | |
1018 | + | let aQ = $Tuple2(nil, 0) | |
1019 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1020 | + | then aS | |
1021 | + | else eb(aS, aO[aT]) | |
1019 | 1022 | ||
1020 | - | func | |
1021 | - | then | |
1023 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1024 | + | then aS | |
1022 | 1025 | else throw("List size exceeds 10") | |
1023 | 1026 | ||
1024 | - | | |
1027 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1025 | 1028 | } | |
1026 | - | let | |
1027 | - | let | |
1028 | - | if ( | |
1029 | + | let cO = ee._1 | |
1030 | + | let ao = ee._2 | |
1031 | + | if (cN(cO)) | |
1029 | 1032 | then throw() | |
1030 | 1033 | else { | |
1031 | - | let | |
1032 | - | if (( | |
1034 | + | let dL = cm(cM.amount, ci(cM.assetId)) | |
1035 | + | if ((dL == dL)) | |
1033 | 1036 | then { | |
1034 | - | let | |
1035 | - | if (( | |
1037 | + | let ef = cy(ea, dW) | |
1038 | + | if ((ef == ef)) | |
1036 | 1039 | then { | |
1037 | - | let | |
1038 | - | let | |
1039 | - | then invoke( | |
1040 | + | let dE = (bT - dA) | |
1041 | + | let dG = if ((dE > 0)) | |
1042 | + | then invoke(U, "airDrop", nil, [AttachedPayment(dZ, dE)]) | |
1040 | 1043 | else 0 | |
1041 | - | if (( | |
1042 | - | then $Tuple2([IntegerEntry(( | |
1044 | + | if ((dG == dG)) | |
1045 | + | then $Tuple2([IntegerEntry((dY + i), bu), IntegerEntry((dW + i), (aW[dV] - ea)), ScriptTransfer(da.caller, ch, dZ), ScriptTransfer(P, dA, dZ)], [ch, dZ]) | |
1043 | 1046 | else throw("Strict value is not equal to itself.") | |
1044 | 1047 | } | |
1045 | 1048 | else throw("Strict value is not equal to itself.") | |
1046 | 1049 | } | |
1047 | 1050 | else throw("Strict value is not equal to itself.") | |
1048 | 1051 | } | |
1049 | 1052 | } | |
1050 | 1053 | } | |
1051 | 1054 | }) | |
1052 | 1055 | ||
1053 | 1056 | ||
1054 | 1057 | ||
1055 | - | @Callable( | |
1056 | - | func withdraw ( | |
1058 | + | @Callable(da) | |
1059 | + | func withdraw (eg) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
1057 | 1060 | then throw("size(payments) != 1") | |
1058 | 1061 | else { | |
1059 | - | let | |
1060 | - | let | |
1061 | - | if (( | |
1062 | + | let eh = da.payments[0].amount | |
1063 | + | let ei = da.payments[0].assetId | |
1064 | + | if ((Y != ei)) | |
1062 | 1065 | then throw("unknown payment token") | |
1063 | 1066 | else { | |
1064 | - | let | |
1065 | - | if ( | |
1066 | - | then (cH | |
1067 | + | let cH = cD() | |
1068 | + | if (cH._1) | |
1069 | + | then (cJ(cH._2) ++ cK(da.originCaller, da.payments)) | |
1067 | 1070 | else { | |
1068 | - | func | |
1069 | - | let | |
1070 | - | let | |
1071 | - | let | |
1072 | - | let | |
1073 | - | if ( | |
1071 | + | func dt (aM,ej) = { | |
1072 | + | let ek = aM | |
1073 | + | let dw = ek._1 | |
1074 | + | let ao = ek._2 | |
1075 | + | let el = fraction(ej, eh, Z) | |
1076 | + | if (av((el >= eg[ao]))) | |
1074 | 1077 | then throw("Withdrawal resulted in fewer coins than expected") | |
1075 | 1078 | else { | |
1076 | - | let | |
1077 | - | if (( | |
1078 | - | then $Tuple2(( | |
1079 | + | let ef = cy(el, ah[ao]) | |
1080 | + | if ((ef == ef)) | |
1081 | + | then $Tuple2((dw ++ [IntegerEntry((ah[ao] + i), (ej - el)), ScriptTransfer(da.originCaller, el, fromBase58String(ah[ao]))]), (ao + 1)) | |
1079 | 1082 | else throw("Strict value is not equal to itself.") | |
1080 | 1083 | } | |
1081 | 1084 | } | |
1082 | 1085 | ||
1083 | - | let | |
1084 | - | let | |
1085 | - | let | |
1086 | - | let | |
1087 | - | func | |
1088 | - | then | |
1089 | - | else | |
1086 | + | let em = { | |
1087 | + | let aO = aK() | |
1088 | + | let aP = size(aO) | |
1089 | + | let aQ = $Tuple2(nil, 0) | |
1090 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1091 | + | then aS | |
1092 | + | else dt(aS, aO[aT]) | |
1090 | 1093 | ||
1091 | - | func | |
1092 | - | then | |
1094 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1095 | + | then aS | |
1093 | 1096 | else throw("List size exceeds 10") | |
1094 | 1097 | ||
1095 | - | | |
1098 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1096 | 1099 | } | |
1097 | - | let | |
1098 | - | let | |
1099 | - | ( | |
1100 | + | let dw = em._1 | |
1101 | + | let ao = em._2 | |
1102 | + | (dw ++ [Burn(Y, eh), IntegerEntry(m, (Z - eh))]) | |
1100 | 1103 | } | |
1101 | 1104 | } | |
1102 | 1105 | }) | |
1103 | 1106 | ||
1104 | 1107 | ||
1105 | 1108 | ||
1106 | - | @Callable( | |
1107 | - | func withdrawWithUnlock ( | |
1109 | + | @Callable(da) | |
1110 | + | func withdrawWithUnlock (eg,en) = valueOrElse(am(), if ((0 >= en)) | |
1108 | 1111 | then throw("Unlock amount must be positive") | |
1109 | 1112 | else { | |
1110 | - | let | |
1111 | - | if ( | |
1112 | - | then (cH | |
1113 | + | let cH = cD() | |
1114 | + | if (cH._1) | |
1115 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
1113 | 1116 | else { | |
1114 | - | let | |
1115 | - | then if ((size( | |
1117 | + | let eh = if ((size(da.payments) > 0)) | |
1118 | + | then if ((size(da.payments) != 1)) | |
1116 | 1119 | then throw("size(payments) != 1") | |
1117 | 1120 | else { | |
1118 | - | let | |
1119 | - | if (( | |
1121 | + | let ei = da.payments[0].assetId | |
1122 | + | if ((Y != ei)) | |
1120 | 1123 | then throw("unknown payment token") | |
1121 | - | else | |
1124 | + | else da.payments[0].amount | |
1122 | 1125 | } | |
1123 | 1126 | else 0 | |
1124 | - | let | |
1125 | - | if (( | |
1127 | + | let eo = invoke(T, "withdrawShareTokens", [toString(this), en], nil) | |
1128 | + | if ((eo == eo)) | |
1126 | 1129 | then { | |
1127 | - | let | |
1128 | - | let | |
1129 | - | if (( | |
1130 | + | let ep = (eh + en) | |
1131 | + | let dF = invoke(this, "withdraw", [eg], [AttachedPayment(Y, ep)]) | |
1132 | + | if ((dF == dF)) | |
1130 | 1133 | then nil | |
1131 | 1134 | else throw("Strict value is not equal to itself.") | |
1132 | 1135 | } | |
1133 | 1136 | else throw("Strict value is not equal to itself.") | |
1134 | 1137 | } | |
1135 | 1138 | }) | |
1136 | 1139 | ||
1137 | 1140 | ||
1138 | 1141 | ||
1139 | - | @Callable( | |
1140 | - | func calcWithdrawOneCoin ( | |
1142 | + | @Callable(da) | |
1143 | + | func calcWithdrawOneCoin (eq,dW,az) = if ((0 >= eq)) | |
1141 | 1144 | then throw("Amount must be positive") | |
1142 | 1145 | else { | |
1143 | - | let | |
1144 | - | $Tuple2(nil, | |
1146 | + | let ao = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
1147 | + | $Tuple2(nil, bP(aK(), eq, ao, Address(fromBase58String(az)))._1) | |
1145 | 1148 | } | |
1146 | 1149 | ||
1147 | 1150 | ||
1148 | 1151 | ||
1149 | - | @Callable( | |
1150 | - | func withdrawOneCoin ( | |
1152 | + | @Callable(da) | |
1153 | + | func withdrawOneCoin (dW,er) = valueOrElse(am(), if ((size(da.payments) != 1)) | |
1151 | 1154 | then throw("size(payments) != 1") | |
1152 | 1155 | else { | |
1153 | - | let | |
1154 | - | if ( | |
1155 | - | then (cH | |
1156 | + | let cH = cD() | |
1157 | + | if (cH._1) | |
1158 | + | then (cJ(cH._2) ++ cK(da.originCaller, da.payments)) | |
1156 | 1159 | else { | |
1157 | - | let | |
1158 | - | let | |
1159 | - | if (( | |
1160 | + | let eh = da.payments[0].amount | |
1161 | + | let ei = da.payments[0].assetId | |
1162 | + | if ((ei != Y)) | |
1160 | 1163 | then throw("unknown token") | |
1161 | 1164 | else { | |
1162 | - | let | |
1163 | - | let | |
1164 | - | let | |
1165 | - | let | |
1166 | - | let | |
1167 | - | let | |
1168 | - | if ( | |
1165 | + | let es = valueOrErrorMessage(indexOf(ah, dW), "unknown token out") | |
1166 | + | let dZ = fromBase58String(dW) | |
1167 | + | let aW = aK() | |
1168 | + | let et = bP(aW, eh, es, da.originCaller) | |
1169 | + | let ch = et._1 | |
1170 | + | let eu = et._2 | |
1171 | + | if (av((ch >= er))) | |
1169 | 1172 | then throw("Not enough coins removed") | |
1170 | 1173 | else { | |
1171 | - | let | |
1172 | - | let | |
1173 | - | func | |
1174 | - | let | |
1175 | - | let | |
1176 | - | let | |
1177 | - | if (( | |
1178 | - | then $Tuple2(( | |
1179 | - | else $Tuple2(( | |
1174 | + | let dA = fraction(eu, ac, aa) | |
1175 | + | let ev = (ch + eu) | |
1176 | + | func eb (aM,ec) = { | |
1177 | + | let ew = aM | |
1178 | + | let cO = ew._1 | |
1179 | + | let ao = ew._2 | |
1180 | + | if ((ao == es)) | |
1181 | + | then $Tuple2((cO :+ (ec - ev)), (ao + 1)) | |
1182 | + | else $Tuple2((cO :+ ec), (ao + 1)) | |
1180 | 1183 | } | |
1181 | 1184 | ||
1182 | - | let | |
1183 | - | let | |
1184 | - | let | |
1185 | - | let | |
1186 | - | func | |
1187 | - | then | |
1188 | - | else | |
1185 | + | let ex = { | |
1186 | + | let aO = aW | |
1187 | + | let aP = size(aO) | |
1188 | + | let aQ = $Tuple2(nil, 0) | |
1189 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1190 | + | then aS | |
1191 | + | else eb(aS, aO[aT]) | |
1189 | 1192 | ||
1190 | - | func | |
1191 | - | then | |
1193 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1194 | + | then aS | |
1192 | 1195 | else throw("List size exceeds 10") | |
1193 | 1196 | ||
1194 | - | | |
1197 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1195 | 1198 | } | |
1196 | - | let | |
1197 | - | let | |
1198 | - | if ( | |
1199 | + | let cO = ex._1 | |
1200 | + | let ey = ex._2 | |
1201 | + | if (cN(cO)) | |
1199 | 1202 | then throw() | |
1200 | 1203 | else { | |
1201 | - | let | |
1202 | - | if (( | |
1204 | + | let ef = cy(ev, dW) | |
1205 | + | if ((ef == ef)) | |
1203 | 1206 | then { | |
1204 | - | let | |
1205 | - | let | |
1206 | - | then invoke( | |
1207 | + | let dE = (eu - dA) | |
1208 | + | let dG = if ((dE > 0)) | |
1209 | + | then invoke(U, "airDrop", nil, [AttachedPayment(dZ, dE)]) | |
1207 | 1210 | else 0 | |
1208 | - | if (( | |
1209 | - | then [ScriptTransfer( | |
1211 | + | if ((dG == dG)) | |
1212 | + | then [ScriptTransfer(da.originCaller, ch, dZ), IntegerEntry((ah[es] + i), (aW[es] - ev)), Burn(Y, eh), ScriptTransfer(P, dA, dZ), IntegerEntry(m, (Z - eh))] | |
1210 | 1213 | else throw("Strict value is not equal to itself.") | |
1211 | 1214 | } | |
1212 | 1215 | else throw("Strict value is not equal to itself.") | |
1213 | 1216 | } | |
1214 | 1217 | } | |
1215 | 1218 | } | |
1216 | 1219 | } | |
1217 | 1220 | }) | |
1218 | 1221 | ||
1219 | 1222 | ||
1220 | 1223 | ||
1221 | - | @Callable( | |
1222 | - | func withdrawOneCoinWithUnlock ( | |
1224 | + | @Callable(da) | |
1225 | + | func withdrawOneCoinWithUnlock (dW,er,en) = valueOrElse(am(), if ((0 >= en)) | |
1223 | 1226 | then throw("Unlock amount must be positive") | |
1224 | 1227 | else { | |
1225 | - | let | |
1226 | - | if ( | |
1227 | - | then (cH | |
1228 | + | let cH = cD() | |
1229 | + | if (cH._1) | |
1230 | + | then (cJ(cH._2) ++ cK(da.caller, da.payments)) | |
1228 | 1231 | else { | |
1229 | - | let | |
1230 | - | then if ((size( | |
1232 | + | let eh = if ((size(da.payments) > 0)) | |
1233 | + | then if ((size(da.payments) != 1)) | |
1231 | 1234 | then throw("size(payments) != 1") | |
1232 | 1235 | else { | |
1233 | - | let | |
1234 | - | if (( | |
1236 | + | let ei = da.payments[0].assetId | |
1237 | + | if ((Y != ei)) | |
1235 | 1238 | then throw("unknown payment token") | |
1236 | - | else | |
1239 | + | else da.payments[0].amount | |
1237 | 1240 | } | |
1238 | 1241 | else 0 | |
1239 | - | let | |
1240 | - | if (( | |
1242 | + | let eo = invoke(T, "withdrawShareTokens", [toString(this), en], nil) | |
1243 | + | if ((eo == eo)) | |
1241 | 1244 | then { | |
1242 | - | let | |
1243 | - | let | |
1244 | - | if (( | |
1245 | + | let ep = (eh + en) | |
1246 | + | let dF = invoke(this, "withdrawOneCoin", [dW, er], [AttachedPayment(Y, ep)]) | |
1247 | + | if ((dF == dF)) | |
1245 | 1248 | then nil | |
1246 | 1249 | else throw("Strict value is not equal to itself.") | |
1247 | 1250 | } | |
1248 | 1251 | else throw("Strict value is not equal to itself.") | |
1249 | 1252 | } | |
1250 | 1253 | }) | |
1251 | 1254 | ||
1252 | 1255 | ||
1253 | 1256 | ||
1254 | - | @Callable( | |
1255 | - | func A () = $Tuple2(nil, | |
1257 | + | @Callable(da) | |
1258 | + | func A () = $Tuple2(nil, aF()) | |
1256 | 1259 | ||
1257 | 1260 | ||
1258 | 1261 | ||
1259 | - | @Callable( | |
1262 | + | @Callable(da) | |
1260 | 1263 | func getVirtualPrice () = { | |
1261 | - | let | |
1262 | - | $Tuple2(nil, fraction( | |
1264 | + | let bn = aZ(aK(), aF()) | |
1265 | + | $Tuple2(nil, fraction(bn, a, Z)) | |
1263 | 1266 | } | |
1264 | 1267 | ||
1265 | 1268 | ||
1266 | 1269 | ||
1267 | - | @Callable( | |
1268 | - | func calcTokenAmount ( | |
1269 | - | let | |
1270 | - | let | |
1271 | - | let | |
1272 | - | func | |
1273 | - | let | |
1274 | - | let | |
1275 | - | let | |
1276 | - | let | |
1277 | - | then | |
1278 | - | else -( | |
1279 | - | $Tuple2(( | |
1270 | + | @Callable(da) | |
1271 | + | func calcTokenAmount (ez,eA) = { | |
1272 | + | let ba = aF() | |
1273 | + | let eB = aK() | |
1274 | + | let bV = bq(eB, ba) | |
1275 | + | func eC (aM,ej) = { | |
1276 | + | let eD = aM | |
1277 | + | let cO = eD._1 | |
1278 | + | let ao = eD._2 | |
1279 | + | let dp = (ej + (if (eA) | |
1280 | + | then ez[ao] | |
1281 | + | else -(ez[ao]))) | |
1282 | + | $Tuple2((cO :+ dp), (ao + 1)) | |
1280 | 1283 | } | |
1281 | 1284 | ||
1282 | - | let | |
1283 | - | let | |
1284 | - | let | |
1285 | - | func | |
1286 | - | then | |
1287 | - | else | |
1285 | + | let cO = ( let aO = eB | |
1286 | + | let aP = size(aO) | |
1287 | + | let aQ = $Tuple2(nil, 0) | |
1288 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1289 | + | then aS | |
1290 | + | else eC(aS, aO[aT]) | |
1288 | 1291 | ||
1289 | - | func | |
1290 | - | then | |
1292 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1293 | + | then aS | |
1291 | 1294 | else throw("List size exceeds 10") | |
1292 | 1295 | ||
1293 | - | | |
1294 | - | let | |
1295 | - | let | |
1296 | - | then ( | |
1297 | - | else ( | |
1298 | - | $Tuple2(nil, fraction( | |
1296 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10))._1 | |
1297 | + | let bW = bq(cO, ba) | |
1298 | + | let eE = if (eA) | |
1299 | + | then (bW - bV) | |
1300 | + | else (bV - bW) | |
1301 | + | $Tuple2(nil, fraction(eE, Z, bV)) | |
1299 | 1302 | } | |
1300 | 1303 | ||
1301 | 1304 | ||
1302 | 1305 | ||
1303 | - | @Callable( | |
1304 | - | func rampA ( | |
1306 | + | @Callable(da) | |
1307 | + | func rampA (eF,eG) = valueOrElse(am(), valueOrElse(an(da), if (av((au >= (af + e)))) | |
1305 | 1308 | then throw("too often") | |
1306 | - | else if ( | |
1309 | + | else if (av((eG >= (au + e)))) | |
1307 | 1310 | then throw("insufficient time") | |
1308 | 1311 | else { | |
1309 | - | let | |
1310 | - | if ( | |
1311 | - | then (b > | |
1312 | + | let eH = aF() | |
1313 | + | if (av(if ((eF > 0)) | |
1314 | + | then (b > eF) | |
1312 | 1315 | else false)) | |
1313 | 1316 | then throw("out of base range") | |
1314 | - | else if ( | |
1315 | - | then (( | |
1317 | + | else if (av(if (if ((eF >= eH)) | |
1318 | + | then ((eH * c) >= eF) | |
1316 | 1319 | else false) | |
1317 | 1320 | then true | |
1318 | - | else if (( | |
1319 | - | then (( | |
1321 | + | else if ((eH > eF)) | |
1322 | + | then ((eF * c) >= eH) | |
1320 | 1323 | else false)) | |
1321 | 1324 | then throw("out of range") | |
1322 | - | else [IntegerEntry("initial_A", | |
1325 | + | else [IntegerEntry("initial_A", eH), IntegerEntry("future_A", eF), IntegerEntry("initial_A_time", au), IntegerEntry("future_A_time", eG)] | |
1323 | 1326 | })) | |
1324 | 1327 | ||
1325 | 1328 | ||
1326 | 1329 | ||
1327 | - | @Callable( | |
1328 | - | func stopRampA () = valueOrElse( | |
1329 | - | let | |
1330 | - | [IntegerEntry("initial_A", | |
1330 | + | @Callable(da) | |
1331 | + | func stopRampA () = valueOrElse(am(), valueOrElse(an(da), { | |
1332 | + | let eI = aF() | |
1333 | + | [IntegerEntry("initial_A", eI), IntegerEntry("future_A", eI), IntegerEntry("initial_A_time", au), IntegerEntry("future_A_time", au)] | |
1331 | 1334 | })) | |
1332 | 1335 | ||
1333 | 1336 | ||
1334 | 1337 | ||
1335 | - | @Callable( | |
1336 | - | func shutdown () = valueOrElse( | |
1338 | + | @Callable(da) | |
1339 | + | func shutdown () = valueOrElse(an(da), if (!(X)) | |
1337 | 1340 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, k), "the cause wasn't specified"))) | |
1338 | - | else | |
1341 | + | else aj("Paused by admin")) | |
1339 | 1342 | ||
1340 | 1343 | ||
1341 | 1344 | ||
1342 | - | @Callable( | |
1343 | - | func activate () = valueOrElse( | |
1344 | - | then | |
1345 | + | @Callable(da) | |
1346 | + | func activate () = valueOrElse(an(da), if (X) | |
1347 | + | then al() | |
1345 | 1348 | else [BooleanEntry(j, true), DeleteEntry(k)]) | |
1346 | 1349 | ||
1347 | 1350 | ||
1348 | 1351 | ||
1349 | - | @Callable( | |
1350 | - | func takeIntoAccountExtraFunds () = valueOrElse( | |
1352 | + | @Callable(da) | |
1353 | + | func takeIntoAccountExtraFunds () = valueOrElse(am(), if ((da.caller != P)) | |
1351 | 1354 | then throw("Only the wallet can call this function") | |
1352 | 1355 | else { | |
1353 | - | let | |
1354 | - | func | |
1355 | - | let | |
1356 | - | let | |
1357 | - | let | |
1358 | - | let | |
1359 | - | let | |
1360 | - | let | |
1361 | - | if ((0 > | |
1362 | - | then | |
1356 | + | let eB = aK() | |
1357 | + | func eJ (aM,aN) = { | |
1358 | + | let eK = aM | |
1359 | + | let eL = eK._1 | |
1360 | + | let ao = eK._2 | |
1361 | + | let eM = fromBase58String(aN) | |
1362 | + | let eN = (assetBalance(this, eM) + cA(eM)) | |
1363 | + | let eO = (eN - eB[ao]) | |
1364 | + | if ((0 > eO)) | |
1365 | + | then aj(("Enroll amount negative for asset" + aN)) | |
1363 | 1366 | else { | |
1364 | - | let | |
1365 | - | then invoke( | |
1367 | + | let dG = if ((eO > 0)) | |
1368 | + | then invoke(U, "airDrop", nil, [AttachedPayment(eM, eO)]) | |
1366 | 1369 | else 0 | |
1367 | - | if (( | |
1368 | - | then $Tuple2(( | |
1370 | + | if ((dG == dG)) | |
1371 | + | then $Tuple2((eL + eO), (ao + 1)) | |
1369 | 1372 | else throw("Strict value is not equal to itself.") | |
1370 | 1373 | } | |
1371 | 1374 | } | |
1372 | 1375 | ||
1373 | - | let | |
1374 | - | let | |
1375 | - | let | |
1376 | - | let | |
1377 | - | func | |
1378 | - | then | |
1379 | - | else | |
1376 | + | let ds = { | |
1377 | + | let aO = ah | |
1378 | + | let aP = size(aO) | |
1379 | + | let aQ = $Tuple2(0, 0) | |
1380 | + | func aR (aS,aT) = if ((aT >= aP)) | |
1381 | + | then aS | |
1382 | + | else eJ(aS, aO[aT]) | |
1380 | 1383 | ||
1381 | - | func | |
1382 | - | then | |
1384 | + | func aU (aS,aT) = if ((aT >= aP)) | |
1385 | + | then aS | |
1383 | 1386 | else throw("List size exceeds 10") | |
1384 | 1387 | ||
1385 | - | | |
1388 | + | aU(aR(aR(aR(aR(aR(aR(aR(aR(aR(aR(aQ, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
1386 | 1389 | } | |
1387 | - | if (( | |
1390 | + | if ((ds._1 == 0)) | |
1388 | 1391 | then throw("No money to take") | |
1389 | 1392 | else nil | |
1390 | 1393 | }) | |
1391 | 1394 | ||
1392 | 1395 | ||
1393 | - | @Verifier( | |
1394 | - | func | |
1395 | - | let | |
1396 | - | let | |
1396 | + | @Verifier(eP) | |
1397 | + | func eQ () = { | |
1398 | + | let eR = { | |
1399 | + | let eS = if (sigVerify(eP.bodyBytes, eP.proofs[0], L)) | |
1397 | 1400 | then 1 | |
1398 | 1401 | else 0 | |
1399 | - | let | |
1402 | + | let eT = if (sigVerify(eP.bodyBytes, eP.proofs[1], M)) | |
1400 | 1403 | then 1 | |
1401 | 1404 | else 0 | |
1402 | - | let | |
1405 | + | let eU = if (sigVerify(eP.bodyBytes, eP.proofs[2], N)) | |
1403 | 1406 | then 1 | |
1404 | 1407 | else 0 | |
1405 | - | ((( | |
1408 | + | (((eS + eT) + eU) >= 2) | |
1406 | 1409 | } | |
1407 | - | let | |
1408 | - | if ($isInstanceOf( | |
1410 | + | let I = eP | |
1411 | + | if ($isInstanceOf(I, "InvokeScriptTransaction")) | |
1409 | 1412 | then { | |
1410 | - | let | |
1411 | - | let | |
1412 | - | then ( | |
1413 | + | let dF = I | |
1414 | + | let eV = if ((dF.dApp == this)) | |
1415 | + | then (dF.function == "takeIntoAccountExtraFunds") | |
1413 | 1416 | else false | |
1414 | - | let | |
1417 | + | let eW = if (if (if (sigVerify(eP.bodyBytes, eP.proofs[0], L)) | |
1415 | 1418 | then true | |
1416 | - | else sigVerify( | |
1419 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], M)) | |
1417 | 1420 | then true | |
1418 | - | else sigVerify( | |
1421 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], N)) | |
1419 | 1422 | then true | |
1420 | - | else sigVerify( | |
1421 | - | if (if ( | |
1422 | - | then | |
1423 | + | else sigVerify(eP.bodyBytes, eP.proofs[0], O) | |
1424 | + | if (if (eV) | |
1425 | + | then eW | |
1423 | 1426 | else false) | |
1424 | 1427 | then true | |
1425 | - | else | |
1428 | + | else eR | |
1426 | 1429 | } | |
1427 | - | else | |
1430 | + | else eR | |
1428 | 1431 | } | |
1429 | 1432 |
github/deemru/w8io/169f3d6 596.23 ms ◑