tx · CPJBNgiqCoi4X64H6kPiZV8k5jRgYMuRPHtNh9CMpnJ4 3MpygN8qm376tUAHB6mhC5BxG5NKYortiyX: -0.03600000 Waves 2022.11.24 23:10 [2331630] smart account 3MpygN8qm376tUAHB6mhC5BxG5NKYortiyX > SELF 0.00000000 Waves
{ "type": 13, "id": "CPJBNgiqCoi4X64H6kPiZV8k5jRgYMuRPHtNh9CMpnJ4", "fee": 3600000, "feeAssetId": null, "timestamp": 1669320559477, "version": 2, "chainId": 84, "sender": "3MpygN8qm376tUAHB6mhC5BxG5NKYortiyX", "senderPublicKey": "BjnLnkAMaJLYAK36vQqSepUNjGeMDHfZGfmdYwGcLbmg", "proofs": [ "22WLfVQrCioS7N68owkxKzVsyQQtfwoewZSV6zzT8yj7n6urGE36WNFjexDGMB6mffacTGAgxTkDWVjYpg8Vitt6", "49bzGPDiKvDxcRo8M6hGBhRT4ULncL3dAj4ma5VbbVfSwLM4zrwribEFX6QEf7HxJa6ZeXURjF1YKCQCHXqeiHsx" ], "script": "base64:BgJJCAISAwoBBBIECgIEARIGCgQBAQQBEgMKAQESBgoEAQgBARIECgIBARIDCgEBEgASABIAEgMKAQESBQoDBAEIEgASBAoCAQESAGsAB3ZlcnNpb24CBTIuMC4wAAhrVmVyc2lvbgIHdmVyc2lvbgAHa0FjdGl2ZQIGYWN0aXZlAAtrQWN0aXZlR2xvYgIUYWN0aXZlX2FsbF9jb250cmFjdHMACWtBc3NldElkQQIKQV9hc3NldF9pZAAJa0Fzc2V0SWRCAgpCX2Fzc2V0X2lkAAlrQmFsYW5jZUECD0FfYXNzZXRfYmFsYW5jZQAJa0JhbGFuY2VCAg9CX2Fzc2V0X2JhbGFuY2UADWtTaGFyZUFzc2V0SWQCDnNoYXJlX2Fzc2V0X2lkABFrU2hhcmVBc3NldFN1cHBseQISc2hhcmVfYXNzZXRfc3VwcGx5AARrRmVlAgpjb21taXNzaW9uAAprSW52YXJpYW50AglpbnZhcmlhbnQABmtDYXVzZQIOc2h1dG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CAUDaW52BGRBcHAFBHRoaXMJAAACCAUDaW52CGZ1bmN0aW9uAhl0YWtlSW50b0FjY291bnRFeHRyYUZ1bmRzBwQNc2lnbmVkQnlBZG1pbgMDAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkxBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkyBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAUMYWRtaW5QdWJLZXkzBgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAURYWRtaW5QdWJLZXlJbnZva2UDAwUTY2FsbFRha2VJbnRvQWNjb3VudAUNc2lnbmVkQnlBZG1pbgcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5zgzYhsQ==", "height": 2331630, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A39GaZW6jN363AdoaKKBJKb8j8a7gV5dGrA81BzYiNZE Next: AxEfEyEs8YwBVVDzHc6ehgNVkhK9mTwTX7Zx7cLsYXDg Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "active_all_contracts" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "A_asset_id" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "B_asset_id" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "A_asset_balance" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "B_asset_balance" | |
19 | 19 | ||
20 | - | let i = "share_asset_ | |
20 | + | let i = "share_asset_id" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "share_asset_supply" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "commission" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "invariant" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "shutdown_cause" | |
29 | 29 | ||
30 | - | let n = "staking_ | |
30 | + | let n = "staking_usdnnsbt_address" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "staking_eurn_address" | |
33 | 33 | ||
34 | - | let p = " | |
34 | + | let p = "discounts" | |
35 | 35 | ||
36 | - | let q = "_ | |
36 | + | let q = "discount_values" | |
37 | 37 | ||
38 | - | let r = "_ | |
38 | + | let r = "_SWOP_amount" | |
39 | 39 | ||
40 | - | let s = " | |
40 | + | let s = "_GSwop_amount" | |
41 | 41 | ||
42 | - | let t = "first_harvest | |
42 | + | let t = "first_harvest" | |
43 | 43 | ||
44 | - | let u = " | |
44 | + | let u = "first_harvest_height" | |
45 | 45 | ||
46 | - | let v = " | |
46 | + | let v = "share_limit_on_first_harvest" | |
47 | 47 | ||
48 | - | let w = "period | |
48 | + | let w = "base_period" | |
49 | 49 | ||
50 | - | let x = " | |
50 | + | let x = "period_length" | |
51 | 51 | ||
52 | - | let y = " | |
52 | + | let y = "start_height" | |
53 | 53 | ||
54 | - | let z = "admin_pub_ | |
54 | + | let z = "admin_pub_1" | |
55 | 55 | ||
56 | - | let A = "admin_pub_ | |
56 | + | let A = "admin_pub_2" | |
57 | 57 | ||
58 | - | let B = "admin_ | |
58 | + | let B = "admin_pub_3" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "admin_invoke_pub" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "money_box_address" | |
63 | 63 | ||
64 | - | let E = " | |
64 | + | let E = "governance_address" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "farming_address" | |
67 | 67 | ||
68 | - | let G = " | |
68 | + | let G = "voting_address" | |
69 | 69 | ||
70 | - | let H = " | |
70 | + | let H = "usdn_asset_id" | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = "staking_assets" | |
73 | 73 | ||
74 | - | func J (K) = { | |
75 | - | let L = getString(I, K) | |
76 | - | if ($isInstanceOf(L, "String")) | |
74 | + | let J = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
75 | + | ||
76 | + | func K (L) = { | |
77 | + | let M = getString(J, L) | |
78 | + | if ($isInstanceOf(M, "String")) | |
77 | 79 | then { | |
78 | - | let | |
79 | - | fromBase58String( | |
80 | + | let N = M | |
81 | + | fromBase58String(N) | |
80 | 82 | } | |
81 | 83 | else { | |
82 | - | let | |
83 | - | throw(( | |
84 | + | let O = M | |
85 | + | throw((L + "is empty")) | |
84 | 86 | } | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | let | |
90 | + | let P = K(z) | |
89 | 91 | ||
90 | - | let | |
92 | + | let Q = K(A) | |
91 | 93 | ||
92 | - | let | |
94 | + | let R = K(B) | |
93 | 95 | ||
94 | - | let | |
96 | + | let S = K(C) | |
95 | 97 | ||
96 | - | let | |
98 | + | let T = Address(K(D)) | |
97 | 99 | ||
98 | - | let | |
100 | + | let U = Address(K(E)) | |
99 | 101 | ||
100 | - | let | |
102 | + | let V = Address(K(n)) | |
101 | 103 | ||
102 | - | let | |
104 | + | let W = Address(K(G)) | |
103 | 105 | ||
104 | - | let | |
106 | + | let X = Address(K(F)) | |
105 | 107 | ||
106 | - | let | |
108 | + | let Y = K(H) | |
107 | 109 | ||
108 | - | let | |
110 | + | let Z = getStringValue(J, I) | |
109 | 111 | ||
110 | - | let | |
112 | + | let aa = valueOrErrorMessage(getInteger(W, w), "Empty kBasePeriod") | |
111 | 113 | ||
112 | - | let | |
114 | + | let ab = valueOrErrorMessage(getInteger(W, y), "Empty kStartHeight") | |
113 | 115 | ||
114 | - | let | |
116 | + | let ac = valueOrErrorMessage(getInteger(W, x), "Empty kPeriodLength") | |
115 | 117 | ||
116 | - | let | |
118 | + | let ad = ((aa + ((height - ab) / ac)) + 3) | |
117 | 119 | ||
118 | - | let | |
120 | + | let ae = getBooleanValue(this, c) | |
119 | 121 | ||
120 | - | let | |
122 | + | let af = valueOrElse(getBoolean(J, d), true) | |
121 | 123 | ||
122 | - | let | |
124 | + | let ag = getStringValue(this, e) | |
123 | 125 | ||
124 | - | let ag = if ((ae == "WAVES")) | |
126 | + | let ah = getStringValue(this, f) | |
127 | + | ||
128 | + | let ai = if ((ag == "WAVES")) | |
125 | 129 | then unit | |
126 | - | else fromBase58String( | |
130 | + | else fromBase58String(ag) | |
127 | 131 | ||
128 | - | let | |
132 | + | let aj = if ((ah == "WAVES")) | |
129 | 133 | then unit | |
130 | - | else fromBase58String( | |
134 | + | else fromBase58String(ah) | |
131 | 135 | ||
132 | - | let | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
136 | + | let ak = { | |
137 | + | let M = ai | |
138 | + | if ($isInstanceOf(M, "ByteVector")) | |
135 | 139 | then { | |
136 | - | let | |
137 | - | value(assetInfo( | |
140 | + | let al = M | |
141 | + | value(assetInfo(al)).name | |
138 | 142 | } | |
139 | - | else if ($isInstanceOf( | |
143 | + | else if ($isInstanceOf(M, "Unit")) | |
140 | 144 | then { | |
141 | - | let | |
145 | + | let am = M | |
142 | 146 | "WAVES" | |
143 | 147 | } | |
144 | 148 | else throw("Match error") | |
145 | 149 | } | |
146 | 150 | ||
147 | - | let | |
148 | - | let | |
149 | - | if ($isInstanceOf( | |
151 | + | let an = { | |
152 | + | let M = aj | |
153 | + | if ($isInstanceOf(M, "ByteVector")) | |
150 | 154 | then { | |
151 | - | let | |
152 | - | value(assetInfo( | |
155 | + | let al = M | |
156 | + | value(assetInfo(al)).name | |
153 | 157 | } | |
154 | - | else if ($isInstanceOf( | |
158 | + | else if ($isInstanceOf(M, "Unit")) | |
155 | 159 | then { | |
156 | - | let | |
160 | + | let am = M | |
157 | 161 | "WAVES" | |
158 | 162 | } | |
159 | 163 | else throw("Match error") | |
160 | 164 | } | |
161 | 165 | ||
162 | - | let | |
166 | + | let ao = getIntegerValue(this, g) | |
163 | 167 | ||
164 | - | let | |
168 | + | let ap = getIntegerValue(this, h) | |
165 | 169 | ||
166 | - | let ao = fromBase58String(getStringValue(this, h)) | |
167 | - | ||
168 | - | let ap = getIntegerValue(this, i) | |
169 | - | ||
170 | - | let aq = getIntegerValue(this, k) | |
170 | + | let aq = fromBase58String(getStringValue(this, i)) | |
171 | 171 | ||
172 | 172 | let ar = getIntegerValue(this, j) | |
173 | 173 | ||
174 | - | let as = | |
174 | + | let as = getIntegerValue(this, l) | |
175 | 175 | ||
176 | - | let at = | |
176 | + | let at = getIntegerValue(this, k) | |
177 | 177 | ||
178 | - | let au = | |
178 | + | let au = fraction(at, 40, 100) | |
179 | 179 | ||
180 | - | let av = | |
180 | + | let av = 1000000 | |
181 | 181 | ||
182 | - | let aw = | |
182 | + | let aw = 1000 | |
183 | 183 | ||
184 | - | let ax = | |
184 | + | let ax = 100000000 | |
185 | 185 | ||
186 | - | let ay = | |
186 | + | let ay = 10000000000000000 | |
187 | 187 | ||
188 | - | let az = | |
188 | + | let az = 8 | |
189 | 189 | ||
190 | - | let aA = | |
190 | + | let aA = 50 | |
191 | 191 | ||
192 | - | let aB = | |
192 | + | let aB = 100 | |
193 | 193 | ||
194 | - | let aC = | |
194 | + | let aC = 90000000 | |
195 | 195 | ||
196 | - | let aD = | |
196 | + | let aD = 110000000 | |
197 | 197 | ||
198 | - | let aE = | |
198 | + | let aE = 50 | |
199 | 199 | ||
200 | - | func aF (aG) = { | |
201 | - | let L = aG | |
202 | - | if ($isInstanceOf(L, "ByteVector")) | |
200 | + | let aF = 2 | |
201 | + | ||
202 | + | let aG = 4600000000000000 | |
203 | + | ||
204 | + | func aH (aI) = { | |
205 | + | let M = aI | |
206 | + | if ($isInstanceOf(M, "ByteVector")) | |
203 | 207 | then { | |
204 | - | let | |
205 | - | assetBalance(this, | |
208 | + | let al = M | |
209 | + | assetBalance(this, al) | |
206 | 210 | } | |
207 | - | else if ($isInstanceOf( | |
211 | + | else if ($isInstanceOf(M, "Unit")) | |
208 | 212 | then { | |
209 | - | let | |
213 | + | let am = M | |
210 | 214 | wavesBalance(this).available | |
211 | 215 | } | |
212 | 216 | else throw("Match error") | |
213 | 217 | } | |
214 | 218 | ||
215 | 219 | ||
216 | - | func | |
217 | - | let | |
218 | - | let | |
219 | - | if ($isInstanceOf( | |
220 | + | func aJ (aI) = { | |
221 | + | let aK = { | |
222 | + | let M = aI | |
223 | + | if ($isInstanceOf(M, "ByteVector")) | |
220 | 224 | then { | |
221 | - | let | |
222 | - | if (( | |
223 | - | then getInteger( | |
225 | + | let aL = M | |
226 | + | if ((aL == Y)) | |
227 | + | then getInteger(V, ((("rpd_balance_" + toBase58String(aL)) + "_") + toString(this))) | |
224 | 228 | else 0 | |
225 | 229 | } | |
226 | - | else if ($isInstanceOf( | |
230 | + | else if ($isInstanceOf(M, "Unit")) | |
227 | 231 | then 0 | |
228 | 232 | else throw("Match error") | |
229 | 233 | } | |
230 | - | let | |
231 | - | if ($isInstanceOf( | |
234 | + | let M = aK | |
235 | + | if ($isInstanceOf(M, "Int")) | |
232 | 236 | then { | |
233 | - | let | |
234 | - | | |
237 | + | let aM = M | |
238 | + | aM | |
235 | 239 | } | |
236 | 240 | else 0 | |
237 | 241 | } | |
238 | 242 | ||
239 | 243 | ||
240 | - | let | |
244 | + | let aN = aJ(ai) | |
241 | 245 | ||
242 | - | let | |
246 | + | let aO = aJ(aj) | |
243 | 247 | ||
244 | - | let | |
248 | + | let aP = (ao - aN) | |
245 | 249 | ||
246 | - | let | |
250 | + | let aQ = (ap - aO) | |
247 | 251 | ||
248 | - | let | |
252 | + | let aR = (aH(ai) + aN) | |
249 | 253 | ||
250 | - | let | |
254 | + | let aS = (aH(aj) + aO) | |
251 | 255 | ||
252 | - | let | |
253 | - | then ( | |
256 | + | let aT = if ((aR >= ao)) | |
257 | + | then (aS >= ap) | |
254 | 258 | else false | |
255 | 259 | ||
256 | - | func | |
260 | + | func aU (aV,aW) = ((fraction(ay, aV, aW) + fraction(ay, aW, aV)) / 2) | |
257 | 261 | ||
258 | 262 | ||
259 | - | func | |
260 | - | let | |
261 | - | (fraction(( | |
263 | + | func aX (aV,aW) = { | |
264 | + | let aY = aU(aV, aW) | |
265 | + | (fraction((aV + aW), ay, pow(aY, az, aE, aF, az, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(aV), toBigInt(aW), toBigInt(ax)), 0, toBigInt(5), 1, (az / 2), DOWN)), pow((aY - aG), az, aE, aF, az, DOWN), ax))) | |
262 | 266 | } | |
263 | 267 | ||
264 | 268 | ||
265 | - | func | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | func | |
269 | + | func aZ (ba,bb,bc,bd,be,bf,bg) = { | |
270 | + | let bh = (ay - ((ay * 1) / 10000000)) | |
271 | + | let bi = (ba - bb) | |
272 | + | let aV = (be + bc) | |
273 | + | let aW = (bf + bc) | |
274 | + | func bj (bk,bl) = if ((bk._1 == -1)) | |
271 | 275 | then { | |
272 | - | let | |
273 | - | let | |
274 | - | then aV | |
275 | - | else | |
276 | - | if (( | |
277 | - | then $Tuple2( | |
276 | + | let bm = (ba - (((bl * bi) / 3) / aw)) | |
277 | + | let bn = if ((bd == ai)) | |
278 | + | then aX(aV, (bf - bm)) | |
279 | + | else aX((be - bm), aW) | |
280 | + | if ((bn > bg)) | |
281 | + | then $Tuple2(bm, bn) | |
278 | 282 | else $Tuple2(-1, 0) | |
279 | 283 | } | |
280 | - | else | |
284 | + | else bk | |
281 | 285 | ||
282 | - | let | |
283 | - | if ((0 > | |
286 | + | let bo = bj($Tuple2(-1, 0), 3000) | |
287 | + | if ((0 > bo._1)) | |
284 | 288 | then throw("Price is worse than minReceived") | |
285 | 289 | else { | |
286 | - | let | |
287 | - | then aV | |
288 | - | else if (( | |
289 | - | then | |
290 | + | let bp = if ((bd == ai)) | |
291 | + | then aX(aV, (bf - ba)) | |
292 | + | else if ((bd == aj)) | |
293 | + | then aX((be - ba), aW) | |
290 | 294 | else throw("Wrong asset in payment") | |
291 | - | if (( | |
292 | - | then if (( | |
295 | + | if ((bg > bp)) | |
296 | + | then if ((bh >= fraction(ay, bg, bp))) | |
293 | 297 | then throw("The requested price is too not profitable for user") | |
294 | 298 | else { | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | func | |
300 | - | then | |
301 | - | else | |
299 | + | let bq = { | |
300 | + | let br = [25, 200, 500] | |
301 | + | let bs = size(br) | |
302 | + | let bt = $Tuple2(-1, 0) | |
303 | + | func bu (bv,bw) = if ((bw >= bs)) | |
304 | + | then bv | |
305 | + | else bj(bv, br[bw]) | |
302 | 306 | ||
303 | - | func | |
304 | - | then | |
307 | + | func bx (bv,bw) = if ((bw >= bs)) | |
308 | + | then bv | |
305 | 309 | else throw("List size exceeds 3") | |
306 | 310 | ||
307 | - | | |
311 | + | bx(bu(bu(bu(bt, 0), 1), 2), 3) | |
308 | 312 | } | |
309 | - | if ((0 > | |
310 | - | then | |
311 | - | else | |
313 | + | if ((0 > bq._1)) | |
314 | + | then bo._1 | |
315 | + | else bq._1 | |
312 | 316 | } | |
313 | 317 | else { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | func | |
319 | - | then | |
320 | - | else | |
318 | + | let bq = { | |
319 | + | let br = [-500, -200, -25] | |
320 | + | let bs = size(br) | |
321 | + | let bt = $Tuple2(-1, 0) | |
322 | + | func bu (bv,bw) = if ((bw >= bs)) | |
323 | + | then bv | |
324 | + | else bj(bv, br[bw]) | |
321 | 325 | ||
322 | - | func | |
323 | - | then | |
326 | + | func bx (bv,bw) = if ((bw >= bs)) | |
327 | + | then bv | |
324 | 328 | else throw("List size exceeds 3") | |
325 | 329 | ||
326 | - | | |
330 | + | bx(bu(bu(bu(bt, 0), 1), 2), 3) | |
327 | 331 | } | |
328 | - | let | |
329 | - | then $Tuple2( | |
330 | - | else | |
331 | - | if (( | |
332 | + | let by = if ((0 > bq._1)) | |
333 | + | then $Tuple2(ba, bp) | |
334 | + | else bq | |
335 | + | if ((bh >= fraction(ay, bg, by._2))) | |
332 | 336 | then throw("The requested price is too not profitable for user") | |
333 | - | else | |
337 | + | else by._1 | |
334 | 338 | } | |
335 | 339 | } | |
336 | 340 | } | |
337 | 341 | ||
338 | 342 | ||
339 | - | func | |
340 | - | let | |
341 | - | if ($isInstanceOf( | |
343 | + | func bz (aI) = { | |
344 | + | let M = aI | |
345 | + | if ($isInstanceOf(M, "ByteVector")) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | $Tuple3( | |
347 | + | let al = M | |
348 | + | let bA = toBase58String(al) | |
349 | + | let bB = valueOrErrorMessage(assetInfo(al), (("Asset " + bA) + " doesn't exist")) | |
350 | + | $Tuple3(bA, bB.name, bB.decimals) | |
347 | 351 | } | |
348 | - | else if ($isInstanceOf( | |
352 | + | else if ($isInstanceOf(M, "Unit")) | |
349 | 353 | then { | |
350 | - | let | |
354 | + | let am = M | |
351 | 355 | $Tuple3("WAVES", "WAVES", 8) | |
352 | 356 | } | |
353 | 357 | else throw("Match error") | |
354 | 358 | } | |
355 | 359 | ||
356 | 360 | ||
357 | - | func | |
361 | + | func bC (bD) = [BooleanEntry(c, false), StringEntry(m, bD)] | |
358 | 362 | ||
359 | 363 | ||
360 | - | func | |
364 | + | func bE () = throw("DApp is already active") | |
361 | 365 | ||
362 | 366 | ||
363 | - | func bD () = if (ad) | |
367 | + | func bF () = if (if (ae) | |
368 | + | then af | |
369 | + | else false) | |
364 | 370 | then unit | |
365 | 371 | else throw("DApp is inactive at this moment") | |
366 | 372 | ||
367 | 373 | ||
368 | - | func | |
374 | + | func bG (aM) = if (containsElement([P, Q, R], aM.callerPublicKey)) | |
369 | 375 | then unit | |
370 | 376 | else throw("Only admin can call this function") | |
371 | 377 | ||
372 | 378 | ||
373 | - | func | |
379 | + | func bH (aM) = if ((this == aM.caller)) | |
374 | 380 | then unit | |
375 | 381 | else throw("Only contract itself can call this function") | |
376 | 382 | ||
377 | 383 | ||
378 | - | func | |
384 | + | func bI () = throw(((("Incorrect assets attached. Expected: " + ag) + " and ") + ah)) | |
379 | 385 | ||
380 | 386 | ||
381 | - | func | |
387 | + | func bJ () = throw("One attached payment expected") | |
382 | 388 | ||
383 | 389 | ||
384 | - | func | |
390 | + | func bK (bL,bM,bN) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(bL)) + ": ") + toString(bM)) + " ") + ak) + ", ") + toString(bN)) + " ") + an)) | |
385 | 391 | ||
386 | 392 | ||
387 | - | func | |
393 | + | func bO () = bC(((((((((((((((("Suspicious state. Actual balances: " + toString(ao)) + " ") + ak) + ", ") + toString(ap)) + " ") + an) + ". State: ") + toString(aH(ai))) + " ") + ak) + ", ") + toString(aH(aj))) + " ") + an)) | |
388 | 394 | ||
389 | 395 | ||
390 | - | func | |
391 | - | then $Tuple2("lockNeutrino", | |
392 | - | else $Tuple2("unlockNeutrino", | |
396 | + | func bP (bQ,aI) = if (bQ) | |
397 | + | then $Tuple2("lockNeutrino", V) | |
398 | + | else $Tuple2("unlockNeutrino", V) | |
393 | 399 | ||
394 | 400 | ||
395 | - | func | |
401 | + | func bR (bQ,bS,aI) = if (bQ) | |
396 | 402 | then { | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | $Tuple4( | |
403 | + | let bT = bP(bQ, aI) | |
404 | + | let bU = bT._1 | |
405 | + | let bV = bT._2 | |
406 | + | $Tuple4(bU, bV, nil, [AttachedPayment(aI, bS)]) | |
401 | 407 | } | |
402 | 408 | else { | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | $Tuple4( | |
409 | + | let bW = bP(bQ, aI) | |
410 | + | let bU = bW._1 | |
411 | + | let bV = bW._2 | |
412 | + | $Tuple4(bU, bV, [bS, toBase58String(aI)], nil) | |
407 | 413 | } | |
408 | 414 | ||
409 | 415 | ||
410 | - | func | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | if (if (( | |
416 | - | then (parseIntValue( | |
416 | + | func bX (bY) = { | |
417 | + | let bZ = valueOrElse(getInteger(U, (toString(bY) + r)), 0) | |
418 | + | let ca = valueOrElse(getInteger(U, (toString(bY) + s)), 0) | |
419 | + | let cb = split(getStringValue(J, q), ",") | |
420 | + | let cc = split(getStringValue(J, p), ",") | |
421 | + | if (if ((ca >= parseIntValue(cb[0]))) | |
422 | + | then (parseIntValue(cb[1]) > ca) | |
417 | 423 | else false) | |
418 | - | then ( | |
419 | - | else if (if (( | |
420 | - | then (parseIntValue( | |
424 | + | then (av - parseIntValue(cc[0])) | |
425 | + | else if (if ((ca >= parseIntValue(cb[1]))) | |
426 | + | then (parseIntValue(cb[2]) > ca) | |
421 | 427 | else false) | |
422 | - | then ( | |
423 | - | else if (if (( | |
424 | - | then (parseIntValue( | |
428 | + | then (av - parseIntValue(cc[1])) | |
429 | + | else if (if ((ca >= parseIntValue(cb[2]))) | |
430 | + | then (parseIntValue(cb[3]) > ca) | |
425 | 431 | else false) | |
426 | - | then ( | |
427 | - | else if (if (( | |
428 | - | then (parseIntValue( | |
432 | + | then (av - parseIntValue(cc[2])) | |
433 | + | else if (if ((ca >= parseIntValue(cb[3]))) | |
434 | + | then (parseIntValue(cb[4]) > ca) | |
429 | 435 | else false) | |
430 | - | then ( | |
431 | - | else if (( | |
432 | - | then ( | |
433 | - | else | |
436 | + | then (av - parseIntValue(cc[3])) | |
437 | + | else if ((ca >= parseIntValue(cb[4]))) | |
438 | + | then (av - parseIntValue(cc[4])) | |
439 | + | else av | |
434 | 440 | } | |
435 | 441 | ||
436 | 442 | ||
437 | - | @Callable(aK) | |
438 | - | func init (cb) = { | |
439 | - | let cc = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
440 | - | let cd = cc._1 | |
441 | - | let ce = cc._2 | |
442 | - | let cf = $Tuple2(aK.payments[1].amount, aK.payments[1].assetId) | |
443 | - | let cg = cf._1 | |
444 | - | let ch = cf._2 | |
445 | - | let ci = bx(ce) | |
446 | - | let cj = ci._1 | |
447 | - | let ck = ci._2 | |
448 | - | let cl = ci._3 | |
449 | - | let cm = bx(ch) | |
450 | - | let cn = cm._1 | |
451 | - | let co = cm._2 | |
452 | - | let cp = cm._3 | |
443 | + | func cd (aM,ce,cf) = { | |
444 | + | let cg = aM.payments[0].assetId | |
445 | + | let ch = aM.payments[1].assetId | |
446 | + | let ci = fraction(ax, aM.payments[0].amount, ao) | |
447 | + | let cj = fraction(ax, aM.payments[1].amount, ap) | |
448 | + | let ck = bz(cg) | |
449 | + | let cl = ck._1 | |
450 | + | let cm = ck._2 | |
451 | + | let cn = ck._3 | |
452 | + | let co = bz(ch) | |
453 | + | let cp = co._1 | |
454 | + | let cq = co._2 | |
455 | + | let cr = co._3 | |
456 | + | let cs = if ((cj > ci)) | |
457 | + | then { | |
458 | + | let ct = fraction(ap, ci, ax, CEILING) | |
459 | + | $Tuple5(aM.payments[0].amount, ct, (aM.payments[1].amount - ct), ch, ci) | |
460 | + | } | |
461 | + | else { | |
462 | + | let ct = fraction(ao, cj, ax, CEILING) | |
463 | + | $Tuple5(ct, aM.payments[1].amount, (aM.payments[0].amount - ct), cg, cj) | |
464 | + | } | |
465 | + | let cu = cs._1 | |
466 | + | let cv = cs._2 | |
467 | + | let cw = cs._3 | |
468 | + | let cx = cs._4 | |
469 | + | let cy = cs._5 | |
470 | + | let cz = fraction(cy, ar, ax) | |
471 | + | if (if ((size(aM.payments) != 2)) | |
472 | + | then (size(aM.payments) != 3) | |
473 | + | else false) | |
474 | + | then throw("Two or three payments expected") | |
475 | + | else if (if ((cg != ai)) | |
476 | + | then true | |
477 | + | else (ch != aj)) | |
478 | + | then bI() | |
479 | + | else if ((cz == 0)) | |
480 | + | then throw("Too small amount to replenish") | |
481 | + | else if ((0 > cw)) | |
482 | + | then throw("Change < 0") | |
483 | + | else if (!(aT)) | |
484 | + | then ([ScriptTransfer(aM.caller, cu, cg), ScriptTransfer(aM.caller, cv, ch)] ++ bO()) | |
485 | + | else { | |
486 | + | let cA = if (contains(Z, cl)) | |
487 | + | then invoke(this, "stakeUnstake", [true, cu, cl], nil) | |
488 | + | else 0 | |
489 | + | if ((cA == cA)) | |
490 | + | then { | |
491 | + | let cB = if (contains(Z, cp)) | |
492 | + | then invoke(this, "stakeUnstake", [true, cv, cp], nil) | |
493 | + | else 0 | |
494 | + | if ((cB == cB)) | |
495 | + | then { | |
496 | + | let cC = [IntegerEntry(g, (ao + cu)), IntegerEntry(h, (ap + cv)), IntegerEntry(j, (ar + cz)), IntegerEntry(l, aX((ao + cu), (ap + cv))), ScriptTransfer(aM.caller, cw, cx)] | |
497 | + | if (ce) | |
498 | + | then { | |
499 | + | let cD = ([AttachedPayment(aq, cz)] ++ (if ((size(aM.payments) == 3)) | |
500 | + | then [AttachedPayment(if ((aM.payments[2].assetId == base58'')) | |
501 | + | then unit | |
502 | + | else aM.payments[2].assetId, aM.payments[2].amount)] | |
503 | + | else nil)) | |
504 | + | let cE = invoke(this, "reissueShare", [cz], nil) | |
505 | + | if ((cE == cE)) | |
506 | + | then { | |
507 | + | let cF = invoke(X, "lockShareTokensFromPool", [aM.caller.bytes, toString(this), cf], cD) | |
508 | + | if ((cF == cF)) | |
509 | + | then cC | |
510 | + | else throw("Strict value is not equal to itself.") | |
511 | + | } | |
512 | + | else throw("Strict value is not equal to itself.") | |
513 | + | } | |
514 | + | else (cC ++ [Reissue(aq, cz, true), ScriptTransfer(aM.caller, cz, aq)]) | |
515 | + | } | |
516 | + | else throw("Strict value is not equal to itself.") | |
517 | + | } | |
518 | + | else throw("Strict value is not equal to itself.") | |
519 | + | } | |
520 | + | } | |
521 | + | ||
522 | + | ||
523 | + | func cG (aM,cH,cI,ce,cf) = { | |
524 | + | let cJ = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
525 | + | let cK = cJ._1 | |
526 | + | let cL = cJ._2 | |
527 | + | let cM = bz(cL) | |
528 | + | let cN = cM._1 | |
529 | + | let cO = cM._2 | |
530 | + | let cP = cM._3 | |
531 | + | let cQ = 5000000 | |
532 | + | let cR = 50000000 | |
533 | + | let cS = if ((cR > cK)) | |
534 | + | then 100000 | |
535 | + | else 1 | |
536 | + | let cT = (ax - ((ax * cS) / 10000000)) | |
537 | + | let cU = (ax + ((ax * cS) / 10000000)) | |
538 | + | let cV = (ax - ((ax * 1) / 10000000)) | |
539 | + | if ((cQ > cK)) | |
540 | + | then throw((((("Payment amount " + toString(cK)) + " does not exceed the minimum amount of ") + toString(cQ)) + " tokens")) | |
541 | + | else if (if ((size(aM.payments) != 1)) | |
542 | + | then (size(aM.payments) != 2) | |
543 | + | else false) | |
544 | + | then throw("One or two payments expected") | |
545 | + | else if (!(aT)) | |
546 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
547 | + | else if (if ((cL != ai)) | |
548 | + | then (cL != aj) | |
549 | + | else false) | |
550 | + | then bI() | |
551 | + | else { | |
552 | + | let cW = if ((cL == ai)) | |
553 | + | then $Tuple6((cK - cH), cI, (ao + cH), (ap - cI), (ao + cK), ap) | |
554 | + | else $Tuple6(cI, (cK - cH), (ao - cI), (ap + cH), ao, (ap + cK)) | |
555 | + | let cX = cW._1 | |
556 | + | let cY = cW._2 | |
557 | + | let cZ = cW._3 | |
558 | + | let da = cW._4 | |
559 | + | let db = cW._5 | |
560 | + | let dc = cW._6 | |
561 | + | let dd = aX(cZ, da) | |
562 | + | let de = (fraction(ay, cZ, da) / fraction(ax, cX, cY)) | |
563 | + | let df = fraction((db + dc), aA, (2 * aB)) | |
564 | + | if (if ((cV >= fraction(ax, as, dd))) | |
565 | + | then true | |
566 | + | else (as > dd)) | |
567 | + | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
568 | + | else if (if ((cT > de)) | |
569 | + | then true | |
570 | + | else (de > cU)) | |
571 | + | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
572 | + | else if (if ((df > db)) | |
573 | + | then true | |
574 | + | else (df > dc)) | |
575 | + | then bK(df, db, dc) | |
576 | + | else { | |
577 | + | let ci = fraction(cX, ax, cZ) | |
578 | + | let cj = fraction(cY, ax, da) | |
579 | + | let cz = fraction(min([ci, cj]), ar, ax) | |
580 | + | let dg = fraction(cz, (av - (at / 2)), av) | |
581 | + | let dh = fraction(cz, (au / 2), av) | |
582 | + | let di = fraction(dh, ao, ar) | |
583 | + | let dj = fraction(dh, ap, ar) | |
584 | + | let dk = if ((cN == ag)) | |
585 | + | then $Tuple3((cK - di), dj, ah) | |
586 | + | else $Tuple3((cK - dj), di, ag) | |
587 | + | let dl = dk._1 | |
588 | + | let dm = dk._2 | |
589 | + | let dn = dk._3 | |
590 | + | let cA = if (contains(Z, cN)) | |
591 | + | then invoke(this, "stakeUnstake", [true, dl, cN], nil) | |
592 | + | else 0 | |
593 | + | if ((cA == cA)) | |
594 | + | then { | |
595 | + | let cB = if (contains(Z, dn)) | |
596 | + | then invoke(this, "stakeUnstake", [false, dm, dn], nil) | |
597 | + | else 0 | |
598 | + | if ((cB == cB)) | |
599 | + | then { | |
600 | + | let cC = [IntegerEntry(g, (db - di)), IntegerEntry(h, (dc - dj)), IntegerEntry(j, (ar + dg)), IntegerEntry(l, aX((db - di), (dc - dj))), ScriptTransfer(T, di, ai), ScriptTransfer(T, dj, aj)] | |
601 | + | if (ce) | |
602 | + | then { | |
603 | + | let cD = ([AttachedPayment(aq, dg)] ++ (if ((size(aM.payments) == 2)) | |
604 | + | then [AttachedPayment(if ((aM.payments[1].assetId == base58'')) | |
605 | + | then unit | |
606 | + | else aM.payments[1].assetId, aM.payments[1].amount)] | |
607 | + | else nil)) | |
608 | + | let cE = invoke(this, "reissueShare", [dg], nil) | |
609 | + | if ((cE == cE)) | |
610 | + | then { | |
611 | + | let cF = invoke(X, "lockShareTokensFromPool", [aM.caller.bytes, toString(this), cf], cD) | |
612 | + | if ((cF == cF)) | |
613 | + | then cC | |
614 | + | else throw("Strict value is not equal to itself.") | |
615 | + | } | |
616 | + | else throw("Strict value is not equal to itself.") | |
617 | + | } | |
618 | + | else (cC ++ [Reissue(aq, dg, true), ScriptTransfer(aM.caller, dg, aq)]) | |
619 | + | } | |
620 | + | else throw("Strict value is not equal to itself.") | |
621 | + | } | |
622 | + | else throw("Strict value is not equal to itself.") | |
623 | + | } | |
624 | + | } | |
625 | + | } | |
626 | + | ||
627 | + | ||
628 | + | func do (aM,dp) = { | |
629 | + | let dq = if ((size(aM.payments) == 1)) | |
630 | + | then if ((aM.payments[0].assetId != aq)) | |
631 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(aq))) | |
632 | + | else $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
633 | + | else $Tuple2(0, aq) | |
634 | + | let cK = dq._1 | |
635 | + | let cL = dq._2 | |
636 | + | if (!(aT)) | |
637 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
638 | + | else { | |
639 | + | let dr = if ((dp > 0)) | |
640 | + | then invoke(X, "withdrawShareTokensFromPool", [aM.caller.bytes, toString(this), dp], nil) | |
641 | + | else 0 | |
642 | + | if ((dr == dr)) | |
643 | + | then { | |
644 | + | let ds = (cK + dp) | |
645 | + | let dt = fraction(ds, ao, ar) | |
646 | + | let du = fraction(ds, ap, ar) | |
647 | + | let dv = aX((ao - dt), (ap - du)) | |
648 | + | let cA = if (contains(Z, ag)) | |
649 | + | then invoke(this, "stakeUnstake", [false, dt, ag], nil) | |
650 | + | else 0 | |
651 | + | if ((cA == cA)) | |
652 | + | then { | |
653 | + | let cB = if (contains(Z, ah)) | |
654 | + | then invoke(this, "stakeUnstake", [false, du, ah], nil) | |
655 | + | else 0 | |
656 | + | if ((cB == cB)) | |
657 | + | then [IntegerEntry(g, (ao - dt)), IntegerEntry(h, (ap - du)), IntegerEntry(j, (ar - ds)), IntegerEntry(l, dv), Burn(aq, ds), ScriptTransfer(aM.caller, dt, ai), ScriptTransfer(aM.caller, du, aj)] | |
658 | + | else throw("Strict value is not equal to itself.") | |
659 | + | } | |
660 | + | else throw("Strict value is not equal to itself.") | |
661 | + | } | |
662 | + | else throw("Strict value is not equal to itself.") | |
663 | + | } | |
664 | + | } | |
665 | + | ||
666 | + | ||
667 | + | @Callable(aM) | |
668 | + | func init (dw) = { | |
669 | + | let dx = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
670 | + | let cu = dx._1 | |
671 | + | let cg = dx._2 | |
672 | + | let dy = $Tuple2(aM.payments[1].amount, aM.payments[1].assetId) | |
673 | + | let cv = dy._1 | |
674 | + | let ch = dy._2 | |
675 | + | let dz = bz(cg) | |
676 | + | let cl = dz._1 | |
677 | + | let cm = dz._2 | |
678 | + | let cn = dz._3 | |
679 | + | let dA = bz(ch) | |
680 | + | let cp = dA._1 | |
681 | + | let cq = dA._2 | |
682 | + | let cr = dA._3 | |
453 | 683 | if (isDefined(getBoolean(this, c))) | |
454 | - | then | |
455 | - | else if (( | |
684 | + | then bE() | |
685 | + | else if ((cg == ch)) | |
456 | 686 | then throw("Assets must be different") | |
457 | 687 | else { | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | then invoke(this, "stakeUnstake", [true, | |
688 | + | let dB = ((("s" + take(cm, 7)) + "_") + take(cq, 7)) | |
689 | + | let dC = ((((("ShareToken of SwopFi protocol for " + cm) + " and ") + cq) + " at address ") + toString(this)) | |
690 | + | let dD = ((cn + cr) / 2) | |
691 | + | let dE = fraction(pow(cu, cn, 5, 1, cn, DOWN), pow(cv, cr, 5, 1, cr, DOWN), pow(10, 0, dD, 0, 0, DOWN)) | |
692 | + | let dF = Issue(dB, dC, dE, dD, true) | |
693 | + | let dG = calculateAssetId(dF) | |
694 | + | let dv = aX(cu, cv) | |
695 | + | let cA = if (contains(Z, cl)) | |
696 | + | then invoke(this, "stakeUnstake", [true, cu, cl], nil) | |
467 | 697 | else 0 | |
468 | - | if (( | |
698 | + | if ((cA == cA)) | |
469 | 699 | then { | |
470 | - | let | |
471 | - | then invoke(this, "stakeUnstake", [true, | |
700 | + | let cB = if (contains(Z, cp)) | |
701 | + | then invoke(this, "stakeUnstake", [true, cv, cp], nil) | |
472 | 702 | else 0 | |
473 | - | if (( | |
703 | + | if ((cB == cB)) | |
474 | 704 | then { | |
475 | - | let | |
476 | - | if ( | |
477 | - | then ( | |
478 | - | else | |
705 | + | let dH = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(e, cl), StringEntry(f, cp), IntegerEntry(g, cu), IntegerEntry(h, cv), IntegerEntry(l, dv), IntegerEntry(k, getIntegerValue(J, "base_fee_flat")), dF, StringEntry(i, toBase58String(dG)), IntegerEntry(j, dE), ScriptTransfer(aM.caller, dE, dG)] | |
706 | + | if (dw) | |
707 | + | then (dH ++ [BooleanEntry(t, dw), IntegerEntry(u, (ab + (ad * ac)))]) | |
708 | + | else dH | |
479 | 709 | } | |
480 | 710 | else throw("Strict value is not equal to itself.") | |
481 | 711 | } | |
485 | 715 | ||
486 | 716 | ||
487 | 717 | ||
488 | - | @Callable(aK) | |
489 | - | func replenishWithTwoTokens (cA,cB) = valueOrElse(bD(), { | |
490 | - | let ce = aK.payments[0].assetId | |
491 | - | let ch = aK.payments[1].assetId | |
492 | - | let cC = fraction(av, aK.payments[0].amount, am) | |
493 | - | let cD = fraction(av, aK.payments[1].amount, an) | |
494 | - | let cE = bx(ce) | |
495 | - | let cj = cE._1 | |
496 | - | let ck = cE._2 | |
497 | - | let cl = cE._3 | |
498 | - | let cF = bx(ch) | |
499 | - | let cn = cF._1 | |
500 | - | let co = cF._2 | |
501 | - | let cp = cF._3 | |
502 | - | let cG = if ((cD > cC)) | |
503 | - | then { | |
504 | - | let cH = fraction(an, cC, av, CEILING) | |
505 | - | $Tuple5(aK.payments[0].amount, cH, (aK.payments[1].amount - cH), ch, cC) | |
506 | - | } | |
507 | - | else { | |
508 | - | let cH = fraction(am, cD, av, CEILING) | |
509 | - | $Tuple5(cH, aK.payments[1].amount, (aK.payments[0].amount - cH), ce, cD) | |
510 | - | } | |
511 | - | let cd = cG._1 | |
512 | - | let cg = cG._2 | |
513 | - | let cI = cG._3 | |
514 | - | let cJ = cG._4 | |
515 | - | let cK = cG._5 | |
516 | - | let cL = fraction(cK, ap, av) | |
517 | - | if (if ((size(aK.payments) != 2)) | |
518 | - | then (size(aK.payments) != 3) | |
718 | + | @Callable(aM) | |
719 | + | func replenishWithTwoTokensV2 (ce,cf) = valueOrElse(bF(), cd(aM, ce, cf)) | |
720 | + | ||
721 | + | ||
722 | + | ||
723 | + | @Callable(aM) | |
724 | + | func replenishWithOneTokenV2 (cH,cI,ce,cf) = valueOrElse(bF(), cG(aM, cH, cI, ce, cf)) | |
725 | + | ||
726 | + | ||
727 | + | ||
728 | + | @Callable(aM) | |
729 | + | func withdrawV2 (dp) = valueOrElse(bF(), do(aM, dp)) | |
730 | + | ||
731 | + | ||
732 | + | ||
733 | + | @Callable(aM) | |
734 | + | func withdrawOneToken (dp,dI,dJ,dK) = valueOrElse(bF(), { | |
735 | + | let dL = if ((size(aM.payments) == 1)) | |
736 | + | then if ((aM.payments[0].assetId != aq)) | |
737 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(aq))) | |
738 | + | else $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
739 | + | else $Tuple2(0, aq) | |
740 | + | let cK = dL._1 | |
741 | + | let cL = dL._2 | |
742 | + | let ds = (cK + dp) | |
743 | + | if (if ((dI != ag)) | |
744 | + | then (dI != ah) | |
519 | 745 | else false) | |
520 | - | then throw("Two or three payments expected") | |
521 | - | else if (if ((ce != ag)) | |
522 | - | then true | |
523 | - | else (ch != ah)) | |
524 | - | then bG() | |
525 | - | else if ((cL == 0)) | |
526 | - | then throw("Too small amount to replenish") | |
527 | - | else if ((0 > cI)) | |
528 | - | then throw("Change < 0") | |
529 | - | else if (!(aR)) | |
530 | - | then ([ScriptTransfer(aK.caller, cd, ce), ScriptTransfer(aK.caller, cg, ch)] ++ bM()) | |
531 | - | else { | |
532 | - | let cx = if (contains(Y, cj)) | |
533 | - | then invoke(this, "stakeUnstake", [true, cd, cj], nil) | |
746 | + | then throw("Incorrect withdraw asset") | |
747 | + | else if ((0 >= ds)) | |
748 | + | then throw("withdraw amount must be grater than 0") | |
749 | + | else if (!(aT)) | |
750 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
751 | + | else { | |
752 | + | let dr = if ((dp > 0)) | |
753 | + | then invoke(X, "withdrawShareTokensFromPool", [aM.caller.bytes, toString(this), dp], nil) | |
754 | + | else 0 | |
755 | + | if ((dr == dr)) | |
756 | + | then { | |
757 | + | let dt = fraction(ds, ao, ar) | |
758 | + | let du = fraction(ds, ap, ar) | |
759 | + | let dM = (ao - dt) | |
760 | + | let dN = (ap - du) | |
761 | + | let dO = bX(aM.originCaller) | |
762 | + | let dP = if ((dI == ag)) | |
763 | + | then aZ(dJ, dK, du, aj, dM, dN, aX(dM, dN)) | |
764 | + | else aZ(dJ, dK, dt, ai, dM, dN, aX(dM, dN)) | |
765 | + | let dQ = fraction(dP, fraction(au, dO, av, CEILING), av) | |
766 | + | let dR = fraction(dP, (av - fraction(at, dO, av, CEILING)), av) | |
767 | + | let dS = if ((dI == ag)) | |
768 | + | then $Tuple3((dt + dR), (((ao - dt) - dR) - dQ), ap) | |
769 | + | else $Tuple3((du + dR), ao, (((ap - du) - dR) - dQ)) | |
770 | + | let dT = dS._1 | |
771 | + | let dU = dS._2 | |
772 | + | let dV = dS._3 | |
773 | + | let dv = aX(dU, dV) | |
774 | + | let cA = if (contains(Z, dI)) | |
775 | + | then invoke(this, "stakeUnstake", [false, (dT + dQ), dI], nil) | |
534 | 776 | else 0 | |
535 | - | if ((cx == cx)) | |
536 | - | then { | |
537 | - | let cy = if (contains(Y, cn)) | |
538 | - | then invoke(this, "stakeUnstake", [true, cg, cn], nil) | |
539 | - | else 0 | |
540 | - | if ((cy == cy)) | |
541 | - | then { | |
542 | - | let cM = [IntegerEntry(f, (am + cd)), IntegerEntry(g, (an + cg)), IntegerEntry(i, (ap + cL)), IntegerEntry(k, aV((am + cd), (an + cg))), ScriptTransfer(aK.caller, cI, cJ)] | |
543 | - | if (cA) | |
544 | - | then { | |
545 | - | let cN = ([AttachedPayment(ao, cL)] ++ (if ((size(aK.payments) == 3)) | |
546 | - | then [AttachedPayment(aK.payments[2].assetId, aK.payments[2].amount)] | |
547 | - | else nil)) | |
548 | - | let cO = invoke(this, "reissueShare", [cL], nil) | |
549 | - | if ((cO == cO)) | |
550 | - | then { | |
551 | - | let cP = invoke(W, "lockShareTokens", [toString(this), cB], cN) | |
552 | - | if ((cP == cP)) | |
553 | - | then cM | |
554 | - | else throw("Strict value is not equal to itself.") | |
555 | - | } | |
556 | - | else throw("Strict value is not equal to itself.") | |
557 | - | } | |
558 | - | else (cM ++ [Reissue(ao, cL, true), ScriptTransfer(aK.caller, cL, ao)]) | |
559 | - | } | |
560 | - | else throw("Strict value is not equal to itself.") | |
561 | - | } | |
777 | + | if ((cA == cA)) | |
778 | + | then [IntegerEntry(g, dU), IntegerEntry(h, dV), IntegerEntry(j, (ar - ds)), IntegerEntry(l, dv), Burn(aq, ds), ScriptTransfer(aM.caller, dT, fromBase58String(dI)), ScriptTransfer(T, dQ, fromBase58String(dI))] | |
562 | 779 | else throw("Strict value is not equal to itself.") | |
563 | 780 | } | |
781 | + | else throw("Strict value is not equal to itself.") | |
782 | + | } | |
564 | 783 | }) | |
565 | 784 | ||
566 | 785 | ||
567 | 786 | ||
568 | - | @Callable(aK) | |
569 | - | func replenishWithOneToken (cQ,cR,cA,cB) = valueOrElse(bD(), { | |
570 | - | let cS = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
571 | - | let cT = cS._1 | |
572 | - | let cU = cS._2 | |
573 | - | let cV = bx(cU) | |
574 | - | let cW = cV._1 | |
575 | - | let cX = cV._2 | |
576 | - | let cY = cV._3 | |
577 | - | let cZ = 5000000 | |
578 | - | let da = 50000000 | |
579 | - | let db = if ((da > cT)) | |
580 | - | then 100000 | |
581 | - | else 1 | |
582 | - | let dc = (av - ((av * db) / 10000000)) | |
583 | - | let dd = (av + ((av * db) / 10000000)) | |
584 | - | let de = (av - ((av * 1) / 10000000)) | |
585 | - | if ((cZ > cT)) | |
586 | - | then throw((((("Payment amount " + toString(cT)) + " does not exceed the minimum amount of ") + toString(cZ)) + " tokens")) | |
587 | - | else if (if ((size(aK.payments) != 1)) | |
588 | - | then (size(aK.payments) != 2) | |
589 | - | else false) | |
590 | - | then throw("One or two payments expected") | |
591 | - | else if (!(aR)) | |
592 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
593 | - | else if (if ((cU != ag)) | |
594 | - | then (cU != ah) | |
595 | - | else false) | |
596 | - | then bG() | |
597 | - | else { | |
598 | - | let df = if ((cU == ag)) | |
599 | - | then $Tuple6((cT - cQ), cR, (am + cQ), (an - cR), (am + cT), an) | |
600 | - | else $Tuple6(cR, (cT - cQ), (am - cR), (an + cQ), am, (an + cT)) | |
601 | - | let dg = df._1 | |
602 | - | let dh = df._2 | |
603 | - | let di = df._3 | |
604 | - | let dj = df._4 | |
605 | - | let dk = df._5 | |
606 | - | let dl = df._6 | |
607 | - | let dm = aV(di, dj) | |
608 | - | let dn = (fraction(aw, di, dj) / fraction(av, dg, dh)) | |
609 | - | let do = fraction((dk + dl), ay, (2 * az)) | |
610 | - | if (if ((de >= fraction(av, aq, dm))) | |
611 | - | then true | |
612 | - | else (aq > dm)) | |
613 | - | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
614 | - | else if (if ((dc > dn)) | |
787 | + | @Callable(aM) | |
788 | + | func exchange (dJ,dK) = valueOrElse(bF(), { | |
789 | + | let dW = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
790 | + | let cK = dW._1 | |
791 | + | let cL = dW._2 | |
792 | + | if ((0 >= dJ)) | |
793 | + | then throw(("Estimated amount must be positive. Actual: " + toString(dJ))) | |
794 | + | else if ((dK > dJ)) | |
795 | + | then throw("Minimal amount can't be greater than estimated.") | |
796 | + | else if ((size(aM.payments) != 1)) | |
797 | + | then bJ() | |
798 | + | else if (!(aT)) | |
799 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
800 | + | else if (if ((cL != ai)) | |
801 | + | then (cL != aj) | |
802 | + | else false) | |
803 | + | then bI() | |
804 | + | else if ((10000000 > cK)) | |
805 | + | then throw("Only swap of 10.000000 or more tokens is allowed") | |
806 | + | else if (if ((aC > fraction(ax, dK, cK))) | |
615 | 807 | then true | |
616 | - | else (dn > dd)) | |
617 | - | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
618 | - | else if (if ((do > dk)) | |
619 | - | then true | |
620 | - | else (do > dl)) | |
621 | - | then bI(do, dk, dl) | |
622 | - | else { | |
623 | - | let cC = fraction(dg, av, di) | |
624 | - | let cD = fraction(dh, av, dj) | |
625 | - | let cL = fraction(min([cC, cD]), ap, av) | |
626 | - | let dp = fraction(cL, (at - (ar / 2)), at) | |
627 | - | let dq = fraction(cL, (as / 2), at) | |
628 | - | let dr = fraction(dq, am, ap) | |
629 | - | let ds = fraction(dq, an, ap) | |
630 | - | let dt = if ((cW == ae)) | |
631 | - | then $Tuple3((cT - dr), ds, af) | |
632 | - | else $Tuple3((cT - ds), dr, ae) | |
633 | - | let du = dt._1 | |
634 | - | let dv = dt._2 | |
635 | - | let dw = dt._3 | |
636 | - | let cx = if (contains(Y, cW)) | |
637 | - | then invoke(this, "stakeUnstake", [true, du, cW], nil) | |
638 | - | else 0 | |
639 | - | if ((cx == cx)) | |
640 | - | then { | |
641 | - | let cy = if (contains(Y, dw)) | |
642 | - | then invoke(this, "stakeUnstake", [false, dv, dw], nil) | |
643 | - | else 0 | |
644 | - | if ((cy == cy)) | |
645 | - | then { | |
646 | - | let cM = [IntegerEntry(f, (dk - dr)), IntegerEntry(g, (dl - ds)), IntegerEntry(i, (ap + dp)), IntegerEntry(k, aV((dk - dr), (dl - ds))), ScriptTransfer(S, dr, ag), ScriptTransfer(S, ds, ah)] | |
647 | - | if (cA) | |
648 | - | then { | |
649 | - | let cN = ([AttachedPayment(ao, dp)] ++ (if ((size(aK.payments) == 2)) | |
650 | - | then [AttachedPayment(aK.payments[1].assetId, aK.payments[1].amount)] | |
651 | - | else nil)) | |
652 | - | let cO = invoke(this, "reissueShare", [dp], nil) | |
653 | - | if ((cO == cO)) | |
654 | - | then { | |
655 | - | let cP = invoke(W, "lockShareTokens", [toString(this), cB], cN) | |
656 | - | if ((cP == cP)) | |
657 | - | then cM | |
658 | - | else throw("Strict value is not equal to itself.") | |
659 | - | } | |
660 | - | else throw("Strict value is not equal to itself.") | |
661 | - | } | |
662 | - | else (cM ++ [Reissue(ao, dp, true), ScriptTransfer(aK.caller, dp, ao)]) | |
663 | - | } | |
664 | - | else throw("Strict value is not equal to itself.") | |
665 | - | } | |
666 | - | else throw("Strict value is not equal to itself.") | |
667 | - | } | |
668 | - | } | |
669 | - | }) | |
670 | - | ||
671 | - | ||
672 | - | ||
673 | - | @Callable(aK) | |
674 | - | func withdraw (dx) = valueOrElse(bD(), { | |
675 | - | let dy = if ((size(aK.payments) == 1)) | |
676 | - | then if ((aK.payments[0].assetId != ao)) | |
677 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(ao))) | |
678 | - | else $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
679 | - | else $Tuple2(0, ao) | |
680 | - | let cT = dy._1 | |
681 | - | let cU = dy._2 | |
682 | - | if (!(aR)) | |
683 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
684 | - | else { | |
685 | - | let dz = if ((dx > 0)) | |
686 | - | then invoke(W, "withdrawShareTokens", [toString(this), dx], nil) | |
687 | - | else 0 | |
688 | - | if ((dz == dz)) | |
689 | - | then { | |
690 | - | let dA = (cT + dx) | |
691 | - | let dB = fraction(dA, am, ap) | |
692 | - | let dC = fraction(dA, an, ap) | |
693 | - | let cw = aV((am - dB), (an - dC)) | |
694 | - | let cx = if (contains(Y, ae)) | |
695 | - | then invoke(this, "stakeUnstake", [false, dB, ae], nil) | |
696 | - | else 0 | |
697 | - | if ((cx == cx)) | |
698 | - | then { | |
699 | - | let cy = if (contains(Y, af)) | |
700 | - | then invoke(this, "stakeUnstake", [false, dC, af], nil) | |
701 | - | else 0 | |
702 | - | if ((cy == cy)) | |
703 | - | then [IntegerEntry(f, (am - dB)), IntegerEntry(g, (an - dC)), IntegerEntry(i, (ap - dA)), IntegerEntry(k, cw), Burn(ao, dA), ScriptTransfer(aK.caller, dB, ag), ScriptTransfer(aK.caller, dC, ah)] | |
704 | - | else throw("Strict value is not equal to itself.") | |
705 | - | } | |
706 | - | else throw("Strict value is not equal to itself.") | |
707 | - | } | |
708 | - | else throw("Strict value is not equal to itself.") | |
709 | - | } | |
710 | - | }) | |
711 | - | ||
712 | - | ||
713 | - | ||
714 | - | @Callable(aK) | |
715 | - | func withdrawOneToken (dx,dD,dE,dF) = { | |
716 | - | let dG = if ((size(aK.payments) == 1)) | |
717 | - | then if ((aK.payments[0].assetId != ao)) | |
718 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(ao))) | |
719 | - | else $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
720 | - | else $Tuple2(0, ao) | |
721 | - | let cT = dG._1 | |
722 | - | let cU = dG._2 | |
723 | - | if (if ((dD != ae)) | |
724 | - | then (dD != af) | |
725 | - | else false) | |
726 | - | then throw("Incorrect withdraw asset") | |
727 | - | else if (!(aR)) | |
728 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
729 | - | else { | |
730 | - | let dz = if ((dx > 0)) | |
731 | - | then invoke(W, "withdrawShareTokens", [toString(this), dx], nil) | |
732 | - | else 0 | |
733 | - | if ((dz == dz)) | |
734 | - | then { | |
735 | - | let dA = (cT + dx) | |
736 | - | let dB = fraction(dA, am, ap) | |
737 | - | let dC = fraction(dA, an, ap) | |
738 | - | let dH = (am - dB) | |
739 | - | let dI = (an - dC) | |
740 | - | let dJ = bV(aK.originCaller) | |
741 | - | let dK = if ((dD == ae)) | |
742 | - | then aX(dE, dF, dC, ah, dH, dI, aV(dH, dI)) | |
743 | - | else aX(dE, dF, dB, ag, dH, dI, aV(dH, dI)) | |
744 | - | let dL = fraction(dK, fraction(as, dJ, at, CEILING), at) | |
745 | - | let dM = fraction(dK, (at - fraction(ar, dJ, at, CEILING)), at) | |
746 | - | let dN = if ((dD == ae)) | |
747 | - | then $Tuple3((dB + dM), (((am - dB) - dM) - dL), an) | |
748 | - | else $Tuple3((dC + dM), am, (((an - dC) - dM) - dL)) | |
749 | - | let dO = dN._1 | |
750 | - | let dP = dN._2 | |
751 | - | let dQ = dN._3 | |
752 | - | let cw = aV(dP, dQ) | |
753 | - | let cx = if (contains(Y, dD)) | |
754 | - | then invoke(this, "stakeUnstake", [false, (dO + dL), dD], nil) | |
755 | - | else 0 | |
756 | - | if ((cx == cx)) | |
757 | - | then [IntegerEntry(f, dP), IntegerEntry(g, dQ), IntegerEntry(i, (ap - dA)), IntegerEntry(k, cw), Burn(ao, dA), ScriptTransfer(aK.caller, dO, fromBase58String(dD)), ScriptTransfer(S, dL, fromBase58String(dD))] | |
758 | - | else throw("Strict value is not equal to itself.") | |
759 | - | } | |
760 | - | else throw("Strict value is not equal to itself.") | |
761 | - | } | |
762 | - | } | |
763 | - | ||
764 | - | ||
765 | - | ||
766 | - | @Callable(aK) | |
767 | - | func exchange (dE,dF) = valueOrElse(bD(), { | |
768 | - | let dR = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
769 | - | let cT = dR._1 | |
770 | - | let cU = dR._2 | |
771 | - | if ((0 >= dE)) | |
772 | - | then throw(("Estimated amount must be positive. Actual: " + toString(dE))) | |
773 | - | else if ((dF > dE)) | |
774 | - | then throw("Minimal amount can't be greater than estimated.") | |
775 | - | else if ((size(aK.payments) != 1)) | |
776 | - | then bH() | |
777 | - | else if (!(aR)) | |
778 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
779 | - | else if (if ((cU != ag)) | |
780 | - | then (cU != ah) | |
781 | - | else false) | |
782 | - | then bG() | |
783 | - | else if ((10000000 > cT)) | |
784 | - | then throw("Only swap of 10.000000 or more tokens is allowed") | |
785 | - | else if (if ((aA > fraction(av, dF, cT))) | |
786 | - | then true | |
787 | - | else (fraction(av, dE, cT) > aB)) | |
808 | + | else (fraction(ax, dJ, cK) > aD)) | |
788 | 809 | then throw("Incorrect args and pmt ratio") | |
789 | 810 | else { | |
790 | - | let | |
791 | - | then | |
792 | - | else | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | then $Tuple2(( | |
799 | - | else $Tuple2((( | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | if (if (( | |
811 | + | let dX = if ((cL == ai)) | |
812 | + | then aj | |
813 | + | else ai | |
814 | + | let bS = aZ(dJ, dK, cK, cL, ao, ap, as) | |
815 | + | let dO = bX(aM.originCaller) | |
816 | + | let dY = fraction(bS, fraction(au, dO, av, CEILING), av) | |
817 | + | let dZ = fraction(bS, (av - fraction(at, dO, av, CEILING)), av) | |
818 | + | let ea = if ((cL == ai)) | |
819 | + | then $Tuple2((ao + cK), ((ap - dZ) - dY)) | |
820 | + | else $Tuple2(((ao - dZ) - dY), (ap + cK)) | |
821 | + | let db = ea._1 | |
822 | + | let dc = ea._2 | |
823 | + | let df = fraction((db + dc), aA, (2 * aB)) | |
824 | + | if (if ((df > db)) | |
804 | 825 | then true | |
805 | - | else ( | |
806 | - | then | |
826 | + | else (df > dc)) | |
827 | + | then bK(df, db, dc) | |
807 | 828 | else { | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then invoke(this, "stakeUnstake", [true, | |
829 | + | let eb = bz(cL) | |
830 | + | let cN = eb._1 | |
831 | + | let cO = eb._2 | |
832 | + | let cP = eb._3 | |
833 | + | let ec = bz(dX) | |
834 | + | let ed = ec._1 | |
835 | + | let ee = ec._2 | |
836 | + | let ef = ec._3 | |
837 | + | let cA = if (contains(Z, cN)) | |
838 | + | then invoke(this, "stakeUnstake", [true, cK, cN], nil) | |
818 | 839 | else 0 | |
819 | - | if (( | |
840 | + | if ((cA == cA)) | |
820 | 841 | then { | |
821 | - | let | |
822 | - | then invoke(this, "stakeUnstake", [false, ( | |
842 | + | let cB = if (contains(Z, ed)) | |
843 | + | then invoke(this, "stakeUnstake", [false, (dZ + dY), ed], nil) | |
823 | 844 | else 0 | |
824 | - | if (( | |
825 | - | then $Tuple2([IntegerEntry( | |
845 | + | if ((cB == cB)) | |
846 | + | then $Tuple2([IntegerEntry(g, db), IntegerEntry(h, dc), IntegerEntry(l, aX(db, dc)), ScriptTransfer(aM.caller, dZ, dX), ScriptTransfer(T, dY, dX)], [dZ, dX]) | |
826 | 847 | else throw("Strict value is not equal to itself.") | |
827 | 848 | } | |
828 | 849 | else throw("Strict value is not equal to itself.") | |
832 | 853 | ||
833 | 854 | ||
834 | 855 | ||
835 | - | @Callable( | |
836 | - | func reissueShare ( | |
856 | + | @Callable(eg) | |
857 | + | func reissueShare (bS) = valueOrElse(bH(eg), [Reissue(aq, bS, true)]) | |
837 | 858 | ||
838 | 859 | ||
839 | 860 | ||
840 | - | @Callable( | |
841 | - | func shutdown () = valueOrElse( | |
842 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, | |
843 | - | else | |
861 | + | @Callable(aM) | |
862 | + | func shutdown () = valueOrElse(bG(aM), if (!(ae)) | |
863 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, m), "the cause wasn't specified"))) | |
864 | + | else bC("Paused by admin")) | |
844 | 865 | ||
845 | 866 | ||
846 | 867 | ||
847 | - | @Callable( | |
848 | - | func activate () = valueOrElse( | |
849 | - | then | |
850 | - | else [BooleanEntry(c, true), DeleteEntry( | |
868 | + | @Callable(aM) | |
869 | + | func activate () = valueOrElse(bG(aM), if (ae) | |
870 | + | then bE() | |
871 | + | else [BooleanEntry(c, true), DeleteEntry(m)]) | |
851 | 872 | ||
852 | 873 | ||
853 | 874 | ||
854 | - | @Callable( | |
855 | - | func takeIntoAccountExtraFunds () = valueOrElse( | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | if (( | |
875 | + | @Callable(aM) | |
876 | + | func takeIntoAccountExtraFunds () = valueOrElse(bF(), { | |
877 | + | let eh = (aR - ao) | |
878 | + | let ei = (aS - ap) | |
879 | + | let dd = aX((ao + eh), (ap + ei)) | |
880 | + | if ((aM.caller != T)) | |
860 | 881 | then throw("Only the money box can call this function") | |
861 | - | else if (if ((0 > | |
882 | + | else if (if ((0 > eh)) | |
862 | 883 | then true | |
863 | - | else (0 > | |
864 | - | then | |
865 | - | else if (if (( | |
866 | - | then ( | |
884 | + | else (0 > ei)) | |
885 | + | then bC("Enroll amount negative") | |
886 | + | else if (if ((eh == 0)) | |
887 | + | then (ei == 0) | |
867 | 888 | else false) | |
868 | 889 | then throw("No money to take") | |
869 | 890 | else { | |
870 | - | let | |
871 | - | then ( | |
891 | + | let cA = if (if (contains(Z, ag)) | |
892 | + | then (eh > 0) | |
872 | 893 | else false) | |
873 | - | then invoke(this, "stakeUnstake", [true, | |
894 | + | then invoke(this, "stakeUnstake", [true, eh, ag], nil) | |
874 | 895 | else 0 | |
875 | - | if (( | |
896 | + | if ((cA == cA)) | |
876 | 897 | then { | |
877 | - | let | |
878 | - | then ( | |
898 | + | let cB = if (if (contains(Z, ah)) | |
899 | + | then (ei > 0) | |
879 | 900 | else false) | |
880 | - | then invoke(this, "stakeUnstake", [true, | |
901 | + | then invoke(this, "stakeUnstake", [true, ei, ah], nil) | |
881 | 902 | else 0 | |
882 | - | if (( | |
883 | - | then [IntegerEntry( | |
903 | + | if ((cB == cB)) | |
904 | + | then [IntegerEntry(l, dd), IntegerEntry(g, (ao + eh)), IntegerEntry(h, (ap + ei))] | |
884 | 905 | else throw("Strict value is not equal to itself.") | |
885 | 906 | } | |
886 | 907 | else throw("Strict value is not equal to itself.") | |
889 | 910 | ||
890 | 911 | ||
891 | 912 | ||
892 | - | @Callable( | |
893 | - | func keepLimitForFirstHarvest ( | |
913 | + | @Callable(aM) | |
914 | + | func keepLimitForFirstHarvest (ej) = valueOrElse(bF(), valueOrElse(bG(aM), [IntegerEntry(v, ej)])) | |
894 | 915 | ||
895 | 916 | ||
896 | 917 | ||
897 | - | @Callable( | |
898 | - | func stakeUnstake ( | |
918 | + | @Callable(aM) | |
919 | + | func stakeUnstake (bQ,bS,ek) = if ((aM.caller != this)) | |
899 | 920 | then throw("Only contract itself can invoke this function") | |
900 | 921 | else { | |
901 | - | let | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | if (( | |
922 | + | let el = bR(bQ, bS, fromBase58String(ek)) | |
923 | + | let bU = el._1 | |
924 | + | let em = el._2 | |
925 | + | let en = el._3 | |
926 | + | let eo = el._4 | |
927 | + | let ep = invoke(em, bU, en, eo) | |
928 | + | if ((ep == ep)) | |
908 | 929 | then nil | |
909 | 930 | else throw("Strict value is not equal to itself.") | |
910 | 931 | } | |
911 | 932 | ||
912 | 933 | ||
913 | - | @Verifier(el) | |
914 | - | func em () = { | |
915 | - | let en = { | |
916 | - | let eo = if (sigVerify(el.bodyBytes, el.proofs[0], O)) | |
934 | + | ||
935 | + | @Callable(aM) | |
936 | + | func replenishWithTwoTokens () = valueOrElse(bF(), cd(aM, false, 0)) | |
937 | + | ||
938 | + | ||
939 | + | ||
940 | + | @Callable(aM) | |
941 | + | func replenishWithOneToken (cH,cI) = valueOrElse(bF(), cG(aM, cH, cI, false, 0)) | |
942 | + | ||
943 | + | ||
944 | + | ||
945 | + | @Callable(aM) | |
946 | + | func withdraw () = valueOrElse(bF(), do(aM, 0)) | |
947 | + | ||
948 | + | ||
949 | + | @Verifier(eq) | |
950 | + | func er () = { | |
951 | + | let es = { | |
952 | + | let et = if (sigVerify(eq.bodyBytes, eq.proofs[0], P)) | |
917 | 953 | then 1 | |
918 | 954 | else 0 | |
919 | - | let | |
955 | + | let eu = if (sigVerify(eq.bodyBytes, eq.proofs[1], Q)) | |
920 | 956 | then 1 | |
921 | 957 | else 0 | |
922 | - | let | |
958 | + | let ev = if (sigVerify(eq.bodyBytes, eq.proofs[2], R)) | |
923 | 959 | then 1 | |
924 | 960 | else 0 | |
925 | - | ((( | |
961 | + | (((et + eu) + ev) >= 2) | |
926 | 962 | } | |
927 | - | let | |
928 | - | if ($isInstanceOf( | |
963 | + | let M = eq | |
964 | + | if ($isInstanceOf(M, "InvokeScriptTransaction")) | |
929 | 965 | then { | |
930 | - | let | |
931 | - | let | |
932 | - | then ( | |
966 | + | let ep = M | |
967 | + | let ew = if ((ep.dApp == this)) | |
968 | + | then (ep.function == "takeIntoAccountExtraFunds") | |
933 | 969 | else false | |
934 | - | let | |
970 | + | let ex = if (if (if (sigVerify(eq.bodyBytes, eq.proofs[0], P)) | |
935 | 971 | then true | |
936 | - | else sigVerify( | |
972 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], Q)) | |
937 | 973 | then true | |
938 | - | else sigVerify( | |
974 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], R)) | |
939 | 975 | then true | |
940 | - | else sigVerify( | |
941 | - | if (if ( | |
942 | - | then | |
976 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], S) | |
977 | + | if (if (ew) | |
978 | + | then ex | |
943 | 979 | else false) | |
944 | 980 | then true | |
945 | - | else | |
981 | + | else es | |
946 | 982 | } | |
947 | - | else | |
983 | + | else es | |
948 | 984 | } | |
949 | 985 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "2.0.0" | |
5 | 5 | ||
6 | 6 | let b = "version" | |
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "active_all_contracts" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "A_asset_id" | |
13 | 13 | ||
14 | - | let f = " | |
14 | + | let f = "B_asset_id" | |
15 | 15 | ||
16 | - | let g = " | |
16 | + | let g = "A_asset_balance" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "B_asset_balance" | |
19 | 19 | ||
20 | - | let i = "share_asset_ | |
20 | + | let i = "share_asset_id" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "share_asset_supply" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "commission" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "invariant" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "shutdown_cause" | |
29 | 29 | ||
30 | - | let n = "staking_ | |
30 | + | let n = "staking_usdnnsbt_address" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "staking_eurn_address" | |
33 | 33 | ||
34 | - | let p = " | |
34 | + | let p = "discounts" | |
35 | 35 | ||
36 | - | let q = "_ | |
36 | + | let q = "discount_values" | |
37 | 37 | ||
38 | - | let r = "_ | |
38 | + | let r = "_SWOP_amount" | |
39 | 39 | ||
40 | - | let s = " | |
40 | + | let s = "_GSwop_amount" | |
41 | 41 | ||
42 | - | let t = "first_harvest | |
42 | + | let t = "first_harvest" | |
43 | 43 | ||
44 | - | let u = " | |
44 | + | let u = "first_harvest_height" | |
45 | 45 | ||
46 | - | let v = " | |
46 | + | let v = "share_limit_on_first_harvest" | |
47 | 47 | ||
48 | - | let w = "period | |
48 | + | let w = "base_period" | |
49 | 49 | ||
50 | - | let x = " | |
50 | + | let x = "period_length" | |
51 | 51 | ||
52 | - | let y = " | |
52 | + | let y = "start_height" | |
53 | 53 | ||
54 | - | let z = "admin_pub_ | |
54 | + | let z = "admin_pub_1" | |
55 | 55 | ||
56 | - | let A = "admin_pub_ | |
56 | + | let A = "admin_pub_2" | |
57 | 57 | ||
58 | - | let B = "admin_ | |
58 | + | let B = "admin_pub_3" | |
59 | 59 | ||
60 | - | let C = " | |
60 | + | let C = "admin_invoke_pub" | |
61 | 61 | ||
62 | - | let D = " | |
62 | + | let D = "money_box_address" | |
63 | 63 | ||
64 | - | let E = " | |
64 | + | let E = "governance_address" | |
65 | 65 | ||
66 | - | let F = " | |
66 | + | let F = "farming_address" | |
67 | 67 | ||
68 | - | let G = " | |
68 | + | let G = "voting_address" | |
69 | 69 | ||
70 | - | let H = " | |
70 | + | let H = "usdn_asset_id" | |
71 | 71 | ||
72 | - | let I = | |
72 | + | let I = "staking_assets" | |
73 | 73 | ||
74 | - | func J (K) = { | |
75 | - | let L = getString(I, K) | |
76 | - | if ($isInstanceOf(L, "String")) | |
74 | + | let J = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz') | |
75 | + | ||
76 | + | func K (L) = { | |
77 | + | let M = getString(J, L) | |
78 | + | if ($isInstanceOf(M, "String")) | |
77 | 79 | then { | |
78 | - | let | |
79 | - | fromBase58String( | |
80 | + | let N = M | |
81 | + | fromBase58String(N) | |
80 | 82 | } | |
81 | 83 | else { | |
82 | - | let | |
83 | - | throw(( | |
84 | + | let O = M | |
85 | + | throw((L + "is empty")) | |
84 | 86 | } | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | let | |
90 | + | let P = K(z) | |
89 | 91 | ||
90 | - | let | |
92 | + | let Q = K(A) | |
91 | 93 | ||
92 | - | let | |
94 | + | let R = K(B) | |
93 | 95 | ||
94 | - | let | |
96 | + | let S = K(C) | |
95 | 97 | ||
96 | - | let | |
98 | + | let T = Address(K(D)) | |
97 | 99 | ||
98 | - | let | |
100 | + | let U = Address(K(E)) | |
99 | 101 | ||
100 | - | let | |
102 | + | let V = Address(K(n)) | |
101 | 103 | ||
102 | - | let | |
104 | + | let W = Address(K(G)) | |
103 | 105 | ||
104 | - | let | |
106 | + | let X = Address(K(F)) | |
105 | 107 | ||
106 | - | let | |
108 | + | let Y = K(H) | |
107 | 109 | ||
108 | - | let | |
110 | + | let Z = getStringValue(J, I) | |
109 | 111 | ||
110 | - | let | |
112 | + | let aa = valueOrErrorMessage(getInteger(W, w), "Empty kBasePeriod") | |
111 | 113 | ||
112 | - | let | |
114 | + | let ab = valueOrErrorMessage(getInteger(W, y), "Empty kStartHeight") | |
113 | 115 | ||
114 | - | let | |
116 | + | let ac = valueOrErrorMessage(getInteger(W, x), "Empty kPeriodLength") | |
115 | 117 | ||
116 | - | let | |
118 | + | let ad = ((aa + ((height - ab) / ac)) + 3) | |
117 | 119 | ||
118 | - | let | |
120 | + | let ae = getBooleanValue(this, c) | |
119 | 121 | ||
120 | - | let | |
122 | + | let af = valueOrElse(getBoolean(J, d), true) | |
121 | 123 | ||
122 | - | let | |
124 | + | let ag = getStringValue(this, e) | |
123 | 125 | ||
124 | - | let ag = if ((ae == "WAVES")) | |
126 | + | let ah = getStringValue(this, f) | |
127 | + | ||
128 | + | let ai = if ((ag == "WAVES")) | |
125 | 129 | then unit | |
126 | - | else fromBase58String( | |
130 | + | else fromBase58String(ag) | |
127 | 131 | ||
128 | - | let | |
132 | + | let aj = if ((ah == "WAVES")) | |
129 | 133 | then unit | |
130 | - | else fromBase58String( | |
134 | + | else fromBase58String(ah) | |
131 | 135 | ||
132 | - | let | |
133 | - | let | |
134 | - | if ($isInstanceOf( | |
136 | + | let ak = { | |
137 | + | let M = ai | |
138 | + | if ($isInstanceOf(M, "ByteVector")) | |
135 | 139 | then { | |
136 | - | let | |
137 | - | value(assetInfo( | |
140 | + | let al = M | |
141 | + | value(assetInfo(al)).name | |
138 | 142 | } | |
139 | - | else if ($isInstanceOf( | |
143 | + | else if ($isInstanceOf(M, "Unit")) | |
140 | 144 | then { | |
141 | - | let | |
145 | + | let am = M | |
142 | 146 | "WAVES" | |
143 | 147 | } | |
144 | 148 | else throw("Match error") | |
145 | 149 | } | |
146 | 150 | ||
147 | - | let | |
148 | - | let | |
149 | - | if ($isInstanceOf( | |
151 | + | let an = { | |
152 | + | let M = aj | |
153 | + | if ($isInstanceOf(M, "ByteVector")) | |
150 | 154 | then { | |
151 | - | let | |
152 | - | value(assetInfo( | |
155 | + | let al = M | |
156 | + | value(assetInfo(al)).name | |
153 | 157 | } | |
154 | - | else if ($isInstanceOf( | |
158 | + | else if ($isInstanceOf(M, "Unit")) | |
155 | 159 | then { | |
156 | - | let | |
160 | + | let am = M | |
157 | 161 | "WAVES" | |
158 | 162 | } | |
159 | 163 | else throw("Match error") | |
160 | 164 | } | |
161 | 165 | ||
162 | - | let | |
166 | + | let ao = getIntegerValue(this, g) | |
163 | 167 | ||
164 | - | let | |
168 | + | let ap = getIntegerValue(this, h) | |
165 | 169 | ||
166 | - | let ao = fromBase58String(getStringValue(this, h)) | |
167 | - | ||
168 | - | let ap = getIntegerValue(this, i) | |
169 | - | ||
170 | - | let aq = getIntegerValue(this, k) | |
170 | + | let aq = fromBase58String(getStringValue(this, i)) | |
171 | 171 | ||
172 | 172 | let ar = getIntegerValue(this, j) | |
173 | 173 | ||
174 | - | let as = | |
174 | + | let as = getIntegerValue(this, l) | |
175 | 175 | ||
176 | - | let at = | |
176 | + | let at = getIntegerValue(this, k) | |
177 | 177 | ||
178 | - | let au = | |
178 | + | let au = fraction(at, 40, 100) | |
179 | 179 | ||
180 | - | let av = | |
180 | + | let av = 1000000 | |
181 | 181 | ||
182 | - | let aw = | |
182 | + | let aw = 1000 | |
183 | 183 | ||
184 | - | let ax = | |
184 | + | let ax = 100000000 | |
185 | 185 | ||
186 | - | let ay = | |
186 | + | let ay = 10000000000000000 | |
187 | 187 | ||
188 | - | let az = | |
188 | + | let az = 8 | |
189 | 189 | ||
190 | - | let aA = | |
190 | + | let aA = 50 | |
191 | 191 | ||
192 | - | let aB = | |
192 | + | let aB = 100 | |
193 | 193 | ||
194 | - | let aC = | |
194 | + | let aC = 90000000 | |
195 | 195 | ||
196 | - | let aD = | |
196 | + | let aD = 110000000 | |
197 | 197 | ||
198 | - | let aE = | |
198 | + | let aE = 50 | |
199 | 199 | ||
200 | - | func aF (aG) = { | |
201 | - | let L = aG | |
202 | - | if ($isInstanceOf(L, "ByteVector")) | |
200 | + | let aF = 2 | |
201 | + | ||
202 | + | let aG = 4600000000000000 | |
203 | + | ||
204 | + | func aH (aI) = { | |
205 | + | let M = aI | |
206 | + | if ($isInstanceOf(M, "ByteVector")) | |
203 | 207 | then { | |
204 | - | let | |
205 | - | assetBalance(this, | |
208 | + | let al = M | |
209 | + | assetBalance(this, al) | |
206 | 210 | } | |
207 | - | else if ($isInstanceOf( | |
211 | + | else if ($isInstanceOf(M, "Unit")) | |
208 | 212 | then { | |
209 | - | let | |
213 | + | let am = M | |
210 | 214 | wavesBalance(this).available | |
211 | 215 | } | |
212 | 216 | else throw("Match error") | |
213 | 217 | } | |
214 | 218 | ||
215 | 219 | ||
216 | - | func | |
217 | - | let | |
218 | - | let | |
219 | - | if ($isInstanceOf( | |
220 | + | func aJ (aI) = { | |
221 | + | let aK = { | |
222 | + | let M = aI | |
223 | + | if ($isInstanceOf(M, "ByteVector")) | |
220 | 224 | then { | |
221 | - | let | |
222 | - | if (( | |
223 | - | then getInteger( | |
225 | + | let aL = M | |
226 | + | if ((aL == Y)) | |
227 | + | then getInteger(V, ((("rpd_balance_" + toBase58String(aL)) + "_") + toString(this))) | |
224 | 228 | else 0 | |
225 | 229 | } | |
226 | - | else if ($isInstanceOf( | |
230 | + | else if ($isInstanceOf(M, "Unit")) | |
227 | 231 | then 0 | |
228 | 232 | else throw("Match error") | |
229 | 233 | } | |
230 | - | let | |
231 | - | if ($isInstanceOf( | |
234 | + | let M = aK | |
235 | + | if ($isInstanceOf(M, "Int")) | |
232 | 236 | then { | |
233 | - | let | |
234 | - | | |
237 | + | let aM = M | |
238 | + | aM | |
235 | 239 | } | |
236 | 240 | else 0 | |
237 | 241 | } | |
238 | 242 | ||
239 | 243 | ||
240 | - | let | |
244 | + | let aN = aJ(ai) | |
241 | 245 | ||
242 | - | let | |
246 | + | let aO = aJ(aj) | |
243 | 247 | ||
244 | - | let | |
248 | + | let aP = (ao - aN) | |
245 | 249 | ||
246 | - | let | |
250 | + | let aQ = (ap - aO) | |
247 | 251 | ||
248 | - | let | |
252 | + | let aR = (aH(ai) + aN) | |
249 | 253 | ||
250 | - | let | |
254 | + | let aS = (aH(aj) + aO) | |
251 | 255 | ||
252 | - | let | |
253 | - | then ( | |
256 | + | let aT = if ((aR >= ao)) | |
257 | + | then (aS >= ap) | |
254 | 258 | else false | |
255 | 259 | ||
256 | - | func | |
260 | + | func aU (aV,aW) = ((fraction(ay, aV, aW) + fraction(ay, aW, aV)) / 2) | |
257 | 261 | ||
258 | 262 | ||
259 | - | func | |
260 | - | let | |
261 | - | (fraction(( | |
263 | + | func aX (aV,aW) = { | |
264 | + | let aY = aU(aV, aW) | |
265 | + | (fraction((aV + aW), ay, pow(aY, az, aE, aF, az, CEILING)) + (2 * fraction(toInt(pow(fraction(toBigInt(aV), toBigInt(aW), toBigInt(ax)), 0, toBigInt(5), 1, (az / 2), DOWN)), pow((aY - aG), az, aE, aF, az, DOWN), ax))) | |
262 | 266 | } | |
263 | 267 | ||
264 | 268 | ||
265 | - | func | |
266 | - | let | |
267 | - | let | |
268 | - | let | |
269 | - | let | |
270 | - | func | |
269 | + | func aZ (ba,bb,bc,bd,be,bf,bg) = { | |
270 | + | let bh = (ay - ((ay * 1) / 10000000)) | |
271 | + | let bi = (ba - bb) | |
272 | + | let aV = (be + bc) | |
273 | + | let aW = (bf + bc) | |
274 | + | func bj (bk,bl) = if ((bk._1 == -1)) | |
271 | 275 | then { | |
272 | - | let | |
273 | - | let | |
274 | - | then aV | |
275 | - | else | |
276 | - | if (( | |
277 | - | then $Tuple2( | |
276 | + | let bm = (ba - (((bl * bi) / 3) / aw)) | |
277 | + | let bn = if ((bd == ai)) | |
278 | + | then aX(aV, (bf - bm)) | |
279 | + | else aX((be - bm), aW) | |
280 | + | if ((bn > bg)) | |
281 | + | then $Tuple2(bm, bn) | |
278 | 282 | else $Tuple2(-1, 0) | |
279 | 283 | } | |
280 | - | else | |
284 | + | else bk | |
281 | 285 | ||
282 | - | let | |
283 | - | if ((0 > | |
286 | + | let bo = bj($Tuple2(-1, 0), 3000) | |
287 | + | if ((0 > bo._1)) | |
284 | 288 | then throw("Price is worse than minReceived") | |
285 | 289 | else { | |
286 | - | let | |
287 | - | then aV | |
288 | - | else if (( | |
289 | - | then | |
290 | + | let bp = if ((bd == ai)) | |
291 | + | then aX(aV, (bf - ba)) | |
292 | + | else if ((bd == aj)) | |
293 | + | then aX((be - ba), aW) | |
290 | 294 | else throw("Wrong asset in payment") | |
291 | - | if (( | |
292 | - | then if (( | |
295 | + | if ((bg > bp)) | |
296 | + | then if ((bh >= fraction(ay, bg, bp))) | |
293 | 297 | then throw("The requested price is too not profitable for user") | |
294 | 298 | else { | |
295 | - | let | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | func | |
300 | - | then | |
301 | - | else | |
299 | + | let bq = { | |
300 | + | let br = [25, 200, 500] | |
301 | + | let bs = size(br) | |
302 | + | let bt = $Tuple2(-1, 0) | |
303 | + | func bu (bv,bw) = if ((bw >= bs)) | |
304 | + | then bv | |
305 | + | else bj(bv, br[bw]) | |
302 | 306 | ||
303 | - | func | |
304 | - | then | |
307 | + | func bx (bv,bw) = if ((bw >= bs)) | |
308 | + | then bv | |
305 | 309 | else throw("List size exceeds 3") | |
306 | 310 | ||
307 | - | | |
311 | + | bx(bu(bu(bu(bt, 0), 1), 2), 3) | |
308 | 312 | } | |
309 | - | if ((0 > | |
310 | - | then | |
311 | - | else | |
313 | + | if ((0 > bq._1)) | |
314 | + | then bo._1 | |
315 | + | else bq._1 | |
312 | 316 | } | |
313 | 317 | else { | |
314 | - | let | |
315 | - | let | |
316 | - | let | |
317 | - | let | |
318 | - | func | |
319 | - | then | |
320 | - | else | |
318 | + | let bq = { | |
319 | + | let br = [-500, -200, -25] | |
320 | + | let bs = size(br) | |
321 | + | let bt = $Tuple2(-1, 0) | |
322 | + | func bu (bv,bw) = if ((bw >= bs)) | |
323 | + | then bv | |
324 | + | else bj(bv, br[bw]) | |
321 | 325 | ||
322 | - | func | |
323 | - | then | |
326 | + | func bx (bv,bw) = if ((bw >= bs)) | |
327 | + | then bv | |
324 | 328 | else throw("List size exceeds 3") | |
325 | 329 | ||
326 | - | | |
330 | + | bx(bu(bu(bu(bt, 0), 1), 2), 3) | |
327 | 331 | } | |
328 | - | let | |
329 | - | then $Tuple2( | |
330 | - | else | |
331 | - | if (( | |
332 | + | let by = if ((0 > bq._1)) | |
333 | + | then $Tuple2(ba, bp) | |
334 | + | else bq | |
335 | + | if ((bh >= fraction(ay, bg, by._2))) | |
332 | 336 | then throw("The requested price is too not profitable for user") | |
333 | - | else | |
337 | + | else by._1 | |
334 | 338 | } | |
335 | 339 | } | |
336 | 340 | } | |
337 | 341 | ||
338 | 342 | ||
339 | - | func | |
340 | - | let | |
341 | - | if ($isInstanceOf( | |
343 | + | func bz (aI) = { | |
344 | + | let M = aI | |
345 | + | if ($isInstanceOf(M, "ByteVector")) | |
342 | 346 | then { | |
343 | - | let | |
344 | - | let | |
345 | - | let | |
346 | - | $Tuple3( | |
347 | + | let al = M | |
348 | + | let bA = toBase58String(al) | |
349 | + | let bB = valueOrErrorMessage(assetInfo(al), (("Asset " + bA) + " doesn't exist")) | |
350 | + | $Tuple3(bA, bB.name, bB.decimals) | |
347 | 351 | } | |
348 | - | else if ($isInstanceOf( | |
352 | + | else if ($isInstanceOf(M, "Unit")) | |
349 | 353 | then { | |
350 | - | let | |
354 | + | let am = M | |
351 | 355 | $Tuple3("WAVES", "WAVES", 8) | |
352 | 356 | } | |
353 | 357 | else throw("Match error") | |
354 | 358 | } | |
355 | 359 | ||
356 | 360 | ||
357 | - | func | |
361 | + | func bC (bD) = [BooleanEntry(c, false), StringEntry(m, bD)] | |
358 | 362 | ||
359 | 363 | ||
360 | - | func | |
364 | + | func bE () = throw("DApp is already active") | |
361 | 365 | ||
362 | 366 | ||
363 | - | func bD () = if (ad) | |
367 | + | func bF () = if (if (ae) | |
368 | + | then af | |
369 | + | else false) | |
364 | 370 | then unit | |
365 | 371 | else throw("DApp is inactive at this moment") | |
366 | 372 | ||
367 | 373 | ||
368 | - | func | |
374 | + | func bG (aM) = if (containsElement([P, Q, R], aM.callerPublicKey)) | |
369 | 375 | then unit | |
370 | 376 | else throw("Only admin can call this function") | |
371 | 377 | ||
372 | 378 | ||
373 | - | func | |
379 | + | func bH (aM) = if ((this == aM.caller)) | |
374 | 380 | then unit | |
375 | 381 | else throw("Only contract itself can call this function") | |
376 | 382 | ||
377 | 383 | ||
378 | - | func | |
384 | + | func bI () = throw(((("Incorrect assets attached. Expected: " + ag) + " and ") + ah)) | |
379 | 385 | ||
380 | 386 | ||
381 | - | func | |
387 | + | func bJ () = throw("One attached payment expected") | |
382 | 388 | ||
383 | 389 | ||
384 | - | func | |
390 | + | func bK (bL,bM,bN) = throw(((((((((("New balance in assets of the DApp is less than threshold " + toString(bL)) + ": ") + toString(bM)) + " ") + ak) + ", ") + toString(bN)) + " ") + an)) | |
385 | 391 | ||
386 | 392 | ||
387 | - | func | |
393 | + | func bO () = bC(((((((((((((((("Suspicious state. Actual balances: " + toString(ao)) + " ") + ak) + ", ") + toString(ap)) + " ") + an) + ". State: ") + toString(aH(ai))) + " ") + ak) + ", ") + toString(aH(aj))) + " ") + an)) | |
388 | 394 | ||
389 | 395 | ||
390 | - | func | |
391 | - | then $Tuple2("lockNeutrino", | |
392 | - | else $Tuple2("unlockNeutrino", | |
396 | + | func bP (bQ,aI) = if (bQ) | |
397 | + | then $Tuple2("lockNeutrino", V) | |
398 | + | else $Tuple2("unlockNeutrino", V) | |
393 | 399 | ||
394 | 400 | ||
395 | - | func | |
401 | + | func bR (bQ,bS,aI) = if (bQ) | |
396 | 402 | then { | |
397 | - | let | |
398 | - | let | |
399 | - | let | |
400 | - | $Tuple4( | |
403 | + | let bT = bP(bQ, aI) | |
404 | + | let bU = bT._1 | |
405 | + | let bV = bT._2 | |
406 | + | $Tuple4(bU, bV, nil, [AttachedPayment(aI, bS)]) | |
401 | 407 | } | |
402 | 408 | else { | |
403 | - | let | |
404 | - | let | |
405 | - | let | |
406 | - | $Tuple4( | |
409 | + | let bW = bP(bQ, aI) | |
410 | + | let bU = bW._1 | |
411 | + | let bV = bW._2 | |
412 | + | $Tuple4(bU, bV, [bS, toBase58String(aI)], nil) | |
407 | 413 | } | |
408 | 414 | ||
409 | 415 | ||
410 | - | func | |
411 | - | let | |
412 | - | let | |
413 | - | let | |
414 | - | let | |
415 | - | if (if (( | |
416 | - | then (parseIntValue( | |
416 | + | func bX (bY) = { | |
417 | + | let bZ = valueOrElse(getInteger(U, (toString(bY) + r)), 0) | |
418 | + | let ca = valueOrElse(getInteger(U, (toString(bY) + s)), 0) | |
419 | + | let cb = split(getStringValue(J, q), ",") | |
420 | + | let cc = split(getStringValue(J, p), ",") | |
421 | + | if (if ((ca >= parseIntValue(cb[0]))) | |
422 | + | then (parseIntValue(cb[1]) > ca) | |
417 | 423 | else false) | |
418 | - | then ( | |
419 | - | else if (if (( | |
420 | - | then (parseIntValue( | |
424 | + | then (av - parseIntValue(cc[0])) | |
425 | + | else if (if ((ca >= parseIntValue(cb[1]))) | |
426 | + | then (parseIntValue(cb[2]) > ca) | |
421 | 427 | else false) | |
422 | - | then ( | |
423 | - | else if (if (( | |
424 | - | then (parseIntValue( | |
428 | + | then (av - parseIntValue(cc[1])) | |
429 | + | else if (if ((ca >= parseIntValue(cb[2]))) | |
430 | + | then (parseIntValue(cb[3]) > ca) | |
425 | 431 | else false) | |
426 | - | then ( | |
427 | - | else if (if (( | |
428 | - | then (parseIntValue( | |
432 | + | then (av - parseIntValue(cc[2])) | |
433 | + | else if (if ((ca >= parseIntValue(cb[3]))) | |
434 | + | then (parseIntValue(cb[4]) > ca) | |
429 | 435 | else false) | |
430 | - | then ( | |
431 | - | else if (( | |
432 | - | then ( | |
433 | - | else | |
436 | + | then (av - parseIntValue(cc[3])) | |
437 | + | else if ((ca >= parseIntValue(cb[4]))) | |
438 | + | then (av - parseIntValue(cc[4])) | |
439 | + | else av | |
434 | 440 | } | |
435 | 441 | ||
436 | 442 | ||
437 | - | @Callable(aK) | |
438 | - | func init (cb) = { | |
439 | - | let cc = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
440 | - | let cd = cc._1 | |
441 | - | let ce = cc._2 | |
442 | - | let cf = $Tuple2(aK.payments[1].amount, aK.payments[1].assetId) | |
443 | - | let cg = cf._1 | |
444 | - | let ch = cf._2 | |
445 | - | let ci = bx(ce) | |
446 | - | let cj = ci._1 | |
447 | - | let ck = ci._2 | |
448 | - | let cl = ci._3 | |
449 | - | let cm = bx(ch) | |
450 | - | let cn = cm._1 | |
451 | - | let co = cm._2 | |
452 | - | let cp = cm._3 | |
443 | + | func cd (aM,ce,cf) = { | |
444 | + | let cg = aM.payments[0].assetId | |
445 | + | let ch = aM.payments[1].assetId | |
446 | + | let ci = fraction(ax, aM.payments[0].amount, ao) | |
447 | + | let cj = fraction(ax, aM.payments[1].amount, ap) | |
448 | + | let ck = bz(cg) | |
449 | + | let cl = ck._1 | |
450 | + | let cm = ck._2 | |
451 | + | let cn = ck._3 | |
452 | + | let co = bz(ch) | |
453 | + | let cp = co._1 | |
454 | + | let cq = co._2 | |
455 | + | let cr = co._3 | |
456 | + | let cs = if ((cj > ci)) | |
457 | + | then { | |
458 | + | let ct = fraction(ap, ci, ax, CEILING) | |
459 | + | $Tuple5(aM.payments[0].amount, ct, (aM.payments[1].amount - ct), ch, ci) | |
460 | + | } | |
461 | + | else { | |
462 | + | let ct = fraction(ao, cj, ax, CEILING) | |
463 | + | $Tuple5(ct, aM.payments[1].amount, (aM.payments[0].amount - ct), cg, cj) | |
464 | + | } | |
465 | + | let cu = cs._1 | |
466 | + | let cv = cs._2 | |
467 | + | let cw = cs._3 | |
468 | + | let cx = cs._4 | |
469 | + | let cy = cs._5 | |
470 | + | let cz = fraction(cy, ar, ax) | |
471 | + | if (if ((size(aM.payments) != 2)) | |
472 | + | then (size(aM.payments) != 3) | |
473 | + | else false) | |
474 | + | then throw("Two or three payments expected") | |
475 | + | else if (if ((cg != ai)) | |
476 | + | then true | |
477 | + | else (ch != aj)) | |
478 | + | then bI() | |
479 | + | else if ((cz == 0)) | |
480 | + | then throw("Too small amount to replenish") | |
481 | + | else if ((0 > cw)) | |
482 | + | then throw("Change < 0") | |
483 | + | else if (!(aT)) | |
484 | + | then ([ScriptTransfer(aM.caller, cu, cg), ScriptTransfer(aM.caller, cv, ch)] ++ bO()) | |
485 | + | else { | |
486 | + | let cA = if (contains(Z, cl)) | |
487 | + | then invoke(this, "stakeUnstake", [true, cu, cl], nil) | |
488 | + | else 0 | |
489 | + | if ((cA == cA)) | |
490 | + | then { | |
491 | + | let cB = if (contains(Z, cp)) | |
492 | + | then invoke(this, "stakeUnstake", [true, cv, cp], nil) | |
493 | + | else 0 | |
494 | + | if ((cB == cB)) | |
495 | + | then { | |
496 | + | let cC = [IntegerEntry(g, (ao + cu)), IntegerEntry(h, (ap + cv)), IntegerEntry(j, (ar + cz)), IntegerEntry(l, aX((ao + cu), (ap + cv))), ScriptTransfer(aM.caller, cw, cx)] | |
497 | + | if (ce) | |
498 | + | then { | |
499 | + | let cD = ([AttachedPayment(aq, cz)] ++ (if ((size(aM.payments) == 3)) | |
500 | + | then [AttachedPayment(if ((aM.payments[2].assetId == base58'')) | |
501 | + | then unit | |
502 | + | else aM.payments[2].assetId, aM.payments[2].amount)] | |
503 | + | else nil)) | |
504 | + | let cE = invoke(this, "reissueShare", [cz], nil) | |
505 | + | if ((cE == cE)) | |
506 | + | then { | |
507 | + | let cF = invoke(X, "lockShareTokensFromPool", [aM.caller.bytes, toString(this), cf], cD) | |
508 | + | if ((cF == cF)) | |
509 | + | then cC | |
510 | + | else throw("Strict value is not equal to itself.") | |
511 | + | } | |
512 | + | else throw("Strict value is not equal to itself.") | |
513 | + | } | |
514 | + | else (cC ++ [Reissue(aq, cz, true), ScriptTransfer(aM.caller, cz, aq)]) | |
515 | + | } | |
516 | + | else throw("Strict value is not equal to itself.") | |
517 | + | } | |
518 | + | else throw("Strict value is not equal to itself.") | |
519 | + | } | |
520 | + | } | |
521 | + | ||
522 | + | ||
523 | + | func cG (aM,cH,cI,ce,cf) = { | |
524 | + | let cJ = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
525 | + | let cK = cJ._1 | |
526 | + | let cL = cJ._2 | |
527 | + | let cM = bz(cL) | |
528 | + | let cN = cM._1 | |
529 | + | let cO = cM._2 | |
530 | + | let cP = cM._3 | |
531 | + | let cQ = 5000000 | |
532 | + | let cR = 50000000 | |
533 | + | let cS = if ((cR > cK)) | |
534 | + | then 100000 | |
535 | + | else 1 | |
536 | + | let cT = (ax - ((ax * cS) / 10000000)) | |
537 | + | let cU = (ax + ((ax * cS) / 10000000)) | |
538 | + | let cV = (ax - ((ax * 1) / 10000000)) | |
539 | + | if ((cQ > cK)) | |
540 | + | then throw((((("Payment amount " + toString(cK)) + " does not exceed the minimum amount of ") + toString(cQ)) + " tokens")) | |
541 | + | else if (if ((size(aM.payments) != 1)) | |
542 | + | then (size(aM.payments) != 2) | |
543 | + | else false) | |
544 | + | then throw("One or two payments expected") | |
545 | + | else if (!(aT)) | |
546 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
547 | + | else if (if ((cL != ai)) | |
548 | + | then (cL != aj) | |
549 | + | else false) | |
550 | + | then bI() | |
551 | + | else { | |
552 | + | let cW = if ((cL == ai)) | |
553 | + | then $Tuple6((cK - cH), cI, (ao + cH), (ap - cI), (ao + cK), ap) | |
554 | + | else $Tuple6(cI, (cK - cH), (ao - cI), (ap + cH), ao, (ap + cK)) | |
555 | + | let cX = cW._1 | |
556 | + | let cY = cW._2 | |
557 | + | let cZ = cW._3 | |
558 | + | let da = cW._4 | |
559 | + | let db = cW._5 | |
560 | + | let dc = cW._6 | |
561 | + | let dd = aX(cZ, da) | |
562 | + | let de = (fraction(ay, cZ, da) / fraction(ax, cX, cY)) | |
563 | + | let df = fraction((db + dc), aA, (2 * aB)) | |
564 | + | if (if ((cV >= fraction(ax, as, dd))) | |
565 | + | then true | |
566 | + | else (as > dd)) | |
567 | + | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
568 | + | else if (if ((cT > de)) | |
569 | + | then true | |
570 | + | else (de > cU)) | |
571 | + | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
572 | + | else if (if ((df > db)) | |
573 | + | then true | |
574 | + | else (df > dc)) | |
575 | + | then bK(df, db, dc) | |
576 | + | else { | |
577 | + | let ci = fraction(cX, ax, cZ) | |
578 | + | let cj = fraction(cY, ax, da) | |
579 | + | let cz = fraction(min([ci, cj]), ar, ax) | |
580 | + | let dg = fraction(cz, (av - (at / 2)), av) | |
581 | + | let dh = fraction(cz, (au / 2), av) | |
582 | + | let di = fraction(dh, ao, ar) | |
583 | + | let dj = fraction(dh, ap, ar) | |
584 | + | let dk = if ((cN == ag)) | |
585 | + | then $Tuple3((cK - di), dj, ah) | |
586 | + | else $Tuple3((cK - dj), di, ag) | |
587 | + | let dl = dk._1 | |
588 | + | let dm = dk._2 | |
589 | + | let dn = dk._3 | |
590 | + | let cA = if (contains(Z, cN)) | |
591 | + | then invoke(this, "stakeUnstake", [true, dl, cN], nil) | |
592 | + | else 0 | |
593 | + | if ((cA == cA)) | |
594 | + | then { | |
595 | + | let cB = if (contains(Z, dn)) | |
596 | + | then invoke(this, "stakeUnstake", [false, dm, dn], nil) | |
597 | + | else 0 | |
598 | + | if ((cB == cB)) | |
599 | + | then { | |
600 | + | let cC = [IntegerEntry(g, (db - di)), IntegerEntry(h, (dc - dj)), IntegerEntry(j, (ar + dg)), IntegerEntry(l, aX((db - di), (dc - dj))), ScriptTransfer(T, di, ai), ScriptTransfer(T, dj, aj)] | |
601 | + | if (ce) | |
602 | + | then { | |
603 | + | let cD = ([AttachedPayment(aq, dg)] ++ (if ((size(aM.payments) == 2)) | |
604 | + | then [AttachedPayment(if ((aM.payments[1].assetId == base58'')) | |
605 | + | then unit | |
606 | + | else aM.payments[1].assetId, aM.payments[1].amount)] | |
607 | + | else nil)) | |
608 | + | let cE = invoke(this, "reissueShare", [dg], nil) | |
609 | + | if ((cE == cE)) | |
610 | + | then { | |
611 | + | let cF = invoke(X, "lockShareTokensFromPool", [aM.caller.bytes, toString(this), cf], cD) | |
612 | + | if ((cF == cF)) | |
613 | + | then cC | |
614 | + | else throw("Strict value is not equal to itself.") | |
615 | + | } | |
616 | + | else throw("Strict value is not equal to itself.") | |
617 | + | } | |
618 | + | else (cC ++ [Reissue(aq, dg, true), ScriptTransfer(aM.caller, dg, aq)]) | |
619 | + | } | |
620 | + | else throw("Strict value is not equal to itself.") | |
621 | + | } | |
622 | + | else throw("Strict value is not equal to itself.") | |
623 | + | } | |
624 | + | } | |
625 | + | } | |
626 | + | ||
627 | + | ||
628 | + | func do (aM,dp) = { | |
629 | + | let dq = if ((size(aM.payments) == 1)) | |
630 | + | then if ((aM.payments[0].assetId != aq)) | |
631 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(aq))) | |
632 | + | else $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
633 | + | else $Tuple2(0, aq) | |
634 | + | let cK = dq._1 | |
635 | + | let cL = dq._2 | |
636 | + | if (!(aT)) | |
637 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
638 | + | else { | |
639 | + | let dr = if ((dp > 0)) | |
640 | + | then invoke(X, "withdrawShareTokensFromPool", [aM.caller.bytes, toString(this), dp], nil) | |
641 | + | else 0 | |
642 | + | if ((dr == dr)) | |
643 | + | then { | |
644 | + | let ds = (cK + dp) | |
645 | + | let dt = fraction(ds, ao, ar) | |
646 | + | let du = fraction(ds, ap, ar) | |
647 | + | let dv = aX((ao - dt), (ap - du)) | |
648 | + | let cA = if (contains(Z, ag)) | |
649 | + | then invoke(this, "stakeUnstake", [false, dt, ag], nil) | |
650 | + | else 0 | |
651 | + | if ((cA == cA)) | |
652 | + | then { | |
653 | + | let cB = if (contains(Z, ah)) | |
654 | + | then invoke(this, "stakeUnstake", [false, du, ah], nil) | |
655 | + | else 0 | |
656 | + | if ((cB == cB)) | |
657 | + | then [IntegerEntry(g, (ao - dt)), IntegerEntry(h, (ap - du)), IntegerEntry(j, (ar - ds)), IntegerEntry(l, dv), Burn(aq, ds), ScriptTransfer(aM.caller, dt, ai), ScriptTransfer(aM.caller, du, aj)] | |
658 | + | else throw("Strict value is not equal to itself.") | |
659 | + | } | |
660 | + | else throw("Strict value is not equal to itself.") | |
661 | + | } | |
662 | + | else throw("Strict value is not equal to itself.") | |
663 | + | } | |
664 | + | } | |
665 | + | ||
666 | + | ||
667 | + | @Callable(aM) | |
668 | + | func init (dw) = { | |
669 | + | let dx = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
670 | + | let cu = dx._1 | |
671 | + | let cg = dx._2 | |
672 | + | let dy = $Tuple2(aM.payments[1].amount, aM.payments[1].assetId) | |
673 | + | let cv = dy._1 | |
674 | + | let ch = dy._2 | |
675 | + | let dz = bz(cg) | |
676 | + | let cl = dz._1 | |
677 | + | let cm = dz._2 | |
678 | + | let cn = dz._3 | |
679 | + | let dA = bz(ch) | |
680 | + | let cp = dA._1 | |
681 | + | let cq = dA._2 | |
682 | + | let cr = dA._3 | |
453 | 683 | if (isDefined(getBoolean(this, c))) | |
454 | - | then | |
455 | - | else if (( | |
684 | + | then bE() | |
685 | + | else if ((cg == ch)) | |
456 | 686 | then throw("Assets must be different") | |
457 | 687 | else { | |
458 | - | let | |
459 | - | let | |
460 | - | let | |
461 | - | let | |
462 | - | let | |
463 | - | let | |
464 | - | let | |
465 | - | let | |
466 | - | then invoke(this, "stakeUnstake", [true, | |
688 | + | let dB = ((("s" + take(cm, 7)) + "_") + take(cq, 7)) | |
689 | + | let dC = ((((("ShareToken of SwopFi protocol for " + cm) + " and ") + cq) + " at address ") + toString(this)) | |
690 | + | let dD = ((cn + cr) / 2) | |
691 | + | let dE = fraction(pow(cu, cn, 5, 1, cn, DOWN), pow(cv, cr, 5, 1, cr, DOWN), pow(10, 0, dD, 0, 0, DOWN)) | |
692 | + | let dF = Issue(dB, dC, dE, dD, true) | |
693 | + | let dG = calculateAssetId(dF) | |
694 | + | let dv = aX(cu, cv) | |
695 | + | let cA = if (contains(Z, cl)) | |
696 | + | then invoke(this, "stakeUnstake", [true, cu, cl], nil) | |
467 | 697 | else 0 | |
468 | - | if (( | |
698 | + | if ((cA == cA)) | |
469 | 699 | then { | |
470 | - | let | |
471 | - | then invoke(this, "stakeUnstake", [true, | |
700 | + | let cB = if (contains(Z, cp)) | |
701 | + | then invoke(this, "stakeUnstake", [true, cv, cp], nil) | |
472 | 702 | else 0 | |
473 | - | if (( | |
703 | + | if ((cB == cB)) | |
474 | 704 | then { | |
475 | - | let | |
476 | - | if ( | |
477 | - | then ( | |
478 | - | else | |
705 | + | let dH = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(e, cl), StringEntry(f, cp), IntegerEntry(g, cu), IntegerEntry(h, cv), IntegerEntry(l, dv), IntegerEntry(k, getIntegerValue(J, "base_fee_flat")), dF, StringEntry(i, toBase58String(dG)), IntegerEntry(j, dE), ScriptTransfer(aM.caller, dE, dG)] | |
706 | + | if (dw) | |
707 | + | then (dH ++ [BooleanEntry(t, dw), IntegerEntry(u, (ab + (ad * ac)))]) | |
708 | + | else dH | |
479 | 709 | } | |
480 | 710 | else throw("Strict value is not equal to itself.") | |
481 | 711 | } | |
482 | 712 | else throw("Strict value is not equal to itself.") | |
483 | 713 | } | |
484 | 714 | } | |
485 | 715 | ||
486 | 716 | ||
487 | 717 | ||
488 | - | @Callable(aK) | |
489 | - | func replenishWithTwoTokens (cA,cB) = valueOrElse(bD(), { | |
490 | - | let ce = aK.payments[0].assetId | |
491 | - | let ch = aK.payments[1].assetId | |
492 | - | let cC = fraction(av, aK.payments[0].amount, am) | |
493 | - | let cD = fraction(av, aK.payments[1].amount, an) | |
494 | - | let cE = bx(ce) | |
495 | - | let cj = cE._1 | |
496 | - | let ck = cE._2 | |
497 | - | let cl = cE._3 | |
498 | - | let cF = bx(ch) | |
499 | - | let cn = cF._1 | |
500 | - | let co = cF._2 | |
501 | - | let cp = cF._3 | |
502 | - | let cG = if ((cD > cC)) | |
503 | - | then { | |
504 | - | let cH = fraction(an, cC, av, CEILING) | |
505 | - | $Tuple5(aK.payments[0].amount, cH, (aK.payments[1].amount - cH), ch, cC) | |
506 | - | } | |
507 | - | else { | |
508 | - | let cH = fraction(am, cD, av, CEILING) | |
509 | - | $Tuple5(cH, aK.payments[1].amount, (aK.payments[0].amount - cH), ce, cD) | |
510 | - | } | |
511 | - | let cd = cG._1 | |
512 | - | let cg = cG._2 | |
513 | - | let cI = cG._3 | |
514 | - | let cJ = cG._4 | |
515 | - | let cK = cG._5 | |
516 | - | let cL = fraction(cK, ap, av) | |
517 | - | if (if ((size(aK.payments) != 2)) | |
518 | - | then (size(aK.payments) != 3) | |
718 | + | @Callable(aM) | |
719 | + | func replenishWithTwoTokensV2 (ce,cf) = valueOrElse(bF(), cd(aM, ce, cf)) | |
720 | + | ||
721 | + | ||
722 | + | ||
723 | + | @Callable(aM) | |
724 | + | func replenishWithOneTokenV2 (cH,cI,ce,cf) = valueOrElse(bF(), cG(aM, cH, cI, ce, cf)) | |
725 | + | ||
726 | + | ||
727 | + | ||
728 | + | @Callable(aM) | |
729 | + | func withdrawV2 (dp) = valueOrElse(bF(), do(aM, dp)) | |
730 | + | ||
731 | + | ||
732 | + | ||
733 | + | @Callable(aM) | |
734 | + | func withdrawOneToken (dp,dI,dJ,dK) = valueOrElse(bF(), { | |
735 | + | let dL = if ((size(aM.payments) == 1)) | |
736 | + | then if ((aM.payments[0].assetId != aq)) | |
737 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(aq))) | |
738 | + | else $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
739 | + | else $Tuple2(0, aq) | |
740 | + | let cK = dL._1 | |
741 | + | let cL = dL._2 | |
742 | + | let ds = (cK + dp) | |
743 | + | if (if ((dI != ag)) | |
744 | + | then (dI != ah) | |
519 | 745 | else false) | |
520 | - | then throw("Two or three payments expected") | |
521 | - | else if (if ((ce != ag)) | |
522 | - | then true | |
523 | - | else (ch != ah)) | |
524 | - | then bG() | |
525 | - | else if ((cL == 0)) | |
526 | - | then throw("Too small amount to replenish") | |
527 | - | else if ((0 > cI)) | |
528 | - | then throw("Change < 0") | |
529 | - | else if (!(aR)) | |
530 | - | then ([ScriptTransfer(aK.caller, cd, ce), ScriptTransfer(aK.caller, cg, ch)] ++ bM()) | |
531 | - | else { | |
532 | - | let cx = if (contains(Y, cj)) | |
533 | - | then invoke(this, "stakeUnstake", [true, cd, cj], nil) | |
746 | + | then throw("Incorrect withdraw asset") | |
747 | + | else if ((0 >= ds)) | |
748 | + | then throw("withdraw amount must be grater than 0") | |
749 | + | else if (!(aT)) | |
750 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
751 | + | else { | |
752 | + | let dr = if ((dp > 0)) | |
753 | + | then invoke(X, "withdrawShareTokensFromPool", [aM.caller.bytes, toString(this), dp], nil) | |
754 | + | else 0 | |
755 | + | if ((dr == dr)) | |
756 | + | then { | |
757 | + | let dt = fraction(ds, ao, ar) | |
758 | + | let du = fraction(ds, ap, ar) | |
759 | + | let dM = (ao - dt) | |
760 | + | let dN = (ap - du) | |
761 | + | let dO = bX(aM.originCaller) | |
762 | + | let dP = if ((dI == ag)) | |
763 | + | then aZ(dJ, dK, du, aj, dM, dN, aX(dM, dN)) | |
764 | + | else aZ(dJ, dK, dt, ai, dM, dN, aX(dM, dN)) | |
765 | + | let dQ = fraction(dP, fraction(au, dO, av, CEILING), av) | |
766 | + | let dR = fraction(dP, (av - fraction(at, dO, av, CEILING)), av) | |
767 | + | let dS = if ((dI == ag)) | |
768 | + | then $Tuple3((dt + dR), (((ao - dt) - dR) - dQ), ap) | |
769 | + | else $Tuple3((du + dR), ao, (((ap - du) - dR) - dQ)) | |
770 | + | let dT = dS._1 | |
771 | + | let dU = dS._2 | |
772 | + | let dV = dS._3 | |
773 | + | let dv = aX(dU, dV) | |
774 | + | let cA = if (contains(Z, dI)) | |
775 | + | then invoke(this, "stakeUnstake", [false, (dT + dQ), dI], nil) | |
534 | 776 | else 0 | |
535 | - | if ((cx == cx)) | |
536 | - | then { | |
537 | - | let cy = if (contains(Y, cn)) | |
538 | - | then invoke(this, "stakeUnstake", [true, cg, cn], nil) | |
539 | - | else 0 | |
540 | - | if ((cy == cy)) | |
541 | - | then { | |
542 | - | let cM = [IntegerEntry(f, (am + cd)), IntegerEntry(g, (an + cg)), IntegerEntry(i, (ap + cL)), IntegerEntry(k, aV((am + cd), (an + cg))), ScriptTransfer(aK.caller, cI, cJ)] | |
543 | - | if (cA) | |
544 | - | then { | |
545 | - | let cN = ([AttachedPayment(ao, cL)] ++ (if ((size(aK.payments) == 3)) | |
546 | - | then [AttachedPayment(aK.payments[2].assetId, aK.payments[2].amount)] | |
547 | - | else nil)) | |
548 | - | let cO = invoke(this, "reissueShare", [cL], nil) | |
549 | - | if ((cO == cO)) | |
550 | - | then { | |
551 | - | let cP = invoke(W, "lockShareTokens", [toString(this), cB], cN) | |
552 | - | if ((cP == cP)) | |
553 | - | then cM | |
554 | - | else throw("Strict value is not equal to itself.") | |
555 | - | } | |
556 | - | else throw("Strict value is not equal to itself.") | |
557 | - | } | |
558 | - | else (cM ++ [Reissue(ao, cL, true), ScriptTransfer(aK.caller, cL, ao)]) | |
559 | - | } | |
560 | - | else throw("Strict value is not equal to itself.") | |
561 | - | } | |
777 | + | if ((cA == cA)) | |
778 | + | then [IntegerEntry(g, dU), IntegerEntry(h, dV), IntegerEntry(j, (ar - ds)), IntegerEntry(l, dv), Burn(aq, ds), ScriptTransfer(aM.caller, dT, fromBase58String(dI)), ScriptTransfer(T, dQ, fromBase58String(dI))] | |
562 | 779 | else throw("Strict value is not equal to itself.") | |
563 | 780 | } | |
781 | + | else throw("Strict value is not equal to itself.") | |
782 | + | } | |
564 | 783 | }) | |
565 | 784 | ||
566 | 785 | ||
567 | 786 | ||
568 | - | @Callable(aK) | |
569 | - | func replenishWithOneToken (cQ,cR,cA,cB) = valueOrElse(bD(), { | |
570 | - | let cS = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
571 | - | let cT = cS._1 | |
572 | - | let cU = cS._2 | |
573 | - | let cV = bx(cU) | |
574 | - | let cW = cV._1 | |
575 | - | let cX = cV._2 | |
576 | - | let cY = cV._3 | |
577 | - | let cZ = 5000000 | |
578 | - | let da = 50000000 | |
579 | - | let db = if ((da > cT)) | |
580 | - | then 100000 | |
581 | - | else 1 | |
582 | - | let dc = (av - ((av * db) / 10000000)) | |
583 | - | let dd = (av + ((av * db) / 10000000)) | |
584 | - | let de = (av - ((av * 1) / 10000000)) | |
585 | - | if ((cZ > cT)) | |
586 | - | then throw((((("Payment amount " + toString(cT)) + " does not exceed the minimum amount of ") + toString(cZ)) + " tokens")) | |
587 | - | else if (if ((size(aK.payments) != 1)) | |
588 | - | then (size(aK.payments) != 2) | |
589 | - | else false) | |
590 | - | then throw("One or two payments expected") | |
591 | - | else if (!(aR)) | |
592 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
593 | - | else if (if ((cU != ag)) | |
594 | - | then (cU != ah) | |
595 | - | else false) | |
596 | - | then bG() | |
597 | - | else { | |
598 | - | let df = if ((cU == ag)) | |
599 | - | then $Tuple6((cT - cQ), cR, (am + cQ), (an - cR), (am + cT), an) | |
600 | - | else $Tuple6(cR, (cT - cQ), (am - cR), (an + cQ), am, (an + cT)) | |
601 | - | let dg = df._1 | |
602 | - | let dh = df._2 | |
603 | - | let di = df._3 | |
604 | - | let dj = df._4 | |
605 | - | let dk = df._5 | |
606 | - | let dl = df._6 | |
607 | - | let dm = aV(di, dj) | |
608 | - | let dn = (fraction(aw, di, dj) / fraction(av, dg, dh)) | |
609 | - | let do = fraction((dk + dl), ay, (2 * az)) | |
610 | - | if (if ((de >= fraction(av, aq, dm))) | |
611 | - | then true | |
612 | - | else (aq > dm)) | |
613 | - | then throw("Incorrect virtualSwapTokenPay or virtualSwapTokenGet value") | |
614 | - | else if (if ((dc > dn)) | |
787 | + | @Callable(aM) | |
788 | + | func exchange (dJ,dK) = valueOrElse(bF(), { | |
789 | + | let dW = $Tuple2(aM.payments[0].amount, aM.payments[0].assetId) | |
790 | + | let cK = dW._1 | |
791 | + | let cL = dW._2 | |
792 | + | if ((0 >= dJ)) | |
793 | + | then throw(("Estimated amount must be positive. Actual: " + toString(dJ))) | |
794 | + | else if ((dK > dJ)) | |
795 | + | then throw("Minimal amount can't be greater than estimated.") | |
796 | + | else if ((size(aM.payments) != 1)) | |
797 | + | then bJ() | |
798 | + | else if (!(aT)) | |
799 | + | then ([ScriptTransfer(aM.caller, cK, cL)] ++ bO()) | |
800 | + | else if (if ((cL != ai)) | |
801 | + | then (cL != aj) | |
802 | + | else false) | |
803 | + | then bI() | |
804 | + | else if ((10000000 > cK)) | |
805 | + | then throw("Only swap of 10.000000 or more tokens is allowed") | |
806 | + | else if (if ((aC > fraction(ax, dK, cK))) | |
615 | 807 | then true | |
616 | - | else (dn > dd)) | |
617 | - | then throw("Swap with virtualSwapTokenPay and virtualSwapTokenGet is possible, but ratio after virtual swap is incorrect") | |
618 | - | else if (if ((do > dk)) | |
619 | - | then true | |
620 | - | else (do > dl)) | |
621 | - | then bI(do, dk, dl) | |
622 | - | else { | |
623 | - | let cC = fraction(dg, av, di) | |
624 | - | let cD = fraction(dh, av, dj) | |
625 | - | let cL = fraction(min([cC, cD]), ap, av) | |
626 | - | let dp = fraction(cL, (at - (ar / 2)), at) | |
627 | - | let dq = fraction(cL, (as / 2), at) | |
628 | - | let dr = fraction(dq, am, ap) | |
629 | - | let ds = fraction(dq, an, ap) | |
630 | - | let dt = if ((cW == ae)) | |
631 | - | then $Tuple3((cT - dr), ds, af) | |
632 | - | else $Tuple3((cT - ds), dr, ae) | |
633 | - | let du = dt._1 | |
634 | - | let dv = dt._2 | |
635 | - | let dw = dt._3 | |
636 | - | let cx = if (contains(Y, cW)) | |
637 | - | then invoke(this, "stakeUnstake", [true, du, cW], nil) | |
638 | - | else 0 | |
639 | - | if ((cx == cx)) | |
640 | - | then { | |
641 | - | let cy = if (contains(Y, dw)) | |
642 | - | then invoke(this, "stakeUnstake", [false, dv, dw], nil) | |
643 | - | else 0 | |
644 | - | if ((cy == cy)) | |
645 | - | then { | |
646 | - | let cM = [IntegerEntry(f, (dk - dr)), IntegerEntry(g, (dl - ds)), IntegerEntry(i, (ap + dp)), IntegerEntry(k, aV((dk - dr), (dl - ds))), ScriptTransfer(S, dr, ag), ScriptTransfer(S, ds, ah)] | |
647 | - | if (cA) | |
648 | - | then { | |
649 | - | let cN = ([AttachedPayment(ao, dp)] ++ (if ((size(aK.payments) == 2)) | |
650 | - | then [AttachedPayment(aK.payments[1].assetId, aK.payments[1].amount)] | |
651 | - | else nil)) | |
652 | - | let cO = invoke(this, "reissueShare", [dp], nil) | |
653 | - | if ((cO == cO)) | |
654 | - | then { | |
655 | - | let cP = invoke(W, "lockShareTokens", [toString(this), cB], cN) | |
656 | - | if ((cP == cP)) | |
657 | - | then cM | |
658 | - | else throw("Strict value is not equal to itself.") | |
659 | - | } | |
660 | - | else throw("Strict value is not equal to itself.") | |
661 | - | } | |
662 | - | else (cM ++ [Reissue(ao, dp, true), ScriptTransfer(aK.caller, dp, ao)]) | |
663 | - | } | |
664 | - | else throw("Strict value is not equal to itself.") | |
665 | - | } | |
666 | - | else throw("Strict value is not equal to itself.") | |
667 | - | } | |
668 | - | } | |
669 | - | }) | |
670 | - | ||
671 | - | ||
672 | - | ||
673 | - | @Callable(aK) | |
674 | - | func withdraw (dx) = valueOrElse(bD(), { | |
675 | - | let dy = if ((size(aK.payments) == 1)) | |
676 | - | then if ((aK.payments[0].assetId != ao)) | |
677 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(ao))) | |
678 | - | else $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
679 | - | else $Tuple2(0, ao) | |
680 | - | let cT = dy._1 | |
681 | - | let cU = dy._2 | |
682 | - | if (!(aR)) | |
683 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
684 | - | else { | |
685 | - | let dz = if ((dx > 0)) | |
686 | - | then invoke(W, "withdrawShareTokens", [toString(this), dx], nil) | |
687 | - | else 0 | |
688 | - | if ((dz == dz)) | |
689 | - | then { | |
690 | - | let dA = (cT + dx) | |
691 | - | let dB = fraction(dA, am, ap) | |
692 | - | let dC = fraction(dA, an, ap) | |
693 | - | let cw = aV((am - dB), (an - dC)) | |
694 | - | let cx = if (contains(Y, ae)) | |
695 | - | then invoke(this, "stakeUnstake", [false, dB, ae], nil) | |
696 | - | else 0 | |
697 | - | if ((cx == cx)) | |
698 | - | then { | |
699 | - | let cy = if (contains(Y, af)) | |
700 | - | then invoke(this, "stakeUnstake", [false, dC, af], nil) | |
701 | - | else 0 | |
702 | - | if ((cy == cy)) | |
703 | - | then [IntegerEntry(f, (am - dB)), IntegerEntry(g, (an - dC)), IntegerEntry(i, (ap - dA)), IntegerEntry(k, cw), Burn(ao, dA), ScriptTransfer(aK.caller, dB, ag), ScriptTransfer(aK.caller, dC, ah)] | |
704 | - | else throw("Strict value is not equal to itself.") | |
705 | - | } | |
706 | - | else throw("Strict value is not equal to itself.") | |
707 | - | } | |
708 | - | else throw("Strict value is not equal to itself.") | |
709 | - | } | |
710 | - | }) | |
711 | - | ||
712 | - | ||
713 | - | ||
714 | - | @Callable(aK) | |
715 | - | func withdrawOneToken (dx,dD,dE,dF) = { | |
716 | - | let dG = if ((size(aK.payments) == 1)) | |
717 | - | then if ((aK.payments[0].assetId != ao)) | |
718 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(ao))) | |
719 | - | else $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
720 | - | else $Tuple2(0, ao) | |
721 | - | let cT = dG._1 | |
722 | - | let cU = dG._2 | |
723 | - | if (if ((dD != ae)) | |
724 | - | then (dD != af) | |
725 | - | else false) | |
726 | - | then throw("Incorrect withdraw asset") | |
727 | - | else if (!(aR)) | |
728 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
729 | - | else { | |
730 | - | let dz = if ((dx > 0)) | |
731 | - | then invoke(W, "withdrawShareTokens", [toString(this), dx], nil) | |
732 | - | else 0 | |
733 | - | if ((dz == dz)) | |
734 | - | then { | |
735 | - | let dA = (cT + dx) | |
736 | - | let dB = fraction(dA, am, ap) | |
737 | - | let dC = fraction(dA, an, ap) | |
738 | - | let dH = (am - dB) | |
739 | - | let dI = (an - dC) | |
740 | - | let dJ = bV(aK.originCaller) | |
741 | - | let dK = if ((dD == ae)) | |
742 | - | then aX(dE, dF, dC, ah, dH, dI, aV(dH, dI)) | |
743 | - | else aX(dE, dF, dB, ag, dH, dI, aV(dH, dI)) | |
744 | - | let dL = fraction(dK, fraction(as, dJ, at, CEILING), at) | |
745 | - | let dM = fraction(dK, (at - fraction(ar, dJ, at, CEILING)), at) | |
746 | - | let dN = if ((dD == ae)) | |
747 | - | then $Tuple3((dB + dM), (((am - dB) - dM) - dL), an) | |
748 | - | else $Tuple3((dC + dM), am, (((an - dC) - dM) - dL)) | |
749 | - | let dO = dN._1 | |
750 | - | let dP = dN._2 | |
751 | - | let dQ = dN._3 | |
752 | - | let cw = aV(dP, dQ) | |
753 | - | let cx = if (contains(Y, dD)) | |
754 | - | then invoke(this, "stakeUnstake", [false, (dO + dL), dD], nil) | |
755 | - | else 0 | |
756 | - | if ((cx == cx)) | |
757 | - | then [IntegerEntry(f, dP), IntegerEntry(g, dQ), IntegerEntry(i, (ap - dA)), IntegerEntry(k, cw), Burn(ao, dA), ScriptTransfer(aK.caller, dO, fromBase58String(dD)), ScriptTransfer(S, dL, fromBase58String(dD))] | |
758 | - | else throw("Strict value is not equal to itself.") | |
759 | - | } | |
760 | - | else throw("Strict value is not equal to itself.") | |
761 | - | } | |
762 | - | } | |
763 | - | ||
764 | - | ||
765 | - | ||
766 | - | @Callable(aK) | |
767 | - | func exchange (dE,dF) = valueOrElse(bD(), { | |
768 | - | let dR = $Tuple2(aK.payments[0].amount, aK.payments[0].assetId) | |
769 | - | let cT = dR._1 | |
770 | - | let cU = dR._2 | |
771 | - | if ((0 >= dE)) | |
772 | - | then throw(("Estimated amount must be positive. Actual: " + toString(dE))) | |
773 | - | else if ((dF > dE)) | |
774 | - | then throw("Minimal amount can't be greater than estimated.") | |
775 | - | else if ((size(aK.payments) != 1)) | |
776 | - | then bH() | |
777 | - | else if (!(aR)) | |
778 | - | then ([ScriptTransfer(aK.caller, cT, cU)] ++ bM()) | |
779 | - | else if (if ((cU != ag)) | |
780 | - | then (cU != ah) | |
781 | - | else false) | |
782 | - | then bG() | |
783 | - | else if ((10000000 > cT)) | |
784 | - | then throw("Only swap of 10.000000 or more tokens is allowed") | |
785 | - | else if (if ((aA > fraction(av, dF, cT))) | |
786 | - | then true | |
787 | - | else (fraction(av, dE, cT) > aB)) | |
808 | + | else (fraction(ax, dJ, cK) > aD)) | |
788 | 809 | then throw("Incorrect args and pmt ratio") | |
789 | 810 | else { | |
790 | - | let | |
791 | - | then | |
792 | - | else | |
793 | - | let | |
794 | - | let | |
795 | - | let | |
796 | - | let | |
797 | - | let | |
798 | - | then $Tuple2(( | |
799 | - | else $Tuple2((( | |
800 | - | let | |
801 | - | let | |
802 | - | let | |
803 | - | if (if (( | |
811 | + | let dX = if ((cL == ai)) | |
812 | + | then aj | |
813 | + | else ai | |
814 | + | let bS = aZ(dJ, dK, cK, cL, ao, ap, as) | |
815 | + | let dO = bX(aM.originCaller) | |
816 | + | let dY = fraction(bS, fraction(au, dO, av, CEILING), av) | |
817 | + | let dZ = fraction(bS, (av - fraction(at, dO, av, CEILING)), av) | |
818 | + | let ea = if ((cL == ai)) | |
819 | + | then $Tuple2((ao + cK), ((ap - dZ) - dY)) | |
820 | + | else $Tuple2(((ao - dZ) - dY), (ap + cK)) | |
821 | + | let db = ea._1 | |
822 | + | let dc = ea._2 | |
823 | + | let df = fraction((db + dc), aA, (2 * aB)) | |
824 | + | if (if ((df > db)) | |
804 | 825 | then true | |
805 | - | else ( | |
806 | - | then | |
826 | + | else (df > dc)) | |
827 | + | then bK(df, db, dc) | |
807 | 828 | else { | |
808 | - | let | |
809 | - | let | |
810 | - | let | |
811 | - | let | |
812 | - | let | |
813 | - | let | |
814 | - | let | |
815 | - | let | |
816 | - | let | |
817 | - | then invoke(this, "stakeUnstake", [true, | |
829 | + | let eb = bz(cL) | |
830 | + | let cN = eb._1 | |
831 | + | let cO = eb._2 | |
832 | + | let cP = eb._3 | |
833 | + | let ec = bz(dX) | |
834 | + | let ed = ec._1 | |
835 | + | let ee = ec._2 | |
836 | + | let ef = ec._3 | |
837 | + | let cA = if (contains(Z, cN)) | |
838 | + | then invoke(this, "stakeUnstake", [true, cK, cN], nil) | |
818 | 839 | else 0 | |
819 | - | if (( | |
840 | + | if ((cA == cA)) | |
820 | 841 | then { | |
821 | - | let | |
822 | - | then invoke(this, "stakeUnstake", [false, ( | |
842 | + | let cB = if (contains(Z, ed)) | |
843 | + | then invoke(this, "stakeUnstake", [false, (dZ + dY), ed], nil) | |
823 | 844 | else 0 | |
824 | - | if (( | |
825 | - | then $Tuple2([IntegerEntry( | |
845 | + | if ((cB == cB)) | |
846 | + | then $Tuple2([IntegerEntry(g, db), IntegerEntry(h, dc), IntegerEntry(l, aX(db, dc)), ScriptTransfer(aM.caller, dZ, dX), ScriptTransfer(T, dY, dX)], [dZ, dX]) | |
826 | 847 | else throw("Strict value is not equal to itself.") | |
827 | 848 | } | |
828 | 849 | else throw("Strict value is not equal to itself.") | |
829 | 850 | } | |
830 | 851 | } | |
831 | 852 | }) | |
832 | 853 | ||
833 | 854 | ||
834 | 855 | ||
835 | - | @Callable( | |
836 | - | func reissueShare ( | |
856 | + | @Callable(eg) | |
857 | + | func reissueShare (bS) = valueOrElse(bH(eg), [Reissue(aq, bS, true)]) | |
837 | 858 | ||
838 | 859 | ||
839 | 860 | ||
840 | - | @Callable( | |
841 | - | func shutdown () = valueOrElse( | |
842 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, | |
843 | - | else | |
861 | + | @Callable(aM) | |
862 | + | func shutdown () = valueOrElse(bG(aM), if (!(ae)) | |
863 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, m), "the cause wasn't specified"))) | |
864 | + | else bC("Paused by admin")) | |
844 | 865 | ||
845 | 866 | ||
846 | 867 | ||
847 | - | @Callable( | |
848 | - | func activate () = valueOrElse( | |
849 | - | then | |
850 | - | else [BooleanEntry(c, true), DeleteEntry( | |
868 | + | @Callable(aM) | |
869 | + | func activate () = valueOrElse(bG(aM), if (ae) | |
870 | + | then bE() | |
871 | + | else [BooleanEntry(c, true), DeleteEntry(m)]) | |
851 | 872 | ||
852 | 873 | ||
853 | 874 | ||
854 | - | @Callable( | |
855 | - | func takeIntoAccountExtraFunds () = valueOrElse( | |
856 | - | let | |
857 | - | let | |
858 | - | let | |
859 | - | if (( | |
875 | + | @Callable(aM) | |
876 | + | func takeIntoAccountExtraFunds () = valueOrElse(bF(), { | |
877 | + | let eh = (aR - ao) | |
878 | + | let ei = (aS - ap) | |
879 | + | let dd = aX((ao + eh), (ap + ei)) | |
880 | + | if ((aM.caller != T)) | |
860 | 881 | then throw("Only the money box can call this function") | |
861 | - | else if (if ((0 > | |
882 | + | else if (if ((0 > eh)) | |
862 | 883 | then true | |
863 | - | else (0 > | |
864 | - | then | |
865 | - | else if (if (( | |
866 | - | then ( | |
884 | + | else (0 > ei)) | |
885 | + | then bC("Enroll amount negative") | |
886 | + | else if (if ((eh == 0)) | |
887 | + | then (ei == 0) | |
867 | 888 | else false) | |
868 | 889 | then throw("No money to take") | |
869 | 890 | else { | |
870 | - | let | |
871 | - | then ( | |
891 | + | let cA = if (if (contains(Z, ag)) | |
892 | + | then (eh > 0) | |
872 | 893 | else false) | |
873 | - | then invoke(this, "stakeUnstake", [true, | |
894 | + | then invoke(this, "stakeUnstake", [true, eh, ag], nil) | |
874 | 895 | else 0 | |
875 | - | if (( | |
896 | + | if ((cA == cA)) | |
876 | 897 | then { | |
877 | - | let | |
878 | - | then ( | |
898 | + | let cB = if (if (contains(Z, ah)) | |
899 | + | then (ei > 0) | |
879 | 900 | else false) | |
880 | - | then invoke(this, "stakeUnstake", [true, | |
901 | + | then invoke(this, "stakeUnstake", [true, ei, ah], nil) | |
881 | 902 | else 0 | |
882 | - | if (( | |
883 | - | then [IntegerEntry( | |
903 | + | if ((cB == cB)) | |
904 | + | then [IntegerEntry(l, dd), IntegerEntry(g, (ao + eh)), IntegerEntry(h, (ap + ei))] | |
884 | 905 | else throw("Strict value is not equal to itself.") | |
885 | 906 | } | |
886 | 907 | else throw("Strict value is not equal to itself.") | |
887 | 908 | } | |
888 | 909 | }) | |
889 | 910 | ||
890 | 911 | ||
891 | 912 | ||
892 | - | @Callable( | |
893 | - | func keepLimitForFirstHarvest ( | |
913 | + | @Callable(aM) | |
914 | + | func keepLimitForFirstHarvest (ej) = valueOrElse(bF(), valueOrElse(bG(aM), [IntegerEntry(v, ej)])) | |
894 | 915 | ||
895 | 916 | ||
896 | 917 | ||
897 | - | @Callable( | |
898 | - | func stakeUnstake ( | |
918 | + | @Callable(aM) | |
919 | + | func stakeUnstake (bQ,bS,ek) = if ((aM.caller != this)) | |
899 | 920 | then throw("Only contract itself can invoke this function") | |
900 | 921 | else { | |
901 | - | let | |
902 | - | let | |
903 | - | let | |
904 | - | let | |
905 | - | let | |
906 | - | let | |
907 | - | if (( | |
922 | + | let el = bR(bQ, bS, fromBase58String(ek)) | |
923 | + | let bU = el._1 | |
924 | + | let em = el._2 | |
925 | + | let en = el._3 | |
926 | + | let eo = el._4 | |
927 | + | let ep = invoke(em, bU, en, eo) | |
928 | + | if ((ep == ep)) | |
908 | 929 | then nil | |
909 | 930 | else throw("Strict value is not equal to itself.") | |
910 | 931 | } | |
911 | 932 | ||
912 | 933 | ||
913 | - | @Verifier(el) | |
914 | - | func em () = { | |
915 | - | let en = { | |
916 | - | let eo = if (sigVerify(el.bodyBytes, el.proofs[0], O)) | |
934 | + | ||
935 | + | @Callable(aM) | |
936 | + | func replenishWithTwoTokens () = valueOrElse(bF(), cd(aM, false, 0)) | |
937 | + | ||
938 | + | ||
939 | + | ||
940 | + | @Callable(aM) | |
941 | + | func replenishWithOneToken (cH,cI) = valueOrElse(bF(), cG(aM, cH, cI, false, 0)) | |
942 | + | ||
943 | + | ||
944 | + | ||
945 | + | @Callable(aM) | |
946 | + | func withdraw () = valueOrElse(bF(), do(aM, 0)) | |
947 | + | ||
948 | + | ||
949 | + | @Verifier(eq) | |
950 | + | func er () = { | |
951 | + | let es = { | |
952 | + | let et = if (sigVerify(eq.bodyBytes, eq.proofs[0], P)) | |
917 | 953 | then 1 | |
918 | 954 | else 0 | |
919 | - | let | |
955 | + | let eu = if (sigVerify(eq.bodyBytes, eq.proofs[1], Q)) | |
920 | 956 | then 1 | |
921 | 957 | else 0 | |
922 | - | let | |
958 | + | let ev = if (sigVerify(eq.bodyBytes, eq.proofs[2], R)) | |
923 | 959 | then 1 | |
924 | 960 | else 0 | |
925 | - | ((( | |
961 | + | (((et + eu) + ev) >= 2) | |
926 | 962 | } | |
927 | - | let | |
928 | - | if ($isInstanceOf( | |
963 | + | let M = eq | |
964 | + | if ($isInstanceOf(M, "InvokeScriptTransaction")) | |
929 | 965 | then { | |
930 | - | let | |
931 | - | let | |
932 | - | then ( | |
966 | + | let ep = M | |
967 | + | let ew = if ((ep.dApp == this)) | |
968 | + | then (ep.function == "takeIntoAccountExtraFunds") | |
933 | 969 | else false | |
934 | - | let | |
970 | + | let ex = if (if (if (sigVerify(eq.bodyBytes, eq.proofs[0], P)) | |
935 | 971 | then true | |
936 | - | else sigVerify( | |
972 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], Q)) | |
937 | 973 | then true | |
938 | - | else sigVerify( | |
974 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], R)) | |
939 | 975 | then true | |
940 | - | else sigVerify( | |
941 | - | if (if ( | |
942 | - | then | |
976 | + | else sigVerify(eq.bodyBytes, eq.proofs[0], S) | |
977 | + | if (if (ew) | |
978 | + | then ex | |
943 | 979 | else false) | |
944 | 980 | then true | |
945 | - | else | |
981 | + | else es | |
946 | 982 | } | |
947 | - | else | |
983 | + | else es | |
948 | 984 | } | |
949 | 985 |
github/deemru/w8io/026f985 286.15 ms ◑