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