tx · DRBLYCxLW4PHy7YBZhkUcrfmMcjeiCKHwNDpLzKY8fUw 3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER: -0.01400000 Waves 2022.12.06 12:51 [2348324] smart account 3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER > SELF 0.00000000 Waves
{ "type": 13, "id": "DRBLYCxLW4PHy7YBZhkUcrfmMcjeiCKHwNDpLzKY8fUw", "fee": 1400000, "feeAssetId": null, "timestamp": 1670320194419, "version": 2, "chainId": 84, "sender": "3N4kXZHGke6yRq3Z57q7BTgCrT2SCvQCYER", "senderPublicKey": "6sxdMr2xYPPACEJccwmgS7nWC2ez1c38Y1kDX49ne42b", "proofs": [ "3Mkqh344sxnjPRaRaEHmpgY9EjYdPSRprDfZYAjTS7ZjarQV1LnaDSJsqUR3ZK3CYNErYZpeqyiAhTUQUjUYQ3ne" ], "script": "base64:BgIvCAISBgoECAgICBIAEgASABIECgIBARIAEgMKAQgSAwoBCBIECgIBARIFCgMICAgiAAlTRVBBUkFUT1ICAl9fAAVXQVZFUwIFV0FWRVMADEtFWV9NVUxUSVNJRwIITVVMVElTSUcACktFWV9TVEFUVVMCBlNUQVRVUwAOS0VZX0JBU0VfQVNTRVQCCkJBU0VfQVNTRVQACUtFWV9BU1NFVAIFQVNTRVQAE0tFWV9TVEFLSU5HX0FEQVBURVICD1NUQUtJTkdfQURBUFRFUgASS0VZX1NUQUtJTkdfQU1PVU5UAg5TVEFLSU5HX0FNT1VOVAANS0VZX0xBU1RfUkFURQIJTEFTVF9SQVRFABBLRVlfQ1VSUkVOVF9SQVRFAgxDVVJSRU5UX1JBVEUAD0tFWV9MQVNUX0hFSUdIVAILTEFTVF9IRUlHSFQAEUtFWV9UQVJHRVRfSEVJR0hUAg1UQVJHRVRfSEVJR0hUABdLRVlfU1BPTlNPUlNISVBfTUFOQUdFUgITU1BPTlNPUlNISVBfTUFOQUdFUgAKRlVOQ19TVEFLRQIFc3Rha2UADEZVTkNfVU5TVEFLR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348324, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EsKWbvZopS9vYW7hTSmuSK5Dm2YD4LEYD7qnrSLWTXW1 Next: 6aPd2miLEVUVkJQjPyGTXHfkgHfeMY1TyXVE4AJUdr8v Diff:
Old | New | Differences | |
---|---|---|---|
25 | 25 | ||
26 | 26 | let l = "TARGET_HEIGHT" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "SPONSORSHIP_MANAGER" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "stake" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "unstake" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "claimReward" | |
35 | 35 | ||
36 | - | let q = toBigInt( | |
36 | + | let q = toBigInt(1000000000000) | |
37 | 37 | ||
38 | - | let r = toBigInt( | |
38 | + | let r = toBigInt(0) | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = toBigInt(1) | |
41 | 41 | ||
42 | - | func t (u) = { | |
43 | - | let v = addressFromString(u) | |
44 | - | if ($isInstanceOf(v, "Address")) | |
42 | + | let t = 100000000 | |
43 | + | ||
44 | + | func u (v) = { | |
45 | + | let w = addressFromString(v) | |
46 | + | if ($isInstanceOf(w, "Address")) | |
45 | 47 | then { | |
46 | - | let | |
48 | + | let x = w | |
47 | 49 | true | |
48 | 50 | } | |
49 | 51 | else false | |
50 | 52 | } | |
51 | 53 | ||
52 | 54 | ||
53 | - | func | |
55 | + | func y (z) = if ((z == b)) | |
54 | 56 | then true | |
55 | 57 | else { | |
56 | - | let | |
57 | - | if ($isInstanceOf( | |
58 | + | let w = assetInfo(fromBase58String(z)) | |
59 | + | if ($isInstanceOf(w, "Asset")) | |
58 | 60 | then { | |
59 | - | let | |
61 | + | let x = w | |
60 | 62 | true | |
61 | 63 | } | |
62 | 64 | else false | |
63 | 65 | } | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func A (z) = if ((z == b)) | |
67 | 69 | then unit | |
68 | - | else fromBase58String( | |
70 | + | else fromBase58String(z) | |
69 | 71 | ||
70 | 72 | ||
71 | - | func | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
73 | + | func B (z) = { | |
74 | + | let w = z | |
75 | + | if ($isInstanceOf(w, "ByteVector")) | |
74 | 76 | then { | |
75 | - | let | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
77 | + | let x = w | |
78 | + | let C = assetInfo(x) | |
79 | + | if ($isInstanceOf(C, "Asset")) | |
78 | 80 | then { | |
79 | - | let | |
80 | - | | |
81 | + | let D = C | |
82 | + | D.decimals | |
81 | 83 | } | |
82 | 84 | else throw("_getAssetDecimals: no such asset") | |
83 | 85 | } | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
89 | - | let | |
90 | - | if ($isInstanceOf( | |
90 | + | func E (z) = { | |
91 | + | let w = assetInfo(z) | |
92 | + | if ($isInstanceOf(w, "Asset")) | |
91 | 93 | then { | |
92 | - | let | |
93 | - | | |
94 | + | let x = w | |
95 | + | x.quantity | |
94 | 96 | } | |
95 | 97 | else throw("_getAssetQuantity: no such asset") | |
96 | 98 | } | |
97 | 99 | ||
98 | 100 | ||
99 | - | func | |
100 | - | let | |
101 | - | if ($isInstanceOf( | |
101 | + | func F (z,G) = { | |
102 | + | let w = z | |
103 | + | if ($isInstanceOf(w, "ByteVector")) | |
102 | 104 | then { | |
103 | - | let | |
104 | - | assetBalance( | |
105 | + | let x = w | |
106 | + | assetBalance(G, x) | |
105 | 107 | } | |
106 | - | else wavesBalance( | |
108 | + | else wavesBalance(G).regular | |
107 | 109 | } | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
111 | - | let | |
112 | - | if ($isInstanceOf( | |
112 | + | func H () = { | |
113 | + | let w = getString(e) | |
114 | + | if ($isInstanceOf(w, "String")) | |
113 | 115 | then { | |
114 | - | let | |
115 | - | if (( | |
116 | + | let x = w | |
117 | + | if ((x == b)) | |
116 | 118 | then unit | |
117 | - | else fromBase58String( | |
119 | + | else fromBase58String(x) | |
118 | 120 | } | |
119 | 121 | else throw("_loadBaseAsset: no base asset") | |
120 | 122 | } | |
121 | 123 | ||
122 | 124 | ||
123 | - | func | |
124 | - | let | |
125 | - | if ($isInstanceOf( | |
125 | + | func I () = { | |
126 | + | let w = getString(g) | |
127 | + | if ($isInstanceOf(w, "String")) | |
126 | 128 | then { | |
127 | - | let | |
128 | - | addressFromStringValue( | |
129 | + | let x = w | |
130 | + | addressFromStringValue(x) | |
129 | 131 | } | |
130 | 132 | else throw("_loadStakingAdapter: no staking adapter") | |
131 | 133 | } | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
135 | - | let | |
136 | - | if ($isInstanceOf( | |
136 | + | func J () = { | |
137 | + | let w = getString(m) | |
138 | + | if ($isInstanceOf(w, "String")) | |
137 | 139 | then { | |
138 | - | let | |
139 | - | | |
140 | + | let x = w | |
141 | + | addressFromStringValue(x) | |
140 | 142 | } | |
141 | - | else | |
143 | + | else throw("_loadSponsorshipManager: no sponsorship manager") | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
146 | - | let | |
147 | - | if ($isInstanceOf( | |
147 | + | func K (L,M) = { | |
148 | + | let w = getInteger(L) | |
149 | + | if ($isInstanceOf(w, "Int")) | |
148 | 150 | then { | |
149 | - | let | |
150 | - | | |
151 | + | let x = w | |
152 | + | x | |
151 | 153 | } | |
152 | - | else | |
154 | + | else M | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
158 | + | func N (L,M) = { | |
159 | + | let w = getBinary(L) | |
160 | + | if ($isInstanceOf(w, "ByteVector")) | |
159 | 161 | then { | |
160 | - | let w = v | |
161 | - | fromBase58String(w) | |
162 | + | let x = w | |
163 | + | toBigInt(x) | |
164 | + | } | |
165 | + | else M | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | func O () = { | |
170 | + | let w = getString(f) | |
171 | + | if ($isInstanceOf(w, "String")) | |
172 | + | then { | |
173 | + | let x = w | |
174 | + | fromBase58String(x) | |
162 | 175 | } | |
163 | 176 | else base58'' | |
164 | 177 | } | |
165 | 178 | ||
166 | 179 | ||
167 | - | func | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | then invoke( | |
172 | - | else invoke( | |
173 | - | if (( | |
174 | - | then [IntegerEntry(h, | |
180 | + | func P (z,Q,R) = { | |
181 | + | let S = K(h, 0) | |
182 | + | let T = (S + Q) | |
183 | + | let U = if ((Q > 0)) | |
184 | + | then invoke(R, n, nil, [AttachedPayment(z, Q)]) | |
185 | + | else invoke(R, o, [(-1 * Q)], nil) | |
186 | + | if ((U == U)) | |
187 | + | then [IntegerEntry(h, T)] | |
175 | 188 | else throw("Strict value is not equal to itself.") | |
176 | 189 | } | |
177 | 190 | ||
178 | 191 | ||
179 | - | func | |
180 | - | let | |
181 | - | if (( | |
192 | + | func V (W) = { | |
193 | + | let U = invoke(I(), p, nil, nil) | |
194 | + | if ((U == U)) | |
182 | 195 | then { | |
183 | - | let | |
184 | - | if ($isInstanceOf( | |
196 | + | let w = U | |
197 | + | if ($isInstanceOf(w, "(Int, Int, Int)")) | |
185 | 198 | then { | |
186 | - | let | |
187 | - | if ( | |
199 | + | let X = w | |
200 | + | if (W) | |
188 | 201 | then { | |
189 | - | let | |
190 | - | if (( | |
191 | - | then $Tuple2(true, | |
202 | + | let Y = invoke(this, n, [X._1, X._3], nil) | |
203 | + | if ((Y == Y)) | |
204 | + | then $Tuple2(true, X._2) | |
192 | 205 | else throw("Strict value is not equal to itself.") | |
193 | 206 | } | |
194 | 207 | else { | |
195 | - | let | |
196 | - | if (( | |
208 | + | let Y = invoke(this, n, [(X._1 + X._2), X._3], nil) | |
209 | + | if ((Y == Y)) | |
197 | 210 | then $Tuple2(true, 0) | |
198 | 211 | else throw("Strict value is not equal to itself.") | |
199 | 212 | } | |
204 | 217 | } | |
205 | 218 | ||
206 | 219 | ||
207 | - | @Callable( | |
208 | - | func init ( | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
220 | + | @Callable(Z) | |
221 | + | func init (aa,ab,ac,ad) = { | |
222 | + | let ae = valueOrErrorMessage(getString(c), "init: no multisig set") | |
223 | + | let D = O() | |
224 | + | let af = A(ac) | |
225 | + | let ag = if ((Z.caller != this)) | |
213 | 226 | then throw("init: permission denied") | |
214 | - | else if (( | |
227 | + | else if ((D != base58'')) | |
215 | 228 | then throw("init: already initialized") | |
216 | - | else if (if ((4 > size( | |
229 | + | else if (if ((4 > size(aa))) | |
217 | 230 | then true | |
218 | - | else (size( | |
231 | + | else (size(aa) > 16)) | |
219 | 232 | then throw("init: invalid token name") | |
220 | - | else if ((size( | |
233 | + | else if ((size(ab) > 1000)) | |
221 | 234 | then throw("init: invalid token description") | |
222 | - | else if (!( | |
235 | + | else if (!(y(ac))) | |
223 | 236 | then throw("init: invalid base asset") | |
224 | - | else if (!( | |
237 | + | else if (!(u(ad))) | |
225 | 238 | then throw("init: invalid staking adapter") | |
226 | 239 | else unit | |
227 | - | if (( | |
240 | + | if ((ag == ag)) | |
228 | 241 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | $Tuple2(([StringEntry(e, | |
242 | + | let ah = B(af) | |
243 | + | let ai = Issue(aa, ab, t, ah, true) | |
244 | + | let aj = calculateAssetId(ai) | |
245 | + | let ak = P(af, t, addressFromStringValue(ad)) | |
246 | + | $Tuple2(([StringEntry(e, ac), StringEntry(g, ad), StringEntry(f, toBase58String(aj)), ai] ++ ak), unit) | |
234 | 247 | } | |
235 | 248 | else throw("Strict value is not equal to itself.") | |
236 | 249 | } | |
237 | 250 | ||
238 | 251 | ||
239 | 252 | ||
240 | - | @Callable( | |
253 | + | @Callable(Z) | |
241 | 254 | func getRate () = { | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | $Tuple2(nil, toString( | |
255 | + | let al = N(i, q) | |
256 | + | let am = N(j, r) | |
257 | + | let an = K(k, 0) | |
258 | + | let ao = min([K(l, 0), height]) | |
259 | + | let ap = (al + (am * toBigInt((ao - an)))) | |
260 | + | $Tuple2(nil, toString(ap)) | |
248 | 261 | } | |
249 | 262 | ||
250 | 263 | ||
251 | 264 | ||
252 | - | @Callable( | |
265 | + | @Callable(Z) | |
253 | 266 | func checkpoint () = { | |
254 | - | let | |
255 | - | if (( | |
256 | - | then if (!( | |
267 | + | let aq = V(true) | |
268 | + | if ((aq == aq)) | |
269 | + | then if (!(aq._1)) | |
257 | 270 | then throw("checkpoint: no reward") | |
258 | - | else if (( | |
259 | - | then $Tuple2([ScriptTransfer( | |
271 | + | else if ((aq._2 > 0)) | |
272 | + | then $Tuple2([ScriptTransfer(Z.originCaller, aq._2, H())], unit) | |
260 | 273 | else $Tuple2(nil, unit) | |
261 | 274 | else throw("Strict value is not equal to itself.") | |
262 | 275 | } | |
263 | 276 | ||
264 | 277 | ||
265 | 278 | ||
266 | - | @Callable( | |
279 | + | @Callable(Z) | |
267 | 280 | func deposit () = { | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
281 | + | let ar = toString(Z.caller) | |
282 | + | let af = H() | |
283 | + | let D = O() | |
284 | + | let as = toBigInt(E(D)) | |
285 | + | let ag = if ((size(Z.payments) != 1)) | |
273 | 286 | then throw("deposit: no payments") | |
274 | - | else if (( | |
287 | + | else if ((Z.payments[0].assetId != af)) | |
275 | 288 | then throw("deposit: payment is not in base asset") | |
276 | - | else if ((0 >= | |
289 | + | else if ((0 >= Z.payments[0].amount)) | |
277 | 290 | then throw("deposit: invalid payment amount") | |
278 | 291 | else unit | |
279 | - | if (( | |
292 | + | if ((ag == ag)) | |
280 | 293 | then { | |
281 | - | let | |
282 | - | if (( | |
294 | + | let aq = V(false) | |
295 | + | if ((aq == aq)) | |
283 | 296 | then { | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | $Tuple2(([Reissue( | |
297 | + | let al = N(i, q) | |
298 | + | let am = N(j, r) | |
299 | + | let an = K(k, 0) | |
300 | + | let ao = min([K(l, 0), height]) | |
301 | + | let at = (al + (am * toBigInt((ao - an)))) | |
302 | + | let au = toInt(fraction(toBigInt(Z.payments[0].amount), q, at, FLOOR)) | |
303 | + | let av = fraction(am, as, (as + toBigInt(au)), FLOOR) | |
304 | + | let aw = ao | |
305 | + | let ak = P(af, Z.payments[0].amount, I()) | |
306 | + | $Tuple2(([Reissue(D, au, true), ScriptTransfer(Z.caller, au, D), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)] ++ ak), unit) | |
294 | 307 | } | |
295 | 308 | else throw("Strict value is not equal to itself.") | |
296 | 309 | } | |
299 | 312 | ||
300 | 313 | ||
301 | 314 | ||
302 | - | @Callable( | |
303 | - | func stake ( | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
315 | + | @Callable(Z) | |
316 | + | func stake (Q,ax) = { | |
317 | + | let ar = toString(Z.caller) | |
318 | + | let af = H() | |
319 | + | let D = O() | |
320 | + | let as = toBigInt(E(D)) | |
321 | + | let ag = if ((Z.caller != this)) | |
309 | 322 | then throw("stake: only this contract") | |
310 | - | else if ((0 >= | |
323 | + | else if ((0 >= Q)) | |
311 | 324 | then throw("stake: invalid stake amount") | |
312 | - | else if (( | |
325 | + | else if ((Q > F(af, this))) | |
313 | 326 | then throw("stake: insufficient stake amount") | |
314 | - | else if (( | |
327 | + | else if ((as == r)) | |
315 | 328 | then throw("stake: no deposits to stake for") | |
316 | 329 | else unit | |
317 | - | if (( | |
330 | + | if ((ag == ag)) | |
318 | 331 | then { | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
332 | + | let al = N(i, q) | |
333 | + | let am = N(j, r) | |
334 | + | let an = K(k, 0) | |
335 | + | let ao = K(l, 0) | |
336 | + | let ay = min([ao, height]) | |
337 | + | let az = if ((ay == height)) | |
325 | 338 | then { | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | [BinaryEntry(i, toBytes( | |
339 | + | let at = (al + (toBigInt((ay - an)) * am)) | |
340 | + | let aA = (am * toBigInt((ao - ay))) | |
341 | + | let av = fraction(((toBigInt(Q) * q) + aA), s, (as * toBigInt(ax))) | |
342 | + | let aw = height | |
343 | + | let aB = (aw + ax) | |
344 | + | [BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
332 | 345 | } | |
333 | - | else if (( | |
346 | + | else if ((ao > an)) | |
334 | 347 | then { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | [BinaryEntry(i, toBytes( | |
348 | + | let at = (al + (toBigInt((ao - an)) * am)) | |
349 | + | let av = fraction(toBigInt(Q), q, (as * toBigInt(ax))) | |
350 | + | let aw = height | |
351 | + | let aB = (aw + ax) | |
352 | + | [BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
340 | 353 | } | |
341 | 354 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | [BinaryEntry(j, toBytes( | |
355 | + | let av = fraction(toBigInt(Q), q, (as * toBigInt(ax))) | |
356 | + | let aw = height | |
357 | + | let aB = (aw + ax) | |
358 | + | [BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
346 | 359 | } | |
347 | - | let | |
348 | - | $Tuple2(( | |
360 | + | let ak = P(af, Q, I()) | |
361 | + | $Tuple2((az ++ ak), unit) | |
349 | 362 | } | |
350 | 363 | else throw("Strict value is not equal to itself.") | |
351 | 364 | } | |
352 | 365 | ||
353 | 366 | ||
354 | 367 | ||
355 | - | @Callable( | |
368 | + | @Callable(Z) | |
356 | 369 | func withdraw () = { | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
370 | + | let ar = toString(Z.caller) | |
371 | + | let af = H() | |
372 | + | let D = O() | |
373 | + | let as = toBigInt(E(D)) | |
374 | + | let ag = if ((1 > size(Z.payments))) | |
362 | 375 | then throw("withdraw: no payments") | |
363 | - | else if (( | |
376 | + | else if ((Z.payments[0].assetId != D)) | |
364 | 377 | then throw("withdraw: payment is not in correct asset") | |
365 | - | else if ((0 >= | |
378 | + | else if ((0 >= Z.payments[0].amount)) | |
366 | 379 | then throw("withdraw: invalid payment amount") | |
367 | 380 | else unit | |
368 | - | if (( | |
381 | + | if ((ag == ag)) | |
369 | 382 | then { | |
370 | - | let | |
371 | - | if (( | |
383 | + | let aq = V(false) | |
384 | + | if ((aq == aq)) | |
372 | 385 | then { | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | $Tuple2(( | |
386 | + | let al = N(i, q) | |
387 | + | let am = N(j, r) | |
388 | + | let an = K(k, 0) | |
389 | + | let ao = min([K(l, 0), height]) | |
390 | + | let at = (al + (am * toBigInt((ao - an)))) | |
391 | + | let aC = toInt(fraction(toBigInt(Z.payments[0].amount), at, q, FLOOR)) | |
392 | + | let av = fraction(am, as, (as - toBigInt(Z.payments[0].amount)), FLOOR) | |
393 | + | let aw = ao | |
394 | + | let ak = P(af, (-1 * aC), I()) | |
395 | + | $Tuple2((ak ++ [Burn(D, Z.payments[0].amount), ScriptTransfer(Z.caller, aC, unit), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)]), unit) | |
383 | 396 | } | |
384 | 397 | else throw("Strict value is not equal to itself.") | |
385 | 398 | } | |
388 | 401 | ||
389 | 402 | ||
390 | 403 | ||
391 | - | @Callable( | |
392 | - | func setMultisig ( | |
393 | - | let | |
404 | + | @Callable(Z) | |
405 | + | func setMultisig (aD) = { | |
406 | + | let ag = if ((Z.caller != this)) | |
394 | 407 | then throw("setMultisig: permission denied") | |
395 | - | else if (!( | |
408 | + | else if (!(u(aD))) | |
396 | 409 | then throw("setMultisig: invalid multisig address") | |
397 | 410 | else unit | |
398 | - | if (( | |
399 | - | then $Tuple2([StringEntry(c, | |
411 | + | if ((ag == ag)) | |
412 | + | then $Tuple2([StringEntry(c, aD)], unit) | |
400 | 413 | else throw("Strict value is not equal to itself.") | |
401 | 414 | } | |
402 | 415 | ||
403 | 416 | ||
404 | - | @Verifier(aC) | |
405 | - | func aD () = { | |
406 | - | let v = getString(c) | |
407 | - | if ($isInstanceOf(v, "String")) | |
417 | + | ||
418 | + | @Callable(Z) | |
419 | + | func setSponsorshipManager (aE) = { | |
420 | + | let ag = if ((Z.caller != this)) | |
421 | + | then throw("setSponsorshipManager: permission denied") | |
422 | + | else if (!(u(aE))) | |
423 | + | then throw("setSponsorshipManager: invalid manager address") | |
424 | + | else unit | |
425 | + | if ((ag == ag)) | |
426 | + | then $Tuple2([StringEntry(m, aE)], unit) | |
427 | + | else throw("Strict value is not equal to itself.") | |
428 | + | } | |
429 | + | ||
430 | + | ||
431 | + | ||
432 | + | @Callable(Z) | |
433 | + | func updateSponsorship (aF,aG) = { | |
434 | + | let ag = if ((Z.caller != J())) | |
435 | + | then throw("updateSponsorship: permission denied") | |
436 | + | else if ((0 > aF)) | |
437 | + | then throw("updateSponsorship: invalid sponsorship fee") | |
438 | + | else if ((0 > aG)) | |
439 | + | then throw("updateSponsorship: invalid waves required amount") | |
440 | + | else unit | |
441 | + | if ((ag == ag)) | |
408 | 442 | then { | |
409 | - | let ac = v | |
410 | - | valueOrElse(getBoolean(addressFromStringValue(ac), makeString([d, toString(this), toBase58String(aC.id)], a)), false) | |
443 | + | let aH = O() | |
444 | + | let aI = if ((aF == 0)) | |
445 | + | then unit | |
446 | + | else aF | |
447 | + | let az = if ((wavesBalance(this).regular > aG)) | |
448 | + | then [ScriptTransfer(Z.caller, (wavesBalance(this).regular - aG), unit)] | |
449 | + | else nil | |
450 | + | $Tuple2((az ++ [ScriptTransfer(Z.caller, assetBalance(this, aH), aH), SponsorFee(aH, aI)]), unit) | |
411 | 451 | } | |
412 | - | else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey) | |
452 | + | else throw("Strict value is not equal to itself.") | |
453 | + | } | |
454 | + | ||
455 | + | ||
456 | + | ||
457 | + | @Callable(Z) | |
458 | + | func wxVotingSuggest (aJ,aK,aL) = { | |
459 | + | let aM = valueOrErrorMessage(addressFromString(aJ), "wxVotingSuggest: invalid voting address") | |
460 | + | let aN = valueOrErrorMessage(assetInfo(fromBase58String(aK)), "wxVotingSuggest: invalid wx asset") | |
461 | + | let U = invoke(aM, "suggest", [O(), aL], [AttachedPayment(fromBase58String(aK), (100 * aN.decimals))]) | |
462 | + | if ((U == U)) | |
463 | + | then $Tuple2(nil, unit) | |
464 | + | else throw("Strict value is not equal to itself.") | |
465 | + | } | |
466 | + | ||
467 | + | ||
468 | + | @Verifier(aO) | |
469 | + | func aP () = { | |
470 | + | let w = getString(c) | |
471 | + | if ($isInstanceOf(w, "String")) | |
472 | + | then { | |
473 | + | let ae = w | |
474 | + | valueOrElse(getBoolean(addressFromStringValue(ae), makeString([d, toString(this), toBase58String(aO.id)], a)), false) | |
475 | + | } | |
476 | + | else sigVerify(aO.bodyBytes, aO.proofs[0], aO.senderPublicKey) | |
413 | 477 | } | |
414 | 478 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "WAVES" | |
7 | 7 | ||
8 | 8 | let c = "MULTISIG" | |
9 | 9 | ||
10 | 10 | let d = "STATUS" | |
11 | 11 | ||
12 | 12 | let e = "BASE_ASSET" | |
13 | 13 | ||
14 | 14 | let f = "ASSET" | |
15 | 15 | ||
16 | 16 | let g = "STAKING_ADAPTER" | |
17 | 17 | ||
18 | 18 | let h = "STAKING_AMOUNT" | |
19 | 19 | ||
20 | 20 | let i = "LAST_RATE" | |
21 | 21 | ||
22 | 22 | let j = "CURRENT_RATE" | |
23 | 23 | ||
24 | 24 | let k = "LAST_HEIGHT" | |
25 | 25 | ||
26 | 26 | let l = "TARGET_HEIGHT" | |
27 | 27 | ||
28 | - | let m = " | |
28 | + | let m = "SPONSORSHIP_MANAGER" | |
29 | 29 | ||
30 | - | let n = " | |
30 | + | let n = "stake" | |
31 | 31 | ||
32 | - | let o = " | |
32 | + | let o = "unstake" | |
33 | 33 | ||
34 | - | let p = | |
34 | + | let p = "claimReward" | |
35 | 35 | ||
36 | - | let q = toBigInt( | |
36 | + | let q = toBigInt(1000000000000) | |
37 | 37 | ||
38 | - | let r = toBigInt( | |
38 | + | let r = toBigInt(0) | |
39 | 39 | ||
40 | - | let s = | |
40 | + | let s = toBigInt(1) | |
41 | 41 | ||
42 | - | func t (u) = { | |
43 | - | let v = addressFromString(u) | |
44 | - | if ($isInstanceOf(v, "Address")) | |
42 | + | let t = 100000000 | |
43 | + | ||
44 | + | func u (v) = { | |
45 | + | let w = addressFromString(v) | |
46 | + | if ($isInstanceOf(w, "Address")) | |
45 | 47 | then { | |
46 | - | let | |
48 | + | let x = w | |
47 | 49 | true | |
48 | 50 | } | |
49 | 51 | else false | |
50 | 52 | } | |
51 | 53 | ||
52 | 54 | ||
53 | - | func | |
55 | + | func y (z) = if ((z == b)) | |
54 | 56 | then true | |
55 | 57 | else { | |
56 | - | let | |
57 | - | if ($isInstanceOf( | |
58 | + | let w = assetInfo(fromBase58String(z)) | |
59 | + | if ($isInstanceOf(w, "Asset")) | |
58 | 60 | then { | |
59 | - | let | |
61 | + | let x = w | |
60 | 62 | true | |
61 | 63 | } | |
62 | 64 | else false | |
63 | 65 | } | |
64 | 66 | ||
65 | 67 | ||
66 | - | func | |
68 | + | func A (z) = if ((z == b)) | |
67 | 69 | then unit | |
68 | - | else fromBase58String( | |
70 | + | else fromBase58String(z) | |
69 | 71 | ||
70 | 72 | ||
71 | - | func | |
72 | - | let | |
73 | - | if ($isInstanceOf( | |
73 | + | func B (z) = { | |
74 | + | let w = z | |
75 | + | if ($isInstanceOf(w, "ByteVector")) | |
74 | 76 | then { | |
75 | - | let | |
76 | - | let | |
77 | - | if ($isInstanceOf( | |
77 | + | let x = w | |
78 | + | let C = assetInfo(x) | |
79 | + | if ($isInstanceOf(C, "Asset")) | |
78 | 80 | then { | |
79 | - | let | |
80 | - | | |
81 | + | let D = C | |
82 | + | D.decimals | |
81 | 83 | } | |
82 | 84 | else throw("_getAssetDecimals: no such asset") | |
83 | 85 | } | |
84 | 86 | else 8 | |
85 | 87 | } | |
86 | 88 | ||
87 | 89 | ||
88 | - | func | |
89 | - | let | |
90 | - | if ($isInstanceOf( | |
90 | + | func E (z) = { | |
91 | + | let w = assetInfo(z) | |
92 | + | if ($isInstanceOf(w, "Asset")) | |
91 | 93 | then { | |
92 | - | let | |
93 | - | | |
94 | + | let x = w | |
95 | + | x.quantity | |
94 | 96 | } | |
95 | 97 | else throw("_getAssetQuantity: no such asset") | |
96 | 98 | } | |
97 | 99 | ||
98 | 100 | ||
99 | - | func | |
100 | - | let | |
101 | - | if ($isInstanceOf( | |
101 | + | func F (z,G) = { | |
102 | + | let w = z | |
103 | + | if ($isInstanceOf(w, "ByteVector")) | |
102 | 104 | then { | |
103 | - | let | |
104 | - | assetBalance( | |
105 | + | let x = w | |
106 | + | assetBalance(G, x) | |
105 | 107 | } | |
106 | - | else wavesBalance( | |
108 | + | else wavesBalance(G).regular | |
107 | 109 | } | |
108 | 110 | ||
109 | 111 | ||
110 | - | func | |
111 | - | let | |
112 | - | if ($isInstanceOf( | |
112 | + | func H () = { | |
113 | + | let w = getString(e) | |
114 | + | if ($isInstanceOf(w, "String")) | |
113 | 115 | then { | |
114 | - | let | |
115 | - | if (( | |
116 | + | let x = w | |
117 | + | if ((x == b)) | |
116 | 118 | then unit | |
117 | - | else fromBase58String( | |
119 | + | else fromBase58String(x) | |
118 | 120 | } | |
119 | 121 | else throw("_loadBaseAsset: no base asset") | |
120 | 122 | } | |
121 | 123 | ||
122 | 124 | ||
123 | - | func | |
124 | - | let | |
125 | - | if ($isInstanceOf( | |
125 | + | func I () = { | |
126 | + | let w = getString(g) | |
127 | + | if ($isInstanceOf(w, "String")) | |
126 | 128 | then { | |
127 | - | let | |
128 | - | addressFromStringValue( | |
129 | + | let x = w | |
130 | + | addressFromStringValue(x) | |
129 | 131 | } | |
130 | 132 | else throw("_loadStakingAdapter: no staking adapter") | |
131 | 133 | } | |
132 | 134 | ||
133 | 135 | ||
134 | - | func | |
135 | - | let | |
136 | - | if ($isInstanceOf( | |
136 | + | func J () = { | |
137 | + | let w = getString(m) | |
138 | + | if ($isInstanceOf(w, "String")) | |
137 | 139 | then { | |
138 | - | let | |
139 | - | | |
140 | + | let x = w | |
141 | + | addressFromStringValue(x) | |
140 | 142 | } | |
141 | - | else | |
143 | + | else throw("_loadSponsorshipManager: no sponsorship manager") | |
142 | 144 | } | |
143 | 145 | ||
144 | 146 | ||
145 | - | func | |
146 | - | let | |
147 | - | if ($isInstanceOf( | |
147 | + | func K (L,M) = { | |
148 | + | let w = getInteger(L) | |
149 | + | if ($isInstanceOf(w, "Int")) | |
148 | 150 | then { | |
149 | - | let | |
150 | - | | |
151 | + | let x = w | |
152 | + | x | |
151 | 153 | } | |
152 | - | else | |
154 | + | else M | |
153 | 155 | } | |
154 | 156 | ||
155 | 157 | ||
156 | - | func | |
157 | - | let | |
158 | - | if ($isInstanceOf( | |
158 | + | func N (L,M) = { | |
159 | + | let w = getBinary(L) | |
160 | + | if ($isInstanceOf(w, "ByteVector")) | |
159 | 161 | then { | |
160 | - | let w = v | |
161 | - | fromBase58String(w) | |
162 | + | let x = w | |
163 | + | toBigInt(x) | |
164 | + | } | |
165 | + | else M | |
166 | + | } | |
167 | + | ||
168 | + | ||
169 | + | func O () = { | |
170 | + | let w = getString(f) | |
171 | + | if ($isInstanceOf(w, "String")) | |
172 | + | then { | |
173 | + | let x = w | |
174 | + | fromBase58String(x) | |
162 | 175 | } | |
163 | 176 | else base58'' | |
164 | 177 | } | |
165 | 178 | ||
166 | 179 | ||
167 | - | func | |
168 | - | let | |
169 | - | let | |
170 | - | let | |
171 | - | then invoke( | |
172 | - | else invoke( | |
173 | - | if (( | |
174 | - | then [IntegerEntry(h, | |
180 | + | func P (z,Q,R) = { | |
181 | + | let S = K(h, 0) | |
182 | + | let T = (S + Q) | |
183 | + | let U = if ((Q > 0)) | |
184 | + | then invoke(R, n, nil, [AttachedPayment(z, Q)]) | |
185 | + | else invoke(R, o, [(-1 * Q)], nil) | |
186 | + | if ((U == U)) | |
187 | + | then [IntegerEntry(h, T)] | |
175 | 188 | else throw("Strict value is not equal to itself.") | |
176 | 189 | } | |
177 | 190 | ||
178 | 191 | ||
179 | - | func | |
180 | - | let | |
181 | - | if (( | |
192 | + | func V (W) = { | |
193 | + | let U = invoke(I(), p, nil, nil) | |
194 | + | if ((U == U)) | |
182 | 195 | then { | |
183 | - | let | |
184 | - | if ($isInstanceOf( | |
196 | + | let w = U | |
197 | + | if ($isInstanceOf(w, "(Int, Int, Int)")) | |
185 | 198 | then { | |
186 | - | let | |
187 | - | if ( | |
199 | + | let X = w | |
200 | + | if (W) | |
188 | 201 | then { | |
189 | - | let | |
190 | - | if (( | |
191 | - | then $Tuple2(true, | |
202 | + | let Y = invoke(this, n, [X._1, X._3], nil) | |
203 | + | if ((Y == Y)) | |
204 | + | then $Tuple2(true, X._2) | |
192 | 205 | else throw("Strict value is not equal to itself.") | |
193 | 206 | } | |
194 | 207 | else { | |
195 | - | let | |
196 | - | if (( | |
208 | + | let Y = invoke(this, n, [(X._1 + X._2), X._3], nil) | |
209 | + | if ((Y == Y)) | |
197 | 210 | then $Tuple2(true, 0) | |
198 | 211 | else throw("Strict value is not equal to itself.") | |
199 | 212 | } | |
200 | 213 | } | |
201 | 214 | else $Tuple2(false, 0) | |
202 | 215 | } | |
203 | 216 | else throw("Strict value is not equal to itself.") | |
204 | 217 | } | |
205 | 218 | ||
206 | 219 | ||
207 | - | @Callable( | |
208 | - | func init ( | |
209 | - | let | |
210 | - | let | |
211 | - | let | |
212 | - | let | |
220 | + | @Callable(Z) | |
221 | + | func init (aa,ab,ac,ad) = { | |
222 | + | let ae = valueOrErrorMessage(getString(c), "init: no multisig set") | |
223 | + | let D = O() | |
224 | + | let af = A(ac) | |
225 | + | let ag = if ((Z.caller != this)) | |
213 | 226 | then throw("init: permission denied") | |
214 | - | else if (( | |
227 | + | else if ((D != base58'')) | |
215 | 228 | then throw("init: already initialized") | |
216 | - | else if (if ((4 > size( | |
229 | + | else if (if ((4 > size(aa))) | |
217 | 230 | then true | |
218 | - | else (size( | |
231 | + | else (size(aa) > 16)) | |
219 | 232 | then throw("init: invalid token name") | |
220 | - | else if ((size( | |
233 | + | else if ((size(ab) > 1000)) | |
221 | 234 | then throw("init: invalid token description") | |
222 | - | else if (!( | |
235 | + | else if (!(y(ac))) | |
223 | 236 | then throw("init: invalid base asset") | |
224 | - | else if (!( | |
237 | + | else if (!(u(ad))) | |
225 | 238 | then throw("init: invalid staking adapter") | |
226 | 239 | else unit | |
227 | - | if (( | |
240 | + | if ((ag == ag)) | |
228 | 241 | then { | |
229 | - | let | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | $Tuple2(([StringEntry(e, | |
242 | + | let ah = B(af) | |
243 | + | let ai = Issue(aa, ab, t, ah, true) | |
244 | + | let aj = calculateAssetId(ai) | |
245 | + | let ak = P(af, t, addressFromStringValue(ad)) | |
246 | + | $Tuple2(([StringEntry(e, ac), StringEntry(g, ad), StringEntry(f, toBase58String(aj)), ai] ++ ak), unit) | |
234 | 247 | } | |
235 | 248 | else throw("Strict value is not equal to itself.") | |
236 | 249 | } | |
237 | 250 | ||
238 | 251 | ||
239 | 252 | ||
240 | - | @Callable( | |
253 | + | @Callable(Z) | |
241 | 254 | func getRate () = { | |
242 | - | let | |
243 | - | let | |
244 | - | let | |
245 | - | let | |
246 | - | let | |
247 | - | $Tuple2(nil, toString( | |
255 | + | let al = N(i, q) | |
256 | + | let am = N(j, r) | |
257 | + | let an = K(k, 0) | |
258 | + | let ao = min([K(l, 0), height]) | |
259 | + | let ap = (al + (am * toBigInt((ao - an)))) | |
260 | + | $Tuple2(nil, toString(ap)) | |
248 | 261 | } | |
249 | 262 | ||
250 | 263 | ||
251 | 264 | ||
252 | - | @Callable( | |
265 | + | @Callable(Z) | |
253 | 266 | func checkpoint () = { | |
254 | - | let | |
255 | - | if (( | |
256 | - | then if (!( | |
267 | + | let aq = V(true) | |
268 | + | if ((aq == aq)) | |
269 | + | then if (!(aq._1)) | |
257 | 270 | then throw("checkpoint: no reward") | |
258 | - | else if (( | |
259 | - | then $Tuple2([ScriptTransfer( | |
271 | + | else if ((aq._2 > 0)) | |
272 | + | then $Tuple2([ScriptTransfer(Z.originCaller, aq._2, H())], unit) | |
260 | 273 | else $Tuple2(nil, unit) | |
261 | 274 | else throw("Strict value is not equal to itself.") | |
262 | 275 | } | |
263 | 276 | ||
264 | 277 | ||
265 | 278 | ||
266 | - | @Callable( | |
279 | + | @Callable(Z) | |
267 | 280 | func deposit () = { | |
268 | - | let | |
269 | - | let | |
270 | - | let | |
271 | - | let | |
272 | - | let | |
281 | + | let ar = toString(Z.caller) | |
282 | + | let af = H() | |
283 | + | let D = O() | |
284 | + | let as = toBigInt(E(D)) | |
285 | + | let ag = if ((size(Z.payments) != 1)) | |
273 | 286 | then throw("deposit: no payments") | |
274 | - | else if (( | |
287 | + | else if ((Z.payments[0].assetId != af)) | |
275 | 288 | then throw("deposit: payment is not in base asset") | |
276 | - | else if ((0 >= | |
289 | + | else if ((0 >= Z.payments[0].amount)) | |
277 | 290 | then throw("deposit: invalid payment amount") | |
278 | 291 | else unit | |
279 | - | if (( | |
292 | + | if ((ag == ag)) | |
280 | 293 | then { | |
281 | - | let | |
282 | - | if (( | |
294 | + | let aq = V(false) | |
295 | + | if ((aq == aq)) | |
283 | 296 | then { | |
284 | - | let | |
285 | - | let | |
286 | - | let | |
287 | - | let | |
288 | - | let | |
289 | - | let | |
290 | - | let | |
291 | - | let | |
292 | - | let | |
293 | - | $Tuple2(([Reissue( | |
297 | + | let al = N(i, q) | |
298 | + | let am = N(j, r) | |
299 | + | let an = K(k, 0) | |
300 | + | let ao = min([K(l, 0), height]) | |
301 | + | let at = (al + (am * toBigInt((ao - an)))) | |
302 | + | let au = toInt(fraction(toBigInt(Z.payments[0].amount), q, at, FLOOR)) | |
303 | + | let av = fraction(am, as, (as + toBigInt(au)), FLOOR) | |
304 | + | let aw = ao | |
305 | + | let ak = P(af, Z.payments[0].amount, I()) | |
306 | + | $Tuple2(([Reissue(D, au, true), ScriptTransfer(Z.caller, au, D), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)] ++ ak), unit) | |
294 | 307 | } | |
295 | 308 | else throw("Strict value is not equal to itself.") | |
296 | 309 | } | |
297 | 310 | else throw("Strict value is not equal to itself.") | |
298 | 311 | } | |
299 | 312 | ||
300 | 313 | ||
301 | 314 | ||
302 | - | @Callable( | |
303 | - | func stake ( | |
304 | - | let | |
305 | - | let | |
306 | - | let | |
307 | - | let | |
308 | - | let | |
315 | + | @Callable(Z) | |
316 | + | func stake (Q,ax) = { | |
317 | + | let ar = toString(Z.caller) | |
318 | + | let af = H() | |
319 | + | let D = O() | |
320 | + | let as = toBigInt(E(D)) | |
321 | + | let ag = if ((Z.caller != this)) | |
309 | 322 | then throw("stake: only this contract") | |
310 | - | else if ((0 >= | |
323 | + | else if ((0 >= Q)) | |
311 | 324 | then throw("stake: invalid stake amount") | |
312 | - | else if (( | |
325 | + | else if ((Q > F(af, this))) | |
313 | 326 | then throw("stake: insufficient stake amount") | |
314 | - | else if (( | |
327 | + | else if ((as == r)) | |
315 | 328 | then throw("stake: no deposits to stake for") | |
316 | 329 | else unit | |
317 | - | if (( | |
330 | + | if ((ag == ag)) | |
318 | 331 | then { | |
319 | - | let | |
320 | - | let | |
321 | - | let | |
322 | - | let | |
323 | - | let | |
324 | - | let | |
332 | + | let al = N(i, q) | |
333 | + | let am = N(j, r) | |
334 | + | let an = K(k, 0) | |
335 | + | let ao = K(l, 0) | |
336 | + | let ay = min([ao, height]) | |
337 | + | let az = if ((ay == height)) | |
325 | 338 | then { | |
326 | - | let | |
327 | - | let | |
328 | - | let | |
329 | - | let | |
330 | - | let | |
331 | - | [BinaryEntry(i, toBytes( | |
339 | + | let at = (al + (toBigInt((ay - an)) * am)) | |
340 | + | let aA = (am * toBigInt((ao - ay))) | |
341 | + | let av = fraction(((toBigInt(Q) * q) + aA), s, (as * toBigInt(ax))) | |
342 | + | let aw = height | |
343 | + | let aB = (aw + ax) | |
344 | + | [BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
332 | 345 | } | |
333 | - | else if (( | |
346 | + | else if ((ao > an)) | |
334 | 347 | then { | |
335 | - | let | |
336 | - | let | |
337 | - | let | |
338 | - | let | |
339 | - | [BinaryEntry(i, toBytes( | |
348 | + | let at = (al + (toBigInt((ao - an)) * am)) | |
349 | + | let av = fraction(toBigInt(Q), q, (as * toBigInt(ax))) | |
350 | + | let aw = height | |
351 | + | let aB = (aw + ax) | |
352 | + | [BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
340 | 353 | } | |
341 | 354 | else { | |
342 | - | let | |
343 | - | let | |
344 | - | let | |
345 | - | [BinaryEntry(j, toBytes( | |
355 | + | let av = fraction(toBigInt(Q), q, (as * toBigInt(ax))) | |
356 | + | let aw = height | |
357 | + | let aB = (aw + ax) | |
358 | + | [BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw), IntegerEntry(l, aB)] | |
346 | 359 | } | |
347 | - | let | |
348 | - | $Tuple2(( | |
360 | + | let ak = P(af, Q, I()) | |
361 | + | $Tuple2((az ++ ak), unit) | |
349 | 362 | } | |
350 | 363 | else throw("Strict value is not equal to itself.") | |
351 | 364 | } | |
352 | 365 | ||
353 | 366 | ||
354 | 367 | ||
355 | - | @Callable( | |
368 | + | @Callable(Z) | |
356 | 369 | func withdraw () = { | |
357 | - | let | |
358 | - | let | |
359 | - | let | |
360 | - | let | |
361 | - | let | |
370 | + | let ar = toString(Z.caller) | |
371 | + | let af = H() | |
372 | + | let D = O() | |
373 | + | let as = toBigInt(E(D)) | |
374 | + | let ag = if ((1 > size(Z.payments))) | |
362 | 375 | then throw("withdraw: no payments") | |
363 | - | else if (( | |
376 | + | else if ((Z.payments[0].assetId != D)) | |
364 | 377 | then throw("withdraw: payment is not in correct asset") | |
365 | - | else if ((0 >= | |
378 | + | else if ((0 >= Z.payments[0].amount)) | |
366 | 379 | then throw("withdraw: invalid payment amount") | |
367 | 380 | else unit | |
368 | - | if (( | |
381 | + | if ((ag == ag)) | |
369 | 382 | then { | |
370 | - | let | |
371 | - | if (( | |
383 | + | let aq = V(false) | |
384 | + | if ((aq == aq)) | |
372 | 385 | then { | |
373 | - | let | |
374 | - | let | |
375 | - | let | |
376 | - | let | |
377 | - | let | |
378 | - | let | |
379 | - | let | |
380 | - | let | |
381 | - | let | |
382 | - | $Tuple2(( | |
386 | + | let al = N(i, q) | |
387 | + | let am = N(j, r) | |
388 | + | let an = K(k, 0) | |
389 | + | let ao = min([K(l, 0), height]) | |
390 | + | let at = (al + (am * toBigInt((ao - an)))) | |
391 | + | let aC = toInt(fraction(toBigInt(Z.payments[0].amount), at, q, FLOOR)) | |
392 | + | let av = fraction(am, as, (as - toBigInt(Z.payments[0].amount)), FLOOR) | |
393 | + | let aw = ao | |
394 | + | let ak = P(af, (-1 * aC), I()) | |
395 | + | $Tuple2((ak ++ [Burn(D, Z.payments[0].amount), ScriptTransfer(Z.caller, aC, unit), BinaryEntry(i, toBytes(at)), BinaryEntry(j, toBytes(av)), IntegerEntry(k, aw)]), unit) | |
383 | 396 | } | |
384 | 397 | else throw("Strict value is not equal to itself.") | |
385 | 398 | } | |
386 | 399 | else throw("Strict value is not equal to itself.") | |
387 | 400 | } | |
388 | 401 | ||
389 | 402 | ||
390 | 403 | ||
391 | - | @Callable( | |
392 | - | func setMultisig ( | |
393 | - | let | |
404 | + | @Callable(Z) | |
405 | + | func setMultisig (aD) = { | |
406 | + | let ag = if ((Z.caller != this)) | |
394 | 407 | then throw("setMultisig: permission denied") | |
395 | - | else if (!( | |
408 | + | else if (!(u(aD))) | |
396 | 409 | then throw("setMultisig: invalid multisig address") | |
397 | 410 | else unit | |
398 | - | if (( | |
399 | - | then $Tuple2([StringEntry(c, | |
411 | + | if ((ag == ag)) | |
412 | + | then $Tuple2([StringEntry(c, aD)], unit) | |
400 | 413 | else throw("Strict value is not equal to itself.") | |
401 | 414 | } | |
402 | 415 | ||
403 | 416 | ||
404 | - | @Verifier(aC) | |
405 | - | func aD () = { | |
406 | - | let v = getString(c) | |
407 | - | if ($isInstanceOf(v, "String")) | |
417 | + | ||
418 | + | @Callable(Z) | |
419 | + | func setSponsorshipManager (aE) = { | |
420 | + | let ag = if ((Z.caller != this)) | |
421 | + | then throw("setSponsorshipManager: permission denied") | |
422 | + | else if (!(u(aE))) | |
423 | + | then throw("setSponsorshipManager: invalid manager address") | |
424 | + | else unit | |
425 | + | if ((ag == ag)) | |
426 | + | then $Tuple2([StringEntry(m, aE)], unit) | |
427 | + | else throw("Strict value is not equal to itself.") | |
428 | + | } | |
429 | + | ||
430 | + | ||
431 | + | ||
432 | + | @Callable(Z) | |
433 | + | func updateSponsorship (aF,aG) = { | |
434 | + | let ag = if ((Z.caller != J())) | |
435 | + | then throw("updateSponsorship: permission denied") | |
436 | + | else if ((0 > aF)) | |
437 | + | then throw("updateSponsorship: invalid sponsorship fee") | |
438 | + | else if ((0 > aG)) | |
439 | + | then throw("updateSponsorship: invalid waves required amount") | |
440 | + | else unit | |
441 | + | if ((ag == ag)) | |
408 | 442 | then { | |
409 | - | let ac = v | |
410 | - | valueOrElse(getBoolean(addressFromStringValue(ac), makeString([d, toString(this), toBase58String(aC.id)], a)), false) | |
443 | + | let aH = O() | |
444 | + | let aI = if ((aF == 0)) | |
445 | + | then unit | |
446 | + | else aF | |
447 | + | let az = if ((wavesBalance(this).regular > aG)) | |
448 | + | then [ScriptTransfer(Z.caller, (wavesBalance(this).regular - aG), unit)] | |
449 | + | else nil | |
450 | + | $Tuple2((az ++ [ScriptTransfer(Z.caller, assetBalance(this, aH), aH), SponsorFee(aH, aI)]), unit) | |
411 | 451 | } | |
412 | - | else sigVerify(aC.bodyBytes, aC.proofs[0], aC.senderPublicKey) | |
452 | + | else throw("Strict value is not equal to itself.") | |
453 | + | } | |
454 | + | ||
455 | + | ||
456 | + | ||
457 | + | @Callable(Z) | |
458 | + | func wxVotingSuggest (aJ,aK,aL) = { | |
459 | + | let aM = valueOrErrorMessage(addressFromString(aJ), "wxVotingSuggest: invalid voting address") | |
460 | + | let aN = valueOrErrorMessage(assetInfo(fromBase58String(aK)), "wxVotingSuggest: invalid wx asset") | |
461 | + | let U = invoke(aM, "suggest", [O(), aL], [AttachedPayment(fromBase58String(aK), (100 * aN.decimals))]) | |
462 | + | if ((U == U)) | |
463 | + | then $Tuple2(nil, unit) | |
464 | + | else throw("Strict value is not equal to itself.") | |
465 | + | } | |
466 | + | ||
467 | + | ||
468 | + | @Verifier(aO) | |
469 | + | func aP () = { | |
470 | + | let w = getString(c) | |
471 | + | if ($isInstanceOf(w, "String")) | |
472 | + | then { | |
473 | + | let ae = w | |
474 | + | valueOrElse(getBoolean(addressFromStringValue(ae), makeString([d, toString(this), toBase58String(aO.id)], a)), false) | |
475 | + | } | |
476 | + | else sigVerify(aO.bodyBytes, aO.proofs[0], aO.senderPublicKey) | |
413 | 477 | } | |
414 | 478 |
github/deemru/w8io/169f3d6 128.47 ms ◑