tx · 7EP4g26uD6KRji195TohVgC5ihDN27wGHLtFhEMtn2AB 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W: -0.01000000 Waves 2021.09.21 03:40 [1712125] smart account 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W > SELF 0.00000000 Waves
{ "type": 13, "id": "7EP4g26uD6KRji195TohVgC5ihDN27wGHLtFhEMtn2AB", "fee": 1000000, "feeAssetId": null, "timestamp": 1632184854892, "version": 2, "chainId": 84, "sender": "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W", "senderPublicKey": "4Tgbt8hFUrh9Ljuh7RR6JU7FGF6Vy8J55djUNpJj8DvX", "proofs": [ "kzHEpRBW2NFfzahFc4nUc5iPjkkDKTR388r6GVX5PYof2CWpkP3uD2jX9c4BcMy2YV5gufpQuBqEvzr1mD6JpLX" ], "script": "base64:AAIFAAAAAAAAAfkIAhIGCgQICAgBGgcKAmExEgFpGgwKAmEyEgZhY3Rpb24aCgoCYTMSBHR5cGUaEQoCYTQSC3ZhbHVlQWN0aW9uGgwKAmE1EgZudW1iZXIaEwoCYTYSDXRyYW5zYWN0aW9uSWQaGAoCYTcSEmN1cnJlbnRXYWxsZXRCeXRlcxoPCgJhOBIJcGF5QW1vdW50GhMKAmE5Eg1jdXJyZW50V2FsbGV0Gg0KAmIxEgduYW1lTmZ0Gg8KAmIyEgl0aW1lc3RhbXAaEAoCYjMSCmJhbGFuY2VTbGkaDQoCYjQSByRtYXRjaDAaBwoCYjUSAXQaEAoCYjYSCmhpc3RvcmljSWQaFQoCYjcSD2luaXRpYWxQb3dlck5mdBoLCgJiOBIFcG93ZXIaDgoCYjkSCG5mdFBvd2VyGhUKAmMxEg9yZXdhcmRUaW1lc3RhbXAaDgoCYzISCG5ld1Bvd2VyGhAKAmMzEgpuZXdQb3dlclVwGhkKAmM0EhNuZXdQb3dlck1vcmVQb3dlclVwGhIKAmM1Egxub3dUaW1lc3RhbXAaGgoCYzYSF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W5zYcOnw6NvIQAAAAAW4f5a", "height": 1712125, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7KoAtZCHHNbLjesFVTNtpyg1rcM8TDSXtEc1p6enmtca Next: FCVPpuSdSAWx3YoX5PSS3fCbdXtuWqTLM6YhbTqChiNV Diff:
Old | New | Differences | |
---|---|---|---|
72 | 72 | else if (if ((action == "Request")) | |
73 | 73 | then (calcTotalReward > 0) | |
74 | 74 | else false) | |
75 | - | then | |
75 | + | then throw(("nowTimestamp:" + toString(nowTimestamp))) | |
76 | 76 | else throw("Não foi possivel atender a sua solicitação! Verifique se possui saldo suficiente para a transação!") | |
77 | 77 | } | |
78 | 78 |
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(i) | |
7 | 7 | func start (action,type,valueAction,number) = { | |
8 | 8 | let transactionId = toBase58String(i.transactionId) | |
9 | 9 | let currentWalletBytes = i.caller | |
10 | 10 | let payAmount = value(i.payments[0].amount) | |
11 | 11 | let currentWallet = toBase58String(i.caller.bytes) | |
12 | 12 | let nameNft = ((((((("nft_" + type) + "_") + take(transactionId, 10)) + "_") + currentWallet) + "_") + transactionId) | |
13 | 13 | let timestamp = take(toString(lastBlock.timestamp), 10) | |
14 | 14 | let balanceSli = match getInteger(this, ("balance_sli_" + currentWallet)) { | |
15 | 15 | case t: Int => | |
16 | 16 | t | |
17 | 17 | case _ => | |
18 | 18 | 0 | |
19 | 19 | } | |
20 | 20 | let historicId = match getInteger(this, "historicId") { | |
21 | 21 | case t: Int => | |
22 | 22 | t | |
23 | 23 | case _ => | |
24 | 24 | 0 | |
25 | 25 | } | |
26 | 26 | let initialPowerNft = match getInteger(this, ("List_NFT_" + type)) { | |
27 | 27 | case t: Int => | |
28 | 28 | t | |
29 | 29 | case _ => | |
30 | 30 | 0 | |
31 | 31 | } | |
32 | 32 | let power = match getInteger(this, ("power_" + currentWallet)) { | |
33 | 33 | case t: Int => | |
34 | 34 | t | |
35 | 35 | case _ => | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let nftPower = match getInteger(this, valueAction) { | |
39 | 39 | case t: Int => | |
40 | 40 | t | |
41 | 41 | case _ => | |
42 | 42 | 0 | |
43 | 43 | } | |
44 | 44 | let rewardTimestamp = match getInteger(this, ("reward_timestamp_" + currentWallet)) { | |
45 | 45 | case t: Int => | |
46 | 46 | t | |
47 | 47 | case _ => | |
48 | 48 | 0 | |
49 | 49 | } | |
50 | 50 | let newPower = (power + initialPowerNft) | |
51 | 51 | let newPowerUp = (nftPower + number) | |
52 | 52 | let newPowerMorePowerUp = (number + power) | |
53 | 53 | let nowTimestamp = parseIntValue(timestamp) | |
54 | 54 | let calcRequestTimestamp = (nowTimestamp - rewardTimestamp) | |
55 | 55 | let calcReward24hours = (86400 / (power / 100)) | |
56 | 56 | let calcTotalReward = ((calcRequestTimestamp * 100000000) / calcReward24hours) | |
57 | 57 | let newBalance = (balanceSli + calcTotalReward) | |
58 | 58 | if (if ((action == "Buy NFT")) | |
59 | 59 | then ((payAmount / 100000) == initialPowerNft) | |
60 | 60 | else false) | |
61 | 61 | then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp)] | |
62 | 62 | else if (if ((action == "Send NFT")) | |
63 | 63 | then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
64 | 64 | else false) | |
65 | 65 | then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))] | |
66 | 66 | else if (if (if ((action == "Power Up")) | |
67 | 67 | then (nftPower != 0) | |
68 | 68 | else false) | |
69 | 69 | then ((payAmount / 100000) == number) | |
70 | 70 | else false) | |
71 | 71 | then [IntegerEntry(valueAction, newPowerUp), IntegerEntry(("power_" + currentWallet), newPowerMorePowerUp)] | |
72 | 72 | else if (if ((action == "Request")) | |
73 | 73 | then (calcTotalReward > 0) | |
74 | 74 | else false) | |
75 | - | then | |
75 | + | then throw(("nowTimestamp:" + toString(nowTimestamp))) | |
76 | 76 | else throw("Não foi possivel atender a sua solicitação! Verifique se possui saldo suficiente para a transação!") | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 |
github/deemru/w8io/026f985 28.74 ms ◑