tx · HoxXNsq3ocoXKToVaq3SXRzpwq4JuNXHuegDQbAct35u

3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3:  -0.00700000 Waves

2022.07.10 10:12 [2133308] smart account 3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3 > SELF 0.00000000 Waves

{ "type": 13, "id": "HoxXNsq3ocoXKToVaq3SXRzpwq4JuNXHuegDQbAct35u", "fee": 700000, "feeAssetId": null, "timestamp": 1657437173573, "version": 2, "chainId": 84, "sender": "3MxSZ4FPq75Q3cQcf9VJkKFDJkeFpm5Ynm3", "senderPublicKey": "AdPVtTCVPZCuVF944iD1f5LJ9e4pjzpQ2rrxGEWt7Rbx", "proofs": [ "52iANA2UnshKJWhMYHnUaALzYfB4a5XHSoGFq3bqkpCgQJysBUaPZPSq2hkzyVskQjFfgYGR9xrzpPgSBT4SLoEr" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEBAAAACAAAAAAKZWdnQXNzZXRJZAEAAAAgF/4YCdBeNnPXi9mYwFve9iIGEZ5QZQVegfUQpkcQUdwAAAAAEGNvbGxlY3RvckFkZHJlc3MBAAAAGgFUAqwIk+AYdvRW0p5bt95mLATeRN8JIV7TAAAAAAVkZWxheQAAAAAAAAAAAgAAAAALbWF4RXhjaGFuZ2UAAAAAAAAAAAEAAAAADGV4Y2hhbmdlUmF0ZQAAAAAAAAAAAQEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAN2YWwEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAAFAAAAA3ZhbAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAA3ZhbAQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtY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AggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleczgw20=", "height": 2133308, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C9ECzazDm8sdpiWHgdY5KiWz71Y2yQukjzhosyz2Gew1 Next: 2NFL6K3EzxQ4BrQwCbhJEJj3hfj53GWMgLkcdpAqZ8Ef Diff:
OldNewDifferences
4848 let lastTransferedDay = tryGetInteger((("receiver_" + toString(i.originCaller)) + "_lastDay"))
4949 let totalAmountInDay = tryGetInteger((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"))
5050 if ((height > (lastTransferedDay + delay)))
51- then if ((maxExchange > totalAmountInDay))
51+ then if ((totalAmountInDay > maxExchange))
5252 then throw("Max exchange limit reached. Please try after 24 hours.")
53- else if ((maxExchange > (totalAmountInDay + amount)))
53+ else if (((totalAmountInDay + amount) > maxExchange))
5454 then throw("Max exchange crossed. Please try with lower value.")
5555 else [IntegerEntry((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"), (totalAmountInDay + amount)), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_waveAmount"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_tokenAmount"), totalExchangedAmount), ScriptTransfer(Address(collectorAddress), amount, unit), ScriptTransfer(i.originCaller, totalExchangedAmount, eggAssetId)]
5656 else [IntegerEntry((("receiver_" + toString(i.originCaller)) + "_lastDay"), height), IntegerEntry((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_waveAmount"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_tokenAmount"), totalExchangedAmount), ScriptTransfer(Address(collectorAddress), amount, unit), ScriptTransfer(i.originCaller, totalExchangedAmount, eggAssetId)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let eggAssetId = base58'2cf6jyVG19oHU79R8iHfqFEesjstr3e7nSYEUhb2WagB'
55
66 let collectorAddress = base58'3MpADDQFqadaCADNH9JDMQAGw9WEaMcymVU'
77
88 let delay = 2
99
1010 let maxExchange = 1
1111
1212 let exchangeRate = 1
1313
1414 func tryGetInteger (key) = {
1515 let val = match getInteger(this, key) {
1616 case b: Int =>
1717 b
1818 case _ =>
1919 0
2020 }
2121 val
2222 }
2323
2424
2525 func tryGetString (key) = {
2626 let val = match getString(this, key) {
2727 case b: String =>
2828 b
2929 case _ =>
3030 ""
3131 }
3232 val
3333 }
3434
3535
3636 func tryGetBoolean (key) = match getBoolean(this, key) {
3737 case b: Boolean =>
3838 b
3939 case _ =>
4040 false
4141 }
4242
4343
4444 @Callable(i)
4545 func exchangeToken (amount) = {
4646 let transactionId = toBase58String(i.transactionId)
4747 let totalExchangedAmount = (exchangeRate * amount)
4848 let lastTransferedDay = tryGetInteger((("receiver_" + toString(i.originCaller)) + "_lastDay"))
4949 let totalAmountInDay = tryGetInteger((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"))
5050 if ((height > (lastTransferedDay + delay)))
51- then if ((maxExchange > totalAmountInDay))
51+ then if ((totalAmountInDay > maxExchange))
5252 then throw("Max exchange limit reached. Please try after 24 hours.")
53- else if ((maxExchange > (totalAmountInDay + amount)))
53+ else if (((totalAmountInDay + amount) > maxExchange))
5454 then throw("Max exchange crossed. Please try with lower value.")
5555 else [IntegerEntry((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"), (totalAmountInDay + amount)), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_waveAmount"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_tokenAmount"), totalExchangedAmount), ScriptTransfer(Address(collectorAddress), amount, unit), ScriptTransfer(i.originCaller, totalExchangedAmount, eggAssetId)]
5656 else [IntegerEntry((("receiver_" + toString(i.originCaller)) + "_lastDay"), height), IntegerEntry((("receiver_" + toString(i.originCaller)) + "_totalAmountInDay"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_waveAmount"), amount), IntegerEntry((((("receiver_" + toString(i.originCaller)) + "_transactionId_") + transactionId) + "_tokenAmount"), totalExchangedAmount), ScriptTransfer(Address(collectorAddress), amount, unit), ScriptTransfer(i.originCaller, totalExchangedAmount, eggAssetId)]
5757 }
5858
5959
6060 @Verifier(tx)
6161 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
6262

github/deemru/w8io/026f985 
28.54 ms