tx · A8x9rZyXp95QyYfHAvu9ewpFJU1fMKAB1Je8auYDMKni 3N6G8j53WGVsDVPR8R8GBxmsaqkML1ayNKV: -0.01700000 Waves 2023.05.10 13:16 [2571656] smart account 3N6G8j53WGVsDVPR8R8GBxmsaqkML1ayNKV > SELF 0.00000000 Waves
{ "type": 13, "id": "A8x9rZyXp95QyYfHAvu9ewpFJU1fMKAB1Je8auYDMKni", "fee": 1700000, "feeAssetId": null, "timestamp": 1683713806954, "version": 2, "chainId": 84, "sender": "3N6G8j53WGVsDVPR8R8GBxmsaqkML1ayNKV", "senderPublicKey": "G8swj2SJhdPvP3eHnoPqp9DM2w2LQJABHJSY3ygtNSSo", "proofs": [ "4F2h3bu5BzuSH1LM8f3e9arivvcLvhoP7y8bufQzDZUrPkZquYAT5kyB8TJ4MPCLGXvb2ocmcf5VYVUrwPLMUeJV" ], "script": "base64:BgLeEggCEgUKAwgIBBIFCgMIGAESBwoFEQgYAQESBgoECAgICBIGCgQICAgCEgUKAwgIBBIGCgQICAEBEgQKAggYEgMKAQgSABIECgIICBIDCgEIEgQKAggIIglzZXBhcmF0b3IiDGtleVd4QXNzZXRJZCITa2V5QmFja2VuZFB1YmxpY0tleSIba2V5RXhpc3RzUmVmZXJyZXJUb1JlZmVycmFsIgtwcm9ncmFtTmFtZSIPcmVmZXJyZXJBZGRyZXNzIg9yZWZlcnJhbEFkZHJlc3MiEmtleUNsYWltZWRSZWZlcnJlciIOY2xhaW1lckFkZHJlc3MiEmtleUNsYWltZWRSZWZlcnJhbCIUa2V5VW5jbGFpbWVkUmVmZXJyZXIiFGtleVVuY2xhaW1lZFJlZmVycmFsIgtrZXlSZWZlcnJlciIOa2V5UHJvZ3JhbU5hbWUiFWtleVRvdGFsUmVmZXJyYWxDb3VudCIWa2V5QWN0aXZlUmVmZXJyYWxDb3VudCITa2V5SXNSZWZlcnJhbEFjdGl2ZSIWa2V5Q2xhaW1lZFRvdGFsQWRkcmVzcyIHYWRkcmVzcyIYa2V5VW5j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WxzZQIJAJ8IAQkBAXQBBQJhdQAACQCUCgIFA25pbAkAzAgCBQJhagkAzAgCBQJhaQUDbmlsAVEBDHNldFRvdGFsS2V5cwIBZQFzBAJiSQkBC3ZhbHVlT3JFbHNlAgkAnwgBCQEBaAIFAWUFAXMAAAQCYkoJAQt2YWx1ZU9yRWxzZQIJAJ8IAQkBAWoCBQFlBQFzAAAEAmFBCQELdmFsdWVPckVsc2UCCQCfCAEJAQFrAgUBZQUBcwAABAJiSwkBC3ZhbHVlT3JFbHNlAgkAnwgBCQEBbAIFAWUFAXMAAAQCYWkJAGQCBQJiSQUCYkoEAmFqCQBkAgUCYUEFAmJLCQCUCgIJAMwIAgkBDEludGVnZXJFbnRyeQIJAQFyAQUBcwUCYWkJAMwIAgkBDEludGVnZXJFbnRyeQIJAQF0AQUBcwUCYWoFA25pbAUEdW5pdAECYkwBAmJNAAQCYk4EAUQJAQFOAAMJAAECBQFEAgpCeXRlVmVjdG9yBAFTBQFEBQFTAwkAAQIFAUQCBFVuaXQIBQJiTA9zZW5kZXJQdWJsaWNLZXkJAAIBAgtNYXRjaCBlcnJvcgkA9AMDCAUCYkwJYm9keUJ5dGVzCQCRAwIIBQJiTAZwcm9vZnMAAAUCYk44C0QG", "height": 2571656, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6avgBrkSjVmTjA6vuNDMQP7TyUeeSVWT4hYJptRQpNPJ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
68 | 68 | func B () = "%s__managerVaultAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | - | func C () = addressFromStringValue(getStringValue(B())) | |
71 | + | func C () = { | |
72 | + | let D = getString(B()) | |
73 | + | if ($isInstanceOf(D, "String")) | |
74 | + | then { | |
75 | + | let E = D | |
76 | + | addressFromStringValue(E) | |
77 | + | } | |
78 | + | else this | |
79 | + | } | |
72 | 80 | ||
73 | 81 | ||
74 | - | func | |
82 | + | func F (e,G,H,I) = makeString(["%s%s%s%s%s", "history", I, e, G, H], a) | |
75 | 83 | ||
76 | 84 | ||
77 | - | func | |
85 | + | func J (K) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(K)], a) | |
78 | 86 | ||
79 | 87 | ||
80 | - | func | |
88 | + | func L (M) = throw(makeString(["referral.ride:", M], " ")) | |
81 | 89 | ||
82 | 90 | ||
83 | - | func | |
84 | - | let | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
91 | + | func N () = { | |
92 | + | let O = C() | |
93 | + | let D = getString(O, A()) | |
94 | + | if ($isInstanceOf(D, "String")) | |
87 | 95 | then { | |
88 | - | let | |
89 | - | fromBase58String( | |
96 | + | let E = D | |
97 | + | fromBase58String(E) | |
90 | 98 | } | |
91 | - | else if ($isInstanceOf( | |
99 | + | else if ($isInstanceOf(D, "Unit")) | |
92 | 100 | then unit | |
93 | 101 | else throw("Match error") | |
94 | 102 | } | |
95 | 103 | ||
96 | 104 | ||
97 | 105 | func P (Q) = { | |
98 | - | let R = | |
99 | - | let | |
100 | - | if ($isInstanceOf( | |
106 | + | let R = L("permission denied") | |
107 | + | let D = N() | |
108 | + | if ($isInstanceOf(D, "ByteVector")) | |
101 | 109 | then { | |
102 | - | let S = | |
110 | + | let S = D | |
103 | 111 | if ((Q.callerPublicKey == S)) | |
104 | 112 | then true | |
105 | 113 | else R | |
106 | 114 | } | |
107 | - | else if ($isInstanceOf( | |
115 | + | else if ($isInstanceOf(D, "Unit")) | |
108 | 116 | then if ((Q.caller == this)) | |
109 | 117 | then true | |
110 | 118 | else R | |
130 | 138 | func claimInternal (e,i,X) = { | |
131 | 139 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
132 | 140 | then true | |
133 | - | else | |
141 | + | else L("program does not exist") | |
134 | 142 | if ((Y == Y)) | |
135 | 143 | then { | |
136 | 144 | let Z = if (X) | |
137 | - | then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), | |
138 | - | else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), | |
145 | + | then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), F(e, i, toBase58String(Q.transactionId), "claimReferral")) | |
146 | + | else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), F(e, i, toBase58String(Q.transactionId), "claimReferrer")) | |
139 | 147 | let aa = Z._1 | |
140 | 148 | let ab = Z._2 | |
141 | 149 | let ac = Z._3 | |
153 | 161 | else { | |
154 | 162 | let ak = if ((ab > 0)) | |
155 | 163 | then true | |
156 | - | else | |
164 | + | else L("nothing to claim") | |
157 | 165 | if ((ak == ak)) | |
158 | 166 | then { | |
159 | 167 | let al = (aa + ab) | |
174 | 182 | then { | |
175 | 183 | let at = if ((as == ab)) | |
176 | 184 | then true | |
177 | - | else | |
185 | + | else L("insufficient balance on referral contract") | |
178 | 186 | if ((at == at)) | |
179 | - | then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, | |
187 | + | then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, J(ab))], ab) | |
180 | 188 | else throw("Strict value is not equal to itself.") | |
181 | 189 | } | |
182 | 190 | else throw("Strict value is not equal to itself.") | |
199 | 207 | func claimBulkInternal (au,av,aw) = { | |
200 | 208 | let ax = if ((Q.caller == this)) | |
201 | 209 | then true | |
202 | - | else | |
210 | + | else L("permission denied") | |
203 | 211 | if ((ax == ax)) | |
204 | 212 | then if ((aw == size(av))) | |
205 | 213 | then nil | |
206 | 214 | else { | |
207 | 215 | let e = av[aw] | |
208 | 216 | let ay = valueOrElse(getInteger(k(e, au)), 0) | |
209 | - | let ae = | |
217 | + | let ae = F(e, au, toBase58String(Q.transactionId), "claimBulk") | |
210 | 218 | let az = invoke(this, "claimBulkInternal", [au, av, (aw + 1)], nil) | |
211 | 219 | if ((az == az)) | |
212 | 220 | then { | |
229 | 237 | func incUnclaimedWithPaymentInternal (aC,e,aD,aw,aE) = { | |
230 | 238 | let ax = if ((Q.caller == this)) | |
231 | 239 | then true | |
232 | - | else | |
240 | + | else L("permission denied") | |
233 | 241 | if ((ax == ax)) | |
234 | 242 | then { | |
235 | 243 | let aF = (size(aC) == size(aD)) | |
236 | 244 | let aG = if (aF) | |
237 | 245 | then true | |
238 | - | else | |
246 | + | else L("lists in args must be same size") | |
239 | 247 | if ((aG == aG)) | |
240 | 248 | then if ((aw == size(aC))) | |
241 | 249 | then $Tuple2(nil, aE) | |
269 | 277 | then { | |
270 | 278 | let aO = if ((getBoolean(n(e)) == unit)) | |
271 | 279 | then true | |
272 | - | else | |
280 | + | else L("program name already exists") | |
273 | 281 | if ((aO == aO)) | |
274 | 282 | then { | |
275 | 283 | let aP = if (!(contains(e, a))) | |
277 | 285 | else false | |
278 | 286 | let Y = if (aP) | |
279 | 287 | then true | |
280 | - | else | |
288 | + | else L("invalid program name") | |
281 | 289 | if ((Y == Y)) | |
282 | 290 | then { | |
283 | 291 | let aQ = if ((assetInfo(fromBase58String(ah)) != unit)) | |
284 | 292 | then true | |
285 | - | else | |
293 | + | else L("invalid reward asset id") | |
286 | 294 | if ((aQ == aQ)) | |
287 | 295 | then $Tuple2([BooleanEntry(n(e), true), StringEntry(x(e), ag), StringEntry(y(e), aN), StringEntry(w(e), ah), IntegerEntry(v(e), 0)], unit) | |
288 | 296 | else throw("Strict value is not equal to itself.") | |
300 | 308 | func createPair (e,f,g,aR) = { | |
301 | 309 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
302 | 310 | then true | |
303 | - | else | |
311 | + | else L("program does not exist") | |
304 | 312 | if ((Y == Y)) | |
305 | 313 | then { | |
306 | 314 | let aS = if ((getBoolean(d(e, f, g)) == unit)) | |
307 | 315 | then true | |
308 | - | else | |
316 | + | else L("pair already exists") | |
309 | 317 | if ((aS == aS)) | |
310 | 318 | then { | |
311 | 319 | let aT = if ((f != g)) | |
312 | 320 | then true | |
313 | - | else | |
321 | + | else L("cannot refer to self") | |
314 | 322 | if ((aT == aT)) | |
315 | 323 | then { | |
316 | 324 | let aU = toBytes(makeString([e, f, g], ":")) | |
317 | 325 | let aV = fromBase58String(value(getString(c))) | |
318 | 326 | let aW = if (sigVerify(aU, aR, aV)) | |
319 | 327 | then true | |
320 | - | else | |
328 | + | else L("bad signature") | |
321 | 329 | if ((aW == aW)) | |
322 | 330 | then { | |
323 | 331 | let aX = valueOrElse(getInteger(o(e, f)), 0) | |
344 | 352 | let f = value(getString(m(e, g))) | |
345 | 353 | let ax = if ((toString(Q.caller) == aN)) | |
346 | 354 | then true | |
347 | - | else | |
355 | + | else L("permission denied") | |
348 | 356 | if ((ax == ax)) | |
349 | 357 | then { | |
350 | 358 | let bb = if ((ba == aZ)) | |
374 | 382 | let f = value(getString(m(e, g))) | |
375 | 383 | let ax = if ((toString(Q.caller) == aN)) | |
376 | 384 | then true | |
377 | - | else | |
385 | + | else L("permission denied") | |
378 | 386 | if ((ax == ax)) | |
379 | 387 | then { | |
380 | 388 | let bf = if ((e == "wxlock")) | |
381 | 389 | then true | |
382 | - | else | |
390 | + | else L("invalid program") | |
383 | 391 | if ((bf == bf)) | |
384 | 392 | then { | |
385 | 393 | let bg = if (contains(valueOrElse(getString(z(f)), ""), e)) | |
386 | 394 | then true | |
387 | - | else | |
395 | + | else L(((("referrer not in program=" + e) + " addr=") + f)) | |
388 | 396 | if ((bg == bg)) | |
389 | 397 | then { | |
390 | 398 | let bh = if (contains(valueOrElse(getString(z(g)), ""), e)) | |
391 | 399 | then true | |
392 | - | else | |
400 | + | else L(((("referral not in program=" + e) + " addr=") + g)) | |
393 | 401 | if ((bh == bh)) | |
394 | 402 | then { | |
395 | 403 | let bi = valueOrElse(getInteger(t(f)), 0) | |
418 | 426 | func incUnclaimedWithPayment (e,aD) = { | |
419 | 427 | let bf = if ((e == "wxSpotFee")) | |
420 | 428 | then true | |
421 | - | else | |
429 | + | else L("invalid program") | |
422 | 430 | if ((bf == bf)) | |
423 | 431 | then { | |
424 | 432 | func bo (bp,bq) = { | |
425 | 433 | let br = (toBase58String(value(bq.assetId)) == value(getString(w(e)))) | |
426 | 434 | let bs = if (br) | |
427 | 435 | then true | |
428 | - | else | |
436 | + | else L("invalid asset id") | |
429 | 437 | if ((bs == bs)) | |
430 | 438 | then (bp :+ bq.amount) | |
431 | 439 | else throw("Strict value is not equal to itself.") | |
468 | 476 | func claim (e) = { | |
469 | 477 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
470 | 478 | then true | |
471 | - | else | |
479 | + | else L("program does not exist") | |
472 | 480 | if ((Y == Y)) | |
473 | 481 | then { | |
474 | 482 | let X = (toString(Q.caller) == value(getString(y(e)))) | |
491 | 499 | let bE = getString(z(toString(Q.caller))) | |
492 | 500 | let bF = if (isDefined(bE)) | |
493 | 501 | then true | |
494 | - | else | |
502 | + | else L("no referral programs") | |
495 | 503 | if ((bF == bF)) | |
496 | 504 | then { | |
497 | 505 | let bG = split(value(bE), "__") | |
506 | 514 | ||
507 | 515 | ||
508 | 516 | @Callable(Q) | |
509 | - | func claimREADONLY (e, | |
510 | - | let aa = valueOrElse(getInteger(h(e, | |
511 | - | let ab = valueOrElse(getInteger(k(e, | |
517 | + | func claimREADONLY (e,G) = { | |
518 | + | let aa = valueOrElse(getInteger(h(e, G)), 0) | |
519 | + | let ab = valueOrElse(getInteger(k(e, G)), 0) | |
512 | 520 | $Tuple2(nil, [ab, aa]) | |
513 | 521 | } | |
514 | 522 | ||
538 | 546 | @Verifier(bL) | |
539 | 547 | func bM () = { | |
540 | 548 | let bN = { | |
541 | - | let | |
542 | - | if ($isInstanceOf( | |
549 | + | let D = N() | |
550 | + | if ($isInstanceOf(D, "ByteVector")) | |
543 | 551 | then { | |
544 | - | let S = | |
552 | + | let S = D | |
545 | 553 | S | |
546 | 554 | } | |
547 | - | else if ($isInstanceOf( | |
555 | + | else if ($isInstanceOf(D, "Unit")) | |
548 | 556 | then bL.senderPublicKey | |
549 | 557 | else throw("Match error") | |
550 | 558 | } |
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 | func b () = makeString(["%s", "wxAssetId"], a) | |
7 | 7 | ||
8 | 8 | ||
9 | 9 | let c = makeString(["%s", "backendPublicKey"], a) | |
10 | 10 | ||
11 | 11 | func d (e,f,g) = makeString(["%s%s%s%s", "existsReferrerToReferral", e, f, g], a) | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | func h (e,i) = makeString(["%s%s%s", "claimedReferrer", e, i], a) | |
15 | 15 | ||
16 | 16 | ||
17 | 17 | func j (e,i) = makeString(["%s%s%s", "claimedReferral", e, i], a) | |
18 | 18 | ||
19 | 19 | ||
20 | 20 | func k (e,i) = makeString(["%s%s%s", "unclaimedReferrer", e, i], a) | |
21 | 21 | ||
22 | 22 | ||
23 | 23 | func l (e,i) = makeString(["%s%s%s", "unclaimedReferral", e, i], a) | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func m (e,g) = makeString(["%s%s%s", "referrer", e, g], a) | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | func n (e) = makeString(["%s%s", "programName", e], a) | |
30 | 30 | ||
31 | 31 | ||
32 | 32 | func o (e,f) = makeString(["%s%s%s", "totalReferralCount", e, f], a) | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | func p (e,f) = makeString(["%s%s%s", "activeReferralCount", e, f], a) | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func q (e,g) = makeString(["%s%s%s", "activeReferral", e, g], a) | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func r (s) = makeString(["%s%s", "claimedTotalAddress", s], a) | |
42 | 42 | ||
43 | 43 | ||
44 | 44 | func t (s) = makeString(["%s%s", "unclaimedTotalAddress", s], a) | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func u (e) = makeString(["%s%s", "claimedTotal", e], a) | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func v (e) = makeString(["%s%s", "rewardsTotal", e], a) | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func w (e) = makeString(["%s%s", "rewardAssetId", e], a) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func x (e) = makeString(["%s%s", "treasuryContract", e], a) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func y (e) = makeString(["%s%s", "implementationContract", e], a) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func z (s) = makeString(["%s%s", "allReferralPrograms", s], a) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func A () = "%s__managerPublicKey" | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func B () = "%s__managerVaultAddress" | |
69 | 69 | ||
70 | 70 | ||
71 | - | func C () = addressFromStringValue(getStringValue(B())) | |
71 | + | func C () = { | |
72 | + | let D = getString(B()) | |
73 | + | if ($isInstanceOf(D, "String")) | |
74 | + | then { | |
75 | + | let E = D | |
76 | + | addressFromStringValue(E) | |
77 | + | } | |
78 | + | else this | |
79 | + | } | |
72 | 80 | ||
73 | 81 | ||
74 | - | func | |
82 | + | func F (e,G,H,I) = makeString(["%s%s%s%s%s", "history", I, e, G, H], a) | |
75 | 83 | ||
76 | 84 | ||
77 | - | func | |
85 | + | func J (K) = makeString(["%d%d%d", toString(lastBlock.height), toString(lastBlock.timestamp), toString(K)], a) | |
78 | 86 | ||
79 | 87 | ||
80 | - | func | |
88 | + | func L (M) = throw(makeString(["referral.ride:", M], " ")) | |
81 | 89 | ||
82 | 90 | ||
83 | - | func | |
84 | - | let | |
85 | - | let | |
86 | - | if ($isInstanceOf( | |
91 | + | func N () = { | |
92 | + | let O = C() | |
93 | + | let D = getString(O, A()) | |
94 | + | if ($isInstanceOf(D, "String")) | |
87 | 95 | then { | |
88 | - | let | |
89 | - | fromBase58String( | |
96 | + | let E = D | |
97 | + | fromBase58String(E) | |
90 | 98 | } | |
91 | - | else if ($isInstanceOf( | |
99 | + | else if ($isInstanceOf(D, "Unit")) | |
92 | 100 | then unit | |
93 | 101 | else throw("Match error") | |
94 | 102 | } | |
95 | 103 | ||
96 | 104 | ||
97 | 105 | func P (Q) = { | |
98 | - | let R = | |
99 | - | let | |
100 | - | if ($isInstanceOf( | |
106 | + | let R = L("permission denied") | |
107 | + | let D = N() | |
108 | + | if ($isInstanceOf(D, "ByteVector")) | |
101 | 109 | then { | |
102 | - | let S = | |
110 | + | let S = D | |
103 | 111 | if ((Q.callerPublicKey == S)) | |
104 | 112 | then true | |
105 | 113 | else R | |
106 | 114 | } | |
107 | - | else if ($isInstanceOf( | |
115 | + | else if ($isInstanceOf(D, "Unit")) | |
108 | 116 | then if ((Q.caller == this)) | |
109 | 117 | then true | |
110 | 118 | else R | |
111 | 119 | else throw("Match error") | |
112 | 120 | } | |
113 | 121 | ||
114 | 122 | ||
115 | 123 | func T (s,e) = { | |
116 | 124 | let U = valueOrElse(getString(z(s)), "") | |
117 | 125 | let V = if (contains(U, e)) | |
118 | 126 | then nil | |
119 | 127 | else { | |
120 | 128 | let W = if ((U == "")) | |
121 | 129 | then e | |
122 | 130 | else makeString([U, e], a) | |
123 | 131 | [StringEntry(z(s), W)] | |
124 | 132 | } | |
125 | 133 | V | |
126 | 134 | } | |
127 | 135 | ||
128 | 136 | ||
129 | 137 | @Callable(Q) | |
130 | 138 | func claimInternal (e,i,X) = { | |
131 | 139 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
132 | 140 | then true | |
133 | - | else | |
141 | + | else L("program does not exist") | |
134 | 142 | if ((Y == Y)) | |
135 | 143 | then { | |
136 | 144 | let Z = if (X) | |
137 | - | then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), | |
138 | - | else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), | |
145 | + | then $Tuple5(valueOrElse(getInteger(j(e, i)), 0), valueOrElse(getInteger(l(e, i)), 0), j(e, i), l(e, i), F(e, i, toBase58String(Q.transactionId), "claimReferral")) | |
146 | + | else $Tuple5(valueOrElse(getInteger(h(e, i)), 0), valueOrElse(getInteger(k(e, i)), 0), h(e, i), k(e, i), F(e, i, toBase58String(Q.transactionId), "claimReferrer")) | |
139 | 147 | let aa = Z._1 | |
140 | 148 | let ab = Z._2 | |
141 | 149 | let ac = Z._3 | |
142 | 150 | let ad = Z._4 | |
143 | 151 | let ae = Z._5 | |
144 | 152 | let af = valueOrElse(getInteger(u(e)), 0) | |
145 | 153 | let ag = value(addressFromString(value(getString(x(e))))) | |
146 | 154 | let ah = fromBase58String(value(getString(w(e)))) | |
147 | 155 | let ai = valueOrElse(getInteger(r(i)), 0) | |
148 | 156 | let aj = valueOrElse(getInteger(t(i)), 0) | |
149 | 157 | if (if (X) | |
150 | 158 | then (ab == 0) | |
151 | 159 | else false) | |
152 | 160 | then $Tuple2(nil, 0) | |
153 | 161 | else { | |
154 | 162 | let ak = if ((ab > 0)) | |
155 | 163 | then true | |
156 | - | else | |
164 | + | else L("nothing to claim") | |
157 | 165 | if ((ak == ak)) | |
158 | 166 | then { | |
159 | 167 | let al = (aa + ab) | |
160 | 168 | let am = (af + ab) | |
161 | 169 | let an = (ai + ab) | |
162 | 170 | let ao = (aj - ab) | |
163 | 171 | let ap = value(assetBalance(this, ah)) | |
164 | 172 | if ((ap == ap)) | |
165 | 173 | then { | |
166 | 174 | let aq = invoke(ag, "withdrawReferralReward", [ab], nil) | |
167 | 175 | if ((aq == aq)) | |
168 | 176 | then { | |
169 | 177 | let ar = value(assetBalance(this, ah)) | |
170 | 178 | if ((ar == ar)) | |
171 | 179 | then { | |
172 | 180 | let as = (ar - ap) | |
173 | 181 | if ((as == as)) | |
174 | 182 | then { | |
175 | 183 | let at = if ((as == ab)) | |
176 | 184 | then true | |
177 | - | else | |
185 | + | else L("insufficient balance on referral contract") | |
178 | 186 | if ((at == at)) | |
179 | - | then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, | |
187 | + | then $Tuple2([IntegerEntry(ac, al), IntegerEntry(ad, 0), IntegerEntry(u(e), am), IntegerEntry(r(i), an), IntegerEntry(t(i), ao), ScriptTransfer(addressFromStringValue(i), ab, ah), StringEntry(ae, J(ab))], ab) | |
180 | 188 | else throw("Strict value is not equal to itself.") | |
181 | 189 | } | |
182 | 190 | else throw("Strict value is not equal to itself.") | |
183 | 191 | } | |
184 | 192 | else throw("Strict value is not equal to itself.") | |
185 | 193 | } | |
186 | 194 | else throw("Strict value is not equal to itself.") | |
187 | 195 | } | |
188 | 196 | else throw("Strict value is not equal to itself.") | |
189 | 197 | } | |
190 | 198 | else throw("Strict value is not equal to itself.") | |
191 | 199 | } | |
192 | 200 | } | |
193 | 201 | else throw("Strict value is not equal to itself.") | |
194 | 202 | } | |
195 | 203 | ||
196 | 204 | ||
197 | 205 | ||
198 | 206 | @Callable(Q) | |
199 | 207 | func claimBulkInternal (au,av,aw) = { | |
200 | 208 | let ax = if ((Q.caller == this)) | |
201 | 209 | then true | |
202 | - | else | |
210 | + | else L("permission denied") | |
203 | 211 | if ((ax == ax)) | |
204 | 212 | then if ((aw == size(av))) | |
205 | 213 | then nil | |
206 | 214 | else { | |
207 | 215 | let e = av[aw] | |
208 | 216 | let ay = valueOrElse(getInteger(k(e, au)), 0) | |
209 | - | let ae = | |
217 | + | let ae = F(e, au, toBase58String(Q.transactionId), "claimBulk") | |
210 | 218 | let az = invoke(this, "claimBulkInternal", [au, av, (aw + 1)], nil) | |
211 | 219 | if ((az == az)) | |
212 | 220 | then { | |
213 | 221 | let aA = valueOrElse(getInteger(k(e, au)), 0) | |
214 | 222 | let aB = if ((aA > 0)) | |
215 | 223 | then invoke(this, "claimInternal", [e, au, false], nil) | |
216 | 224 | else unit | |
217 | 225 | if ((aB == aB)) | |
218 | 226 | then $Tuple2(nil, [az, aB]) | |
219 | 227 | else throw("Strict value is not equal to itself.") | |
220 | 228 | } | |
221 | 229 | else throw("Strict value is not equal to itself.") | |
222 | 230 | } | |
223 | 231 | else throw("Strict value is not equal to itself.") | |
224 | 232 | } | |
225 | 233 | ||
226 | 234 | ||
227 | 235 | ||
228 | 236 | @Callable(Q) | |
229 | 237 | func incUnclaimedWithPaymentInternal (aC,e,aD,aw,aE) = { | |
230 | 238 | let ax = if ((Q.caller == this)) | |
231 | 239 | then true | |
232 | - | else | |
240 | + | else L("permission denied") | |
233 | 241 | if ((ax == ax)) | |
234 | 242 | then { | |
235 | 243 | let aF = (size(aC) == size(aD)) | |
236 | 244 | let aG = if (aF) | |
237 | 245 | then true | |
238 | - | else | |
246 | + | else L("lists in args must be same size") | |
239 | 247 | if ((aG == aG)) | |
240 | 248 | then if ((aw == size(aC))) | |
241 | 249 | then $Tuple2(nil, aE) | |
242 | 250 | else { | |
243 | 251 | let f = aD[aw] | |
244 | 252 | let aj = valueOrElse(getInteger(t(f)), 0) | |
245 | 253 | let aH = valueOrElse(getInteger(k(e, f)), 0) | |
246 | 254 | let aI = valueOrElse(getInteger(v(e)), 0) | |
247 | 255 | let ao = (aj + aC[aw]) | |
248 | 256 | let aJ = (aH + aC[aw]) | |
249 | 257 | let aK = (aE + aC[aw]) | |
250 | 258 | let aL = invoke(this, "incUnclaimedWithPaymentInternal", [aC, e, aD, (aw + 1), aK], nil) | |
251 | 259 | if ((aL == aL)) | |
252 | 260 | then { | |
253 | 261 | let aM = T(f, e) | |
254 | 262 | $Tuple2(([IntegerEntry(t(f), ao), IntegerEntry(k(e, f), aJ), IntegerEntry(v(e), (aI + aC[aw]))] ++ aM), aL) | |
255 | 263 | } | |
256 | 264 | else throw("Strict value is not equal to itself.") | |
257 | 265 | } | |
258 | 266 | else throw("Strict value is not equal to itself.") | |
259 | 267 | } | |
260 | 268 | else throw("Strict value is not equal to itself.") | |
261 | 269 | } | |
262 | 270 | ||
263 | 271 | ||
264 | 272 | ||
265 | 273 | @Callable(Q) | |
266 | 274 | func createReferralProgram (e,ag,aN,ah) = { | |
267 | 275 | let ax = P(Q) | |
268 | 276 | if ((ax == ax)) | |
269 | 277 | then { | |
270 | 278 | let aO = if ((getBoolean(n(e)) == unit)) | |
271 | 279 | then true | |
272 | - | else | |
280 | + | else L("program name already exists") | |
273 | 281 | if ((aO == aO)) | |
274 | 282 | then { | |
275 | 283 | let aP = if (!(contains(e, a))) | |
276 | 284 | then !(contains(e, " ")) | |
277 | 285 | else false | |
278 | 286 | let Y = if (aP) | |
279 | 287 | then true | |
280 | - | else | |
288 | + | else L("invalid program name") | |
281 | 289 | if ((Y == Y)) | |
282 | 290 | then { | |
283 | 291 | let aQ = if ((assetInfo(fromBase58String(ah)) != unit)) | |
284 | 292 | then true | |
285 | - | else | |
293 | + | else L("invalid reward asset id") | |
286 | 294 | if ((aQ == aQ)) | |
287 | 295 | then $Tuple2([BooleanEntry(n(e), true), StringEntry(x(e), ag), StringEntry(y(e), aN), StringEntry(w(e), ah), IntegerEntry(v(e), 0)], unit) | |
288 | 296 | else throw("Strict value is not equal to itself.") | |
289 | 297 | } | |
290 | 298 | else throw("Strict value is not equal to itself.") | |
291 | 299 | } | |
292 | 300 | else throw("Strict value is not equal to itself.") | |
293 | 301 | } | |
294 | 302 | else throw("Strict value is not equal to itself.") | |
295 | 303 | } | |
296 | 304 | ||
297 | 305 | ||
298 | 306 | ||
299 | 307 | @Callable(Q) | |
300 | 308 | func createPair (e,f,g,aR) = { | |
301 | 309 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
302 | 310 | then true | |
303 | - | else | |
311 | + | else L("program does not exist") | |
304 | 312 | if ((Y == Y)) | |
305 | 313 | then { | |
306 | 314 | let aS = if ((getBoolean(d(e, f, g)) == unit)) | |
307 | 315 | then true | |
308 | - | else | |
316 | + | else L("pair already exists") | |
309 | 317 | if ((aS == aS)) | |
310 | 318 | then { | |
311 | 319 | let aT = if ((f != g)) | |
312 | 320 | then true | |
313 | - | else | |
321 | + | else L("cannot refer to self") | |
314 | 322 | if ((aT == aT)) | |
315 | 323 | then { | |
316 | 324 | let aU = toBytes(makeString([e, f, g], ":")) | |
317 | 325 | let aV = fromBase58String(value(getString(c))) | |
318 | 326 | let aW = if (sigVerify(aU, aR, aV)) | |
319 | 327 | then true | |
320 | - | else | |
328 | + | else L("bad signature") | |
321 | 329 | if ((aW == aW)) | |
322 | 330 | then { | |
323 | 331 | let aX = valueOrElse(getInteger(o(e, f)), 0) | |
324 | 332 | let aY = (aX + 1) | |
325 | 333 | let aM = T(f, e) | |
326 | 334 | let V = T(g, e) | |
327 | 335 | $Tuple2((([BooleanEntry(d(e, f, g), true), IntegerEntry(o(e, f), aY), StringEntry(m(e, g), f)] ++ aM) ++ V), unit) | |
328 | 336 | } | |
329 | 337 | else throw("Strict value is not equal to itself.") | |
330 | 338 | } | |
331 | 339 | else throw("Strict value is not equal to itself.") | |
332 | 340 | } | |
333 | 341 | else throw("Strict value is not equal to itself.") | |
334 | 342 | } | |
335 | 343 | else throw("Strict value is not equal to itself.") | |
336 | 344 | } | |
337 | 345 | ||
338 | 346 | ||
339 | 347 | ||
340 | 348 | @Callable(Q) | |
341 | 349 | func updateReferralActivity (e,g,aZ) = { | |
342 | 350 | let aN = value(getString(y(e))) | |
343 | 351 | let ba = (getBoolean(q(e, g)) != unit) | |
344 | 352 | let f = value(getString(m(e, g))) | |
345 | 353 | let ax = if ((toString(Q.caller) == aN)) | |
346 | 354 | then true | |
347 | - | else | |
355 | + | else L("permission denied") | |
348 | 356 | if ((ax == ax)) | |
349 | 357 | then { | |
350 | 358 | let bb = if ((ba == aZ)) | |
351 | 359 | then $Tuple2(nil, unit) | |
352 | 360 | else { | |
353 | 361 | let bb = if ((aZ == true)) | |
354 | 362 | then { | |
355 | 363 | let bc = (valueOrElse(getInteger(p(e, f)), 0) + 1) | |
356 | 364 | $Tuple2([BooleanEntry(q(e, g), true), IntegerEntry(p(e, f), bc)], unit) | |
357 | 365 | } | |
358 | 366 | else { | |
359 | 367 | let bc = (valueOrElse(getInteger(p(e, f)), 0) - 1) | |
360 | 368 | $Tuple2([DeleteEntry(q(e, g)), IntegerEntry(p(e, f), bc)], unit) | |
361 | 369 | } | |
362 | 370 | bb | |
363 | 371 | } | |
364 | 372 | bb | |
365 | 373 | } | |
366 | 374 | else throw("Strict value is not equal to itself.") | |
367 | 375 | } | |
368 | 376 | ||
369 | 377 | ||
370 | 378 | ||
371 | 379 | @Callable(Q) | |
372 | 380 | func incUnclaimed (e,g,bd,be) = { | |
373 | 381 | let aN = value(getString(y(e))) | |
374 | 382 | let f = value(getString(m(e, g))) | |
375 | 383 | let ax = if ((toString(Q.caller) == aN)) | |
376 | 384 | then true | |
377 | - | else | |
385 | + | else L("permission denied") | |
378 | 386 | if ((ax == ax)) | |
379 | 387 | then { | |
380 | 388 | let bf = if ((e == "wxlock")) | |
381 | 389 | then true | |
382 | - | else | |
390 | + | else L("invalid program") | |
383 | 391 | if ((bf == bf)) | |
384 | 392 | then { | |
385 | 393 | let bg = if (contains(valueOrElse(getString(z(f)), ""), e)) | |
386 | 394 | then true | |
387 | - | else | |
395 | + | else L(((("referrer not in program=" + e) + " addr=") + f)) | |
388 | 396 | if ((bg == bg)) | |
389 | 397 | then { | |
390 | 398 | let bh = if (contains(valueOrElse(getString(z(g)), ""), e)) | |
391 | 399 | then true | |
392 | - | else | |
400 | + | else L(((("referral not in program=" + e) + " addr=") + g)) | |
393 | 401 | if ((bh == bh)) | |
394 | 402 | then { | |
395 | 403 | let bi = valueOrElse(getInteger(t(f)), 0) | |
396 | 404 | let aH = valueOrElse(getInteger(k(e, f)), 0) | |
397 | 405 | let bj = valueOrElse(getInteger(t(g)), 0) | |
398 | 406 | let bk = valueOrElse(getInteger(l(e, g)), 0) | |
399 | 407 | let aI = valueOrElse(getInteger(v(e)), 0) | |
400 | 408 | let bl = (bi + bd) | |
401 | 409 | let aJ = (aH + bd) | |
402 | 410 | let bm = (bj + be) | |
403 | 411 | let bn = (bk + be) | |
404 | 412 | $Tuple2([IntegerEntry(t(f), bl), IntegerEntry(t(g), bm), IntegerEntry(k(e, f), aJ), IntegerEntry(l(e, g), bn), IntegerEntry(v(e), ((aI + bd) + be))], unit) | |
405 | 413 | } | |
406 | 414 | else throw("Strict value is not equal to itself.") | |
407 | 415 | } | |
408 | 416 | else throw("Strict value is not equal to itself.") | |
409 | 417 | } | |
410 | 418 | else throw("Strict value is not equal to itself.") | |
411 | 419 | } | |
412 | 420 | else throw("Strict value is not equal to itself.") | |
413 | 421 | } | |
414 | 422 | ||
415 | 423 | ||
416 | 424 | ||
417 | 425 | @Callable(Q) | |
418 | 426 | func incUnclaimedWithPayment (e,aD) = { | |
419 | 427 | let bf = if ((e == "wxSpotFee")) | |
420 | 428 | then true | |
421 | - | else | |
429 | + | else L("invalid program") | |
422 | 430 | if ((bf == bf)) | |
423 | 431 | then { | |
424 | 432 | func bo (bp,bq) = { | |
425 | 433 | let br = (toBase58String(value(bq.assetId)) == value(getString(w(e)))) | |
426 | 434 | let bs = if (br) | |
427 | 435 | then true | |
428 | - | else | |
436 | + | else L("invalid asset id") | |
429 | 437 | if ((bs == bs)) | |
430 | 438 | then (bp :+ bq.amount) | |
431 | 439 | else throw("Strict value is not equal to itself.") | |
432 | 440 | } | |
433 | 441 | ||
434 | 442 | let bt = { | |
435 | 443 | let bu = Q.payments | |
436 | 444 | let bv = size(bu) | |
437 | 445 | let bw = nil | |
438 | 446 | func bx (by,bz) = if ((bz >= bv)) | |
439 | 447 | then by | |
440 | 448 | else bo(by, bu[bz]) | |
441 | 449 | ||
442 | 450 | func bA (by,bz) = if ((bz >= bv)) | |
443 | 451 | then by | |
444 | 452 | else throw("List size exceeds 10") | |
445 | 453 | ||
446 | 454 | bA(bx(bx(bx(bx(bx(bx(bx(bx(bx(bx(bw, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10) | |
447 | 455 | } | |
448 | 456 | let aE = { | |
449 | 457 | let bB = invoke(this, "incUnclaimedWithPaymentInternal", [bt, e, aD, 0, 0], nil) | |
450 | 458 | if ($isInstanceOf(bB, "Int")) | |
451 | 459 | then bB | |
452 | 460 | else throw(($getType(bB) + " couldn't be cast to Int")) | |
453 | 461 | } | |
454 | 462 | if ((aE == aE)) | |
455 | 463 | then { | |
456 | 464 | let ag = addressFromStringValue(value(getString(x(e)))) | |
457 | 465 | let ah = fromBase58String(value(getString(w(e)))) | |
458 | 466 | [ScriptTransfer(ag, aE, ah)] | |
459 | 467 | } | |
460 | 468 | else throw("Strict value is not equal to itself.") | |
461 | 469 | } | |
462 | 470 | else throw("Strict value is not equal to itself.") | |
463 | 471 | } | |
464 | 472 | ||
465 | 473 | ||
466 | 474 | ||
467 | 475 | @Callable(Q) | |
468 | 476 | func claim (e) = { | |
469 | 477 | let Y = if (valueOrElse(getBoolean(n(e)), false)) | |
470 | 478 | then true | |
471 | - | else | |
479 | + | else L("program does not exist") | |
472 | 480 | if ((Y == Y)) | |
473 | 481 | then { | |
474 | 482 | let X = (toString(Q.caller) == value(getString(y(e)))) | |
475 | 483 | let i = if (X) | |
476 | 484 | then toString(Q.originCaller) | |
477 | 485 | else toString(Q.caller) | |
478 | 486 | let bC = invoke(this, "claimInternal", [e, i, X], nil) | |
479 | 487 | if ((bC == bC)) | |
480 | 488 | then $Tuple2(nil, bC) | |
481 | 489 | else throw("Strict value is not equal to itself.") | |
482 | 490 | } | |
483 | 491 | else throw("Strict value is not equal to itself.") | |
484 | 492 | } | |
485 | 493 | ||
486 | 494 | ||
487 | 495 | ||
488 | 496 | @Callable(Q) | |
489 | 497 | func claimBulk () = { | |
490 | 498 | let bD = toString(Q.caller) | |
491 | 499 | let bE = getString(z(toString(Q.caller))) | |
492 | 500 | let bF = if (isDefined(bE)) | |
493 | 501 | then true | |
494 | - | else | |
502 | + | else L("no referral programs") | |
495 | 503 | if ((bF == bF)) | |
496 | 504 | then { | |
497 | 505 | let bG = split(value(bE), "__") | |
498 | 506 | let bH = invoke(this, "claimBulkInternal", [bD, bG, 0], nil) | |
499 | 507 | if ((bH == bH)) | |
500 | 508 | then $Tuple2(nil, bH) | |
501 | 509 | else throw("Strict value is not equal to itself.") | |
502 | 510 | } | |
503 | 511 | else throw("Strict value is not equal to itself.") | |
504 | 512 | } | |
505 | 513 | ||
506 | 514 | ||
507 | 515 | ||
508 | 516 | @Callable(Q) | |
509 | - | func claimREADONLY (e, | |
510 | - | let aa = valueOrElse(getInteger(h(e, | |
511 | - | let ab = valueOrElse(getInteger(k(e, | |
517 | + | func claimREADONLY (e,G) = { | |
518 | + | let aa = valueOrElse(getInteger(h(e, G)), 0) | |
519 | + | let ab = valueOrElse(getInteger(k(e, G)), 0) | |
512 | 520 | $Tuple2(nil, [ab, aa]) | |
513 | 521 | } | |
514 | 522 | ||
515 | 523 | ||
516 | 524 | ||
517 | 525 | @Callable(Q) | |
518 | 526 | func claimBulkREADONLY (au) = { | |
519 | 527 | let ai = valueOrElse(getInteger(r(au)), 0) | |
520 | 528 | let aj = valueOrElse(getInteger(t(au)), 0) | |
521 | 529 | $Tuple2(nil, [aj, ai]) | |
522 | 530 | } | |
523 | 531 | ||
524 | 532 | ||
525 | 533 | ||
526 | 534 | @Callable(Q) | |
527 | 535 | func setTotalKeys (e,s) = { | |
528 | 536 | let bI = valueOrElse(getInteger(h(e, s)), 0) | |
529 | 537 | let bJ = valueOrElse(getInteger(j(e, s)), 0) | |
530 | 538 | let aA = valueOrElse(getInteger(k(e, s)), 0) | |
531 | 539 | let bK = valueOrElse(getInteger(l(e, s)), 0) | |
532 | 540 | let ai = (bI + bJ) | |
533 | 541 | let aj = (aA + bK) | |
534 | 542 | $Tuple2([IntegerEntry(r(s), ai), IntegerEntry(t(s), aj)], unit) | |
535 | 543 | } | |
536 | 544 | ||
537 | 545 | ||
538 | 546 | @Verifier(bL) | |
539 | 547 | func bM () = { | |
540 | 548 | let bN = { | |
541 | - | let | |
542 | - | if ($isInstanceOf( | |
549 | + | let D = N() | |
550 | + | if ($isInstanceOf(D, "ByteVector")) | |
543 | 551 | then { | |
544 | - | let S = | |
552 | + | let S = D | |
545 | 553 | S | |
546 | 554 | } | |
547 | - | else if ($isInstanceOf( | |
555 | + | else if ($isInstanceOf(D, "Unit")) | |
548 | 556 | then bL.senderPublicKey | |
549 | 557 | else throw("Match error") | |
550 | 558 | } | |
551 | 559 | sigVerify(bL.bodyBytes, bL.proofs[0], bN) | |
552 | 560 | } | |
553 | 561 |
github/deemru/w8io/169f3d6 132.08 ms ◑