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:AAIFAAAAAAAAAgcIAhIFCgMICAgaFAoBQRIPY2FsY1RvdGFsUmV3YXJkGg8KAUISCm5ld0JhbGFuY2UaEgoBQxINbmV3U2F2ZVJld2FyZBoGCgFhEgFpGgsKAWISBmFjdGlvbhoJCgFjEgR0eXBlGhAKAWQSC3ZhbHVlQWN0aW9uGhIKAWUSDXRyYW5zYWN0aW9uSWQaFwoBZhISY3VycmVudFdhbGxldEJ5dGVzGg4KAWcSCXBheUFtb3VudBoSCgFoEg1jdXJyZW50V2FsbGV0GgwKAWkSB25hbWVOZnQaDgoBahIJdGltZXN0YW1wGhAKAWsSC2V4YW5CYWxhbmNlGgwKAWwSByRtYXRjaDAaBgoBbRIBdBoMCgFuEgdiYWxhbmNlGg8KAW8SCmhpc3RvcmljSWQaFAoBcBIPaW5pdGlhbFBvd2VyTmZ0GgoKAXESBXBvd2VyGg0KAXISCG5mdFBvd2VyGhQKAXMSD3Jld2FyZFRpbWVzdGFtcBoPCgF0EgpzYXZlUmV3YXJkGhUKAXUSEG5ld1Rva2VuUHVyY2hhc2UaFQoBdhIQdG90YWxFeGFuQmFsYW5j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AAAAAWICAAAACFNlbmQgTkZUCQAAAAAAAAIFAAAAAWgCAAAAIzNON1ltMVdLM1phRnA3VmZqdno2S0ZSR0Y2QXhzQVhtNzZXBwkAAAAAAAACBQAAAAFnAAAAAAAAD0JABwkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAHQWRkcmVzcwAAAAEJAAJZAAAAAQUAAAABYwAAAAAAAAAAAQkAAlkAAAABBQAAAAFkBQAAAANuaWwDAwMJAAAAAAAAAgUAAAABYgIAAAAHUmVxdWVzdAkAAGYAAAACBQAAAAFBAAAAAAAAAAAABwkAAAAAAAACBQAAAAFnAAAAAAAAD0JABwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAA1iYWxhbmNlX2V4YW5fBQAAAAFoBQAAAAFCCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAAEXJld2FyZF90aW1lc3RhbXBfBQAAAAFoBQAAAAF4CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAADHNhdmVfcmV3YXJkXwUAAAABaAAAAAAAAAAAAAUAAAADbmlsCQAAAgAAAAECAAAAXldlIHdlcmUgdW5hYmxlIHRvIGZ1bGZpbGwgeW91ciByZXF1ZXN0ISBNYWtlIHN1cmUgeW91IGhhdmUgZW5vdWdoIGJhbGFuY2UgZm9yIHRoZSB0cmFuc2FjdGlvbiEAAAAAIQTigA==", "height": 1845915, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GQkSzkfpfKuDezTo4a9ZWEw2Y963pkrp7nMJz1F8svDG Next: 3pveFmMBGoRdhKfdtd8Zj4ZzfJbccCfMpV6rvyfvvTjY Diff:
OldNewDifferences
7474 let newSaveReward = if ((power == 0))
7575 then 0
7676 else (saveReward + calcTotalReward)
77- if ((action == "Buy Tokens"))
78- then [IntegerEntry(("exan_balance_" + currentWallet), totalExanBalance), IntegerEntry(((("buy_tokens_" + currentWallet) + "_") + transactionId), newTokenPurchase)]
79- else if (if ((action == "Buy NFT"))
80- then ((payAmount / 100000) == initialPowerNft)
81- else false)
82- 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)]
83- else if (if (if ((action == "Send NFT"))
84- then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
77+ if (true)
78+ then throw(("payAmount: " + toString(payAmount)))
79+ else if ((action == "Buy Tokens"))
80+ then [IntegerEntry(("exan_balance_" + currentWallet), totalExanBalance), IntegerEntry(((("buy_tokens_" + currentWallet) + "_") + transactionId), newTokenPurchase)]
81+ else if (if ((action == "Buy NFT"))
82+ then ((payAmount / 100000) == initialPowerNft)
8583 else false)
86- then (payAmount == 1000000)
87- else false)
88- then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
89- else if (if (if ((action == "Request"))
90- then (calcTotalReward > 0)
84+ 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)]
85+ else if (if (if ((action == "Send NFT"))
86+ then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
9187 else false)
9288 then (payAmount == 1000000)
9389 else false)
94- then [IntegerEntry(("balance_exan_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), 0)]
95- else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!")
90+ then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
91+ else if (if (if ((action == "Request"))
92+ then (calcTotalReward > 0)
93+ else false)
94+ then (payAmount == 1000000)
95+ else false)
96+ then [IntegerEntry(("balance_exan_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), 0)]
97+ else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!")
9698 }
9799
98100
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) = {
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 exanBalance = match getInteger(this, ("exan_balance_" + currentWallet)) {
1515 case t: Int =>
1616 t
1717 case _ =>
1818 0
1919 }
2020 let balance = match getInteger(this, ("balance_exan_" + currentWallet)) {
2121 case t: Int =>
2222 t
2323 case _ =>
2424 0
2525 }
2626 let historicId = match getInteger(this, "historicId") {
2727 case t: Int =>
2828 t
2929 case _ =>
3030 0
3131 }
3232 let initialPowerNft = match getInteger(this, ("List_NFT_" + type)) {
3333 case t: Int =>
3434 t
3535 case _ =>
3636 0
3737 }
3838 let power = match getInteger(this, ("power_" + currentWallet)) {
3939 case t: Int =>
4040 t
4141 case _ =>
4242 0
4343 }
4444 let nftPower = match getInteger(this, valueAction) {
4545 case t: Int =>
4646 t
4747 case _ =>
4848 0
4949 }
5050 let rewardTimestamp = match getInteger(this, ("reward_timestamp_" + currentWallet)) {
5151 case t: Int =>
5252 t
5353 case _ =>
5454 0
5555 }
5656 let saveReward = match getInteger(this, ("save_reward_" + currentWallet)) {
5757 case t: Int =>
5858 t
5959 case _ =>
6060 0
6161 }
6262 let newTokenPurchase = (i.payments[0].amount * 10000)
6363 let totalExanBalance = (exanBalance + newTokenPurchase)
6464 let newPower = (power + initialPowerNft)
6565 let nowTimestamp = parseIntValue(timestamp)
6666 let calcRequestTimestamp = (nowTimestamp - rewardTimestamp)
6767 let calcReward24hours = if ((power > 0))
6868 then (86400 / (power / 100))
6969 else 0
7070 let calcTotalReward = if ((calcReward24hours > 0))
7171 then ((calcRequestTimestamp * 100000000) / calcReward24hours)
7272 else 0
7373 let newBalance = ((balance + calcTotalReward) + saveReward)
7474 let newSaveReward = if ((power == 0))
7575 then 0
7676 else (saveReward + calcTotalReward)
77- if ((action == "Buy Tokens"))
78- then [IntegerEntry(("exan_balance_" + currentWallet), totalExanBalance), IntegerEntry(((("buy_tokens_" + currentWallet) + "_") + transactionId), newTokenPurchase)]
79- else if (if ((action == "Buy NFT"))
80- then ((payAmount / 100000) == initialPowerNft)
81- else false)
82- 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)]
83- else if (if (if ((action == "Send NFT"))
84- then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
77+ if (true)
78+ then throw(("payAmount: " + toString(payAmount)))
79+ else if ((action == "Buy Tokens"))
80+ then [IntegerEntry(("exan_balance_" + currentWallet), totalExanBalance), IntegerEntry(((("buy_tokens_" + currentWallet) + "_") + transactionId), newTokenPurchase)]
81+ else if (if ((action == "Buy NFT"))
82+ then ((payAmount / 100000) == initialPowerNft)
8583 else false)
86- then (payAmount == 1000000)
87- else false)
88- then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
89- else if (if (if ((action == "Request"))
90- then (calcTotalReward > 0)
84+ 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)]
85+ else if (if (if ((action == "Send NFT"))
86+ then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W")
9187 else false)
9288 then (payAmount == 1000000)
9389 else false)
94- then [IntegerEntry(("balance_exan_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), 0)]
95- else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!")
90+ then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))]
91+ else if (if (if ((action == "Request"))
92+ then (calcTotalReward > 0)
93+ else false)
94+ then (payAmount == 1000000)
95+ else false)
96+ then [IntegerEntry(("balance_exan_" + currentWallet), newBalance), IntegerEntry(("reward_timestamp_" + currentWallet), nowTimestamp), IntegerEntry(("save_reward_" + currentWallet), 0)]
97+ else throw("We were unable to fulfill your request! Make sure you have enough balance for the transaction!")
9698 }
9799
98100

github/deemru/w8io/169f3d6 
40.46 ms