tx · 8uMDS5JfUA7Qyd82WvmvCouVmhES9ZDRwEjkkjgXGweE 3MyzPou5b4wqX1yKewzD9Q842nZfEsrmmdA: -0.14000000 Waves 2022.11.14 15:43 [2316817] smart account 3MyzPou5b4wqX1yKewzD9Q842nZfEsrmmdA > SELF 0.00000000 Waves
{ "type": 13, "id": "8uMDS5JfUA7Qyd82WvmvCouVmhES9ZDRwEjkkjgXGweE", "fee": 14000000, "feeAssetId": null, "timestamp": 1668429878207, "version": 2, "chainId": 84, "sender": "3MyzPou5b4wqX1yKewzD9Q842nZfEsrmmdA", "senderPublicKey": "J7rgH9Evbm92drmc4Tf5qZVRXhZDjak1uHg31HriTLxD", "proofs": [ "5ETbisymrmEzrS9ozPpiJmHEosgzqQAbEzUNGxFMFHDJetxQBPmPkNf5zvEgw3hQFKwnEAKC3bvZFwnxRpXTAtDR", "JTefR8R3N5rAYCdEHphSAeJVwok3aXPqP7BuAAeUSzpec8TJvzeRfaSYWJNJJpTXGEyC4ECj3ztF6gZMv4ssCVF" ], "script": "base64:BgIkCAISBAoCCBgSABIAEgUKAwQBCBIDCgEBEgMKAQESABIDCgEBJwAHa0FjdGl2ZQIGYWN0aXZlAAZrQ2F1c2UCDnNodXRkb3duX2NhdXNlAAxrVVNETkFkZHJlc3MCGHN0YWtpbmdfdXNkbm5zYnRfYWRkcmVzcwAMa0VVUk5BZGRyZXNzAhRzdGFraW5nX2V1cm5fYWRkcmVzcwAMa0xlYXNpbmdQb29sAg9sZWFzaW5nX2FkZHJlc3MADmtMZWFzaW5nQW1vdW50Ag5sZWFzaW5nX2Ftb3VudAAKa0xlYXNpbmdJZAIKbGVhc2luZ19pZAANa0FkbWluUHViS2V5MQILYWRtaW5fcHViXzEADWtBZG1pblB1YktleTICC2FkbWluX3B1Yl8yAA1rQWRtaW5QdWJLZXkzAgthZG1pbl9wdWJfMwASa0FkbWluSW52b2tlUHViS2V5AhBhZG1pbl9pbnZva2VfcHViAA1rQ3BtbUNvbnRyYWN0Ag1jc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aQhwYXltZW50cwECdHgBBnZlcmlmeQAEE211bHRpU2lnbmVkQnlBZG1pbnMEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAgUTbXVsdGlTaWduZWRCeUFkbWluc18ca1c=", "height": 2316817, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9bhqVSCHrwUJGqQ1BKvwtTUA4hTSgZo9X7z8L78YGS6b Next: none Diff:
Old | New | Differences | |
---|---|---|---|
33 | 33 | ||
34 | 34 | let p = "share_asset_id" | |
35 | 35 | ||
36 | - | let q = Address(base58' | |
36 | + | let q = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
37 | 37 | ||
38 | 38 | func r (s) = { | |
39 | 39 | let t = getString(q, s) | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | - | @Callable(aj) | |
178 | - | func callFunction (ak,al) = valueOrElse(H(), { | |
179 | - | let am = { | |
180 | - | let an = aj.payments | |
181 | - | let ao = size(an) | |
182 | - | let ap = $Tuple2(nil, nil) | |
183 | - | func aq (ar,as) = if ((as >= ao)) | |
184 | - | then ar | |
185 | - | else X(ar, an[as]) | |
177 | + | func aj (ak,J,al,am) = valueOrElse(H(), { | |
178 | + | let an = { | |
179 | + | let ao = am | |
180 | + | let ap = size(ao) | |
181 | + | let aq = $Tuple2(nil, nil) | |
182 | + | func ar (as,at) = if ((at >= ap)) | |
183 | + | then as | |
184 | + | else X(as, ao[at]) | |
186 | 185 | ||
187 | - | func | |
188 | - | then | |
186 | + | func au (as,at) = if ((at >= ap)) | |
187 | + | then as | |
189 | 188 | else throw("List size exceeds 10") | |
190 | 189 | ||
191 | - | | |
190 | + | au(ar(ar(ar(ar(ar(ar(ar(ar(ar(ar(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
192 | 191 | } | |
193 | - | let ab = | |
194 | - | let ac = | |
195 | - | let | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | - | then | |
199 | - | else throw(($getType( | |
192 | + | let ab = an._1 | |
193 | + | let ac = an._2 | |
194 | + | let av = { | |
195 | + | let aw = reentrantInvoke(C, ak, [J, al, ab, ac], nil) | |
196 | + | if ($isInstanceOf(aw, "(List[Any], List[Any])")) | |
197 | + | then aw | |
198 | + | else throw(($getType(aw) + " couldn't be cast to (List[Any], List[Any])")) | |
200 | 199 | } | |
201 | - | if (( | |
200 | + | if ((av == av)) | |
202 | 201 | then { | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | func | |
210 | - | then | |
211 | - | else ah( | |
202 | + | let ax = av._2 | |
203 | + | let ay = av._1 | |
204 | + | let az = { | |
205 | + | let ao = ax | |
206 | + | let ap = size(ao) | |
207 | + | let aq = nil | |
208 | + | func aA (as,at) = if ((at >= ap)) | |
209 | + | then as | |
210 | + | else ah(as, ao[at]) | |
212 | 211 | ||
213 | - | func | |
214 | - | then | |
212 | + | func aB (as,at) = if ((at >= ap)) | |
213 | + | then as | |
215 | 214 | else throw("List size exceeds 10") | |
216 | 215 | ||
217 | - | aA( | |
216 | + | aB(aA(aA(aA(aA(aA(aA(aA(aA(aA(aA(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
218 | 217 | } | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | func | |
224 | - | then | |
225 | - | else ad( | |
218 | + | let aC = { | |
219 | + | let ao = ay | |
220 | + | let ap = size(ao) | |
221 | + | let aq = nil | |
222 | + | func aD (as,at) = if ((at >= ap)) | |
223 | + | then as | |
224 | + | else ad(as, ao[at]) | |
226 | 225 | ||
227 | - | func | |
228 | - | then | |
226 | + | func aE (as,at) = if ((at >= ap)) | |
227 | + | then as | |
229 | 228 | else throw("List size exceeds 15") | |
230 | 229 | ||
231 | - | aD( | |
230 | + | aE(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
232 | 231 | } | |
233 | - | $Tuple2( | |
232 | + | $Tuple2(aC, az) | |
234 | 233 | } | |
235 | 234 | else throw("Strict value is not equal to itself.") | |
236 | 235 | }) | |
237 | 236 | ||
238 | 237 | ||
238 | + | @Callable(aF) | |
239 | + | func callFunction (ak,al) = aj(ak, aF.caller.bytes, al, aF.payments) | |
239 | 240 | ||
240 | - | @Callable(aj) | |
241 | - | func shutdown () = valueOrElse(K(aj.callerPublicKey), if (!(G)) | |
241 | + | ||
242 | + | ||
243 | + | @Callable(aF) | |
244 | + | func shutdown () = valueOrElse(K(aF.callerPublicKey), if (!(G)) | |
242 | 245 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
243 | 246 | else M("Paused by admin")) | |
244 | 247 | ||
245 | 248 | ||
246 | 249 | ||
247 | - | @Callable( | |
248 | - | func activate () = valueOrElse(K( | |
250 | + | @Callable(aF) | |
251 | + | func activate () = valueOrElse(K(aF.callerPublicKey), if (G) | |
249 | 252 | then throw("DApp is already active") | |
250 | 253 | else [BooleanEntry(a, true), DeleteEntry(b)]) | |
251 | 254 | ||
252 | 255 | ||
253 | 256 | ||
254 | - | @Callable( | |
255 | - | func stakeUnstake (P,S, | |
257 | + | @Callable(aF) | |
258 | + | func stakeUnstake (P,S,aG) = valueOrElse(H(), if ((aF.caller != C)) | |
256 | 259 | then throw("Only global Contract can invoke this function") | |
257 | - | else if (( | |
260 | + | else if ((aG == "WAVES")) | |
258 | 261 | then { | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | then ( | |
264 | - | else ( | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let t = | |
262 | + | let aH = addressFromStringValue(valueOrErrorMessage(getString(q, e), "No leasing pool in oracle")) | |
263 | + | let aI = getBinary(this, g) | |
264 | + | let aJ = valueOrElse(getInteger(this, f), 0) | |
265 | + | let aK = if (P) | |
266 | + | then (aJ + S) | |
267 | + | else (aJ - S) | |
268 | + | let aL = Lease(aH, aK) | |
269 | + | let aM = calculateLeaseId(aL) | |
270 | + | let aN = [aL, BinaryEntry(g, aM), IntegerEntry(f, aK)] | |
271 | + | let t = aI | |
269 | 272 | if ($isInstanceOf(t, "ByteVector")) | |
270 | 273 | then { | |
271 | - | let | |
272 | - | ([LeaseCancel( | |
274 | + | let aO = t | |
275 | + | ([LeaseCancel(aO)] ++ aN) | |
273 | 276 | } | |
274 | - | else | |
277 | + | else aN | |
275 | 278 | } | |
276 | 279 | else { | |
277 | - | let | |
278 | - | let U = | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | if (( | |
280 | + | let aP = R(P, S, fromBase58String(aG)) | |
281 | + | let U = aP._1 | |
282 | + | let aQ = aP._2 | |
283 | + | let aR = aP._3 | |
284 | + | let am = aP._4 | |
285 | + | let aS = invoke(aQ, U, aR, am) | |
286 | + | if ((aS == aS)) | |
284 | 287 | then nil | |
285 | 288 | else throw("Strict value is not equal to itself.") | |
286 | - | }) | |
289 | + | }) | |
287 | 290 | ||
288 | 291 | ||
289 | 292 | ||
290 | - | @Callable( | |
291 | - | func reissueShareToken (S) = valueOrElse(I( | |
292 | - | let | |
293 | - | [Reissue( | |
293 | + | @Callable(aF) | |
294 | + | func reissueShareToken (S) = valueOrElse(I(aF.caller), valueOrElse(H(), { | |
295 | + | let aT = fromBase58String(getStringValue(this, p)) | |
296 | + | [Reissue(aT, S, true), ScriptTransfer(aF.caller, S, aT)] | |
294 | 297 | })) | |
295 | 298 | ||
296 | 299 | ||
297 | - | @Verifier(aT) | |
298 | - | func aU () = { | |
299 | - | let aV = { | |
300 | - | let aW = if (sigVerify(aT.bodyBytes, aT.proofs[0], w)) | |
300 | + | ||
301 | + | @Callable(aF) | |
302 | + | func replenishWithTwoTokens (aU) = aj("replenishWithTwoTokens", aF.caller.bytes, ["false", "0"], aF.payments) | |
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | @Callable(aF) | |
307 | + | func withdraw () = aj("withdraw", aF.caller.bytes, ["0"], aF.payments) | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(aF) | |
312 | + | func exchange (aV) = aj("exchange", aF.caller.bytes, [toString(aV)], aF.payments) | |
313 | + | ||
314 | + | ||
315 | + | @Verifier(aW) | |
316 | + | func aX () = { | |
317 | + | let aY = { | |
318 | + | let aZ = if (sigVerify(aW.bodyBytes, aW.proofs[0], w)) | |
301 | 319 | then 1 | |
302 | 320 | else 0 | |
303 | - | let | |
321 | + | let ba = if (sigVerify(aW.bodyBytes, aW.proofs[1], x)) | |
304 | 322 | then 1 | |
305 | 323 | else 0 | |
306 | - | let | |
324 | + | let bb = if (sigVerify(aW.bodyBytes, aW.proofs[2], y)) | |
307 | 325 | then 1 | |
308 | 326 | else 0 | |
309 | - | ((( | |
327 | + | (((aZ + ba) + bb) >= 2) | |
310 | 328 | } | |
311 | - | | |
329 | + | aY | |
312 | 330 | } | |
313 | 331 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "active" | |
5 | 5 | ||
6 | 6 | let b = "shutdown_cause" | |
7 | 7 | ||
8 | 8 | let c = "staking_usdnnsbt_address" | |
9 | 9 | ||
10 | 10 | let d = "staking_eurn_address" | |
11 | 11 | ||
12 | 12 | let e = "leasing_address" | |
13 | 13 | ||
14 | 14 | let f = "leasing_amount" | |
15 | 15 | ||
16 | 16 | let g = "leasing_id" | |
17 | 17 | ||
18 | 18 | let h = "admin_pub_1" | |
19 | 19 | ||
20 | 20 | let i = "admin_pub_2" | |
21 | 21 | ||
22 | 22 | let j = "admin_pub_3" | |
23 | 23 | ||
24 | 24 | let k = "admin_invoke_pub" | |
25 | 25 | ||
26 | 26 | let l = "cpmm_contract" | |
27 | 27 | ||
28 | 28 | let m = "usdn_asset_id" | |
29 | 29 | ||
30 | 30 | let n = "eurn_asset_id" | |
31 | 31 | ||
32 | 32 | let o = "staking_assets" | |
33 | 33 | ||
34 | 34 | let p = "share_asset_id" | |
35 | 35 | ||
36 | - | let q = Address(base58' | |
36 | + | let q = Address(base58'3PEbqViERCoKnmcSULh6n2aiMvUdSQdCsom') | |
37 | 37 | ||
38 | 38 | func r (s) = { | |
39 | 39 | let t = getString(q, s) | |
40 | 40 | if ($isInstanceOf(t, "String")) | |
41 | 41 | then { | |
42 | 42 | let u = t | |
43 | 43 | fromBase58String(u) | |
44 | 44 | } | |
45 | 45 | else { | |
46 | 46 | let v = t | |
47 | 47 | throw((s + "is empty")) | |
48 | 48 | } | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | let w = r(h) | |
53 | 53 | ||
54 | 54 | let x = r(i) | |
55 | 55 | ||
56 | 56 | let y = r(j) | |
57 | 57 | ||
58 | 58 | let z = r(k) | |
59 | 59 | ||
60 | 60 | let A = Address(r(c)) | |
61 | 61 | ||
62 | 62 | let B = Address(r(d)) | |
63 | 63 | ||
64 | 64 | let C = Address(r(l)) | |
65 | 65 | ||
66 | 66 | let D = r(m) | |
67 | 67 | ||
68 | 68 | let E = r(n) | |
69 | 69 | ||
70 | 70 | let F = getStringValue(q, o) | |
71 | 71 | ||
72 | 72 | let G = valueOrElse(getBoolean(this, a), true) | |
73 | 73 | ||
74 | 74 | func H () = if (G) | |
75 | 75 | then unit | |
76 | 76 | else throw("DApp is inactive at this moment") | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func I (J) = if ((J == C)) | |
80 | 80 | then unit | |
81 | 81 | else throw("Only global Contract can invoke this function") | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func K (L) = if (containsElement([w, x, y], L)) | |
85 | 85 | then unit | |
86 | 86 | else throw("Only admin can call this function") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func M (N) = [BooleanEntry(a, false), StringEntry(b, N)] | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func O (P,Q) = if (P) | |
93 | 93 | then if ((Q == D)) | |
94 | 94 | then $Tuple2("lockNeutrino", A) | |
95 | 95 | else $Tuple2("startStaking", B) | |
96 | 96 | else if ((Q == D)) | |
97 | 97 | then $Tuple2("unlockNeutrino", A) | |
98 | 98 | else $Tuple2("stopStaking", B) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func R (P,S,Q) = if (P) | |
102 | 102 | then { | |
103 | 103 | let T = O(P, Q) | |
104 | 104 | let U = T._1 | |
105 | 105 | let V = T._2 | |
106 | 106 | $Tuple4(U, V, nil, [AttachedPayment(Q, S)]) | |
107 | 107 | } | |
108 | 108 | else { | |
109 | 109 | let W = O(P, Q) | |
110 | 110 | let U = W._1 | |
111 | 111 | let V = W._2 | |
112 | 112 | $Tuple4(U, V, [S, toBase58String(Q)], nil) | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func X (Y,Z) = { | |
117 | 117 | let aa = Y | |
118 | 118 | let ab = aa._1 | |
119 | 119 | let ac = aa._2 | |
120 | 120 | $Tuple2((ab :+ Z.amount), (ac :+ (if ((Z.assetId == unit)) | |
121 | 121 | then base58'' | |
122 | 122 | else Z.assetId))) | |
123 | 123 | } | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func ad (ae,af) = { | |
127 | 127 | let t = af | |
128 | 128 | if (if ($isInstanceOf(t, "Issue")) | |
129 | 129 | then true | |
130 | 130 | else if ($isInstanceOf(t, "Burn")) | |
131 | 131 | then true | |
132 | 132 | else if ($isInstanceOf(t, "Reissue")) | |
133 | 133 | then true | |
134 | 134 | else if ($isInstanceOf(t, "ScriptTransfer")) | |
135 | 135 | then true | |
136 | 136 | else if ($isInstanceOf(t, "BinaryEntry")) | |
137 | 137 | then true | |
138 | 138 | else if ($isInstanceOf(t, "BooleanEntry")) | |
139 | 139 | then true | |
140 | 140 | else if ($isInstanceOf(t, "StringEntry")) | |
141 | 141 | then true | |
142 | 142 | else $isInstanceOf(t, "IntegerEntry")) | |
143 | 143 | then { | |
144 | 144 | let ag = t | |
145 | 145 | (ae :+ ag) | |
146 | 146 | } | |
147 | 147 | else ae | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | func ah (ae,af) = { | |
152 | 152 | let t = af | |
153 | 153 | if ($isInstanceOf(t, "String")) | |
154 | 154 | then { | |
155 | 155 | let ai = t | |
156 | 156 | (ae :+ ai) | |
157 | 157 | } | |
158 | 158 | else if ($isInstanceOf(t, "Int")) | |
159 | 159 | then { | |
160 | 160 | let ai = t | |
161 | 161 | (ae :+ ai) | |
162 | 162 | } | |
163 | 163 | else if ($isInstanceOf(t, "Boolean")) | |
164 | 164 | then { | |
165 | 165 | let ai = t | |
166 | 166 | (ae :+ ai) | |
167 | 167 | } | |
168 | 168 | else if ($isInstanceOf(t, "ByteVector")) | |
169 | 169 | then { | |
170 | 170 | let ai = t | |
171 | 171 | (ae :+ ai) | |
172 | 172 | } | |
173 | 173 | else throw() | |
174 | 174 | } | |
175 | 175 | ||
176 | 176 | ||
177 | - | @Callable(aj) | |
178 | - | func callFunction (ak,al) = valueOrElse(H(), { | |
179 | - | let am = { | |
180 | - | let an = aj.payments | |
181 | - | let ao = size(an) | |
182 | - | let ap = $Tuple2(nil, nil) | |
183 | - | func aq (ar,as) = if ((as >= ao)) | |
184 | - | then ar | |
185 | - | else X(ar, an[as]) | |
177 | + | func aj (ak,J,al,am) = valueOrElse(H(), { | |
178 | + | let an = { | |
179 | + | let ao = am | |
180 | + | let ap = size(ao) | |
181 | + | let aq = $Tuple2(nil, nil) | |
182 | + | func ar (as,at) = if ((at >= ap)) | |
183 | + | then as | |
184 | + | else X(as, ao[at]) | |
186 | 185 | ||
187 | - | func | |
188 | - | then | |
186 | + | func au (as,at) = if ((at >= ap)) | |
187 | + | then as | |
189 | 188 | else throw("List size exceeds 10") | |
190 | 189 | ||
191 | - | | |
190 | + | au(ar(ar(ar(ar(ar(ar(ar(ar(ar(ar(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
192 | 191 | } | |
193 | - | let ab = | |
194 | - | let ac = | |
195 | - | let | |
196 | - | let | |
197 | - | if ($isInstanceOf( | |
198 | - | then | |
199 | - | else throw(($getType( | |
192 | + | let ab = an._1 | |
193 | + | let ac = an._2 | |
194 | + | let av = { | |
195 | + | let aw = reentrantInvoke(C, ak, [J, al, ab, ac], nil) | |
196 | + | if ($isInstanceOf(aw, "(List[Any], List[Any])")) | |
197 | + | then aw | |
198 | + | else throw(($getType(aw) + " couldn't be cast to (List[Any], List[Any])")) | |
200 | 199 | } | |
201 | - | if (( | |
200 | + | if ((av == av)) | |
202 | 201 | then { | |
203 | - | let | |
204 | - | let | |
205 | - | let | |
206 | - | let | |
207 | - | let | |
208 | - | let | |
209 | - | func | |
210 | - | then | |
211 | - | else ah( | |
202 | + | let ax = av._2 | |
203 | + | let ay = av._1 | |
204 | + | let az = { | |
205 | + | let ao = ax | |
206 | + | let ap = size(ao) | |
207 | + | let aq = nil | |
208 | + | func aA (as,at) = if ((at >= ap)) | |
209 | + | then as | |
210 | + | else ah(as, ao[at]) | |
212 | 211 | ||
213 | - | func | |
214 | - | then | |
212 | + | func aB (as,at) = if ((at >= ap)) | |
213 | + | then as | |
215 | 214 | else throw("List size exceeds 10") | |
216 | 215 | ||
217 | - | aA( | |
216 | + | aB(aA(aA(aA(aA(aA(aA(aA(aA(aA(aA(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
218 | 217 | } | |
219 | - | let | |
220 | - | let | |
221 | - | let | |
222 | - | let | |
223 | - | func | |
224 | - | then | |
225 | - | else ad( | |
218 | + | let aC = { | |
219 | + | let ao = ay | |
220 | + | let ap = size(ao) | |
221 | + | let aq = nil | |
222 | + | func aD (as,at) = if ((at >= ap)) | |
223 | + | then as | |
224 | + | else ad(as, ao[at]) | |
226 | 225 | ||
227 | - | func | |
228 | - | then | |
226 | + | func aE (as,at) = if ((at >= ap)) | |
227 | + | then as | |
229 | 228 | else throw("List size exceeds 15") | |
230 | 229 | ||
231 | - | aD( | |
230 | + | aE(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aD(aq, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
232 | 231 | } | |
233 | - | $Tuple2( | |
232 | + | $Tuple2(aC, az) | |
234 | 233 | } | |
235 | 234 | else throw("Strict value is not equal to itself.") | |
236 | 235 | }) | |
237 | 236 | ||
238 | 237 | ||
238 | + | @Callable(aF) | |
239 | + | func callFunction (ak,al) = aj(ak, aF.caller.bytes, al, aF.payments) | |
239 | 240 | ||
240 | - | @Callable(aj) | |
241 | - | func shutdown () = valueOrElse(K(aj.callerPublicKey), if (!(G)) | |
241 | + | ||
242 | + | ||
243 | + | @Callable(aF) | |
244 | + | func shutdown () = valueOrElse(K(aF.callerPublicKey), if (!(G)) | |
242 | 245 | then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, b), "the cause wasn't specified"))) | |
243 | 246 | else M("Paused by admin")) | |
244 | 247 | ||
245 | 248 | ||
246 | 249 | ||
247 | - | @Callable( | |
248 | - | func activate () = valueOrElse(K( | |
250 | + | @Callable(aF) | |
251 | + | func activate () = valueOrElse(K(aF.callerPublicKey), if (G) | |
249 | 252 | then throw("DApp is already active") | |
250 | 253 | else [BooleanEntry(a, true), DeleteEntry(b)]) | |
251 | 254 | ||
252 | 255 | ||
253 | 256 | ||
254 | - | @Callable( | |
255 | - | func stakeUnstake (P,S, | |
257 | + | @Callable(aF) | |
258 | + | func stakeUnstake (P,S,aG) = valueOrElse(H(), if ((aF.caller != C)) | |
256 | 259 | then throw("Only global Contract can invoke this function") | |
257 | - | else if (( | |
260 | + | else if ((aG == "WAVES")) | |
258 | 261 | then { | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | let | |
263 | - | then ( | |
264 | - | else ( | |
265 | - | let | |
266 | - | let | |
267 | - | let | |
268 | - | let t = | |
262 | + | let aH = addressFromStringValue(valueOrErrorMessage(getString(q, e), "No leasing pool in oracle")) | |
263 | + | let aI = getBinary(this, g) | |
264 | + | let aJ = valueOrElse(getInteger(this, f), 0) | |
265 | + | let aK = if (P) | |
266 | + | then (aJ + S) | |
267 | + | else (aJ - S) | |
268 | + | let aL = Lease(aH, aK) | |
269 | + | let aM = calculateLeaseId(aL) | |
270 | + | let aN = [aL, BinaryEntry(g, aM), IntegerEntry(f, aK)] | |
271 | + | let t = aI | |
269 | 272 | if ($isInstanceOf(t, "ByteVector")) | |
270 | 273 | then { | |
271 | - | let | |
272 | - | ([LeaseCancel( | |
274 | + | let aO = t | |
275 | + | ([LeaseCancel(aO)] ++ aN) | |
273 | 276 | } | |
274 | - | else | |
277 | + | else aN | |
275 | 278 | } | |
276 | 279 | else { | |
277 | - | let | |
278 | - | let U = | |
279 | - | let | |
280 | - | let | |
281 | - | let | |
282 | - | let | |
283 | - | if (( | |
280 | + | let aP = R(P, S, fromBase58String(aG)) | |
281 | + | let U = aP._1 | |
282 | + | let aQ = aP._2 | |
283 | + | let aR = aP._3 | |
284 | + | let am = aP._4 | |
285 | + | let aS = invoke(aQ, U, aR, am) | |
286 | + | if ((aS == aS)) | |
284 | 287 | then nil | |
285 | 288 | else throw("Strict value is not equal to itself.") | |
286 | - | }) | |
289 | + | }) | |
287 | 290 | ||
288 | 291 | ||
289 | 292 | ||
290 | - | @Callable( | |
291 | - | func reissueShareToken (S) = valueOrElse(I( | |
292 | - | let | |
293 | - | [Reissue( | |
293 | + | @Callable(aF) | |
294 | + | func reissueShareToken (S) = valueOrElse(I(aF.caller), valueOrElse(H(), { | |
295 | + | let aT = fromBase58String(getStringValue(this, p)) | |
296 | + | [Reissue(aT, S, true), ScriptTransfer(aF.caller, S, aT)] | |
294 | 297 | })) | |
295 | 298 | ||
296 | 299 | ||
297 | - | @Verifier(aT) | |
298 | - | func aU () = { | |
299 | - | let aV = { | |
300 | - | let aW = if (sigVerify(aT.bodyBytes, aT.proofs[0], w)) | |
300 | + | ||
301 | + | @Callable(aF) | |
302 | + | func replenishWithTwoTokens (aU) = aj("replenishWithTwoTokens", aF.caller.bytes, ["false", "0"], aF.payments) | |
303 | + | ||
304 | + | ||
305 | + | ||
306 | + | @Callable(aF) | |
307 | + | func withdraw () = aj("withdraw", aF.caller.bytes, ["0"], aF.payments) | |
308 | + | ||
309 | + | ||
310 | + | ||
311 | + | @Callable(aF) | |
312 | + | func exchange (aV) = aj("exchange", aF.caller.bytes, [toString(aV)], aF.payments) | |
313 | + | ||
314 | + | ||
315 | + | @Verifier(aW) | |
316 | + | func aX () = { | |
317 | + | let aY = { | |
318 | + | let aZ = if (sigVerify(aW.bodyBytes, aW.proofs[0], w)) | |
301 | 319 | then 1 | |
302 | 320 | else 0 | |
303 | - | let | |
321 | + | let ba = if (sigVerify(aW.bodyBytes, aW.proofs[1], x)) | |
304 | 322 | then 1 | |
305 | 323 | else 0 | |
306 | - | let | |
324 | + | let bb = if (sigVerify(aW.bodyBytes, aW.proofs[2], y)) | |
307 | 325 | then 1 | |
308 | 326 | else 0 | |
309 | - | ((( | |
327 | + | (((aZ + ba) + bb) >= 2) | |
310 | 328 | } | |
311 | - | | |
329 | + | aY | |
312 | 330 | } | |
313 | 331 |
github/deemru/w8io/026f985 62.45 ms ◑