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