tx · GvhZNZwcJLxtzaYbjVhyWXqoS27XNkDXay2gKpT7yPTv 3MqSv5qEvZKapkPQ6hPtUgbZfxdMQexnwqa: -0.01400000 Waves 2024.11.21 12:55 [3381056] smart account 3MqSv5qEvZKapkPQ6hPtUgbZfxdMQexnwqa > SELF 0.00000000 Waves
{ "type": 13, "id": "GvhZNZwcJLxtzaYbjVhyWXqoS27XNkDXay2gKpT7yPTv", "fee": 1400000, "feeAssetId": null, "timestamp": 1732182852170, "version": 2, "chainId": 84, "sender": "3MqSv5qEvZKapkPQ6hPtUgbZfxdMQexnwqa", "senderPublicKey": "tinwq3CCsobvKT9fhHjTjbxXQdTDmXW9KtgPvR94m1H", "proofs": [ "5X2qWPR52avMqPyVvTwhsv1vwP4qm4tUPypZzkZh1y82Rbvu1xGhCzS7HY7QDr2zavK5YmHSLEmcDfc5rdhMkZVs" ], "script": "base64:BwJFCAISBAoCCAgSBQoDCAgIEgcKBQgICAgIEgUKAwgICBIJCgcICAgICAgIEgUKAwgICBIGCgQICAgIEgUKAwgICBIDCgEIIQAJU0VQQVJBVE9SAgJfXwAMS0VZX01VTFRJU0lHAghNVUxUSVNJRwAKS0VZX1NUQVRVUwIGU1RBVFVTAAhLRVlfSU5JVAIESU5JVAAUS0VZX0dBVEVXQVlfQ09OVFJBQ1QCEEdBVEVXQVlfQ09OVFJBQ1QAFEtFWV9NQVRDSEVSX0NPTlRSQUNUAhBNQVRDSEVSX0NPTlRSQUNUABBLRVlfVVNFUl9CQUxBTkNFAgxVU0VSX0JBTEFOQ0UAEUtFWV9UT1RBTF9CQUxBTkNFAg1UT1RBTF9CQUxBTkNFAAtTUE9UX1dBTExFVAIEU1BPVAAVU1RBS0lOR19SRVdBUkRfV0FMTEVUAg5TVEFLSU5HX1JFV0FSRAALWkVST19CSUdJTlQJALYCAQAAARBfdmFsaWRhdGVBZGRyZXNzAghhZGRyZXNzXwRlcnJfBAckbWF0Y2gwCQCmCAEFCGFkZHJlc3NfAwkAAQIFByRtYXR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BUkFUT1IHCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAACAUCdHgPc2VuZGVyUHVibGljS2V5fQO9bw==", "height": 3381056, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FFDt51UGQUxwE3127Cu5DhPAigdsPYuibeSofwCzwexu Next: none Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | ||
20 | 20 | let i = "SPOT" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "STAKING_REWARD" | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = toBigInt(0) | |
25 | 25 | ||
26 | - | let l = toBigInt(0) | |
27 | - | ||
28 | - | func m (n,o) = { | |
29 | - | let p = addressFromString(n) | |
30 | - | if ($isInstanceOf(p, "Address")) | |
26 | + | func l (m,n) = { | |
27 | + | let o = addressFromString(m) | |
28 | + | if ($isInstanceOf(o, "Address")) | |
31 | 29 | then { | |
32 | - | let | |
30 | + | let p = o | |
33 | 31 | true | |
34 | 32 | } | |
35 | - | else throw( | |
33 | + | else throw(n) | |
36 | 34 | } | |
37 | 35 | ||
38 | 36 | ||
39 | - | func | |
40 | - | then throw( | |
37 | + | func q (r,s,n) = if ((s > r)) | |
38 | + | then throw(n) | |
41 | 39 | else true | |
42 | 40 | ||
43 | 41 | ||
44 | - | func | |
42 | + | func t (r,n) = if (if ((0 >= size(r))) | |
45 | 43 | then true | |
46 | - | else contains( | |
47 | - | then throw( | |
44 | + | else contains(r, a)) | |
45 | + | then throw(n) | |
48 | 46 | else true | |
49 | 47 | ||
50 | 48 | ||
51 | - | func | |
52 | - | then throw( | |
49 | + | func u (v,w,n) = if ((v != w)) | |
50 | + | then throw(n) | |
53 | 51 | else true | |
54 | 52 | ||
55 | 53 | ||
56 | - | func | |
57 | - | let | |
58 | - | if ($isInstanceOf( | |
54 | + | func x () = { | |
55 | + | let o = getBoolean(d) | |
56 | + | if ($isInstanceOf(o, "Boolean")) | |
59 | 57 | then { | |
60 | - | let | |
61 | - | | |
58 | + | let p = o | |
59 | + | p | |
62 | 60 | } | |
63 | 61 | else false | |
64 | 62 | } | |
65 | 63 | ||
66 | 64 | ||
67 | - | func | |
65 | + | func y (z) = [BooleanEntry(d, z)] | |
68 | 66 | ||
69 | 67 | ||
70 | - | func | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
68 | + | func A () = { | |
69 | + | let o = getString(b) | |
70 | + | if ($isInstanceOf(o, "String")) | |
73 | 71 | then { | |
74 | - | let | |
75 | - | addressFromStringValue( | |
72 | + | let p = o | |
73 | + | addressFromStringValue(p) | |
76 | 74 | } | |
77 | 75 | else Address(base58'') | |
78 | 76 | } | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func B (C) = [StringEntry(b, toString(C))] | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
82 | + | func D () = { | |
83 | + | let o = getString(e) | |
84 | + | if ($isInstanceOf(o, "String")) | |
87 | 85 | then { | |
88 | - | let | |
89 | - | addressFromStringValue( | |
86 | + | let p = o | |
87 | + | addressFromStringValue(p) | |
90 | 88 | } | |
91 | 89 | else Address(base58'') | |
92 | 90 | } | |
93 | 91 | ||
94 | 92 | ||
95 | - | func | |
93 | + | func E (F) = [StringEntry(e, toString(F))] | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | let | |
100 | - | if ($isInstanceOf( | |
96 | + | func G () = { | |
97 | + | let o = getString(f) | |
98 | + | if ($isInstanceOf(o, "String")) | |
101 | 99 | then { | |
102 | - | let | |
103 | - | addressFromStringValue( | |
100 | + | let p = o | |
101 | + | addressFromStringValue(p) | |
104 | 102 | } | |
105 | 103 | else Address(base58'') | |
106 | 104 | } | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func H (I) = [StringEntry(f, toString(I))] | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
113 | - | let | |
114 | - | if ($isInstanceOf( | |
110 | + | func J (K,L,M) = { | |
111 | + | let o = getString(makeString([g, K, L, M], a)) | |
112 | + | if ($isInstanceOf(o, "String")) | |
115 | 113 | then { | |
116 | - | let | |
117 | - | parseBigIntValue( | |
114 | + | let p = o | |
115 | + | parseBigIntValue(p) | |
118 | 116 | } | |
119 | - | else | |
117 | + | else k | |
120 | 118 | } | |
121 | 119 | ||
122 | 120 | ||
123 | - | func | |
121 | + | func N (K,L,M,O) = [StringEntry(makeString([g, K, L, M], a), toString(O))] | |
124 | 122 | ||
125 | 123 | ||
126 | - | func | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
124 | + | func P (M) = { | |
125 | + | let o = getString(makeString([h, M], a)) | |
126 | + | if ($isInstanceOf(o, "String")) | |
129 | 127 | then { | |
130 | - | let | |
131 | - | parseBigIntValue( | |
128 | + | let p = o | |
129 | + | parseBigIntValue(p) | |
132 | 130 | } | |
133 | - | else | |
131 | + | else k | |
134 | 132 | } | |
135 | 133 | ||
136 | 134 | ||
137 | - | func | |
135 | + | func Q (M,O) = [StringEntry(makeString([h, M], a), toString(O))] | |
138 | 136 | ||
139 | 137 | ||
140 | - | func | |
138 | + | func R (S) = if ((S != this)) | |
141 | 139 | then throw("_onlyThisContract: revert") | |
142 | 140 | else true | |
143 | 141 | ||
144 | 142 | ||
145 | - | func | |
143 | + | func T () = if ((A() == Address(base58''))) | |
146 | 144 | then throw("_whenMultisigSet: revert") | |
147 | 145 | else true | |
148 | 146 | ||
149 | 147 | ||
150 | - | func | |
148 | + | func U () = if (x()) | |
151 | 149 | then throw("_whenNotInitialized: revert") | |
152 | 150 | else true | |
153 | 151 | ||
154 | 152 | ||
155 | - | func | |
153 | + | func V () = if (!(x())) | |
156 | 154 | then throw("_whenInitialized: revert") | |
157 | 155 | else true | |
158 | 156 | ||
159 | 157 | ||
160 | - | func | |
161 | - | then throw( | |
158 | + | func W (X,n) = if ((D() != X)) | |
159 | + | then throw(n) | |
162 | 160 | else true | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
166 | - | then throw( | |
163 | + | func Y (X,n) = if ((G() != X)) | |
164 | + | then throw(n) | |
167 | 165 | else true | |
168 | 166 | ||
169 | 167 | ||
170 | - | @Callable(aa) | |
171 | - | func init (G,J) = { | |
172 | - | let ab = if (if (if (if (S(aa.caller)) | |
173 | - | then V() | |
174 | - | else false) | |
168 | + | @Callable(Z) | |
169 | + | func init (F,I) = { | |
170 | + | let aa = if (if (if (if (R(Z.caller)) | |
175 | 171 | then U() | |
176 | 172 | else false) | |
177 | - | then | |
173 | + | then T() | |
178 | 174 | else false) | |
179 | - | then m(J, "init: invalid matcherContract") | |
175 | + | then l(F, "init: invalid gatewayContract") | |
176 | + | else false) | |
177 | + | then l(I, "init: invalid matcherContract") | |
180 | 178 | else false | |
181 | - | if (( | |
182 | - | then $Tuple2((( | |
179 | + | if ((aa == aa)) | |
180 | + | then $Tuple2(((y(true) ++ E(addressFromStringValue(F))) ++ H(addressFromStringValue(I))), unit) | |
183 | 181 | else throw("Strict value is not equal to itself.") | |
184 | 182 | } | |
185 | 183 | ||
186 | 184 | ||
187 | 185 | ||
188 | - | @Callable( | |
189 | - | func deposit ( | |
190 | - | let | |
191 | - | let | |
192 | - | then | |
186 | + | @Callable(Z) | |
187 | + | func deposit (K,M,ab) = { | |
188 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "deposit: amount not int") | |
189 | + | let aa = if (if (if (if (V()) | |
190 | + | then t(K, "deposit: invalid user") | |
193 | 191 | else false) | |
194 | - | then | |
192 | + | then t(M, "deposit: invalid currency") | |
195 | 193 | else false) | |
196 | - | then | |
194 | + | then q(ac, k, "deposit: invalid amount") | |
197 | 195 | else false) | |
198 | - | then | |
196 | + | then W(Z.caller, "deposit: invalid caller") | |
199 | 197 | else false | |
200 | - | if (( | |
198 | + | if ((aa == aa)) | |
201 | 199 | then { | |
202 | - | let | |
203 | - | $Tuple2(( | |
200 | + | let ad = J(K, i, M) | |
201 | + | $Tuple2((N(K, i, M, (ad + ac)) ++ Q(M, (P(M) + ac))), unit) | |
204 | 202 | } | |
205 | 203 | else throw("Strict value is not equal to itself.") | |
206 | 204 | } | |
207 | 205 | ||
208 | 206 | ||
209 | 207 | ||
210 | - | @Callable( | |
211 | - | func internalTransfer ( | |
212 | - | let | |
213 | - | let | |
214 | - | then | |
208 | + | @Callable(Z) | |
209 | + | func internalTransfer (K,ae,af,M,ab) = { | |
210 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "internalTransfer: amount not int") | |
211 | + | let aa = if (if (if (if (if (if (V()) | |
212 | + | then t(K, "internalTransfer: invalid user") | |
215 | 213 | else false) | |
216 | - | then | |
214 | + | then t(ae, "internalTransfer: invalid sourceWallet") | |
217 | 215 | else false) | |
218 | - | then | |
216 | + | then t(af, "internalTransfer: invalid targetWallet") | |
219 | 217 | else false) | |
220 | - | then | |
218 | + | then t(M, "internalTransfer: invalid currency") | |
221 | 219 | else false) | |
222 | - | then | |
220 | + | then q(ac, k, "internalTransfer: invalid amount") | |
223 | 221 | else false) | |
224 | - | then if ((ag == j)) | |
225 | - | then X(aa.caller, "internalTransfer: invalid gw caller") | |
226 | - | else Z(aa.caller, "internalTransfer: invalid matcher caller") | |
222 | + | then Y(Z.caller, "internalTransfer: invalid matcher caller") | |
227 | 223 | else false | |
228 | - | if (( | |
224 | + | if ((aa == aa)) | |
229 | 225 | then { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | if (( | |
236 | - | then $Tuple2(( | |
226 | + | let ag = J(K, ae, M) | |
227 | + | let ah = J(K, af, M) | |
228 | + | let ai = (ag - ac) | |
229 | + | let aj = (ah + ac) | |
230 | + | let ak = q(ai, k, "internalTransfer: insufficient amount") | |
231 | + | if ((ak == ak)) | |
232 | + | then $Tuple2((N(K, ae, M, ai) ++ N(K, af, M, aj)), unit) | |
237 | 233 | else throw("Strict value is not equal to itself.") | |
238 | 234 | } | |
239 | 235 | else throw("Strict value is not equal to itself.") | |
241 | 237 | ||
242 | 238 | ||
243 | 239 | ||
244 | - | @Callable( | |
245 | - | func withdraw ( | |
246 | - | let | |
247 | - | let | |
248 | - | then | |
240 | + | @Callable(Z) | |
241 | + | func withdraw (K,M,ab) = { | |
242 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "withdraw: amount not int") | |
243 | + | let aa = if (if (if (if (V()) | |
244 | + | then t(K, "withdraw: invalid user") | |
249 | 245 | else false) | |
250 | - | then | |
246 | + | then t(M, "withdraw: invalid currency") | |
251 | 247 | else false) | |
252 | - | then | |
248 | + | then q(ac, k, "withdraw: invalid amount") | |
253 | 249 | else false) | |
254 | - | then | |
250 | + | then W(Z.caller, "withdraw: invalid caller") | |
255 | 251 | else false | |
256 | - | if (( | |
252 | + | if ((aa == aa)) | |
257 | 253 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then | |
254 | + | let ad = J(K, i, M) | |
255 | + | let al = (ad - ac) | |
256 | + | let am = (P(M) - ac) | |
257 | + | let ak = if (q(al, k, "withdraw: insufficient amount")) | |
258 | + | then q(am, k, "withdraw: negative total balance") | |
263 | 259 | else false | |
264 | - | if (( | |
265 | - | then $Tuple2(( | |
260 | + | if ((ak == ak)) | |
261 | + | then $Tuple2((N(K, i, M, al) ++ Q(M, am)), unit) | |
266 | 262 | else throw("Strict value is not equal to itself.") | |
267 | 263 | } | |
268 | 264 | else throw("Strict value is not equal to itself.") | |
270 | 266 | ||
271 | 267 | ||
272 | 268 | ||
273 | - | @Callable( | |
274 | - | func externalTransfer (M, | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | then | |
269 | + | @Callable(Z) | |
270 | + | func externalTransfer (L,M,an,ao,ab,ap,aq) = { | |
271 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "externalTransfer: amount not int") | |
272 | + | let ar = valueOrErrorMessage(parseBigInt(ap), "externalTransfer: fee not int") | |
273 | + | let aa = if (if (if (if (if (if (if (if (V()) | |
274 | + | then t(L, "externalTransfer: invalid wallet") | |
279 | 275 | else false) | |
280 | - | then | |
276 | + | then t(M, "externalTransfer: invalid currency") | |
281 | 277 | else false) | |
282 | - | then | |
278 | + | then t(an, "externalTransfer: invalid from") | |
283 | 279 | else false) | |
284 | - | then | |
280 | + | then t(ao, "externalTransfer: invalid to") | |
285 | 281 | else false) | |
286 | - | then | |
282 | + | then q(ac, k, "externalTransfer: invalid amount") | |
287 | 283 | else false) | |
288 | - | then | |
284 | + | then q(ar, k, "externalTransfer: invalid fee") | |
289 | 285 | else false) | |
290 | - | then | |
286 | + | then t(aq, "externalTransfer: invalid dex") | |
291 | 287 | else false) | |
292 | - | then Z | |
288 | + | then Y(Z.caller, "externalTransfer: invalid matcher caller") | |
293 | 289 | else false | |
294 | - | if (( | |
290 | + | if ((aa == aa)) | |
295 | 291 | then { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if (( | |
304 | - | then $Tuple2((( | |
292 | + | let ag = J(an, L, M) | |
293 | + | let ah = J(ao, L, M) | |
294 | + | let as = J(aq, L, M) | |
295 | + | let ai = ((ag - ac) - ar) | |
296 | + | let aj = (ah + ac) | |
297 | + | let at = (as + ar) | |
298 | + | let ak = q(ai, k, "externalTransfer: insufficient amount") | |
299 | + | if ((ak == ak)) | |
300 | + | then $Tuple2(((N(an, L, M, ai) ++ N(ao, L, M, aj)) ++ N(aq, L, M, at)), unit) | |
305 | 301 | else throw("Strict value is not equal to itself.") | |
306 | 302 | } | |
307 | 303 | else throw("Strict value is not equal to itself.") | |
309 | 305 | ||
310 | 306 | ||
311 | 307 | ||
312 | - | @Callable( | |
313 | - | func depositStakingReward ( | |
314 | - | let | |
315 | - | let | |
316 | - | then | |
308 | + | @Callable(Z) | |
309 | + | func depositStakingReward (aq,M,ab) = { | |
310 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "depositStakingReward: amount not int") | |
311 | + | let aa = if (if (if (if (V()) | |
312 | + | then t(aq, "depositStakingReward: invalid dex") | |
317 | 313 | else false) | |
318 | - | then | |
314 | + | then t(M, "depositStakingReward: invalid currency") | |
319 | 315 | else false) | |
320 | - | then | |
316 | + | then q(ac, k, "depositStakingReward: invalid amount") | |
321 | 317 | else false) | |
322 | - | then | |
318 | + | then W(Z.caller, "depositStakingReward: invalid caller") | |
323 | 319 | else false | |
324 | - | if (( | |
320 | + | if ((aa == aa)) | |
325 | 321 | then { | |
326 | - | let | |
327 | - | $Tuple2(( | |
322 | + | let ad = J(aq, j, M) | |
323 | + | $Tuple2((N(aq, j, M, (ad + ac)) ++ Q(M, (P(M) + ac))), unit) | |
328 | 324 | } | |
329 | 325 | else throw("Strict value is not equal to itself.") | |
330 | 326 | } | |
331 | 327 | ||
332 | 328 | ||
333 | 329 | ||
334 | - | @Callable( | |
335 | - | func claimReward ( | |
336 | - | let | |
337 | - | let | |
338 | - | then | |
330 | + | @Callable(Z) | |
331 | + | func claimReward (aq,K,M,ab) = { | |
332 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "claimReward: amount not int") | |
333 | + | let aa = if (if (if (if (if (V()) | |
334 | + | then t(aq, "claimReward: invalid dex") | |
339 | 335 | else false) | |
340 | - | then | |
336 | + | then t(K, "claimReward: invalid user") | |
341 | 337 | else false) | |
342 | - | then | |
338 | + | then t(M, "claimReward: invalid currency") | |
343 | 339 | else false) | |
344 | - | then | |
340 | + | then q(ac, k, "claimReward: invalid amount") | |
345 | 341 | else false) | |
346 | - | then Z | |
342 | + | then Y(Z.caller, "claimReward: invalid matcher caller") | |
347 | 343 | else false | |
348 | - | if (( | |
344 | + | if ((aa == aa)) | |
349 | 345 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | if (( | |
356 | - | then $Tuple2(( | |
346 | + | let au = J(aq, j, M) | |
347 | + | let ah = J(K, i, M) | |
348 | + | let av = (au - ac) | |
349 | + | let aj = (ah + ac) | |
350 | + | let ak = q(av, k, "claimReward: insufficient amount") | |
351 | + | if ((ak == ak)) | |
352 | + | then $Tuple2((N(aq, j, M, av) ++ N(K, i, M, aj)), unit) | |
357 | 353 | else throw("Strict value is not equal to itself.") | |
358 | 354 | } | |
359 | 355 | else throw("Strict value is not equal to itself.") | |
361 | 357 | ||
362 | 358 | ||
363 | 359 | ||
364 | - | @Callable( | |
365 | - | func getUserBalance (L,M | |
360 | + | @Callable(Z) | |
361 | + | func getUserBalance (K,L,M) = $Tuple2(nil, toString(J(K, L, M))) | |
366 | 362 | ||
367 | 363 | ||
368 | 364 | ||
369 | - | @Callable( | |
370 | - | func setMultisig ( | |
371 | - | let | |
372 | - | then | |
365 | + | @Callable(Z) | |
366 | + | func setMultisig (C) = { | |
367 | + | let aa = if (R(Z.caller)) | |
368 | + | then l(C, "setMultisig: invalid multisig") | |
373 | 369 | else false | |
374 | - | if (( | |
375 | - | then $Tuple2( | |
370 | + | if ((aa == aa)) | |
371 | + | then $Tuple2(B(addressFromStringValue(C)), unit) | |
376 | 372 | else throw("Strict value is not equal to itself.") | |
377 | 373 | } | |
378 | 374 | ||
379 | 375 | ||
380 | - | @Verifier( | |
381 | - | func | |
382 | - | let | |
383 | - | let | |
384 | - | if ($isInstanceOf( | |
376 | + | @Verifier(aw) | |
377 | + | func ax () = { | |
378 | + | let o = aw | |
379 | + | let ay = getString(b) | |
380 | + | if ($isInstanceOf(ay, "String")) | |
385 | 381 | then { | |
386 | - | let | |
387 | - | valueOrElse(getBoolean(addressFromStringValue( | |
382 | + | let az = ay | |
383 | + | valueOrElse(getBoolean(addressFromStringValue(az), makeString([c, toString(this), toBase58String(aw.id)], a)), false) | |
388 | 384 | } | |
389 | - | else sigVerify( | |
385 | + | else sigVerify(aw.bodyBytes, aw.proofs[0], aw.senderPublicKey) | |
390 | 386 | } | |
391 | 387 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "__" | |
5 | 5 | ||
6 | 6 | let b = "MULTISIG" | |
7 | 7 | ||
8 | 8 | let c = "STATUS" | |
9 | 9 | ||
10 | 10 | let d = "INIT" | |
11 | 11 | ||
12 | 12 | let e = "GATEWAY_CONTRACT" | |
13 | 13 | ||
14 | 14 | let f = "MATCHER_CONTRACT" | |
15 | 15 | ||
16 | 16 | let g = "USER_BALANCE" | |
17 | 17 | ||
18 | 18 | let h = "TOTAL_BALANCE" | |
19 | 19 | ||
20 | 20 | let i = "SPOT" | |
21 | 21 | ||
22 | - | let j = " | |
22 | + | let j = "STAKING_REWARD" | |
23 | 23 | ||
24 | - | let k = | |
24 | + | let k = toBigInt(0) | |
25 | 25 | ||
26 | - | let l = toBigInt(0) | |
27 | - | ||
28 | - | func m (n,o) = { | |
29 | - | let p = addressFromString(n) | |
30 | - | if ($isInstanceOf(p, "Address")) | |
26 | + | func l (m,n) = { | |
27 | + | let o = addressFromString(m) | |
28 | + | if ($isInstanceOf(o, "Address")) | |
31 | 29 | then { | |
32 | - | let | |
30 | + | let p = o | |
33 | 31 | true | |
34 | 32 | } | |
35 | - | else throw( | |
33 | + | else throw(n) | |
36 | 34 | } | |
37 | 35 | ||
38 | 36 | ||
39 | - | func | |
40 | - | then throw( | |
37 | + | func q (r,s,n) = if ((s > r)) | |
38 | + | then throw(n) | |
41 | 39 | else true | |
42 | 40 | ||
43 | 41 | ||
44 | - | func | |
42 | + | func t (r,n) = if (if ((0 >= size(r))) | |
45 | 43 | then true | |
46 | - | else contains( | |
47 | - | then throw( | |
44 | + | else contains(r, a)) | |
45 | + | then throw(n) | |
48 | 46 | else true | |
49 | 47 | ||
50 | 48 | ||
51 | - | func | |
52 | - | then throw( | |
49 | + | func u (v,w,n) = if ((v != w)) | |
50 | + | then throw(n) | |
53 | 51 | else true | |
54 | 52 | ||
55 | 53 | ||
56 | - | func | |
57 | - | let | |
58 | - | if ($isInstanceOf( | |
54 | + | func x () = { | |
55 | + | let o = getBoolean(d) | |
56 | + | if ($isInstanceOf(o, "Boolean")) | |
59 | 57 | then { | |
60 | - | let | |
61 | - | | |
58 | + | let p = o | |
59 | + | p | |
62 | 60 | } | |
63 | 61 | else false | |
64 | 62 | } | |
65 | 63 | ||
66 | 64 | ||
67 | - | func | |
65 | + | func y (z) = [BooleanEntry(d, z)] | |
68 | 66 | ||
69 | 67 | ||
70 | - | func | |
71 | - | let | |
72 | - | if ($isInstanceOf( | |
68 | + | func A () = { | |
69 | + | let o = getString(b) | |
70 | + | if ($isInstanceOf(o, "String")) | |
73 | 71 | then { | |
74 | - | let | |
75 | - | addressFromStringValue( | |
72 | + | let p = o | |
73 | + | addressFromStringValue(p) | |
76 | 74 | } | |
77 | 75 | else Address(base58'') | |
78 | 76 | } | |
79 | 77 | ||
80 | 78 | ||
81 | - | func | |
79 | + | func B (C) = [StringEntry(b, toString(C))] | |
82 | 80 | ||
83 | 81 | ||
84 | - | func | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
82 | + | func D () = { | |
83 | + | let o = getString(e) | |
84 | + | if ($isInstanceOf(o, "String")) | |
87 | 85 | then { | |
88 | - | let | |
89 | - | addressFromStringValue( | |
86 | + | let p = o | |
87 | + | addressFromStringValue(p) | |
90 | 88 | } | |
91 | 89 | else Address(base58'') | |
92 | 90 | } | |
93 | 91 | ||
94 | 92 | ||
95 | - | func | |
93 | + | func E (F) = [StringEntry(e, toString(F))] | |
96 | 94 | ||
97 | 95 | ||
98 | - | func | |
99 | - | let | |
100 | - | if ($isInstanceOf( | |
96 | + | func G () = { | |
97 | + | let o = getString(f) | |
98 | + | if ($isInstanceOf(o, "String")) | |
101 | 99 | then { | |
102 | - | let | |
103 | - | addressFromStringValue( | |
100 | + | let p = o | |
101 | + | addressFromStringValue(p) | |
104 | 102 | } | |
105 | 103 | else Address(base58'') | |
106 | 104 | } | |
107 | 105 | ||
108 | 106 | ||
109 | - | func | |
107 | + | func H (I) = [StringEntry(f, toString(I))] | |
110 | 108 | ||
111 | 109 | ||
112 | - | func | |
113 | - | let | |
114 | - | if ($isInstanceOf( | |
110 | + | func J (K,L,M) = { | |
111 | + | let o = getString(makeString([g, K, L, M], a)) | |
112 | + | if ($isInstanceOf(o, "String")) | |
115 | 113 | then { | |
116 | - | let | |
117 | - | parseBigIntValue( | |
114 | + | let p = o | |
115 | + | parseBigIntValue(p) | |
118 | 116 | } | |
119 | - | else | |
117 | + | else k | |
120 | 118 | } | |
121 | 119 | ||
122 | 120 | ||
123 | - | func | |
121 | + | func N (K,L,M,O) = [StringEntry(makeString([g, K, L, M], a), toString(O))] | |
124 | 122 | ||
125 | 123 | ||
126 | - | func | |
127 | - | let | |
128 | - | if ($isInstanceOf( | |
124 | + | func P (M) = { | |
125 | + | let o = getString(makeString([h, M], a)) | |
126 | + | if ($isInstanceOf(o, "String")) | |
129 | 127 | then { | |
130 | - | let | |
131 | - | parseBigIntValue( | |
128 | + | let p = o | |
129 | + | parseBigIntValue(p) | |
132 | 130 | } | |
133 | - | else | |
131 | + | else k | |
134 | 132 | } | |
135 | 133 | ||
136 | 134 | ||
137 | - | func | |
135 | + | func Q (M,O) = [StringEntry(makeString([h, M], a), toString(O))] | |
138 | 136 | ||
139 | 137 | ||
140 | - | func | |
138 | + | func R (S) = if ((S != this)) | |
141 | 139 | then throw("_onlyThisContract: revert") | |
142 | 140 | else true | |
143 | 141 | ||
144 | 142 | ||
145 | - | func | |
143 | + | func T () = if ((A() == Address(base58''))) | |
146 | 144 | then throw("_whenMultisigSet: revert") | |
147 | 145 | else true | |
148 | 146 | ||
149 | 147 | ||
150 | - | func | |
148 | + | func U () = if (x()) | |
151 | 149 | then throw("_whenNotInitialized: revert") | |
152 | 150 | else true | |
153 | 151 | ||
154 | 152 | ||
155 | - | func | |
153 | + | func V () = if (!(x())) | |
156 | 154 | then throw("_whenInitialized: revert") | |
157 | 155 | else true | |
158 | 156 | ||
159 | 157 | ||
160 | - | func | |
161 | - | then throw( | |
158 | + | func W (X,n) = if ((D() != X)) | |
159 | + | then throw(n) | |
162 | 160 | else true | |
163 | 161 | ||
164 | 162 | ||
165 | - | func | |
166 | - | then throw( | |
163 | + | func Y (X,n) = if ((G() != X)) | |
164 | + | then throw(n) | |
167 | 165 | else true | |
168 | 166 | ||
169 | 167 | ||
170 | - | @Callable(aa) | |
171 | - | func init (G,J) = { | |
172 | - | let ab = if (if (if (if (S(aa.caller)) | |
173 | - | then V() | |
174 | - | else false) | |
168 | + | @Callable(Z) | |
169 | + | func init (F,I) = { | |
170 | + | let aa = if (if (if (if (R(Z.caller)) | |
175 | 171 | then U() | |
176 | 172 | else false) | |
177 | - | then | |
173 | + | then T() | |
178 | 174 | else false) | |
179 | - | then m(J, "init: invalid matcherContract") | |
175 | + | then l(F, "init: invalid gatewayContract") | |
176 | + | else false) | |
177 | + | then l(I, "init: invalid matcherContract") | |
180 | 178 | else false | |
181 | - | if (( | |
182 | - | then $Tuple2((( | |
179 | + | if ((aa == aa)) | |
180 | + | then $Tuple2(((y(true) ++ E(addressFromStringValue(F))) ++ H(addressFromStringValue(I))), unit) | |
183 | 181 | else throw("Strict value is not equal to itself.") | |
184 | 182 | } | |
185 | 183 | ||
186 | 184 | ||
187 | 185 | ||
188 | - | @Callable( | |
189 | - | func deposit ( | |
190 | - | let | |
191 | - | let | |
192 | - | then | |
186 | + | @Callable(Z) | |
187 | + | func deposit (K,M,ab) = { | |
188 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "deposit: amount not int") | |
189 | + | let aa = if (if (if (if (V()) | |
190 | + | then t(K, "deposit: invalid user") | |
193 | 191 | else false) | |
194 | - | then | |
192 | + | then t(M, "deposit: invalid currency") | |
195 | 193 | else false) | |
196 | - | then | |
194 | + | then q(ac, k, "deposit: invalid amount") | |
197 | 195 | else false) | |
198 | - | then | |
196 | + | then W(Z.caller, "deposit: invalid caller") | |
199 | 197 | else false | |
200 | - | if (( | |
198 | + | if ((aa == aa)) | |
201 | 199 | then { | |
202 | - | let | |
203 | - | $Tuple2(( | |
200 | + | let ad = J(K, i, M) | |
201 | + | $Tuple2((N(K, i, M, (ad + ac)) ++ Q(M, (P(M) + ac))), unit) | |
204 | 202 | } | |
205 | 203 | else throw("Strict value is not equal to itself.") | |
206 | 204 | } | |
207 | 205 | ||
208 | 206 | ||
209 | 207 | ||
210 | - | @Callable( | |
211 | - | func internalTransfer ( | |
212 | - | let | |
213 | - | let | |
214 | - | then | |
208 | + | @Callable(Z) | |
209 | + | func internalTransfer (K,ae,af,M,ab) = { | |
210 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "internalTransfer: amount not int") | |
211 | + | let aa = if (if (if (if (if (if (V()) | |
212 | + | then t(K, "internalTransfer: invalid user") | |
215 | 213 | else false) | |
216 | - | then | |
214 | + | then t(ae, "internalTransfer: invalid sourceWallet") | |
217 | 215 | else false) | |
218 | - | then | |
216 | + | then t(af, "internalTransfer: invalid targetWallet") | |
219 | 217 | else false) | |
220 | - | then | |
218 | + | then t(M, "internalTransfer: invalid currency") | |
221 | 219 | else false) | |
222 | - | then | |
220 | + | then q(ac, k, "internalTransfer: invalid amount") | |
223 | 221 | else false) | |
224 | - | then if ((ag == j)) | |
225 | - | then X(aa.caller, "internalTransfer: invalid gw caller") | |
226 | - | else Z(aa.caller, "internalTransfer: invalid matcher caller") | |
222 | + | then Y(Z.caller, "internalTransfer: invalid matcher caller") | |
227 | 223 | else false | |
228 | - | if (( | |
224 | + | if ((aa == aa)) | |
229 | 225 | then { | |
230 | - | let | |
231 | - | let | |
232 | - | let | |
233 | - | let | |
234 | - | let | |
235 | - | if (( | |
236 | - | then $Tuple2(( | |
226 | + | let ag = J(K, ae, M) | |
227 | + | let ah = J(K, af, M) | |
228 | + | let ai = (ag - ac) | |
229 | + | let aj = (ah + ac) | |
230 | + | let ak = q(ai, k, "internalTransfer: insufficient amount") | |
231 | + | if ((ak == ak)) | |
232 | + | then $Tuple2((N(K, ae, M, ai) ++ N(K, af, M, aj)), unit) | |
237 | 233 | else throw("Strict value is not equal to itself.") | |
238 | 234 | } | |
239 | 235 | else throw("Strict value is not equal to itself.") | |
240 | 236 | } | |
241 | 237 | ||
242 | 238 | ||
243 | 239 | ||
244 | - | @Callable( | |
245 | - | func withdraw ( | |
246 | - | let | |
247 | - | let | |
248 | - | then | |
240 | + | @Callable(Z) | |
241 | + | func withdraw (K,M,ab) = { | |
242 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "withdraw: amount not int") | |
243 | + | let aa = if (if (if (if (V()) | |
244 | + | then t(K, "withdraw: invalid user") | |
249 | 245 | else false) | |
250 | - | then | |
246 | + | then t(M, "withdraw: invalid currency") | |
251 | 247 | else false) | |
252 | - | then | |
248 | + | then q(ac, k, "withdraw: invalid amount") | |
253 | 249 | else false) | |
254 | - | then | |
250 | + | then W(Z.caller, "withdraw: invalid caller") | |
255 | 251 | else false | |
256 | - | if (( | |
252 | + | if ((aa == aa)) | |
257 | 253 | then { | |
258 | - | let | |
259 | - | let | |
260 | - | let | |
261 | - | let | |
262 | - | then | |
254 | + | let ad = J(K, i, M) | |
255 | + | let al = (ad - ac) | |
256 | + | let am = (P(M) - ac) | |
257 | + | let ak = if (q(al, k, "withdraw: insufficient amount")) | |
258 | + | then q(am, k, "withdraw: negative total balance") | |
263 | 259 | else false | |
264 | - | if (( | |
265 | - | then $Tuple2(( | |
260 | + | if ((ak == ak)) | |
261 | + | then $Tuple2((N(K, i, M, al) ++ Q(M, am)), unit) | |
266 | 262 | else throw("Strict value is not equal to itself.") | |
267 | 263 | } | |
268 | 264 | else throw("Strict value is not equal to itself.") | |
269 | 265 | } | |
270 | 266 | ||
271 | 267 | ||
272 | 268 | ||
273 | - | @Callable( | |
274 | - | func externalTransfer (M, | |
275 | - | let | |
276 | - | let | |
277 | - | let | |
278 | - | then | |
269 | + | @Callable(Z) | |
270 | + | func externalTransfer (L,M,an,ao,ab,ap,aq) = { | |
271 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "externalTransfer: amount not int") | |
272 | + | let ar = valueOrErrorMessage(parseBigInt(ap), "externalTransfer: fee not int") | |
273 | + | let aa = if (if (if (if (if (if (if (if (V()) | |
274 | + | then t(L, "externalTransfer: invalid wallet") | |
279 | 275 | else false) | |
280 | - | then | |
276 | + | then t(M, "externalTransfer: invalid currency") | |
281 | 277 | else false) | |
282 | - | then | |
278 | + | then t(an, "externalTransfer: invalid from") | |
283 | 279 | else false) | |
284 | - | then | |
280 | + | then t(ao, "externalTransfer: invalid to") | |
285 | 281 | else false) | |
286 | - | then | |
282 | + | then q(ac, k, "externalTransfer: invalid amount") | |
287 | 283 | else false) | |
288 | - | then | |
284 | + | then q(ar, k, "externalTransfer: invalid fee") | |
289 | 285 | else false) | |
290 | - | then | |
286 | + | then t(aq, "externalTransfer: invalid dex") | |
291 | 287 | else false) | |
292 | - | then Z | |
288 | + | then Y(Z.caller, "externalTransfer: invalid matcher caller") | |
293 | 289 | else false | |
294 | - | if (( | |
290 | + | if ((aa == aa)) | |
295 | 291 | then { | |
296 | - | let | |
297 | - | let | |
298 | - | let | |
299 | - | let | |
300 | - | let | |
301 | - | let | |
302 | - | let | |
303 | - | if (( | |
304 | - | then $Tuple2((( | |
292 | + | let ag = J(an, L, M) | |
293 | + | let ah = J(ao, L, M) | |
294 | + | let as = J(aq, L, M) | |
295 | + | let ai = ((ag - ac) - ar) | |
296 | + | let aj = (ah + ac) | |
297 | + | let at = (as + ar) | |
298 | + | let ak = q(ai, k, "externalTransfer: insufficient amount") | |
299 | + | if ((ak == ak)) | |
300 | + | then $Tuple2(((N(an, L, M, ai) ++ N(ao, L, M, aj)) ++ N(aq, L, M, at)), unit) | |
305 | 301 | else throw("Strict value is not equal to itself.") | |
306 | 302 | } | |
307 | 303 | else throw("Strict value is not equal to itself.") | |
308 | 304 | } | |
309 | 305 | ||
310 | 306 | ||
311 | 307 | ||
312 | - | @Callable( | |
313 | - | func depositStakingReward ( | |
314 | - | let | |
315 | - | let | |
316 | - | then | |
308 | + | @Callable(Z) | |
309 | + | func depositStakingReward (aq,M,ab) = { | |
310 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "depositStakingReward: amount not int") | |
311 | + | let aa = if (if (if (if (V()) | |
312 | + | then t(aq, "depositStakingReward: invalid dex") | |
317 | 313 | else false) | |
318 | - | then | |
314 | + | then t(M, "depositStakingReward: invalid currency") | |
319 | 315 | else false) | |
320 | - | then | |
316 | + | then q(ac, k, "depositStakingReward: invalid amount") | |
321 | 317 | else false) | |
322 | - | then | |
318 | + | then W(Z.caller, "depositStakingReward: invalid caller") | |
323 | 319 | else false | |
324 | - | if (( | |
320 | + | if ((aa == aa)) | |
325 | 321 | then { | |
326 | - | let | |
327 | - | $Tuple2(( | |
322 | + | let ad = J(aq, j, M) | |
323 | + | $Tuple2((N(aq, j, M, (ad + ac)) ++ Q(M, (P(M) + ac))), unit) | |
328 | 324 | } | |
329 | 325 | else throw("Strict value is not equal to itself.") | |
330 | 326 | } | |
331 | 327 | ||
332 | 328 | ||
333 | 329 | ||
334 | - | @Callable( | |
335 | - | func claimReward ( | |
336 | - | let | |
337 | - | let | |
338 | - | then | |
330 | + | @Callable(Z) | |
331 | + | func claimReward (aq,K,M,ab) = { | |
332 | + | let ac = valueOrErrorMessage(parseBigInt(ab), "claimReward: amount not int") | |
333 | + | let aa = if (if (if (if (if (V()) | |
334 | + | then t(aq, "claimReward: invalid dex") | |
339 | 335 | else false) | |
340 | - | then | |
336 | + | then t(K, "claimReward: invalid user") | |
341 | 337 | else false) | |
342 | - | then | |
338 | + | then t(M, "claimReward: invalid currency") | |
343 | 339 | else false) | |
344 | - | then | |
340 | + | then q(ac, k, "claimReward: invalid amount") | |
345 | 341 | else false) | |
346 | - | then Z | |
342 | + | then Y(Z.caller, "claimReward: invalid matcher caller") | |
347 | 343 | else false | |
348 | - | if (( | |
344 | + | if ((aa == aa)) | |
349 | 345 | then { | |
350 | - | let | |
351 | - | let | |
352 | - | let | |
353 | - | let | |
354 | - | let | |
355 | - | if (( | |
356 | - | then $Tuple2(( | |
346 | + | let au = J(aq, j, M) | |
347 | + | let ah = J(K, i, M) | |
348 | + | let av = (au - ac) | |
349 | + | let aj = (ah + ac) | |
350 | + | let ak = q(av, k, "claimReward: insufficient amount") | |
351 | + | if ((ak == ak)) | |
352 | + | then $Tuple2((N(aq, j, M, av) ++ N(K, i, M, aj)), unit) | |
357 | 353 | else throw("Strict value is not equal to itself.") | |
358 | 354 | } | |
359 | 355 | else throw("Strict value is not equal to itself.") | |
360 | 356 | } | |
361 | 357 | ||
362 | 358 | ||
363 | 359 | ||
364 | - | @Callable( | |
365 | - | func getUserBalance (L,M | |
360 | + | @Callable(Z) | |
361 | + | func getUserBalance (K,L,M) = $Tuple2(nil, toString(J(K, L, M))) | |
366 | 362 | ||
367 | 363 | ||
368 | 364 | ||
369 | - | @Callable( | |
370 | - | func setMultisig ( | |
371 | - | let | |
372 | - | then | |
365 | + | @Callable(Z) | |
366 | + | func setMultisig (C) = { | |
367 | + | let aa = if (R(Z.caller)) | |
368 | + | then l(C, "setMultisig: invalid multisig") | |
373 | 369 | else false | |
374 | - | if (( | |
375 | - | then $Tuple2( | |
370 | + | if ((aa == aa)) | |
371 | + | then $Tuple2(B(addressFromStringValue(C)), unit) | |
376 | 372 | else throw("Strict value is not equal to itself.") | |
377 | 373 | } | |
378 | 374 | ||
379 | 375 | ||
380 | - | @Verifier( | |
381 | - | func | |
382 | - | let | |
383 | - | let | |
384 | - | if ($isInstanceOf( | |
376 | + | @Verifier(aw) | |
377 | + | func ax () = { | |
378 | + | let o = aw | |
379 | + | let ay = getString(b) | |
380 | + | if ($isInstanceOf(ay, "String")) | |
385 | 381 | then { | |
386 | - | let | |
387 | - | valueOrElse(getBoolean(addressFromStringValue( | |
382 | + | let az = ay | |
383 | + | valueOrElse(getBoolean(addressFromStringValue(az), makeString([c, toString(this), toBase58String(aw.id)], a)), false) | |
388 | 384 | } | |
389 | - | else sigVerify( | |
385 | + | else sigVerify(aw.bodyBytes, aw.proofs[0], aw.senderPublicKey) | |
390 | 386 | } | |
391 | 387 |
github/deemru/w8io/026f985 104.66 ms ◑