tx · HoxXNsq3ocoXKToVaq3SXRzpwq4JuNXHuegDQbAct35u 3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3: -0.00700000 Waves 2022.07.10 10:12 [2133308] smart account 3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3 > SELF 0.00000000 Waves
{ "type": 13, "id": "HoxXNsq3ocoXKToVaq3SXRzpwq4JuNXHuegDQbAct35u", "fee": 700000, "feeAssetId": null, "timestamp": 1657437173573, "version": 2, "chainId": 84, "sender": "3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3", "senderPublicKey": "AdPVtTCVPZCuVF944iD1f5LJ9e4pjzpQ2rrxGEWt7Rbx", "proofs": [ "52iANA2UnshKJWhMYHnUaALzYfB4a5XHSoGFq3bqkpCgQJysBUaPZPSq2hkzyVskQjFfgYGR9xrzpPgSBT4SLoEr" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAACAAAAAAKZWdnQXNzZXRJZAEAAAAgF/4YCdBeNnPXi9mYwFve9iIGEZ5QZQVegfUQpkcQUdwAAAAAEGNvbGxlY3RvckFkZHJlc3MBAAAAGgFUAqwIk+AYdvRW0p5bt95mLATeRN8JIV7TAAAAAAVkZWxheQAAAAAAAAAAAgAAAAALbWF4RXhjaGFuZ2UAAAAAAAAAAAEAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAAAQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYX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ggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleczgw20=", "height": 2133308, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C9ECzazDm8sdpiWHgdY5KiWz71Y2yQukjzhosyz2Gew1 Next: 2NFL6K3EzxQ4BrQwCbhJEJj3hfj53GWMgLkcdpAqZ8Ef Diff:
Old | New | Differences | |
---|---|---|---|
57 | 57 | let q = f((("receiver_" + toString(m.originCaller)) + "_lastDay")) | |
58 | 58 | let r = f((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay")) | |
59 | 59 | if ((height > (q + c))) | |
60 | - | then if (( | |
60 | + | then if ((r > d)) | |
61 | 61 | then throw("Max exchange limit reached. Please try after 24 hours.") | |
62 | - | else if (( | |
62 | + | else if (((r + n) > d)) | |
63 | 63 | then throw("Max exchange crossed. Please try with lower value.") | |
64 | 64 | else [IntegerEntry((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay"), (r + n)), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_waveAmount"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_tokenAmount"), p), ScriptTransfer(Address(b), n, unit), ScriptTransfer(m.originCaller, p, a)] | |
65 | 65 | else [IntegerEntry((("receiver_" + toString(m.originCaller)) + "_lastDay"), height), IntegerEntry((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_waveAmount"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_tokenAmount"), p), ScriptTransfer(Address(b), n, unit), ScriptTransfer(m.originCaller, p, a)] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'2cf6jyVG19oHU79R8iHfqFEesjstr3e7nSYEUhb2WagB' | |
5 | 5 | ||
6 | 6 | let b = base58'3MpADDQFqadaCADNH9JDMQAGw9WEaMcymVU' | |
7 | 7 | ||
8 | 8 | let c = 2 | |
9 | 9 | ||
10 | 10 | let d = 1 | |
11 | 11 | ||
12 | 12 | let e = 1 | |
13 | 13 | ||
14 | 14 | func f (g) = { | |
15 | 15 | let h = { | |
16 | 16 | let i = getInteger(this, g) | |
17 | 17 | if ($isInstanceOf(i, "Int")) | |
18 | 18 | then { | |
19 | 19 | let j = i | |
20 | 20 | j | |
21 | 21 | } | |
22 | 22 | else 0 | |
23 | 23 | } | |
24 | 24 | h | |
25 | 25 | } | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func k (g) = { | |
29 | 29 | let h = { | |
30 | 30 | let i = getString(this, g) | |
31 | 31 | if ($isInstanceOf(i, "String")) | |
32 | 32 | then { | |
33 | 33 | let j = i | |
34 | 34 | j | |
35 | 35 | } | |
36 | 36 | else "" | |
37 | 37 | } | |
38 | 38 | h | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func l (g) = { | |
43 | 43 | let i = getBoolean(this, g) | |
44 | 44 | if ($isInstanceOf(i, "Boolean")) | |
45 | 45 | then { | |
46 | 46 | let j = i | |
47 | 47 | j | |
48 | 48 | } | |
49 | 49 | else false | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(m) | |
54 | 54 | func exchangeToken (n) = { | |
55 | 55 | let o = toBase58String(m.transactionId) | |
56 | 56 | let p = (e * n) | |
57 | 57 | let q = f((("receiver_" + toString(m.originCaller)) + "_lastDay")) | |
58 | 58 | let r = f((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay")) | |
59 | 59 | if ((height > (q + c))) | |
60 | - | then if (( | |
60 | + | then if ((r > d)) | |
61 | 61 | then throw("Max exchange limit reached. Please try after 24 hours.") | |
62 | - | else if (( | |
62 | + | else if (((r + n) > d)) | |
63 | 63 | then throw("Max exchange crossed. Please try with lower value.") | |
64 | 64 | else [IntegerEntry((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay"), (r + n)), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_waveAmount"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_tokenAmount"), p), ScriptTransfer(Address(b), n, unit), ScriptTransfer(m.originCaller, p, a)] | |
65 | 65 | else [IntegerEntry((("receiver_" + toString(m.originCaller)) + "_lastDay"), height), IntegerEntry((("receiver_" + toString(m.originCaller)) + "_totalAmountInDay"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_waveAmount"), n), IntegerEntry((((("receiver_" + toString(m.originCaller)) + "_transactionId_") + o) + "_tokenAmount"), p), ScriptTransfer(Address(b), n, unit), ScriptTransfer(m.originCaller, p, a)] | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Verifier(s) | |
70 | 70 | func t () = sigVerify(s.bodyBytes, s.proofs[0], s.senderPublicKey) | |
71 | 71 |
github/deemru/w8io/026f985 45.68 ms ◑