tx · EaYsvjBjaei5BxMbMi3W8UdkCCKNKoDybKQaPt4EV9kW 3MpB5fPHEK9ZgW6EjiDi4nyntnRUD3d9zf6: -0.01000000 Waves 2022.01.16 17:56 [1881647] smart account 3MpB5fPHEK9ZgW6EjiDi4nyntnRUD3d9zf6 > SELF 0.00000000 Waves
{ "type": 13, "id": "EaYsvjBjaei5BxMbMi3W8UdkCCKNKoDybKQaPt4EV9kW", "fee": 1000000, "feeAssetId": null, "timestamp": 1642345024311, "version": 2, "chainId": 84, "sender": "3MpB5fPHEK9ZgW6EjiDi4nyntnRUD3d9zf6", "senderPublicKey": "Fz8BCeavpVwDSotUvdUamhzyN9aAjfL3kq97YYU7fvU3", "proofs": [ "3osorAudkf7eiDaMnfteeMVdAhYvR6HGmmgnt8VLDk6BjHGEj6FamZxE3kZrFtXq7Sc1t8j7hGDAECmiNkZZ7hhc" ], "script": "base64:AAIFAAAAAAAAAccIAhIFCgMICAgaBgoBYRIBaRoLCgFiEgZhY3Rpb24aCQoBYxIEdHlwZRoQCgFkEgt2YWx1ZUFjdGlvbhoSCgFlEg10cmFuc2FjdGlvbklkGhcKAWYSEmN1cnJlbnRXYWxsZXRCeXRlcxoOCgFnEglwYXlBbW91bnQaEgoBaBINY3VycmVudFdhbGxldBoMCgFpEgduYW1lTmZ0Gg4KAWoSCXRpbWVzdGFtcBoMCgFrEgdiYWxhbmNlGgwKAWwSByRtYXRjaDAaBgoBbRIBdBoPCgFuEgpoaXN0b3JpY0lkGhQKAW8SD2luaXRpYWxQb3dlck5mdBoKCgFwEgVwb3dlchoNCgFxEghuZnRQb3dlchoUCgFyEg9yZXdhcmRUaW1lc3RhbXAaDwoBcxIKc2F2ZVJld2FyZBoNCgF0EghuZXdQb3dlchoRCgF1Egxub3dUaW1lc3RhbXAaGQoBdhIUY2FsY1JlcXVlc3RUaW1lc3RhbXAaFgoBdxIRY2FsY1Jld2FyZDI0aG91cnMaFAoBeBIPY2FsY1RvdGFsUmV3YXJkGg8KAXkSCm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IV2l0aGRyYXcJAAAAAAAAAgUAAAABZwAAAAAAAB6EgAcJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAABZgUAAAABawEAAAAgxMC2Gz11iIwwvdFLAvXSdGCxH//T5ZA5JZvxObMzWfkJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQkAASwAAAACAgAAAA1iYWxhbmNlX2V4YW5fBQAAAAFoBQAAAANuaWwJAAACAAAAAQIAAACESXQgaXMgbm90IHBvc3NpYmxlIHRvIGZ1bGZpbGwgeW91ciByZXF1ZXN0IGF0IHRoaXMgdGltZSEgTWFrZSBzdXJlIHlvdSBoYXZlIGVub3VnaCBiYWxhbmNlIGZvciB0aGUgdHJhbnNhY3Rpb24gb3Igd2FpdCB0byB0cnkgYWdhaW4hAAAAALa9m68=", "height": 1881647, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3RV13FPM6UbuMjVZ4n9ojgz4mwPJyFv1EaKrLwXwBKj2 Next: none Diff:
Old | New | Differences | |
---|---|---|---|
86 | 86 | then (payAmount == 2000000) | |
87 | 87 | else false) | |
88 | 88 | then [ScriptTransfer(currentWalletBytes, balance, base58'EF3Lw4y6NTfUUBhp3aSbfKuYEvqxR5EiTYBpvDgDFTa8'), DeleteEntry(("balance_exan_" + currentWallet))] | |
89 | - | else throw("It is not possible to fulfill your request at this time!") | |
89 | + | else throw("It is not possible to fulfill your request at this time! Make sure you have enough balance for the transaction or wait to try again!") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 |
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) = { | |
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 balance = match getInteger(this, ("balance_exan_" + 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 saveReward = match getInteger(this, ("save_reward_" + currentWallet)) { | |
51 | 51 | case t: Int => | |
52 | 52 | t | |
53 | 53 | case _ => | |
54 | 54 | 0 | |
55 | 55 | } | |
56 | 56 | let newPower = (power + initialPowerNft) | |
57 | 57 | let nowTimestamp = parseIntValue(timestamp) | |
58 | 58 | let calcRequestTimestamp = (nowTimestamp - rewardTimestamp) | |
59 | 59 | let calcReward24hours = if ((power > 0)) | |
60 | 60 | then (86400 / (power / 100)) | |
61 | 61 | else 0 | |
62 | 62 | let calcTotalReward = if ((calcReward24hours > 0)) | |
63 | 63 | then ((calcRequestTimestamp * 100000000) / calcReward24hours) | |
64 | 64 | else 0 | |
65 | 65 | let newBalance = ((balance + calcTotalReward) + saveReward) | |
66 | 66 | let newSaveReward = if ((power == 0)) | |
67 | 67 | then 0 | |
68 | 68 | else (saveReward + calcTotalReward) | |
69 | 69 | if (if ((action == "Buy NFT")) | |
70 | 70 | then ((payAmount / 100000) == initialPowerNft) | |
71 | 71 | else false) | |
72 | 72 | then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), newSaveReward)] | |
73 | 73 | else if (if (if ((action == "Send NFT")) | |
74 | 74 | then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
75 | 75 | else false) | |
76 | 76 | then (payAmount == 1000000) | |
77 | 77 | else false) | |
78 | 78 | then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))] | |
79 | 79 | else if (if (if ((action == "Request")) | |
80 | 80 | then (calcTotalReward > 0) | |
81 | 81 | else false) | |
82 | 82 | then (payAmount == 1000000) | |
83 | 83 | else false) | |
84 | 84 | then [IntegerEntry(("balance_exan_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), 0)] | |
85 | 85 | else if (if ((action == "Withdraw")) | |
86 | 86 | then (payAmount == 2000000) | |
87 | 87 | else false) | |
88 | 88 | then [ScriptTransfer(currentWalletBytes, balance, base58'EF3Lw4y6NTfUUBhp3aSbfKuYEvqxR5EiTYBpvDgDFTa8'), DeleteEntry(("balance_exan_" + currentWallet))] | |
89 | - | else throw("It is not possible to fulfill your request at this time!") | |
89 | + | else throw("It is not possible to fulfill your request at this time! Make sure you have enough balance for the transaction or wait to try again!") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 |
github/deemru/w8io/169f3d6 59.52 ms ◑