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