tx · 7KoAtZCHHNbLjesFVTNtpyg1rcM8TDSXtEc1p6enmtca

3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W:  -0.01000000 Waves

2021.09.21 02:35 [1712059] smart account 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W > SELF 0.00000000 Waves

{ "type": 13, "id": "7KoAtZCHHNbLjesFVTNtpyg1rcM8TDSXtEc1p6enmtca", "fee": 1000000, "feeAssetId": null, "timestamp": 1632180966811, "version": 2, "chainId": 84, "sender": "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W", "senderPublicKey": "4Tgbt8hFUrh9Ljuh7RR6JU7FGF6Vy8J55djUNpJj8DvX", "proofs": [ "4x8c438nyMtdvza69Muz3UrEpSCopMF7EUs2ABZzfTJT2ttTsAv5qUNRpEaBtqC1qR5TXRPtmnZmyRdSdXcQfALy" ], "script": "base64:AAIFAAAAAAAAAfkIAhIGCgQICAgBGgcKAmExEgFpGgwKAmEyEgZhY3Rpb24aCgoCYTMSBHR5cGUaEQoCYTQSC3ZhbHVlQWN0aW9uGgwKAmE1EgZudW1iZXIaEwoCYTYSDXRyYW5zYWN0aW9uSWQaGAoCYTcSEmN1cnJlbnRXYWxsZXRCeXRlcxoPCgJhOBIJcGF5QW1vdW50GhMKAmE5Eg1jdXJyZW50V2FsbGV0Gg0KAmIxEgduYW1lTmZ0Gg8KAmIyEgl0aW1lc3RhbXAaEAoCYjMSCmJhbGFuY2VTbGkaDQoCYjQSByRtYXRjaDAaBwoCYjUSAXQaEAoCYjYSCmhpc3RvcmljSWQaFQoCYjcSD2luaXRpYWxQb3dlck5mdBoLCgJiOBIFcG93ZXIaDgoCYjkSCG5mdFBvd2VyGhUKAmMxEg9yZXdhcmRUaW1lc3RhbXAaDgoCYzISCG5ld1Bvd2VyGhAKAmMzEgpuZXdQb3dlclVwGhkKAmM0EhNuZXdQb3dlck1vcmVQb3dlclVwGhIKAmM1Egxub3dUaW1lc3RhbXAaGg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AAAAAQIAAABnTsOjbyBmb2kgcG9zc2l2ZWwgYXRlbmRlciBhIHN1YSBzb2xpY2l0YcOnw6NvISBWZXJpZmlxdWUgc2UgcG9zc3VpIHNhbGRvIHN1ZmljaWVudGUgcGFyYSBhIHRyYW5zYcOnw6NvIQAAAADdm+P2", "height": 1712059, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9mXqgSHmu8uX4zKSjypSwfLYtJTGvgmvMzHmr8j4UaNc Next: 7EP4g26uD6KRji195TohVgC5ihDN27wGHLtFhEMtn2AB Diff:
OldNewDifferences
7272 else if (if ((action == "Request"))
7373 then (calcTotalReward > 0)
7474 else false)
75- then [IntegerEntry(("balance_sli_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), calcTotalReward)]
75+ then [IntegerEntry(("balance_sli_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp)]
7676 else throw("Não foi possivel atender a sua solicitação! Verifique se possui saldo suficiente para a transação!")
7777 }
7878
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func start (action,type,valueAction,number) = {
88 let transactionId = toBase58String(i.transactionId)
99 let currentWalletBytes = i.caller
1010 let payAmount = value(i.payments[0].amount)
1111 let currentWallet = toBase58String(i.caller.bytes)
1212 let nameNft = ((((((("nft_" + type) + "_") + take(transactionId, 10)) + "_") + currentWallet) + "_") + transactionId)
1313 let timestamp = take(toString(lastBlock.timestamp), 10)
1414 let balanceSli = match getInteger(this, ("balance_sli_" + currentWallet)) {
1515 case t: Int =>
1616 t
1717 case _ =>
1818 0
1919 }
2020 let historicId = match getInteger(this, "historicId") {
2121 case t: Int =>
2222 t
2323 case _ =>
2424 0
2525 }
2626 let initialPowerNft = match getInteger(this, ("List_NFT_" + type)) {
2727 case t: Int =>
2828 t
2929 case _ =>
3030 0
3131 }
3232 let power = match getInteger(this, ("power_" + currentWallet)) {
3333 case t: Int =>
3434 t
3535 case _ =>
3636 0
3737 }
3838 let nftPower = match getInteger(this, valueAction) {
3939 case t: Int =>
4040 t
4141 case _ =>
4242 0
4343 }
4444 let rewardTimestamp = match getInteger(this, ("reward_timestamp_" + currentWallet)) {
4545 case t: Int =>
4646 t
4747 case _ =>
4848 0
4949 }
5050 let newPower = (power + initialPowerNft)
5151 let newPowerUp = (nftPower + number)
5252 let newPowerMorePowerUp = (number + power)
5353 let nowTimestamp = parseIntValue(timestamp)
5454 let calcRequestTimestamp = (nowTimestamp - rewardTimestamp)
5555 let calcReward24hours = (86400 / (power / 100))
5656 let calcTotalReward = ((calcRequestTimestamp * 100000000) / calcReward24hours)
5757 let newBalance = (balanceSli + calcTotalReward)
5858 if (if ((action == "Buy NFT"))
5959 then ((payAmount / 100000) == initialPowerNft)
6060 else false)
6161 then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp)]
6262 else if (if ((action == "Send NFT"))
6363 then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
6464 else false)
6565 then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
6666 else if (if (if ((action == "Power Up"))
6767 then (nftPower != 0)
6868 else false)
6969 then ((payAmount / 100000) == number)
7070 else false)
7171 then [IntegerEntry(valueAction, newPowerUp), IntegerEntry(("power_" + currentWallet), newPowerMorePowerUp)]
7272 else if (if ((action == "Request"))
7373 then (calcTotalReward > 0)
7474 else false)
75- then [IntegerEntry(("balance_sli_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), calcTotalReward)]
75+ then [IntegerEntry(("balance_sli_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp)]
7676 else throw("Não foi possivel atender a sua solicitação! Verifique se possui saldo suficiente para a transação!")
7777 }
7878
7979

github/deemru/w8io/026f985 
22.08 ms