tx · 5b21zdMqf2sbpgBmpPoMFDEvssfCvG675sBYAQP8mt1n 3MyswDZXU8YcgX1dfuQgAjitWPJ3cggU2PR: -0.01000000 Waves 2021.12.22 22:53 [1845915] smart account 3MyswDZXU8YcgX1dfuQgAjitWPJ3cggU2PR > SELF 0.00000000 Waves
{ "type": 13, "id": "5b21zdMqf2sbpgBmpPoMFDEvssfCvG675sBYAQP8mt1n", "fee": 1000000, "feeAssetId": null, "timestamp": 1640202831884, "version": 2, "chainId": 84, "sender": "3MyswDZXU8YcgX1dfuQgAjitWPJ3cggU2PR", "senderPublicKey": "JBFUVQjjvtMqXZeeeJLQyEP8RPmvMWbZHyCfGFnrmWJZ", "proofs": [ "2vbwnUopug9J4xzuQuK666wDSEfAsMzDWNKuLegMeidLfJCPkqfD9PBSefXUaafPeMPQSabT8j81CaR94D3PZEvS" ], "script": "base64:AAIFAAAAAAAAAgcIAhIFCgMICAgaFAoBQRIPY2FsY1RvdGFsUmV3YXJkGg8KAUISCm5ld0JhbGFuY2UaEgoBQxINbmV3U2F2ZVJld2FyZBoGCgFhEgFpGgsKAWISBmFjdGlvbhoJCgFjEgR0eXBlGhAKAWQSC3ZhbHVlQWN0aW9uGhIKAWUSDXRyYW5zYWN0aW9uSWQaFwoBZhISY3VycmVudFdhbGxldEJ5dGVzGg4KAWcSCXBheUFtb3VudBoSCgFoEg1jdXJyZW50V2FsbGV0GgwKAWkSB25hbWVOZnQaDgoBahIJdGltZXN0YW1wGhAKAWsSC2V4YW5CYWxhbmNlGgwKAWwSByRtYXRjaDAaBgoBbRIBdBoMCgFuEgdiYWxhbmNlGg8KAW8SCmhpc3RvcmljSWQaFAoBcBIPaW5pdGlhbFBvd2VyTmZ0GgoKAXESBXBvd2VyGg0KAXISCG5mdFBvd2VyGhQKAXMSD3Jld2FyZFRpbWVzdGFtcBoPCgF0EgpzYXZlUmV3YXJkGhUKAXUSEG5ld1Rva2VuUHVyY2hhc2UaFQoBdhIQdG90YWxFeGFuQmFsYW5jZ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AAAAWICAAAACFNlbmQgTkZUCQAAAAAAAAIFAAAAAWgCAAAAIzNON1ltMVdLM1phRnA3VmZqdno2S0ZSR0Y2QXhzQVhtNzZXBwkAAAAAAAACBQAAAAFnAAAAAAAAD0JABwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAABYwAAAAAAAAAAAQkAAlkAAAABBQAAAAFkBQAAAANuaWwDAwMJAAAAAAAAAgUAAAABYgIAAAAHUmVxdWVzdAkAAGYAAAACBQAAAAFBAAAAAAAAAAAABwkAAAAAAAACBQAAAAFnAAAAAAAAD0JABwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAA1iYWxhbmNlX2V4YW5fBQAAAAFoBQAAAAFCCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAAEXJld2FyZF90aW1lc3RhbXBfBQAAAAFoBQAAAAF4CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAADHNhdmVfcmV3YXJkXwUAAAABaAAAAAAAAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAXldlIHdlcmUgdW5hYmxlIHRvIGZ1bGZpbGwgeW91ciByZXF1ZXN0ISBNYWtlIHN1cmUgeW91IGhhdmUgZW5vdWdoIGJhbGFuY2UgZm9yIHRoZSB0cmFuc2FjdGlvbiEAAAAAIQTigA==", "height": 1845915, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GQkSzkfpfKuDezTo4a9ZWEw2Y963pkrp7nMJz1F8svDG Next: 3pveFmMBGoRdhKfdtd8Zj4ZzfJbccCfMpV6rvyfvvTjY Diff:
Old | New | Differences | |
---|---|---|---|
98 | 98 | let C = if ((q == 0)) | |
99 | 99 | then 0 | |
100 | 100 | else (t + A) | |
101 | - | if ((b == "Buy Tokens")) | |
102 | - | then [IntegerEntry(("exan_balance_" + h), v), IntegerEntry(((("buy_tokens_" + h) + "_") + e), u)] | |
103 | - | else if (if ((b == "Buy NFT")) | |
104 | - | then ((g / 100000) == p) | |
105 | - | else false) | |
106 | - | then [Issue(((take(c, 6) + "_") + take(e, 9)), "", 1, 0, false), IntegerEntry(i, p), IntegerEntry(("power_" + h), w), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), C)] | |
107 | - | else if (if (if ((b == "Send NFT")) | |
108 | - | then (h == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
101 | + | if (true) | |
102 | + | then throw(("payAmount: " + toString(g))) | |
103 | + | else if ((b == "Buy Tokens")) | |
104 | + | then [IntegerEntry(("exan_balance_" + h), v), IntegerEntry(((("buy_tokens_" + h) + "_") + e), u)] | |
105 | + | else if (if ((b == "Buy NFT")) | |
106 | + | then ((g / 100000) == p) | |
109 | 107 | else false) | |
110 | - | then (g == 1000000) | |
111 | - | else false) | |
112 | - | then [ScriptTransfer(Address(fromBase58String(c)), 1, fromBase58String(d))] | |
113 | - | else if (if (if ((b == "Request")) | |
114 | - | then (A > 0) | |
108 | + | then [Issue(((take(c, 6) + "_") + take(e, 9)), "", 1, 0, false), IntegerEntry(i, p), IntegerEntry(("power_" + h), w), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), C)] | |
109 | + | else if (if (if ((b == "Send NFT")) | |
110 | + | then (h == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
115 | 111 | else false) | |
116 | 112 | then (g == 1000000) | |
117 | 113 | else false) | |
118 | - | then [IntegerEntry(("balance_exan_" + h), B), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), 0)] | |
119 | - | else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!") | |
114 | + | then [ScriptTransfer(Address(fromBase58String(c)), 1, fromBase58String(d))] | |
115 | + | else if (if (if ((b == "Request")) | |
116 | + | then (A > 0) | |
117 | + | else false) | |
118 | + | then (g == 1000000) | |
119 | + | else false) | |
120 | + | then [IntegerEntry(("balance_exan_" + h), B), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), 0)] | |
121 | + | else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!") | |
120 | 122 | } | |
121 | 123 | ||
122 | 124 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(a) | |
7 | 7 | func start (b,c,d) = { | |
8 | 8 | let e = toBase58String(a.transactionId) | |
9 | 9 | let f = a.caller | |
10 | 10 | let g = value(a.payments[0].amount) | |
11 | 11 | let h = toBase58String(a.caller.bytes) | |
12 | 12 | let i = ((((((("nft_" + c) + "_") + take(e, 10)) + "_") + h) + "_") + e) | |
13 | 13 | let j = take(toString(lastBlock.timestamp), 10) | |
14 | 14 | let k = { | |
15 | 15 | let l = getInteger(this, ("exan_balance_" + h)) | |
16 | 16 | if ($isInstanceOf(l, "Int")) | |
17 | 17 | then { | |
18 | 18 | let m = l | |
19 | 19 | m | |
20 | 20 | } | |
21 | 21 | else 0 | |
22 | 22 | } | |
23 | 23 | let n = { | |
24 | 24 | let l = getInteger(this, ("balance_exan_" + h)) | |
25 | 25 | if ($isInstanceOf(l, "Int")) | |
26 | 26 | then { | |
27 | 27 | let m = l | |
28 | 28 | m | |
29 | 29 | } | |
30 | 30 | else 0 | |
31 | 31 | } | |
32 | 32 | let o = { | |
33 | 33 | let l = getInteger(this, "historicId") | |
34 | 34 | if ($isInstanceOf(l, "Int")) | |
35 | 35 | then { | |
36 | 36 | let m = l | |
37 | 37 | m | |
38 | 38 | } | |
39 | 39 | else 0 | |
40 | 40 | } | |
41 | 41 | let p = { | |
42 | 42 | let l = getInteger(this, ("List_NFT_" + c)) | |
43 | 43 | if ($isInstanceOf(l, "Int")) | |
44 | 44 | then { | |
45 | 45 | let m = l | |
46 | 46 | m | |
47 | 47 | } | |
48 | 48 | else 0 | |
49 | 49 | } | |
50 | 50 | let q = { | |
51 | 51 | let l = getInteger(this, ("power_" + h)) | |
52 | 52 | if ($isInstanceOf(l, "Int")) | |
53 | 53 | then { | |
54 | 54 | let m = l | |
55 | 55 | m | |
56 | 56 | } | |
57 | 57 | else 0 | |
58 | 58 | } | |
59 | 59 | let r = { | |
60 | 60 | let l = getInteger(this, d) | |
61 | 61 | if ($isInstanceOf(l, "Int")) | |
62 | 62 | then { | |
63 | 63 | let m = l | |
64 | 64 | m | |
65 | 65 | } | |
66 | 66 | else 0 | |
67 | 67 | } | |
68 | 68 | let s = { | |
69 | 69 | let l = getInteger(this, ("reward_timestamp_" + h)) | |
70 | 70 | if ($isInstanceOf(l, "Int")) | |
71 | 71 | then { | |
72 | 72 | let m = l | |
73 | 73 | m | |
74 | 74 | } | |
75 | 75 | else 0 | |
76 | 76 | } | |
77 | 77 | let t = { | |
78 | 78 | let l = getInteger(this, ("save_reward_" + h)) | |
79 | 79 | if ($isInstanceOf(l, "Int")) | |
80 | 80 | then { | |
81 | 81 | let m = l | |
82 | 82 | m | |
83 | 83 | } | |
84 | 84 | else 0 | |
85 | 85 | } | |
86 | 86 | let u = (a.payments[0].amount * 10000) | |
87 | 87 | let v = (k + u) | |
88 | 88 | let w = (q + p) | |
89 | 89 | let x = parseIntValue(j) | |
90 | 90 | let y = (x - s) | |
91 | 91 | let z = if ((q > 0)) | |
92 | 92 | then (86400 / (q / 100)) | |
93 | 93 | else 0 | |
94 | 94 | let A = if ((z > 0)) | |
95 | 95 | then ((y * 100000000) / z) | |
96 | 96 | else 0 | |
97 | 97 | let B = ((n + A) + t) | |
98 | 98 | let C = if ((q == 0)) | |
99 | 99 | then 0 | |
100 | 100 | else (t + A) | |
101 | - | if ((b == "Buy Tokens")) | |
102 | - | then [IntegerEntry(("exan_balance_" + h), v), IntegerEntry(((("buy_tokens_" + h) + "_") + e), u)] | |
103 | - | else if (if ((b == "Buy NFT")) | |
104 | - | then ((g / 100000) == p) | |
105 | - | else false) | |
106 | - | then [Issue(((take(c, 6) + "_") + take(e, 9)), "", 1, 0, false), IntegerEntry(i, p), IntegerEntry(("power_" + h), w), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), C)] | |
107 | - | else if (if (if ((b == "Send NFT")) | |
108 | - | then (h == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
101 | + | if (true) | |
102 | + | then throw(("payAmount: " + toString(g))) | |
103 | + | else if ((b == "Buy Tokens")) | |
104 | + | then [IntegerEntry(("exan_balance_" + h), v), IntegerEntry(((("buy_tokens_" + h) + "_") + e), u)] | |
105 | + | else if (if ((b == "Buy NFT")) | |
106 | + | then ((g / 100000) == p) | |
109 | 107 | else false) | |
110 | - | then (g == 1000000) | |
111 | - | else false) | |
112 | - | then [ScriptTransfer(Address(fromBase58String(c)), 1, fromBase58String(d))] | |
113 | - | else if (if (if ((b == "Request")) | |
114 | - | then (A > 0) | |
108 | + | then [Issue(((take(c, 6) + "_") + take(e, 9)), "", 1, 0, false), IntegerEntry(i, p), IntegerEntry(("power_" + h), w), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), C)] | |
109 | + | else if (if (if ((b == "Send NFT")) | |
110 | + | then (h == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
115 | 111 | else false) | |
116 | 112 | then (g == 1000000) | |
117 | 113 | else false) | |
118 | - | then [IntegerEntry(("balance_exan_" + h), B), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), 0)] | |
119 | - | else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!") | |
114 | + | then [ScriptTransfer(Address(fromBase58String(c)), 1, fromBase58String(d))] | |
115 | + | else if (if (if ((b == "Request")) | |
116 | + | then (A > 0) | |
117 | + | else false) | |
118 | + | then (g == 1000000) | |
119 | + | else false) | |
120 | + | then [IntegerEntry(("balance_exan_" + h), B), IntegerEntry(("reward_timestamp_" + h), x), IntegerEntry(("save_reward_" + h), 0)] | |
121 | + | else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!") | |
120 | 122 | } | |
121 | 123 | ||
122 | 124 |
github/deemru/w8io/169f3d6 30.24 ms ◑