tx · CWa7rzWnjopxgzHUqaFMAucGu73gRRxWJ9K7H3PGFqxG 3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY: -0.01400000 Waves 2021.07.28 16:26 [1633559] smart account 3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY > SELF 0.00000000 Waves
{ "type": 13, "id": "CWa7rzWnjopxgzHUqaFMAucGu73gRRxWJ9K7H3PGFqxG", "fee": 1400000, "feeAssetId": null, "timestamp": 1627478793846, "version": 2, "chainId": 84, "sender": "3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY", "senderPublicKey": "DhKV985fxsz63vhWDNTF3gWwe7AHS4RsGjR2BzThJRYa", "proofs": [ "1L1h5YrXY3hmDVk1SDgF2j6TJM7QpjbC8FRt7JoRa3XWrf5aXSrKrktXD7oW4qXVC5WuYDuSJD6tNHwK4GVFX6W", "x6yh8mA6UGHYQjpgbbRz2Rs5FDzpp19Zk3qQW8wBheBohH3CNBrCQHwb8ZoAe58KgR1fKR5m8kaH5c3eYAYxgmh" ], "script": "base64:AAIFAAAAAAAAACoIAhIDCgEEEgcKBQEBCAgEEgMKAQESAwoBARIAEgMKAQESABIAEgMKAQEAAABUAAAAAAd2ZXJzaW9uAgAAAAUxLjAuMAAAAAAKa2V5VmVyc2lvbgIAAAAHdmVyc2lvbgAAAAAJa2V5QWN0aXZlAgAAAAZhY3RpdmUAAAAAC2tleUFzc2V0SWRBAgAAAApBX2Fzc2V0X2lkAAAAAAtrZXlBc3NldElkQgIAAAAKQl9hc3NldF9pZAAAAAALa2V5QmFsYW5jZUECAAAAD0FfYXNzZXRfYmFsYW5jZQAAAAALa2V5QmFsYW5jZUICAAAAD0JfYXNzZXRfYmFsYW5jZQAAAAAPa2V5QmFsYW5jZUluaXRBAgAAAAxBX2Fzc2V0X2luaXQAAAAAD2tleUJhbGFuY2VJbml0QgIAAAAMQl9hc3NldF9pbml0AAAAAA9rZXlTaGFyZUFzc2V0SWQCAAAADnNoYXJlX2Fzc2V0X2l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WduZWRCeUFkbWluczFCB1g=", "height": 1633559, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2D7fadJmPTPzQ84crsgEEFX1AVQsCbXhE6TiWpVpt5Qr Next: 2he85K197PvpzabRUq6iYpSV5KUjCiKfTsR4eBPBW8pK Diff:
Old | New | Differences | |
---|---|---|---|
15 | 15 | ||
16 | 16 | let g = "B_asset_balance" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "A_asset_init" | |
19 | 19 | ||
20 | - | let i = " | |
20 | + | let i = "B_asset_init" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "share_asset_id" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "share_asset_supply" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "commission" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "commission_scale_delimiter" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "shutdown_cause" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "first_harvest" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "first_harvest_height" | |
35 | 35 | ||
36 | - | func q (r) = { | |
37 | - | let s = getString(p, r) | |
38 | - | if ($isInstanceOf(s, "String")) | |
36 | + | let q = "share_limit_on_first_harvest" | |
37 | + | ||
38 | + | let r = "base_period" | |
39 | + | ||
40 | + | let s = "period_length" | |
41 | + | ||
42 | + | let t = "start_height" | |
43 | + | ||
44 | + | let u = "first_harvest_height" | |
45 | + | ||
46 | + | let v = "admin_pub_1" | |
47 | + | ||
48 | + | let w = "admin_pub_2" | |
49 | + | ||
50 | + | let x = "admin_pub_3" | |
51 | + | ||
52 | + | let y = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
53 | + | ||
54 | + | func z (A) = { | |
55 | + | let B = getString(y, A) | |
56 | + | if ($isInstanceOf(B, "String")) | |
39 | 57 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
58 | + | let C = B | |
59 | + | fromBase58String(C) | |
42 | 60 | } | |
43 | 61 | else { | |
44 | - | let | |
62 | + | let D = B | |
45 | 63 | throw("Admin public key is empty") | |
46 | 64 | } | |
47 | 65 | } | |
48 | 66 | ||
49 | 67 | ||
50 | - | let | |
68 | + | let E = z(v) | |
51 | 69 | ||
52 | - | let | |
70 | + | let F = z(w) | |
53 | 71 | ||
54 | - | let | |
72 | + | let G = z(x) | |
55 | 73 | ||
56 | - | let | |
74 | + | let H = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 75 | ||
58 | - | let | |
76 | + | let I = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 77 | ||
60 | - | let | |
78 | + | let J = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 79 | ||
62 | - | let | |
80 | + | let K = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
63 | 81 | ||
64 | - | let | |
82 | + | let L = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
65 | 83 | ||
66 | - | let | |
84 | + | let M = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
67 | 85 | ||
68 | - | let | |
86 | + | let N = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
69 | 87 | ||
70 | - | let | |
88 | + | let O = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
71 | 89 | ||
72 | - | let | |
90 | + | let P = Address(base58'3N1qKnD3EoFpmFphWeZgmFjAUPXJmGw9cUp') | |
73 | 91 | ||
74 | - | let | |
92 | + | let Q = Address(base58'3MyVqAbmKWh339gF6hy8faWw1jGeTV2wnGE') | |
75 | 93 | ||
76 | - | let | |
94 | + | let R = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
77 | 95 | ||
78 | - | let | |
96 | + | let S = Address(base58'3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY') | |
79 | 97 | ||
80 | - | let | |
98 | + | let T = 270000 | |
81 | 99 | ||
82 | - | let L = if ((J == "WAVES")) | |
100 | + | let U = 234000 | |
101 | + | ||
102 | + | let V = valueOrErrorMessage(getInteger(K, r), "Empty kBasePeriod") | |
103 | + | ||
104 | + | let W = valueOrErrorMessage(getInteger(K, t), "Empty kStartHeight") | |
105 | + | ||
106 | + | let X = valueOrErrorMessage(getInteger(K, s), "Empty kPeriodLength") | |
107 | + | ||
108 | + | let Y = ((V + ((height - W) / X)) + 3) | |
109 | + | ||
110 | + | let Z = getBooleanValue(this, c) | |
111 | + | ||
112 | + | let aa = getStringValue(this, d) | |
113 | + | ||
114 | + | let ab = getStringValue(this, e) | |
115 | + | ||
116 | + | let ac = if ((aa == "WAVES")) | |
83 | 117 | then unit | |
84 | - | else fromBase58String( | |
118 | + | else fromBase58String(aa) | |
85 | 119 | ||
86 | - | let | |
120 | + | let ad = if ((ab == "WAVES")) | |
87 | 121 | then unit | |
88 | - | else fromBase58String( | |
122 | + | else fromBase58String(ab) | |
89 | 123 | ||
90 | - | let | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
124 | + | let ae = { | |
125 | + | let B = ac | |
126 | + | if ($isInstanceOf(B, "ByteVector")) | |
93 | 127 | then { | |
94 | - | let | |
95 | - | value(assetInfo( | |
128 | + | let af = B | |
129 | + | value(assetInfo(af)).name | |
96 | 130 | } | |
97 | - | else if ($isInstanceOf( | |
131 | + | else if ($isInstanceOf(B, "Unit")) | |
98 | 132 | then { | |
99 | - | let | |
133 | + | let ag = B | |
100 | 134 | "WAVES" | |
101 | 135 | } | |
102 | 136 | else throw("Match error") | |
103 | 137 | } | |
104 | 138 | ||
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
139 | + | let ah = { | |
140 | + | let B = ad | |
141 | + | if ($isInstanceOf(B, "ByteVector")) | |
108 | 142 | then { | |
109 | - | let | |
110 | - | value(assetInfo( | |
143 | + | let af = B | |
144 | + | value(assetInfo(af)).name | |
111 | 145 | } | |
112 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(B, "Unit")) | |
113 | 147 | then { | |
114 | - | let | |
148 | + | let ag = B | |
115 | 149 | "WAVES" | |
116 | 150 | } | |
117 | 151 | else throw("Match error") | |
118 | 152 | } | |
119 | 153 | ||
120 | - | let | |
154 | + | let ai = getIntegerValue(this, f) | |
121 | 155 | ||
122 | - | let | |
156 | + | let aj = getIntegerValue(this, g) | |
123 | 157 | ||
124 | - | let | |
158 | + | let ak = fromBase58String(getStringValue(this, j)) | |
125 | 159 | ||
126 | - | let | |
160 | + | let al = getIntegerValue(this, k) | |
127 | 161 | ||
128 | - | let | |
162 | + | let am = 3000 | |
129 | 163 | ||
130 | - | let | |
164 | + | let an = 1200 | |
131 | 165 | ||
132 | - | let | |
166 | + | let ao = 1000000 | |
133 | 167 | ||
134 | - | let | |
168 | + | let ap = 1000 | |
135 | 169 | ||
136 | - | let | |
170 | + | let aq = 100000000 | |
137 | 171 | ||
138 | - | let | |
172 | + | let ar = 1000 | |
139 | 173 | ||
140 | - | let | |
174 | + | let as = 8 | |
141 | 175 | ||
142 | - | func | |
143 | - | let | |
144 | - | if ($isInstanceOf( | |
176 | + | func at (au) = { | |
177 | + | let B = au | |
178 | + | if ($isInstanceOf(B, "ByteVector")) | |
145 | 179 | then { | |
146 | - | let | |
147 | - | assetBalance(this, | |
180 | + | let af = B | |
181 | + | assetBalance(this, af) | |
148 | 182 | } | |
149 | - | else if ($isInstanceOf( | |
183 | + | else if ($isInstanceOf(B, "Unit")) | |
150 | 184 | then { | |
151 | - | let | |
185 | + | let ag = B | |
152 | 186 | wavesBalance(this).available | |
153 | 187 | } | |
154 | 188 | else throw("Match error") | |
155 | 189 | } | |
156 | 190 | ||
157 | 191 | ||
158 | - | func | |
159 | - | let | |
160 | - | let | |
161 | - | if ($isInstanceOf( | |
192 | + | func av (au) = { | |
193 | + | let aw = { | |
194 | + | let B = au | |
195 | + | if ($isInstanceOf(B, "ByteVector")) | |
162 | 196 | then { | |
163 | - | let ai = s | |
164 | - | ai | |
197 | + | let ax = B | |
198 | + | if (if ((ax == L)) | |
199 | + | then true | |
200 | + | else (ax == M)) | |
201 | + | then getInteger(P, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this))) | |
202 | + | else if ((ax == O)) | |
203 | + | then getInteger(Q, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this))) | |
204 | + | else 0 | |
165 | 205 | } | |
166 | - | else if ($isInstanceOf(s, "Unit")) | |
167 | - | then { | |
168 | - | let u = s | |
169 | - | 0 | |
170 | - | } | |
206 | + | else if ($isInstanceOf(B, "Unit")) | |
207 | + | then 0 | |
171 | 208 | else throw("Match error") | |
172 | 209 | } | |
173 | - | ah | |
210 | + | let B = aw | |
211 | + | if ($isInstanceOf(B, "Int")) | |
212 | + | then { | |
213 | + | let ay = B | |
214 | + | ay | |
215 | + | } | |
216 | + | else 0 | |
174 | 217 | } | |
175 | 218 | ||
176 | 219 | ||
177 | - | let | |
220 | + | let az = av(ac) | |
178 | 221 | ||
179 | - | let | |
222 | + | let aA = av(ad) | |
180 | 223 | ||
181 | - | let | |
224 | + | let aB = getIntegerValue(this, h) | |
182 | 225 | ||
183 | - | let | |
226 | + | let aC = getIntegerValue(this, i) | |
184 | 227 | ||
185 | - | let | |
228 | + | let aD = (ai - az) | |
186 | 229 | ||
187 | - | let | |
230 | + | let aE = (aj - aA) | |
188 | 231 | ||
189 | - | let ap = if ((an >= R)) | |
190 | - | then (ao >= S) | |
232 | + | let aF = (at(ac) + az) | |
233 | + | ||
234 | + | let aG = (at(ad) + aA) | |
235 | + | ||
236 | + | let aH = if ((aF >= ai)) | |
237 | + | then (aG >= aj) | |
191 | 238 | else false | |
192 | 239 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
240 | + | func aI (au) = { | |
241 | + | let B = au | |
242 | + | if ($isInstanceOf(B, "ByteVector")) | |
196 | 243 | then { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | $Tuple3( | |
244 | + | let af = B | |
245 | + | let aJ = toBase58String(af) | |
246 | + | let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist")) | |
247 | + | $Tuple3(aJ, aK.name, aK.decimals) | |
201 | 248 | } | |
202 | - | else if ($isInstanceOf( | |
249 | + | else if ($isInstanceOf(B, "Unit")) | |
203 | 250 | then { | |
204 | - | let | |
251 | + | let ag = B | |
205 | 252 | $Tuple3("WAVES", "WAVES", 8) | |
206 | 253 | } | |
207 | 254 | else throw("Match error") | |
208 | 255 | } | |
209 | 256 | ||
210 | 257 | ||
211 | - | func at (au) = [BooleanEntry(c, false), StringEntry(l, au)] | |
258 | + | func aL (aM) = if ((aM == "WAVES")) | |
259 | + | then $Tuple3("WAVES", "WAVES", 8) | |
260 | + | else { | |
261 | + | let aJ = aM | |
262 | + | let af = fromBase58String(aM) | |
263 | + | let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist")) | |
264 | + | $Tuple3(aJ, aK.name, aK.decimals) | |
265 | + | } | |
212 | 266 | ||
213 | 267 | ||
214 | - | func av () = { | |
215 | - | let aw = if ((aj > 0)) | |
216 | - | then 1 | |
217 | - | else 0 | |
218 | - | let ax = if ((ak > 0)) | |
219 | - | then 1 | |
220 | - | else 0 | |
221 | - | (aw + ax) | |
222 | - | } | |
268 | + | func aN (aO) = [BooleanEntry(c, false), StringEntry(n, aO)] | |
223 | 269 | ||
224 | 270 | ||
225 | - | func ay (az,ad) = if ((ad == C)) | |
271 | + | func aP (aQ,au,aR) = if (if ((au == L)) | |
272 | + | then true | |
273 | + | else (au == O)) | |
226 | 274 | then { | |
227 | - | let aA = (az - (av() * H)) | |
228 | - | if ((0 >= aA)) | |
229 | - | then throw((((("Insufficient amount " + toString(az)) + " to deduct staking fee ") + toString(H)) + " USD-N")) | |
230 | - | else aA | |
275 | + | let aS = if ((au == L)) | |
276 | + | then (T * (if ((aR == M)) | |
277 | + | then 2 | |
278 | + | else 1)) | |
279 | + | else if ((au == O)) | |
280 | + | then U | |
281 | + | else 0 | |
282 | + | let aT = (aQ - aS) | |
283 | + | if ((0 >= aT)) | |
284 | + | then throw((((("Insufficient amount " + toString(aQ)) + " to deduct staking fee ") + toString(aS)) + "USDN/EURN")) | |
285 | + | else aT | |
231 | 286 | } | |
232 | - | else | |
287 | + | else aQ | |
233 | 288 | ||
234 | 289 | ||
235 | - | func aB (az,aC,aD) = throw((((((((("Insufficient DApp balance to pay " + toString(az)) + " ") + aD) + " due to staking. Available: ") + toString(aC)) + " ") + aD) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
290 | + | func aU (au,aR) = if ((au == L)) | |
291 | + | then (T * (if ((aR == M)) | |
292 | + | then 2 | |
293 | + | else 1)) | |
294 | + | else if ((au == O)) | |
295 | + | then U | |
296 | + | else 0 | |
236 | 297 | ||
237 | 298 | ||
238 | - | func | |
299 | + | func aV (aQ,aW,aX) = throw((((((((("Insufficient DApp balance to pay " + toString(aQ)) + " ") + aX) + " due to staking. Available: ") + toString(aW)) + " ") + aX) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
239 | 300 | ||
240 | 301 | ||
241 | - | func | |
302 | + | func aY (aZ,ba) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(aZ)) + " ") + ae) + " and ") + toString(ba)) + " ") + ah) + " due to staking. Available: ") + toString(aD)) + " ") + ae) + " and ") + toString(aE)) + " ") + ah) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
242 | 303 | ||
243 | 304 | ||
244 | - | @Callable(aI) | |
245 | - | func init () = { | |
246 | - | let aJ = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
247 | - | let aK = aJ._1 | |
248 | - | let aL = aJ._2 | |
249 | - | let aM = $Tuple2(aI.payments[1].amount, aI.payments[1].assetId) | |
250 | - | let aN = aM._1 | |
251 | - | let aO = aM._2 | |
252 | - | let aP = aq(aL) | |
253 | - | let aQ = aP._1 | |
254 | - | let aR = aP._2 | |
255 | - | let aS = aP._3 | |
256 | - | let aT = aq(aO) | |
257 | - | let aU = aT._1 | |
258 | - | let aV = aT._2 | |
259 | - | let aW = aT._3 | |
260 | - | if (isDefined(getBoolean(this, c))) | |
261 | - | then throw("DApp is already active") | |
262 | - | else if ((aL == aO)) | |
263 | - | then throw("Assets must be different") | |
264 | - | else { | |
265 | - | let aX = ((("s" + take(aR, 7)) + "_") + take(aV, 7)) | |
266 | - | let aY = ((((("ShareToken of SwopFi protocol for " + aR) + " and ") + aV) + " at address ") + toString(this)) | |
267 | - | let aZ = ((aS + aW) / 2) | |
268 | - | let ba = fraction(pow(aK, aS, 5, 1, aS, DOWN), pow(aN, aW, 5, 1, aW, DOWN), pow(10, 0, aZ, 0, 0, DOWN)) | |
269 | - | let bb = Issue(aX, aY, ba, aZ, true) | |
270 | - | let bc = calculateAssetId(bb) | |
271 | - | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, aQ), StringEntry(e, aU), IntegerEntry(f, aK), IntegerEntry(g, aN), IntegerEntry(j, V), IntegerEntry(k, X), bb, StringEntry(h, toBase58String(bc)), IntegerEntry(i, ba), ScriptTransfer(aI.caller, ba, bc)] | |
272 | - | } | |
305 | + | func bb () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ae) + ", ") + toString(aG)) + " ") + ah) + ". State: ") + toString(ai)) + " ") + ae) + ", ") + toString(aj)) + " ") + ah)) | |
306 | + | ||
307 | + | ||
308 | + | @Callable(ay) | |
309 | + | func init (bc) = { | |
310 | + | let bd = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
311 | + | let be = bd._1 | |
312 | + | let bf = bd._2 | |
313 | + | let bg = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId) | |
314 | + | let bh = bg._1 | |
315 | + | let bi = bg._2 | |
316 | + | let bj = aI(bf) | |
317 | + | let bk = bj._1 | |
318 | + | let bl = bj._2 | |
319 | + | let bm = bj._3 | |
320 | + | let bn = aI(bi) | |
321 | + | let bo = bn._1 | |
322 | + | let bp = bn._2 | |
323 | + | let bq = bn._3 | |
324 | + | if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
325 | + | then throw("Only admin can call this function") | |
326 | + | else if (isDefined(getBoolean(this, c))) | |
327 | + | then throw("DApp is already active") | |
328 | + | else if ((bf == bi)) | |
329 | + | then throw("Assets must be different") | |
330 | + | else { | |
331 | + | let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7)) | |
332 | + | let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this)) | |
333 | + | let bt = ((bm + bq) / 2) | |
334 | + | let bu = pow(be, bm, 5, 1, bm, DOWN) | |
335 | + | let bv = pow(bh, bq, 5, 1, bq, DOWN) | |
336 | + | let bw = pow(10, 0, bt, 0, 0, DOWN) | |
337 | + | let bx = fraction(bu, bv, bw) | |
338 | + | let by = Issue(br, bs, bx, bt, true) | |
339 | + | let bz = calculateAssetId(by) | |
340 | + | let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, bz)] | |
341 | + | if (bc) | |
342 | + | then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))]) | |
343 | + | else bA | |
344 | + | } | |
273 | 345 | } | |
274 | 346 | ||
275 | 347 | ||
276 | 348 | ||
277 | - | @Callable(aI) | |
278 | - | func replenishWithTwoTokens (bd) = { | |
279 | - | let aL = aI.payments[0].assetId | |
280 | - | let aO = aI.payments[1].assetId | |
281 | - | let aK = ay(aI.payments[0].amount, aL) | |
282 | - | let aN = ay(aI.payments[1].amount, aO) | |
283 | - | let be = fraction(fraction(R, Z, aK), Y, fraction(S, Z, aN)) | |
284 | - | let bf = fraction(aK, Z, R) | |
285 | - | let bg = fraction(aN, Z, S) | |
286 | - | let bh = fraction(min([bf, bg]), U, Z) | |
287 | - | if (!(I)) | |
288 | - | then throw("DApp is inactive at this moment") | |
289 | - | else if (if ((0 > bd)) | |
290 | - | then true | |
291 | - | else (bd > aa)) | |
292 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(aa)) + " inclusively. Actual: ") + toString(bd))) | |
293 | - | else if ((size(aI.payments) != 2)) | |
294 | - | then throw("Two attached assets expected") | |
295 | - | else if (if ((aL != L)) | |
296 | - | then true | |
297 | - | else (aO != M)) | |
298 | - | then throw(((("Incorrect assets attached. Expected: " + J) + " and ") + K)) | |
299 | - | else if (if ((((Y * (aa - bd)) / aa) > be)) | |
300 | - | then true | |
301 | - | else (be > ((Y * (aa + bd)) / aa))) | |
302 | - | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
303 | - | else if ((bh == 0)) | |
304 | - | then throw("Too small amount to replenish") | |
305 | - | else if (!(ap)) | |
306 | - | then ([ScriptTransfer(aI.caller, aK, aL), ScriptTransfer(aI.caller, aN, aO)] ++ aH()) | |
307 | - | else [IntegerEntry(f, (R + aK)), IntegerEntry(g, (S + aN)), IntegerEntry(i, (U + bh)), Reissue(T, bh, true), ScriptTransfer(aI.caller, bh, T)] | |
349 | + | @Callable(ay) | |
350 | + | func initWithInitRatio (bB,bC,aa,ab,bc) = { | |
351 | + | let bD = aL(aa) | |
352 | + | let bk = bD._1 | |
353 | + | let bl = bD._2 | |
354 | + | let bm = bD._3 | |
355 | + | let bE = aL(ab) | |
356 | + | let bo = bE._1 | |
357 | + | let bp = bE._2 | |
358 | + | let bq = bE._3 | |
359 | + | if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
360 | + | then throw("Only admin can call this function") | |
361 | + | else if (isDefined(getBoolean(this, c))) | |
362 | + | then throw("DApp is already active") | |
363 | + | else if ((aa == ab)) | |
364 | + | then throw("Assets must be different") | |
365 | + | else { | |
366 | + | let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7)) | |
367 | + | let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this)) | |
368 | + | let bt = ((bm + bq) / 2) | |
369 | + | let bx = 0 | |
370 | + | let by = Issue(br, bs, bx, bt, true) | |
371 | + | let bz = calculateAssetId(by) | |
372 | + | let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(h, bB), IntegerEntry(i, bC), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx)] | |
373 | + | if (bc) | |
374 | + | then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))]) | |
375 | + | else bA | |
376 | + | } | |
308 | 377 | } | |
309 | 378 | ||
310 | 379 | ||
311 | 380 | ||
312 | - | @Callable(aI) | |
313 | - | func withdraw () = { | |
314 | - | let bi = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
315 | - | let bj = bi._1 | |
316 | - | let bk = bi._2 | |
317 | - | let bl = ay(fraction(bj, R, U), L) | |
318 | - | let bm = ay(fraction(bj, S, U), M) | |
319 | - | if (!(I)) | |
320 | - | then throw("DApp is inactive at this moment") | |
321 | - | else if ((size(aI.payments) != 1)) | |
322 | - | then throw("One attached payment expected") | |
323 | - | else if ((bk != T)) | |
324 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(T))) | |
325 | - | else if (!(ap)) | |
326 | - | then ([ScriptTransfer(aI.caller, bj, bk)] ++ aH()) | |
327 | - | else if (if ((bl > al)) | |
328 | - | then true | |
329 | - | else (bm > am)) | |
330 | - | then aE(bl, bm) | |
331 | - | else [IntegerEntry(f, (R - bl)), IntegerEntry(g, (S - bm)), IntegerEntry(i, (U - bj)), Burn(T, bj), ScriptTransfer(aI.caller, bl, L), ScriptTransfer(aI.caller, bm, M)] | |
381 | + | @Callable(ay) | |
382 | + | func keepLimitForFirstHarvest (bF) = if (!(Z)) | |
383 | + | then throw("DApp is inactive at this moment") | |
384 | + | else if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
385 | + | then throw("Only admin can call this function") | |
386 | + | else [IntegerEntry(q, bF)] | |
387 | + | ||
388 | + | ||
389 | + | ||
390 | + | @Callable(ay) | |
391 | + | func replenishWithTwoTokens (bG) = { | |
392 | + | let bf = ay.payments[0].assetId | |
393 | + | let bi = ay.payments[1].assetId | |
394 | + | let be = aP(ay.payments[0].amount, bf, bi) | |
395 | + | let bh = aP(ay.payments[1].amount, bi, bf) | |
396 | + | if (if ((ai == 0)) | |
397 | + | then (aj == 0) | |
398 | + | else false) | |
399 | + | then { | |
400 | + | let bH = aI(bf) | |
401 | + | let bk = bH._1 | |
402 | + | let bl = bH._2 | |
403 | + | let bm = bH._3 | |
404 | + | let bI = aI(bi) | |
405 | + | let bo = bI._1 | |
406 | + | let bp = bI._2 | |
407 | + | let bq = bI._3 | |
408 | + | let bJ = fraction(fraction(aB, aq, be), ap, fraction(aC, aq, bh)) | |
409 | + | if ((bf == bi)) | |
410 | + | then throw("Assets must be different") | |
411 | + | else { | |
412 | + | let bt = ((bm + bq) / 2) | |
413 | + | let bx = fraction(pow(be, bm, 5, 1, bm, DOWN), pow(bh, bq, 5, 1, bq, DOWN), pow(10, 0, bt, 0, 0, DOWN)) | |
414 | + | if (!(Z)) | |
415 | + | then throw("DApp is inactive at this moment") | |
416 | + | else if (if ((0 > bG)) | |
417 | + | then true | |
418 | + | else (bG > ar)) | |
419 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG))) | |
420 | + | else if ((size(ay.payments) != 2)) | |
421 | + | then throw("Two attached assets expected") | |
422 | + | else if (if ((((ap * (ar - bG)) / ar) > bJ)) | |
423 | + | then true | |
424 | + | else (bJ > ((ap * (ar + bG)) / ar))) | |
425 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
426 | + | else if (if ((bf != ac)) | |
427 | + | then true | |
428 | + | else (bi != ad)) | |
429 | + | then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab)) | |
430 | + | else if ((bx == 0)) | |
431 | + | then throw("Too small amount to replenish") | |
432 | + | else if (!(aH)) | |
433 | + | then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb()) | |
434 | + | else [Reissue(ak, bx, true), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, ak)] | |
435 | + | } | |
436 | + | } | |
437 | + | else { | |
438 | + | let bJ = fraction(fraction(ai, aq, be), ap, fraction(aj, aq, bh)) | |
439 | + | let bK = fraction(be, aq, ai) | |
440 | + | let bL = fraction(bh, aq, aj) | |
441 | + | let bM = fraction(min([bK, bL]), al, aq) | |
442 | + | if (!(Z)) | |
443 | + | then throw("DApp is inactive at this moment") | |
444 | + | else if (if ((0 > bG)) | |
445 | + | then true | |
446 | + | else (bG > ar)) | |
447 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG))) | |
448 | + | else if ((size(ay.payments) != 2)) | |
449 | + | then throw("Two attached assets expected") | |
450 | + | else if (if ((bf != ac)) | |
451 | + | then true | |
452 | + | else (bi != ad)) | |
453 | + | then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab)) | |
454 | + | else if (if ((((ap * (ar - bG)) / ar) > bJ)) | |
455 | + | then true | |
456 | + | else (bJ > ((ap * (ar + bG)) / ar))) | |
457 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
458 | + | else if ((bM == 0)) | |
459 | + | then throw("Too small amount to replenish") | |
460 | + | else if (!(aH)) | |
461 | + | then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb()) | |
462 | + | else [IntegerEntry(f, (ai + be)), IntegerEntry(g, (aj + bh)), IntegerEntry(k, (al + bM)), Reissue(ak, bM, true), ScriptTransfer(ay.caller, bM, ak)] | |
463 | + | } | |
332 | 464 | } | |
333 | 465 | ||
334 | 466 | ||
335 | 467 | ||
336 | - | @Callable(aI) | |
337 | - | func exchange (bn) = { | |
338 | - | let bo = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
339 | - | let bj = bo._1 | |
340 | - | let bk = bo._2 | |
341 | - | func bp (bq,br) = { | |
342 | - | let bs = fraction(br, bj, (bj + bq)) | |
343 | - | let bt = fraction(bs, (X - V), X) | |
344 | - | let bu = fraction(bs, W, X) | |
345 | - | if ((bn > bt)) | |
346 | - | then throw(((("Calculated amount to receive " + toString(bt)) + " is less than specified minimum ") + toString(bn))) | |
347 | - | else $Tuple3(bs, bt, bu) | |
348 | - | } | |
349 | - | ||
350 | - | if (!(I)) | |
468 | + | @Callable(ay) | |
469 | + | func withdraw () = { | |
470 | + | let bN = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
471 | + | let bO = bN._1 | |
472 | + | let bP = bN._2 | |
473 | + | let bQ = aP(fraction(bO, ai, al), ac, ad) | |
474 | + | let bR = aP(fraction(bO, aj, al), ad, ac) | |
475 | + | if (!(Z)) | |
351 | 476 | then throw("DApp is inactive at this moment") | |
352 | - | else if ((0 >= bn)) | |
353 | - | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bn))) | |
354 | - | else if ((size(aI.payments) != 1)) | |
355 | - | then throw("One attached payment expected") | |
356 | - | else if (!(ap)) | |
357 | - | then ([ScriptTransfer(aI.caller, bj, bk)] ++ aH()) | |
358 | - | else if ((bk == L)) | |
359 | - | then { | |
360 | - | let bv = M | |
361 | - | let bw = bp(R, S) | |
362 | - | let bs = bw._1 | |
363 | - | let bt = bw._2 | |
364 | - | let bu = bw._3 | |
365 | - | let bx = (R + bj) | |
366 | - | let by = ((S - bt) - bu) | |
367 | - | if (if ((aj >= bx)) | |
368 | - | then true | |
369 | - | else (ak >= by)) | |
370 | - | then aB(bt, am, Q) | |
371 | - | else [IntegerEntry(f, bx), IntegerEntry(g, by), ScriptTransfer(aI.caller, bt, bv), ScriptTransfer(A, bu, bv)] | |
372 | - | } | |
373 | - | else if ((bk == M)) | |
374 | - | then { | |
375 | - | let bv = L | |
376 | - | let bz = bp(S, R) | |
377 | - | let bs = bz._1 | |
378 | - | let bt = bz._2 | |
379 | - | let bu = bz._3 | |
380 | - | let bx = ((R - bt) - bu) | |
381 | - | let by = (S + bj) | |
382 | - | if (if ((aj >= bx)) | |
383 | - | then true | |
384 | - | else (ak >= by)) | |
385 | - | then aB(bt, al, N) | |
386 | - | else [IntegerEntry(f, bx), IntegerEntry(g, by), ScriptTransfer(aI.caller, bt, bv), ScriptTransfer(A, bu, bv)] | |
387 | - | } | |
388 | - | else throw(((("Incorrect asset attached. Expected: " + J) + " or ") + K)) | |
477 | + | else if ((size(ay.payments) != 1)) | |
478 | + | then throw("One attached payment expected") | |
479 | + | else if ((bP != ak)) | |
480 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(ak))) | |
481 | + | else if (!(aH)) | |
482 | + | then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb()) | |
483 | + | else if (if ((bQ > aD)) | |
484 | + | then true | |
485 | + | else (bR > aE)) | |
486 | + | then aY(bQ, bR) | |
487 | + | else [IntegerEntry(f, (ai - bQ)), IntegerEntry(g, (aj - bR)), IntegerEntry(k, (al - bO)), Burn(ak, bO), ScriptTransfer(ay.caller, bQ, ac), ScriptTransfer(ay.caller, bR, ad)] | |
389 | 488 | } | |
390 | 489 | ||
391 | 490 | ||
392 | 491 | ||
393 | - | @Callable(aI) | |
394 | - | func shutdown () = if (!(I)) | |
395 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
396 | - | else if (!(containsElement([v, w, x, y], aI.callerPublicKey))) | |
397 | - | then throw("Only admin can call this function") | |
398 | - | else at("Paused by admin") | |
492 | + | @Callable(ay) | |
493 | + | func exchange (bS) = { | |
494 | + | let bT = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
495 | + | let bO = bT._1 | |
496 | + | let bP = bT._2 | |
497 | + | func bU (bV,bW) = { | |
498 | + | let bX = fraction(bW, bO, (bO + bV)) | |
499 | + | let bY = fraction(bX, (ao - am), ao) | |
500 | + | let bZ = fraction(bX, an, ao) | |
501 | + | if ((bS > bY)) | |
502 | + | then throw(((("Calculated amount to receive " + toString(bY)) + " is less than specified minimum ") + toString(bS))) | |
503 | + | else $Tuple3(bX, bY, bZ) | |
504 | + | } | |
505 | + | ||
506 | + | if (!(Z)) | |
507 | + | then throw("DApp is inactive at this moment") | |
508 | + | else if (if ((ai == 0)) | |
509 | + | then true | |
510 | + | else (aj == 0)) | |
511 | + | then throw("Can't exchange with zero balance") | |
512 | + | else if ((0 >= bS)) | |
513 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bS))) | |
514 | + | else if ((size(ay.payments) != 1)) | |
515 | + | then throw("One attached payment expected") | |
516 | + | else if (!(aH)) | |
517 | + | then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb()) | |
518 | + | else if ((bP == ac)) | |
519 | + | then { | |
520 | + | let ca = ad | |
521 | + | let cb = bU(ai, aj) | |
522 | + | let bX = cb._1 | |
523 | + | let bY = cb._2 | |
524 | + | let bZ = cb._3 | |
525 | + | let cc = (ai + bO) | |
526 | + | let cd = ((aj - bY) - bZ) | |
527 | + | if (if ((az >= cc)) | |
528 | + | then true | |
529 | + | else (aA >= cd)) | |
530 | + | then aV(bY, aE, ah) | |
531 | + | else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)] | |
532 | + | } | |
533 | + | else if ((bP == ad)) | |
534 | + | then { | |
535 | + | let ca = ac | |
536 | + | let ce = bU(aj, ai) | |
537 | + | let bX = ce._1 | |
538 | + | let bY = ce._2 | |
539 | + | let bZ = ce._3 | |
540 | + | let cc = ((ai - bY) - bZ) | |
541 | + | let cd = (aj + bO) | |
542 | + | if (if ((az >= cc)) | |
543 | + | then true | |
544 | + | else (aA >= cd)) | |
545 | + | then aV(bY, aD, ae) | |
546 | + | else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)] | |
547 | + | } | |
548 | + | else throw(((("Incorrect asset attached. Expected: " + aa) + " or ") + ab)) | |
549 | + | } | |
399 | 550 | ||
400 | 551 | ||
401 | 552 | ||
402 | - | @Callable( | |
403 | - | func | |
404 | - | then throw("DApp is already | |
405 | - | else if (!(containsElement([ | |
553 | + | @Callable(ay) | |
554 | + | func shutdown () = if (!(Z)) | |
555 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, n), "the cause wasn't specified"))) | |
556 | + | else if (!(containsElement([E, F, G, H], ay.callerPublicKey))) | |
406 | 557 | then throw("Only admin can call this function") | |
407 | - | else | |
558 | + | else aN("Paused by admin") | |
408 | 559 | ||
409 | 560 | ||
410 | 561 | ||
411 | - | @Callable(aI) | |
412 | - | func takeIntoAccountExtraFunds (bA) = { | |
413 | - | let bB = (an - R) | |
414 | - | let bC = (ao - S) | |
415 | - | let bD = (bB - (if ((L == unit)) | |
416 | - | then bA | |
562 | + | @Callable(ay) | |
563 | + | func activate () = if (Z) | |
564 | + | then throw("DApp is already active") | |
565 | + | else if (!(containsElement([E, F, G, H], ay.callerPublicKey))) | |
566 | + | then throw("Only admin can call this function") | |
567 | + | else [BooleanEntry(c, true), DeleteEntry(n)] | |
568 | + | ||
569 | + | ||
570 | + | ||
571 | + | @Callable(ay) | |
572 | + | func takeIntoAccountExtraFunds (cf) = { | |
573 | + | let cg = (aF - ai) | |
574 | + | let ch = (aG - aj) | |
575 | + | let ci = (cg - (if ((ac == unit)) | |
576 | + | then cf | |
417 | 577 | else 0)) | |
418 | - | let | |
419 | - | then | |
578 | + | let cj = (ch - (if ((ad == unit)) | |
579 | + | then cf | |
420 | 580 | else 0)) | |
421 | - | if (!( | |
581 | + | if (!(Z)) | |
422 | 582 | then throw("DApp is inactive at this moment") | |
423 | - | else if (( | |
583 | + | else if ((ay.caller != this)) | |
424 | 584 | then throw("Only the DApp itself can call this function") | |
425 | - | else if ((0 > | |
426 | - | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString( | |
427 | - | else if (if ((0 > | |
585 | + | else if ((0 > cf)) | |
586 | + | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cf))) | |
587 | + | else if (if ((0 > cg)) | |
428 | 588 | then true | |
429 | - | else (0 > | |
430 | - | then | |
431 | - | else if (if ((0 > | |
589 | + | else (0 > ch)) | |
590 | + | then aN("Enroll amount negative") | |
591 | + | else if (if ((0 > ci)) | |
432 | 592 | then true | |
433 | - | else (0 > | |
593 | + | else (0 > cj)) | |
434 | 594 | then throw("Too large amountLeave") | |
435 | - | else [IntegerEntry(f, ( | |
595 | + | else [IntegerEntry(f, (ai + ci)), IntegerEntry(g, (aj + cj)), IntegerEntry(("last_income_" + aa), ci), IntegerEntry(("last_income_" + ab), cj)] | |
436 | 596 | } | |
437 | 597 | ||
438 | 598 | ||
439 | - | @Verifier( | |
440 | - | func | |
441 | - | let | |
442 | - | let | |
599 | + | @Verifier(ck) | |
600 | + | func cl () = { | |
601 | + | let cm = { | |
602 | + | let cn = if (sigVerify(ck.bodyBytes, ck.proofs[0], E)) | |
443 | 603 | then 1 | |
444 | 604 | else 0 | |
445 | - | let | |
605 | + | let co = if (sigVerify(ck.bodyBytes, ck.proofs[1], F)) | |
446 | 606 | then 1 | |
447 | 607 | else 0 | |
448 | - | let | |
608 | + | let cp = if (sigVerify(ck.bodyBytes, ck.proofs[2], G)) | |
449 | 609 | then 1 | |
450 | 610 | else 0 | |
451 | - | ((( | |
611 | + | (((cn + co) + cp) >= 2) | |
452 | 612 | } | |
453 | - | let | |
454 | - | if ($isInstanceOf( | |
613 | + | let B = ck | |
614 | + | if ($isInstanceOf(B, "InvokeScriptTransaction")) | |
455 | 615 | then { | |
456 | - | let bL = s | |
457 | - | if (if (if (if (sigVerify(bL.bodyBytes, bL.proofs[0], z)) | |
458 | - | then (bL.dApp == B) | |
616 | + | let cq = B | |
617 | + | let cr = if ((cq.dApp == this)) | |
618 | + | then (cq.function == "takeIntoAccountExtraFunds") | |
619 | + | else false | |
620 | + | let cs = if (if ((cq.dApp == P)) | |
621 | + | then if (if (if ((cq.function == "lockNeutrino")) | |
622 | + | then (size(cq.payments) == 1) | |
623 | + | else false) | |
624 | + | then if ((cq.payments[0].assetId == L)) | |
625 | + | then true | |
626 | + | else (cq.payments[0].assetId == M) | |
627 | + | else false) | |
628 | + | then true | |
629 | + | else if ((cq.function == "unlockNeutrino")) | |
630 | + | then (size(cq.payments) == 0) | |
631 | + | else false | |
459 | 632 | else false) | |
460 | 633 | then true | |
461 | - | else if (if (sigVerify(bL.bodyBytes, bL.proofs[0], z)) | |
462 | - | then (bL.function == "exchange") | |
463 | - | else false) | |
464 | - | then if (if (if (if (if ((L == D)) | |
465 | - | then (M == C) | |
634 | + | else if ((cq.dApp == Q)) | |
635 | + | then if (if (if ((cq.function == "startStaking")) | |
636 | + | then (size(cq.payments) == 1) | |
466 | 637 | else false) | |
467 | - | then (bL.dApp == F) | |
468 | - | else false) | |
469 | - | then (bL.payments[0].assetId == unit) | |
470 | - | else false) | |
471 | - | then if ((bL.payments[0].assetId == unit)) | |
472 | - | then true | |
473 | - | else (bL.payments[0].assetId == C) | |
638 | + | then (cq.payments[0].assetId == O) | |
474 | 639 | else false) | |
475 | 640 | then true | |
476 | - | else if (if ((L == D)) | |
477 | - | then (M == E) | |
478 | - | else false) | |
479 | - | then if (if ((bL.dApp == G)) | |
480 | - | then (bL.payments[0].assetId == C) | |
481 | - | else false) | |
482 | - | then true | |
483 | - | else if ((bL.dApp == F)) | |
484 | - | then if ((bL.payments[0].assetId == unit)) | |
485 | - | then true | |
486 | - | else (bL.payments[0].assetId == C) | |
487 | - | else false | |
641 | + | else if ((cq.function == "stopStaking")) | |
642 | + | then (size(cq.payments) == 0) | |
488 | 643 | else false | |
644 | + | else false | |
645 | + | let ct = if (if (if ((cq.dApp == R)) | |
646 | + | then (cq.function == "exchange") | |
647 | + | else false) | |
648 | + | then (ac == L) | |
649 | + | else false) | |
650 | + | then true | |
651 | + | else if (if ((ad == L)) | |
652 | + | then (size(cq.payments) == 1) | |
489 | 653 | else false) | |
654 | + | then (cq.payments[0].assetId == L) | |
655 | + | else false | |
656 | + | let cu = if (if (if ((cq.dApp == S)) | |
657 | + | then (cq.function == "exchange") | |
658 | + | else false) | |
659 | + | then (ac == M) | |
660 | + | else false) | |
490 | 661 | then true | |
491 | - | else if (if ( | |
492 | - | then ( | |
662 | + | else if (if ((ad == M)) | |
663 | + | then (size(cq.payments) == 1) | |
493 | 664 | else false) | |
494 | - | then (bL.function == "takeIntoAccountExtraFunds") | |
495 | - | else false) | |
665 | + | then (cq.payments[0].assetId == L) | |
666 | + | else false | |
667 | + | let cv = if (if (if (sigVerify(ck.bodyBytes, ck.proofs[0], E)) | |
496 | 668 | then true | |
497 | - | else bH | |
669 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], F)) | |
670 | + | then true | |
671 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], G)) | |
672 | + | then true | |
673 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], I) | |
674 | + | if (if (if (if (if (cr) | |
675 | + | then true | |
676 | + | else cs) | |
677 | + | then true | |
678 | + | else ct) | |
679 | + | then true | |
680 | + | else cu) | |
681 | + | then cv | |
682 | + | else false) | |
683 | + | then true | |
684 | + | else cm | |
498 | 685 | } | |
499 | - | else | |
686 | + | else cm | |
500 | 687 | } | |
501 | 688 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "1.0.0" | |
5 | 5 | ||
6 | 6 | let b = "version" | |
7 | 7 | ||
8 | 8 | let c = "active" | |
9 | 9 | ||
10 | 10 | let d = "A_asset_id" | |
11 | 11 | ||
12 | 12 | let e = "B_asset_id" | |
13 | 13 | ||
14 | 14 | let f = "A_asset_balance" | |
15 | 15 | ||
16 | 16 | let g = "B_asset_balance" | |
17 | 17 | ||
18 | - | let h = " | |
18 | + | let h = "A_asset_init" | |
19 | 19 | ||
20 | - | let i = " | |
20 | + | let i = "B_asset_init" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "share_asset_id" | |
23 | 23 | ||
24 | - | let k = " | |
24 | + | let k = "share_asset_supply" | |
25 | 25 | ||
26 | - | let l = " | |
26 | + | let l = "commission" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "commission_scale_delimiter" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "shutdown_cause" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "first_harvest" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "first_harvest_height" | |
35 | 35 | ||
36 | - | func q (r) = { | |
37 | - | let s = getString(p, r) | |
38 | - | if ($isInstanceOf(s, "String")) | |
36 | + | let q = "share_limit_on_first_harvest" | |
37 | + | ||
38 | + | let r = "base_period" | |
39 | + | ||
40 | + | let s = "period_length" | |
41 | + | ||
42 | + | let t = "start_height" | |
43 | + | ||
44 | + | let u = "first_harvest_height" | |
45 | + | ||
46 | + | let v = "admin_pub_1" | |
47 | + | ||
48 | + | let w = "admin_pub_2" | |
49 | + | ||
50 | + | let x = "admin_pub_3" | |
51 | + | ||
52 | + | let y = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9') | |
53 | + | ||
54 | + | func z (A) = { | |
55 | + | let B = getString(y, A) | |
56 | + | if ($isInstanceOf(B, "String")) | |
39 | 57 | then { | |
40 | - | let | |
41 | - | fromBase58String( | |
58 | + | let C = B | |
59 | + | fromBase58String(C) | |
42 | 60 | } | |
43 | 61 | else { | |
44 | - | let | |
62 | + | let D = B | |
45 | 63 | throw("Admin public key is empty") | |
46 | 64 | } | |
47 | 65 | } | |
48 | 66 | ||
49 | 67 | ||
50 | - | let | |
68 | + | let E = z(v) | |
51 | 69 | ||
52 | - | let | |
70 | + | let F = z(w) | |
53 | 71 | ||
54 | - | let | |
72 | + | let G = z(x) | |
55 | 73 | ||
56 | - | let | |
74 | + | let H = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
57 | 75 | ||
58 | - | let | |
76 | + | let I = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK' | |
59 | 77 | ||
60 | - | let | |
78 | + | let J = Address(base58'3NAGTtZz6WpupSN89NZD5rMZwwziZEg4Kx4') | |
61 | 79 | ||
62 | - | let | |
80 | + | let K = Address(base58'3MrJgdL1GniipErHy44YF9idzLaUL2iX5DQ') | |
63 | 81 | ||
64 | - | let | |
82 | + | let L = base58'8UrfDVd5GreeUwm7uPk7eYz1eMv376kzR52C6sANPkwS' | |
65 | 83 | ||
66 | - | let | |
84 | + | let M = base58'36mg8NZTaFRDygiVwb8uBnLR51hetJruUCZcxhaVcHj9' | |
67 | 85 | ||
68 | - | let | |
86 | + | let N = base58'2HAJrwa8q4SxBx9cHYaBTQdBjdk5wwqdof7ccpAx2uhZ' | |
69 | 87 | ||
70 | - | let | |
88 | + | let O = base58'ECBCkHS68DckpBrzLeoRgYbFg7sCVqR176mPqbXsj9pA' | |
71 | 89 | ||
72 | - | let | |
90 | + | let P = Address(base58'3N1qKnD3EoFpmFphWeZgmFjAUPXJmGw9cUp') | |
73 | 91 | ||
74 | - | let | |
92 | + | let Q = Address(base58'3MyVqAbmKWh339gF6hy8faWw1jGeTV2wnGE') | |
75 | 93 | ||
76 | - | let | |
94 | + | let R = Address(base58'3N77kfPbQyjXWpDALX3xjKw3iEGMWEctV37') | |
77 | 95 | ||
78 | - | let | |
96 | + | let S = Address(base58'3MzTHd4e3yukNUURApVLVzH5uxeEsXHD6yY') | |
79 | 97 | ||
80 | - | let | |
98 | + | let T = 270000 | |
81 | 99 | ||
82 | - | let L = if ((J == "WAVES")) | |
100 | + | let U = 234000 | |
101 | + | ||
102 | + | let V = valueOrErrorMessage(getInteger(K, r), "Empty kBasePeriod") | |
103 | + | ||
104 | + | let W = valueOrErrorMessage(getInteger(K, t), "Empty kStartHeight") | |
105 | + | ||
106 | + | let X = valueOrErrorMessage(getInteger(K, s), "Empty kPeriodLength") | |
107 | + | ||
108 | + | let Y = ((V + ((height - W) / X)) + 3) | |
109 | + | ||
110 | + | let Z = getBooleanValue(this, c) | |
111 | + | ||
112 | + | let aa = getStringValue(this, d) | |
113 | + | ||
114 | + | let ab = getStringValue(this, e) | |
115 | + | ||
116 | + | let ac = if ((aa == "WAVES")) | |
83 | 117 | then unit | |
84 | - | else fromBase58String( | |
118 | + | else fromBase58String(aa) | |
85 | 119 | ||
86 | - | let | |
120 | + | let ad = if ((ab == "WAVES")) | |
87 | 121 | then unit | |
88 | - | else fromBase58String( | |
122 | + | else fromBase58String(ab) | |
89 | 123 | ||
90 | - | let | |
91 | - | let | |
92 | - | if ($isInstanceOf( | |
124 | + | let ae = { | |
125 | + | let B = ac | |
126 | + | if ($isInstanceOf(B, "ByteVector")) | |
93 | 127 | then { | |
94 | - | let | |
95 | - | value(assetInfo( | |
128 | + | let af = B | |
129 | + | value(assetInfo(af)).name | |
96 | 130 | } | |
97 | - | else if ($isInstanceOf( | |
131 | + | else if ($isInstanceOf(B, "Unit")) | |
98 | 132 | then { | |
99 | - | let | |
133 | + | let ag = B | |
100 | 134 | "WAVES" | |
101 | 135 | } | |
102 | 136 | else throw("Match error") | |
103 | 137 | } | |
104 | 138 | ||
105 | - | let | |
106 | - | let | |
107 | - | if ($isInstanceOf( | |
139 | + | let ah = { | |
140 | + | let B = ad | |
141 | + | if ($isInstanceOf(B, "ByteVector")) | |
108 | 142 | then { | |
109 | - | let | |
110 | - | value(assetInfo( | |
143 | + | let af = B | |
144 | + | value(assetInfo(af)).name | |
111 | 145 | } | |
112 | - | else if ($isInstanceOf( | |
146 | + | else if ($isInstanceOf(B, "Unit")) | |
113 | 147 | then { | |
114 | - | let | |
148 | + | let ag = B | |
115 | 149 | "WAVES" | |
116 | 150 | } | |
117 | 151 | else throw("Match error") | |
118 | 152 | } | |
119 | 153 | ||
120 | - | let | |
154 | + | let ai = getIntegerValue(this, f) | |
121 | 155 | ||
122 | - | let | |
156 | + | let aj = getIntegerValue(this, g) | |
123 | 157 | ||
124 | - | let | |
158 | + | let ak = fromBase58String(getStringValue(this, j)) | |
125 | 159 | ||
126 | - | let | |
160 | + | let al = getIntegerValue(this, k) | |
127 | 161 | ||
128 | - | let | |
162 | + | let am = 3000 | |
129 | 163 | ||
130 | - | let | |
164 | + | let an = 1200 | |
131 | 165 | ||
132 | - | let | |
166 | + | let ao = 1000000 | |
133 | 167 | ||
134 | - | let | |
168 | + | let ap = 1000 | |
135 | 169 | ||
136 | - | let | |
170 | + | let aq = 100000000 | |
137 | 171 | ||
138 | - | let | |
172 | + | let ar = 1000 | |
139 | 173 | ||
140 | - | let | |
174 | + | let as = 8 | |
141 | 175 | ||
142 | - | func | |
143 | - | let | |
144 | - | if ($isInstanceOf( | |
176 | + | func at (au) = { | |
177 | + | let B = au | |
178 | + | if ($isInstanceOf(B, "ByteVector")) | |
145 | 179 | then { | |
146 | - | let | |
147 | - | assetBalance(this, | |
180 | + | let af = B | |
181 | + | assetBalance(this, af) | |
148 | 182 | } | |
149 | - | else if ($isInstanceOf( | |
183 | + | else if ($isInstanceOf(B, "Unit")) | |
150 | 184 | then { | |
151 | - | let | |
185 | + | let ag = B | |
152 | 186 | wavesBalance(this).available | |
153 | 187 | } | |
154 | 188 | else throw("Match error") | |
155 | 189 | } | |
156 | 190 | ||
157 | 191 | ||
158 | - | func | |
159 | - | let | |
160 | - | let | |
161 | - | if ($isInstanceOf( | |
192 | + | func av (au) = { | |
193 | + | let aw = { | |
194 | + | let B = au | |
195 | + | if ($isInstanceOf(B, "ByteVector")) | |
162 | 196 | then { | |
163 | - | let ai = s | |
164 | - | ai | |
197 | + | let ax = B | |
198 | + | if (if ((ax == L)) | |
199 | + | then true | |
200 | + | else (ax == M)) | |
201 | + | then getInteger(P, ((("rpd_balance_" + toBase58String(ax)) + "_") + toString(this))) | |
202 | + | else if ((ax == O)) | |
203 | + | then getInteger(Q, ((("%s%s%s__stakingBalance__" + toBase58String(ax)) + "__") + toString(this))) | |
204 | + | else 0 | |
165 | 205 | } | |
166 | - | else if ($isInstanceOf(s, "Unit")) | |
167 | - | then { | |
168 | - | let u = s | |
169 | - | 0 | |
170 | - | } | |
206 | + | else if ($isInstanceOf(B, "Unit")) | |
207 | + | then 0 | |
171 | 208 | else throw("Match error") | |
172 | 209 | } | |
173 | - | ah | |
210 | + | let B = aw | |
211 | + | if ($isInstanceOf(B, "Int")) | |
212 | + | then { | |
213 | + | let ay = B | |
214 | + | ay | |
215 | + | } | |
216 | + | else 0 | |
174 | 217 | } | |
175 | 218 | ||
176 | 219 | ||
177 | - | let | |
220 | + | let az = av(ac) | |
178 | 221 | ||
179 | - | let | |
222 | + | let aA = av(ad) | |
180 | 223 | ||
181 | - | let | |
224 | + | let aB = getIntegerValue(this, h) | |
182 | 225 | ||
183 | - | let | |
226 | + | let aC = getIntegerValue(this, i) | |
184 | 227 | ||
185 | - | let | |
228 | + | let aD = (ai - az) | |
186 | 229 | ||
187 | - | let | |
230 | + | let aE = (aj - aA) | |
188 | 231 | ||
189 | - | let ap = if ((an >= R)) | |
190 | - | then (ao >= S) | |
232 | + | let aF = (at(ac) + az) | |
233 | + | ||
234 | + | let aG = (at(ad) + aA) | |
235 | + | ||
236 | + | let aH = if ((aF >= ai)) | |
237 | + | then (aG >= aj) | |
191 | 238 | else false | |
192 | 239 | ||
193 | - | func | |
194 | - | let | |
195 | - | if ($isInstanceOf( | |
240 | + | func aI (au) = { | |
241 | + | let B = au | |
242 | + | if ($isInstanceOf(B, "ByteVector")) | |
196 | 243 | then { | |
197 | - | let | |
198 | - | let | |
199 | - | let | |
200 | - | $Tuple3( | |
244 | + | let af = B | |
245 | + | let aJ = toBase58String(af) | |
246 | + | let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist")) | |
247 | + | $Tuple3(aJ, aK.name, aK.decimals) | |
201 | 248 | } | |
202 | - | else if ($isInstanceOf( | |
249 | + | else if ($isInstanceOf(B, "Unit")) | |
203 | 250 | then { | |
204 | - | let | |
251 | + | let ag = B | |
205 | 252 | $Tuple3("WAVES", "WAVES", 8) | |
206 | 253 | } | |
207 | 254 | else throw("Match error") | |
208 | 255 | } | |
209 | 256 | ||
210 | 257 | ||
211 | - | func at (au) = [BooleanEntry(c, false), StringEntry(l, au)] | |
258 | + | func aL (aM) = if ((aM == "WAVES")) | |
259 | + | then $Tuple3("WAVES", "WAVES", 8) | |
260 | + | else { | |
261 | + | let aJ = aM | |
262 | + | let af = fromBase58String(aM) | |
263 | + | let aK = valueOrErrorMessage(assetInfo(af), (("Asset " + aJ) + " doesn't exist")) | |
264 | + | $Tuple3(aJ, aK.name, aK.decimals) | |
265 | + | } | |
212 | 266 | ||
213 | 267 | ||
214 | - | func av () = { | |
215 | - | let aw = if ((aj > 0)) | |
216 | - | then 1 | |
217 | - | else 0 | |
218 | - | let ax = if ((ak > 0)) | |
219 | - | then 1 | |
220 | - | else 0 | |
221 | - | (aw + ax) | |
222 | - | } | |
268 | + | func aN (aO) = [BooleanEntry(c, false), StringEntry(n, aO)] | |
223 | 269 | ||
224 | 270 | ||
225 | - | func ay (az,ad) = if ((ad == C)) | |
271 | + | func aP (aQ,au,aR) = if (if ((au == L)) | |
272 | + | then true | |
273 | + | else (au == O)) | |
226 | 274 | then { | |
227 | - | let aA = (az - (av() * H)) | |
228 | - | if ((0 >= aA)) | |
229 | - | then throw((((("Insufficient amount " + toString(az)) + " to deduct staking fee ") + toString(H)) + " USD-N")) | |
230 | - | else aA | |
275 | + | let aS = if ((au == L)) | |
276 | + | then (T * (if ((aR == M)) | |
277 | + | then 2 | |
278 | + | else 1)) | |
279 | + | else if ((au == O)) | |
280 | + | then U | |
281 | + | else 0 | |
282 | + | let aT = (aQ - aS) | |
283 | + | if ((0 >= aT)) | |
284 | + | then throw((((("Insufficient amount " + toString(aQ)) + " to deduct staking fee ") + toString(aS)) + "USDN/EURN")) | |
285 | + | else aT | |
231 | 286 | } | |
232 | - | else | |
287 | + | else aQ | |
233 | 288 | ||
234 | 289 | ||
235 | - | func aB (az,aC,aD) = throw((((((((("Insufficient DApp balance to pay " + toString(az)) + " ") + aD) + " due to staking. Available: ") + toString(aC)) + " ") + aD) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
290 | + | func aU (au,aR) = if ((au == L)) | |
291 | + | then (T * (if ((aR == M)) | |
292 | + | then 2 | |
293 | + | else 1)) | |
294 | + | else if ((au == O)) | |
295 | + | then U | |
296 | + | else 0 | |
236 | 297 | ||
237 | 298 | ||
238 | - | func | |
299 | + | func aV (aQ,aW,aX) = throw((((((((("Insufficient DApp balance to pay " + toString(aQ)) + " ") + aX) + " due to staking. Available: ") + toString(aW)) + " ") + aX) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
239 | 300 | ||
240 | 301 | ||
241 | - | func | |
302 | + | func aY (aZ,ba) = throw((((((((((((((((("Insufficient DApp balance to pay " + toString(aZ)) + " ") + ae) + " and ") + toString(ba)) + " ") + ah) + " due to staking. Available: ") + toString(aD)) + " ") + ae) + " and ") + toString(aE)) + " ") + ah) + ". Please contact support in Telegram: https://t.me/swopfisupport")) | |
242 | 303 | ||
243 | 304 | ||
244 | - | @Callable(aI) | |
245 | - | func init () = { | |
246 | - | let aJ = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
247 | - | let aK = aJ._1 | |
248 | - | let aL = aJ._2 | |
249 | - | let aM = $Tuple2(aI.payments[1].amount, aI.payments[1].assetId) | |
250 | - | let aN = aM._1 | |
251 | - | let aO = aM._2 | |
252 | - | let aP = aq(aL) | |
253 | - | let aQ = aP._1 | |
254 | - | let aR = aP._2 | |
255 | - | let aS = aP._3 | |
256 | - | let aT = aq(aO) | |
257 | - | let aU = aT._1 | |
258 | - | let aV = aT._2 | |
259 | - | let aW = aT._3 | |
260 | - | if (isDefined(getBoolean(this, c))) | |
261 | - | then throw("DApp is already active") | |
262 | - | else if ((aL == aO)) | |
263 | - | then throw("Assets must be different") | |
264 | - | else { | |
265 | - | let aX = ((("s" + take(aR, 7)) + "_") + take(aV, 7)) | |
266 | - | let aY = ((((("ShareToken of SwopFi protocol for " + aR) + " and ") + aV) + " at address ") + toString(this)) | |
267 | - | let aZ = ((aS + aW) / 2) | |
268 | - | let ba = fraction(pow(aK, aS, 5, 1, aS, DOWN), pow(aN, aW, 5, 1, aW, DOWN), pow(10, 0, aZ, 0, 0, DOWN)) | |
269 | - | let bb = Issue(aX, aY, ba, aZ, true) | |
270 | - | let bc = calculateAssetId(bb) | |
271 | - | [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, aQ), StringEntry(e, aU), IntegerEntry(f, aK), IntegerEntry(g, aN), IntegerEntry(j, V), IntegerEntry(k, X), bb, StringEntry(h, toBase58String(bc)), IntegerEntry(i, ba), ScriptTransfer(aI.caller, ba, bc)] | |
272 | - | } | |
305 | + | func bb () = aN(((((((((((((((("Suspicious state. Actual balances: " + toString(aF)) + " ") + ae) + ", ") + toString(aG)) + " ") + ah) + ". State: ") + toString(ai)) + " ") + ae) + ", ") + toString(aj)) + " ") + ah)) | |
306 | + | ||
307 | + | ||
308 | + | @Callable(ay) | |
309 | + | func init (bc) = { | |
310 | + | let bd = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
311 | + | let be = bd._1 | |
312 | + | let bf = bd._2 | |
313 | + | let bg = $Tuple2(ay.payments[1].amount, ay.payments[1].assetId) | |
314 | + | let bh = bg._1 | |
315 | + | let bi = bg._2 | |
316 | + | let bj = aI(bf) | |
317 | + | let bk = bj._1 | |
318 | + | let bl = bj._2 | |
319 | + | let bm = bj._3 | |
320 | + | let bn = aI(bi) | |
321 | + | let bo = bn._1 | |
322 | + | let bp = bn._2 | |
323 | + | let bq = bn._3 | |
324 | + | if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
325 | + | then throw("Only admin can call this function") | |
326 | + | else if (isDefined(getBoolean(this, c))) | |
327 | + | then throw("DApp is already active") | |
328 | + | else if ((bf == bi)) | |
329 | + | then throw("Assets must be different") | |
330 | + | else { | |
331 | + | let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7)) | |
332 | + | let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this)) | |
333 | + | let bt = ((bm + bq) / 2) | |
334 | + | let bu = pow(be, bm, 5, 1, bm, DOWN) | |
335 | + | let bv = pow(bh, bq, 5, 1, bq, DOWN) | |
336 | + | let bw = pow(10, 0, bt, 0, 0, DOWN) | |
337 | + | let bx = fraction(bu, bv, bw) | |
338 | + | let by = Issue(br, bs, bx, bt, true) | |
339 | + | let bz = calculateAssetId(by) | |
340 | + | let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, bz)] | |
341 | + | if (bc) | |
342 | + | then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))]) | |
343 | + | else bA | |
344 | + | } | |
273 | 345 | } | |
274 | 346 | ||
275 | 347 | ||
276 | 348 | ||
277 | - | @Callable(aI) | |
278 | - | func replenishWithTwoTokens (bd) = { | |
279 | - | let aL = aI.payments[0].assetId | |
280 | - | let aO = aI.payments[1].assetId | |
281 | - | let aK = ay(aI.payments[0].amount, aL) | |
282 | - | let aN = ay(aI.payments[1].amount, aO) | |
283 | - | let be = fraction(fraction(R, Z, aK), Y, fraction(S, Z, aN)) | |
284 | - | let bf = fraction(aK, Z, R) | |
285 | - | let bg = fraction(aN, Z, S) | |
286 | - | let bh = fraction(min([bf, bg]), U, Z) | |
287 | - | if (!(I)) | |
288 | - | then throw("DApp is inactive at this moment") | |
289 | - | else if (if ((0 > bd)) | |
290 | - | then true | |
291 | - | else (bd > aa)) | |
292 | - | then throw(((("Slippage tolerance must be between 0 and " + toString(aa)) + " inclusively. Actual: ") + toString(bd))) | |
293 | - | else if ((size(aI.payments) != 2)) | |
294 | - | then throw("Two attached assets expected") | |
295 | - | else if (if ((aL != L)) | |
296 | - | then true | |
297 | - | else (aO != M)) | |
298 | - | then throw(((("Incorrect assets attached. Expected: " + J) + " and ") + K)) | |
299 | - | else if (if ((((Y * (aa - bd)) / aa) > be)) | |
300 | - | then true | |
301 | - | else (be > ((Y * (aa + bd)) / aa))) | |
302 | - | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
303 | - | else if ((bh == 0)) | |
304 | - | then throw("Too small amount to replenish") | |
305 | - | else if (!(ap)) | |
306 | - | then ([ScriptTransfer(aI.caller, aK, aL), ScriptTransfer(aI.caller, aN, aO)] ++ aH()) | |
307 | - | else [IntegerEntry(f, (R + aK)), IntegerEntry(g, (S + aN)), IntegerEntry(i, (U + bh)), Reissue(T, bh, true), ScriptTransfer(aI.caller, bh, T)] | |
349 | + | @Callable(ay) | |
350 | + | func initWithInitRatio (bB,bC,aa,ab,bc) = { | |
351 | + | let bD = aL(aa) | |
352 | + | let bk = bD._1 | |
353 | + | let bl = bD._2 | |
354 | + | let bm = bD._3 | |
355 | + | let bE = aL(ab) | |
356 | + | let bo = bE._1 | |
357 | + | let bp = bE._2 | |
358 | + | let bq = bE._3 | |
359 | + | if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
360 | + | then throw("Only admin can call this function") | |
361 | + | else if (isDefined(getBoolean(this, c))) | |
362 | + | then throw("DApp is already active") | |
363 | + | else if ((aa == ab)) | |
364 | + | then throw("Assets must be different") | |
365 | + | else { | |
366 | + | let br = ((("s" + take(bl, 7)) + "_") + take(bp, 7)) | |
367 | + | let bs = ((((("ShareToken of SwopFi protocol for " + bl) + " and ") + bp) + " at address ") + toString(this)) | |
368 | + | let bt = ((bm + bq) / 2) | |
369 | + | let bx = 0 | |
370 | + | let by = Issue(br, bs, bx, bt, true) | |
371 | + | let bz = calculateAssetId(by) | |
372 | + | let bA = [StringEntry(b, a), BooleanEntry(c, true), StringEntry(d, bk), StringEntry(e, bo), IntegerEntry(h, bB), IntegerEntry(i, bC), IntegerEntry(f, 0), IntegerEntry(g, 0), IntegerEntry(l, am), IntegerEntry(m, ao), by, StringEntry(j, toBase58String(bz)), IntegerEntry(k, bx)] | |
373 | + | if (bc) | |
374 | + | then (bA ++ [BooleanEntry(o, bc), IntegerEntry(p, (W + (Y * X)))]) | |
375 | + | else bA | |
376 | + | } | |
308 | 377 | } | |
309 | 378 | ||
310 | 379 | ||
311 | 380 | ||
312 | - | @Callable(aI) | |
313 | - | func withdraw () = { | |
314 | - | let bi = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
315 | - | let bj = bi._1 | |
316 | - | let bk = bi._2 | |
317 | - | let bl = ay(fraction(bj, R, U), L) | |
318 | - | let bm = ay(fraction(bj, S, U), M) | |
319 | - | if (!(I)) | |
320 | - | then throw("DApp is inactive at this moment") | |
321 | - | else if ((size(aI.payments) != 1)) | |
322 | - | then throw("One attached payment expected") | |
323 | - | else if ((bk != T)) | |
324 | - | then throw(("Incorrect asset attached. Expected: " + toBase58String(T))) | |
325 | - | else if (!(ap)) | |
326 | - | then ([ScriptTransfer(aI.caller, bj, bk)] ++ aH()) | |
327 | - | else if (if ((bl > al)) | |
328 | - | then true | |
329 | - | else (bm > am)) | |
330 | - | then aE(bl, bm) | |
331 | - | else [IntegerEntry(f, (R - bl)), IntegerEntry(g, (S - bm)), IntegerEntry(i, (U - bj)), Burn(T, bj), ScriptTransfer(aI.caller, bl, L), ScriptTransfer(aI.caller, bm, M)] | |
381 | + | @Callable(ay) | |
382 | + | func keepLimitForFirstHarvest (bF) = if (!(Z)) | |
383 | + | then throw("DApp is inactive at this moment") | |
384 | + | else if (!(containsElement([E, F, G, I], ay.callerPublicKey))) | |
385 | + | then throw("Only admin can call this function") | |
386 | + | else [IntegerEntry(q, bF)] | |
387 | + | ||
388 | + | ||
389 | + | ||
390 | + | @Callable(ay) | |
391 | + | func replenishWithTwoTokens (bG) = { | |
392 | + | let bf = ay.payments[0].assetId | |
393 | + | let bi = ay.payments[1].assetId | |
394 | + | let be = aP(ay.payments[0].amount, bf, bi) | |
395 | + | let bh = aP(ay.payments[1].amount, bi, bf) | |
396 | + | if (if ((ai == 0)) | |
397 | + | then (aj == 0) | |
398 | + | else false) | |
399 | + | then { | |
400 | + | let bH = aI(bf) | |
401 | + | let bk = bH._1 | |
402 | + | let bl = bH._2 | |
403 | + | let bm = bH._3 | |
404 | + | let bI = aI(bi) | |
405 | + | let bo = bI._1 | |
406 | + | let bp = bI._2 | |
407 | + | let bq = bI._3 | |
408 | + | let bJ = fraction(fraction(aB, aq, be), ap, fraction(aC, aq, bh)) | |
409 | + | if ((bf == bi)) | |
410 | + | then throw("Assets must be different") | |
411 | + | else { | |
412 | + | let bt = ((bm + bq) / 2) | |
413 | + | let bx = fraction(pow(be, bm, 5, 1, bm, DOWN), pow(bh, bq, 5, 1, bq, DOWN), pow(10, 0, bt, 0, 0, DOWN)) | |
414 | + | if (!(Z)) | |
415 | + | then throw("DApp is inactive at this moment") | |
416 | + | else if (if ((0 > bG)) | |
417 | + | then true | |
418 | + | else (bG > ar)) | |
419 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG))) | |
420 | + | else if ((size(ay.payments) != 2)) | |
421 | + | then throw("Two attached assets expected") | |
422 | + | else if (if ((((ap * (ar - bG)) / ar) > bJ)) | |
423 | + | then true | |
424 | + | else (bJ > ((ap * (ar + bG)) / ar))) | |
425 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
426 | + | else if (if ((bf != ac)) | |
427 | + | then true | |
428 | + | else (bi != ad)) | |
429 | + | then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab)) | |
430 | + | else if ((bx == 0)) | |
431 | + | then throw("Too small amount to replenish") | |
432 | + | else if (!(aH)) | |
433 | + | then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb()) | |
434 | + | else [Reissue(ak, bx, true), IntegerEntry(f, be), IntegerEntry(g, bh), IntegerEntry(k, bx), ScriptTransfer(ay.caller, bx, ak)] | |
435 | + | } | |
436 | + | } | |
437 | + | else { | |
438 | + | let bJ = fraction(fraction(ai, aq, be), ap, fraction(aj, aq, bh)) | |
439 | + | let bK = fraction(be, aq, ai) | |
440 | + | let bL = fraction(bh, aq, aj) | |
441 | + | let bM = fraction(min([bK, bL]), al, aq) | |
442 | + | if (!(Z)) | |
443 | + | then throw("DApp is inactive at this moment") | |
444 | + | else if (if ((0 > bG)) | |
445 | + | then true | |
446 | + | else (bG > ar)) | |
447 | + | then throw(((("Slippage tolerance must be between 0 and " + toString(ar)) + " inclusively. Actual: ") + toString(bG))) | |
448 | + | else if ((size(ay.payments) != 2)) | |
449 | + | then throw("Two attached assets expected") | |
450 | + | else if (if ((bf != ac)) | |
451 | + | then true | |
452 | + | else (bi != ad)) | |
453 | + | then throw(((("Incorrect assets attached. Expected: " + aa) + " and ") + ab)) | |
454 | + | else if (if ((((ap * (ar - bG)) / ar) > bJ)) | |
455 | + | then true | |
456 | + | else (bJ > ((ap * (ar + bG)) / ar))) | |
457 | + | then throw("Incorrect assets amount: amounts must have the contract ratio") | |
458 | + | else if ((bM == 0)) | |
459 | + | then throw("Too small amount to replenish") | |
460 | + | else if (!(aH)) | |
461 | + | then ([ScriptTransfer(ay.caller, be, bf), ScriptTransfer(ay.caller, bh, bi)] ++ bb()) | |
462 | + | else [IntegerEntry(f, (ai + be)), IntegerEntry(g, (aj + bh)), IntegerEntry(k, (al + bM)), Reissue(ak, bM, true), ScriptTransfer(ay.caller, bM, ak)] | |
463 | + | } | |
332 | 464 | } | |
333 | 465 | ||
334 | 466 | ||
335 | 467 | ||
336 | - | @Callable(aI) | |
337 | - | func exchange (bn) = { | |
338 | - | let bo = $Tuple2(aI.payments[0].amount, aI.payments[0].assetId) | |
339 | - | let bj = bo._1 | |
340 | - | let bk = bo._2 | |
341 | - | func bp (bq,br) = { | |
342 | - | let bs = fraction(br, bj, (bj + bq)) | |
343 | - | let bt = fraction(bs, (X - V), X) | |
344 | - | let bu = fraction(bs, W, X) | |
345 | - | if ((bn > bt)) | |
346 | - | then throw(((("Calculated amount to receive " + toString(bt)) + " is less than specified minimum ") + toString(bn))) | |
347 | - | else $Tuple3(bs, bt, bu) | |
348 | - | } | |
349 | - | ||
350 | - | if (!(I)) | |
468 | + | @Callable(ay) | |
469 | + | func withdraw () = { | |
470 | + | let bN = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
471 | + | let bO = bN._1 | |
472 | + | let bP = bN._2 | |
473 | + | let bQ = aP(fraction(bO, ai, al), ac, ad) | |
474 | + | let bR = aP(fraction(bO, aj, al), ad, ac) | |
475 | + | if (!(Z)) | |
351 | 476 | then throw("DApp is inactive at this moment") | |
352 | - | else if ((0 >= bn)) | |
353 | - | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bn))) | |
354 | - | else if ((size(aI.payments) != 1)) | |
355 | - | then throw("One attached payment expected") | |
356 | - | else if (!(ap)) | |
357 | - | then ([ScriptTransfer(aI.caller, bj, bk)] ++ aH()) | |
358 | - | else if ((bk == L)) | |
359 | - | then { | |
360 | - | let bv = M | |
361 | - | let bw = bp(R, S) | |
362 | - | let bs = bw._1 | |
363 | - | let bt = bw._2 | |
364 | - | let bu = bw._3 | |
365 | - | let bx = (R + bj) | |
366 | - | let by = ((S - bt) - bu) | |
367 | - | if (if ((aj >= bx)) | |
368 | - | then true | |
369 | - | else (ak >= by)) | |
370 | - | then aB(bt, am, Q) | |
371 | - | else [IntegerEntry(f, bx), IntegerEntry(g, by), ScriptTransfer(aI.caller, bt, bv), ScriptTransfer(A, bu, bv)] | |
372 | - | } | |
373 | - | else if ((bk == M)) | |
374 | - | then { | |
375 | - | let bv = L | |
376 | - | let bz = bp(S, R) | |
377 | - | let bs = bz._1 | |
378 | - | let bt = bz._2 | |
379 | - | let bu = bz._3 | |
380 | - | let bx = ((R - bt) - bu) | |
381 | - | let by = (S + bj) | |
382 | - | if (if ((aj >= bx)) | |
383 | - | then true | |
384 | - | else (ak >= by)) | |
385 | - | then aB(bt, al, N) | |
386 | - | else [IntegerEntry(f, bx), IntegerEntry(g, by), ScriptTransfer(aI.caller, bt, bv), ScriptTransfer(A, bu, bv)] | |
387 | - | } | |
388 | - | else throw(((("Incorrect asset attached. Expected: " + J) + " or ") + K)) | |
477 | + | else if ((size(ay.payments) != 1)) | |
478 | + | then throw("One attached payment expected") | |
479 | + | else if ((bP != ak)) | |
480 | + | then throw(("Incorrect asset attached. Expected: " + toBase58String(ak))) | |
481 | + | else if (!(aH)) | |
482 | + | then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb()) | |
483 | + | else if (if ((bQ > aD)) | |
484 | + | then true | |
485 | + | else (bR > aE)) | |
486 | + | then aY(bQ, bR) | |
487 | + | else [IntegerEntry(f, (ai - bQ)), IntegerEntry(g, (aj - bR)), IntegerEntry(k, (al - bO)), Burn(ak, bO), ScriptTransfer(ay.caller, bQ, ac), ScriptTransfer(ay.caller, bR, ad)] | |
389 | 488 | } | |
390 | 489 | ||
391 | 490 | ||
392 | 491 | ||
393 | - | @Callable(aI) | |
394 | - | func shutdown () = if (!(I)) | |
395 | - | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, l), "the cause wasn't specified"))) | |
396 | - | else if (!(containsElement([v, w, x, y], aI.callerPublicKey))) | |
397 | - | then throw("Only admin can call this function") | |
398 | - | else at("Paused by admin") | |
492 | + | @Callable(ay) | |
493 | + | func exchange (bS) = { | |
494 | + | let bT = $Tuple2(ay.payments[0].amount, ay.payments[0].assetId) | |
495 | + | let bO = bT._1 | |
496 | + | let bP = bT._2 | |
497 | + | func bU (bV,bW) = { | |
498 | + | let bX = fraction(bW, bO, (bO + bV)) | |
499 | + | let bY = fraction(bX, (ao - am), ao) | |
500 | + | let bZ = fraction(bX, an, ao) | |
501 | + | if ((bS > bY)) | |
502 | + | then throw(((("Calculated amount to receive " + toString(bY)) + " is less than specified minimum ") + toString(bS))) | |
503 | + | else $Tuple3(bX, bY, bZ) | |
504 | + | } | |
505 | + | ||
506 | + | if (!(Z)) | |
507 | + | then throw("DApp is inactive at this moment") | |
508 | + | else if (if ((ai == 0)) | |
509 | + | then true | |
510 | + | else (aj == 0)) | |
511 | + | then throw("Can't exchange with zero balance") | |
512 | + | else if ((0 >= bS)) | |
513 | + | then throw(("Minimal amount to receive must be positive. Actual: " + toString(bS))) | |
514 | + | else if ((size(ay.payments) != 1)) | |
515 | + | then throw("One attached payment expected") | |
516 | + | else if (!(aH)) | |
517 | + | then ([ScriptTransfer(ay.caller, bO, bP)] ++ bb()) | |
518 | + | else if ((bP == ac)) | |
519 | + | then { | |
520 | + | let ca = ad | |
521 | + | let cb = bU(ai, aj) | |
522 | + | let bX = cb._1 | |
523 | + | let bY = cb._2 | |
524 | + | let bZ = cb._3 | |
525 | + | let cc = (ai + bO) | |
526 | + | let cd = ((aj - bY) - bZ) | |
527 | + | if (if ((az >= cc)) | |
528 | + | then true | |
529 | + | else (aA >= cd)) | |
530 | + | then aV(bY, aE, ah) | |
531 | + | else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)] | |
532 | + | } | |
533 | + | else if ((bP == ad)) | |
534 | + | then { | |
535 | + | let ca = ac | |
536 | + | let ce = bU(aj, ai) | |
537 | + | let bX = ce._1 | |
538 | + | let bY = ce._2 | |
539 | + | let bZ = ce._3 | |
540 | + | let cc = ((ai - bY) - bZ) | |
541 | + | let cd = (aj + bO) | |
542 | + | if (if ((az >= cc)) | |
543 | + | then true | |
544 | + | else (aA >= cd)) | |
545 | + | then aV(bY, aD, ae) | |
546 | + | else [IntegerEntry(f, cc), IntegerEntry(g, cd), ScriptTransfer(ay.caller, bY, ca), ScriptTransfer(J, bZ, ca)] | |
547 | + | } | |
548 | + | else throw(((("Incorrect asset attached. Expected: " + aa) + " or ") + ab)) | |
549 | + | } | |
399 | 550 | ||
400 | 551 | ||
401 | 552 | ||
402 | - | @Callable( | |
403 | - | func | |
404 | - | then throw("DApp is already | |
405 | - | else if (!(containsElement([ | |
553 | + | @Callable(ay) | |
554 | + | func shutdown () = if (!(Z)) | |
555 | + | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, n), "the cause wasn't specified"))) | |
556 | + | else if (!(containsElement([E, F, G, H], ay.callerPublicKey))) | |
406 | 557 | then throw("Only admin can call this function") | |
407 | - | else | |
558 | + | else aN("Paused by admin") | |
408 | 559 | ||
409 | 560 | ||
410 | 561 | ||
411 | - | @Callable(aI) | |
412 | - | func takeIntoAccountExtraFunds (bA) = { | |
413 | - | let bB = (an - R) | |
414 | - | let bC = (ao - S) | |
415 | - | let bD = (bB - (if ((L == unit)) | |
416 | - | then bA | |
562 | + | @Callable(ay) | |
563 | + | func activate () = if (Z) | |
564 | + | then throw("DApp is already active") | |
565 | + | else if (!(containsElement([E, F, G, H], ay.callerPublicKey))) | |
566 | + | then throw("Only admin can call this function") | |
567 | + | else [BooleanEntry(c, true), DeleteEntry(n)] | |
568 | + | ||
569 | + | ||
570 | + | ||
571 | + | @Callable(ay) | |
572 | + | func takeIntoAccountExtraFunds (cf) = { | |
573 | + | let cg = (aF - ai) | |
574 | + | let ch = (aG - aj) | |
575 | + | let ci = (cg - (if ((ac == unit)) | |
576 | + | then cf | |
417 | 577 | else 0)) | |
418 | - | let | |
419 | - | then | |
578 | + | let cj = (ch - (if ((ad == unit)) | |
579 | + | then cf | |
420 | 580 | else 0)) | |
421 | - | if (!( | |
581 | + | if (!(Z)) | |
422 | 582 | then throw("DApp is inactive at this moment") | |
423 | - | else if (( | |
583 | + | else if ((ay.caller != this)) | |
424 | 584 | then throw("Only the DApp itself can call this function") | |
425 | - | else if ((0 > | |
426 | - | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString( | |
427 | - | else if (if ((0 > | |
585 | + | else if ((0 > cf)) | |
586 | + | then throw(("Argument 'amountLeave' cannot be negative. Actual: " + toString(cf))) | |
587 | + | else if (if ((0 > cg)) | |
428 | 588 | then true | |
429 | - | else (0 > | |
430 | - | then | |
431 | - | else if (if ((0 > | |
589 | + | else (0 > ch)) | |
590 | + | then aN("Enroll amount negative") | |
591 | + | else if (if ((0 > ci)) | |
432 | 592 | then true | |
433 | - | else (0 > | |
593 | + | else (0 > cj)) | |
434 | 594 | then throw("Too large amountLeave") | |
435 | - | else [IntegerEntry(f, ( | |
595 | + | else [IntegerEntry(f, (ai + ci)), IntegerEntry(g, (aj + cj)), IntegerEntry(("last_income_" + aa), ci), IntegerEntry(("last_income_" + ab), cj)] | |
436 | 596 | } | |
437 | 597 | ||
438 | 598 | ||
439 | - | @Verifier( | |
440 | - | func | |
441 | - | let | |
442 | - | let | |
599 | + | @Verifier(ck) | |
600 | + | func cl () = { | |
601 | + | let cm = { | |
602 | + | let cn = if (sigVerify(ck.bodyBytes, ck.proofs[0], E)) | |
443 | 603 | then 1 | |
444 | 604 | else 0 | |
445 | - | let | |
605 | + | let co = if (sigVerify(ck.bodyBytes, ck.proofs[1], F)) | |
446 | 606 | then 1 | |
447 | 607 | else 0 | |
448 | - | let | |
608 | + | let cp = if (sigVerify(ck.bodyBytes, ck.proofs[2], G)) | |
449 | 609 | then 1 | |
450 | 610 | else 0 | |
451 | - | ((( | |
611 | + | (((cn + co) + cp) >= 2) | |
452 | 612 | } | |
453 | - | let | |
454 | - | if ($isInstanceOf( | |
613 | + | let B = ck | |
614 | + | if ($isInstanceOf(B, "InvokeScriptTransaction")) | |
455 | 615 | then { | |
456 | - | let bL = s | |
457 | - | if (if (if (if (sigVerify(bL.bodyBytes, bL.proofs[0], z)) | |
458 | - | then (bL.dApp == B) | |
616 | + | let cq = B | |
617 | + | let cr = if ((cq.dApp == this)) | |
618 | + | then (cq.function == "takeIntoAccountExtraFunds") | |
619 | + | else false | |
620 | + | let cs = if (if ((cq.dApp == P)) | |
621 | + | then if (if (if ((cq.function == "lockNeutrino")) | |
622 | + | then (size(cq.payments) == 1) | |
623 | + | else false) | |
624 | + | then if ((cq.payments[0].assetId == L)) | |
625 | + | then true | |
626 | + | else (cq.payments[0].assetId == M) | |
627 | + | else false) | |
628 | + | then true | |
629 | + | else if ((cq.function == "unlockNeutrino")) | |
630 | + | then (size(cq.payments) == 0) | |
631 | + | else false | |
459 | 632 | else false) | |
460 | 633 | then true | |
461 | - | else if (if (sigVerify(bL.bodyBytes, bL.proofs[0], z)) | |
462 | - | then (bL.function == "exchange") | |
463 | - | else false) | |
464 | - | then if (if (if (if (if ((L == D)) | |
465 | - | then (M == C) | |
634 | + | else if ((cq.dApp == Q)) | |
635 | + | then if (if (if ((cq.function == "startStaking")) | |
636 | + | then (size(cq.payments) == 1) | |
466 | 637 | else false) | |
467 | - | then (bL.dApp == F) | |
468 | - | else false) | |
469 | - | then (bL.payments[0].assetId == unit) | |
470 | - | else false) | |
471 | - | then if ((bL.payments[0].assetId == unit)) | |
472 | - | then true | |
473 | - | else (bL.payments[0].assetId == C) | |
638 | + | then (cq.payments[0].assetId == O) | |
474 | 639 | else false) | |
475 | 640 | then true | |
476 | - | else if (if ((L == D)) | |
477 | - | then (M == E) | |
478 | - | else false) | |
479 | - | then if (if ((bL.dApp == G)) | |
480 | - | then (bL.payments[0].assetId == C) | |
481 | - | else false) | |
482 | - | then true | |
483 | - | else if ((bL.dApp == F)) | |
484 | - | then if ((bL.payments[0].assetId == unit)) | |
485 | - | then true | |
486 | - | else (bL.payments[0].assetId == C) | |
487 | - | else false | |
641 | + | else if ((cq.function == "stopStaking")) | |
642 | + | then (size(cq.payments) == 0) | |
488 | 643 | else false | |
644 | + | else false | |
645 | + | let ct = if (if (if ((cq.dApp == R)) | |
646 | + | then (cq.function == "exchange") | |
647 | + | else false) | |
648 | + | then (ac == L) | |
649 | + | else false) | |
650 | + | then true | |
651 | + | else if (if ((ad == L)) | |
652 | + | then (size(cq.payments) == 1) | |
489 | 653 | else false) | |
654 | + | then (cq.payments[0].assetId == L) | |
655 | + | else false | |
656 | + | let cu = if (if (if ((cq.dApp == S)) | |
657 | + | then (cq.function == "exchange") | |
658 | + | else false) | |
659 | + | then (ac == M) | |
660 | + | else false) | |
490 | 661 | then true | |
491 | - | else if (if ( | |
492 | - | then ( | |
662 | + | else if (if ((ad == M)) | |
663 | + | then (size(cq.payments) == 1) | |
493 | 664 | else false) | |
494 | - | then (bL.function == "takeIntoAccountExtraFunds") | |
495 | - | else false) | |
665 | + | then (cq.payments[0].assetId == L) | |
666 | + | else false | |
667 | + | let cv = if (if (if (sigVerify(ck.bodyBytes, ck.proofs[0], E)) | |
496 | 668 | then true | |
497 | - | else bH | |
669 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], F)) | |
670 | + | then true | |
671 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], G)) | |
672 | + | then true | |
673 | + | else sigVerify(ck.bodyBytes, ck.proofs[0], I) | |
674 | + | if (if (if (if (if (cr) | |
675 | + | then true | |
676 | + | else cs) | |
677 | + | then true | |
678 | + | else ct) | |
679 | + | then true | |
680 | + | else cu) | |
681 | + | then cv | |
682 | + | else false) | |
683 | + | then true | |
684 | + | else cm | |
498 | 685 | } | |
499 | - | else | |
686 | + | else cm | |
500 | 687 | } | |
501 | 688 |
github/deemru/w8io/169f3d6 151.98 ms ◑