tx · 36kDnUmXxN9bHMJtJaSDdCDqRSJF2yYUtLrrK1Meb9x4

3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W:  -0.01000000 Waves

2021.09.20 04:04 [1710685] smart account 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W > SELF 0.00000000 Waves

{ "type": 13, "id": "36kDnUmXxN9bHMJtJaSDdCDqRSJF2yYUtLrrK1Meb9x4", "fee": 1000000, "feeAssetId": null, "timestamp": 1632099869772, "version": 2, "chainId": 84, "sender": "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W", "senderPublicKey": "4Tgbt8hFUrh9Ljuh7RR6JU7FGF6Vy8J55djUNpJj8DvX", "proofs": [ "2njRzMjCy6SGnoTG3dADx4rCVT7Ai1pdqXzkeCHyGwVcPnC6oBGeHhVjaozYdmwp2DBJfN7QTkBxiyWqGXQ9C6w7" ], "script": "base64:AAIFAAAAAAAAAaUIAhIGCgQICAgBGgcKAmExEgFpGgwKAmEyEgZhY3Rpb24aCgoCYTMSBHR5cGUaEQoCYTQSC3ZhbHVlQWN0aW9uGgwKAmE1EgZudW1iZXIaEwoCYTYSDXRyYW5zYWN0aW9uSWQaGAoCYTcSEmN1cnJlbnRXYWxsZXRCeXRlcxoPCgJhOBIJcGF5QW1vdW50GhMKAmE5Eg1jdXJyZW50V2FsbGV0Gg0KAmIxEgduYW1lTmZ0Gg8KAmIyEgl0aW1lc3RhbXAaEAoCYjMSCmhpc3RvcmljSWQaDQoCYjQSByRtYXRjaDAaBwoCYjUSAXQaFQoCYjYSD2luaXRpYWxQb3dlck5mdBoLCgJiNxIFcG93ZXIaDgoCYjgSCG5mdFBvd2VyGhUKAmI5Eg9yZXdhcmRUaW1lc3RhbXAaDgoCYzESCG5ld1Bvd2VyGhAKAmMyEgpuZXdQb3dlclVwGhkKAmMzEhNuZXdQb3dlck1vcmVQb3dlclVwGhIKAmM0Egxub3dUaW1lc3RhbXAaGgoCYzUSFGNhbGNS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3JpcHRUcmFuc2ZlcgAAAAMJAQAAAAdBZGRyZXNzAAAAAQkAAlkAAAABBQAAAAJhMwAAAAAAAAAAAQkAAlkAAAABBQAAAAJhNAUAAAADbmlsAwMDCQAAAAAAAAIFAAAAAmEyAgAAAAhQb3dlciBVcAkBAAAAAiE9AAAAAgUAAAACYjgAAAAAAAAAAAAHCQAAAAAAAAIJAABpAAAAAgUAAAACYTgAAAAAAAABhqAFAAAAAmE1BwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAACYTQFAAAAAmMyCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAABnBvd2VyXwUAAAACYTkFAAAAAmMzBQAAAANuaWwDCQAAAAAAAAIFAAAAAmEyAgAAAAdSZXF1ZXN0CQAAAgAAAAEJAAGkAAAAAQUAAAACYzUJAAACAAAAAQIAAAAtQWxnbyBkZXUgZXJyYWRvISBWZXJpZmlxdWUgc3VhIHNvbGljaXRhw6fDo28hAAAAAJTg5QM=", "height": 1710685, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CXDqSynuFGES1XaKn8najqayaJ9qpuWB8n1gojNQp4P1 Next: CBpJWwVRxpZzR1j9efEqtmidn4WpTRJcbYjC1Qq8W9QA Diff:
OldNewDifferences
3535 case _ =>
3636 0
3737 }
38- let requestTimestamp = match getInteger(this, "request_timestamp") {
38+ let rewardTimestamp = match getInteger(this, ("reward_timestamp_" + currentWallet)) {
3939 case t: Int =>
4040 t
4141 case _ =>
4444 let newPower = (power + initialPowerNft)
4545 let newPowerUp = (nftPower + number)
4646 let newPowerMorePowerUp = (number + power)
47- let newTimestamp = (parseIntValue(timestamp) - 86400)
47+ let nowTimestamp = parseIntValue(timestamp)
48+ let calcRequestTimestamp = (nowTimestamp - rewardTimestamp)
4849 if (if ((action == "Buy NFT"))
4950 then ((payAmount / 100000) == initialPowerNft)
5051 else false)
6061 else false)
6162 then [IntegerEntry(valueAction, newPowerUp), IntegerEntry(("power_" + currentWallet), newPowerMorePowerUp)]
6263 else if ((action == "Request"))
63- then throw(toString(newTimestamp))
64+ then throw(toString(calcRequestTimestamp))
6465 else throw("Algo deu errado! Verifique sua solicitação!")
6566 }
6667
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 historicId = match getInteger(this, "historicId") {
1515 case t: Int =>
1616 t
1717 case _ =>
1818 0
1919 }
2020 let initialPowerNft = match getInteger(this, ("List_NFT_" + type)) {
2121 case t: Int =>
2222 t
2323 case _ =>
2424 0
2525 }
2626 let power = match getInteger(this, ("power_" + currentWallet)) {
2727 case t: Int =>
2828 t
2929 case _ =>
3030 0
3131 }
3232 let nftPower = match getInteger(this, valueAction) {
3333 case t: Int =>
3434 t
3535 case _ =>
3636 0
3737 }
38- let requestTimestamp = match getInteger(this, "request_timestamp") {
38+ let rewardTimestamp = match getInteger(this, ("reward_timestamp_" + currentWallet)) {
3939 case t: Int =>
4040 t
4141 case _ =>
4242 0
4343 }
4444 let newPower = (power + initialPowerNft)
4545 let newPowerUp = (nftPower + number)
4646 let newPowerMorePowerUp = (number + power)
47- let newTimestamp = (parseIntValue(timestamp) - 86400)
47+ let nowTimestamp = parseIntValue(timestamp)
48+ let calcRequestTimestamp = (nowTimestamp - rewardTimestamp)
4849 if (if ((action == "Buy NFT"))
4950 then ((payAmount / 100000) == initialPowerNft)
5051 else false)
5152 then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower), IntegerEntry(("timestamp_" + currentWallet), parseIntValue(timestamp))]
5253 else if (if ((action == "Send NFT"))
5354 then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
5455 else false)
5556 then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
5657 else if (if (if ((action == "Power Up"))
5758 then (nftPower != 0)
5859 else false)
5960 then ((payAmount / 100000) == number)
6061 else false)
6162 then [IntegerEntry(valueAction, newPowerUp), IntegerEntry(("power_" + currentWallet), newPowerMorePowerUp)]
6263 else if ((action == "Request"))
63- then throw(toString(newTimestamp))
64+ then throw(toString(calcRequestTimestamp))
6465 else throw("Algo deu errado! Verifique sua solicitação!")
6566 }
6667
6768

github/deemru/w8io/fabc49c 
32.51 ms