tx · 7VA5eTSCvYJbbaavFGcz8pMaUxaCuQ9jwSWQwLGDcx98

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.10 21:49 [1828520] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "7VA5eTSCvYJbbaavFGcz8pMaUxaCuQ9jwSWQwLGDcx98", "fee": 1000000, "feeAssetId": null, "timestamp": 1639162214206, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "5cMzpHKNNyYWT675y8UxNtiNpGVRqKKczmo8kUByHrh3FuTXPvGgmq7usjnisX9eusury4kAWPCoLPuq6jkRWfFM" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGJ1cm5pbmdzdGFnZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAABGNhbGwAAAABAAAABGlkNTgEAAAAC2N1cnJlbnR0aW1lBAAAAAckbWF0Y2gwCQAD7QAAAAEFAAAABmhlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAVibG9jawUAAAAHJG1hdGNoMAgFAAAABWJsb2NrAAAACXRpbWVzdGFtcAkAAAIAAAABAgAAABB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AAAC2N1cnJlbnR0aW1lAgAAAAACAAAAFWNhbnQgZmluZCB0cmFuc2FjdGlvbgMFAAAACWlzcHJvb3ZlZAMJAABmAAAAAgUAAAAKYnVybmFtb3VudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAtjdXJyZW50dGltZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACmRyb3BhbW91bnQFAAAABXRva2VuCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAFdG9rZW4AAAAAAAAAA+cFAAAAA25pbAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAtjdXJyZW50dGltZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACmRyb3BhbW91bnQFAAAABXRva2VuBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMCAAAAB19yZXN1bHQFAAAABnJlc3VsdAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAA7tVah", "height": 1828520, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9QD2vUGN6LJWaFWK1BZDDyGVL4pmhxAy6TBqDNTwCjnp Next: Co8j2KeLtaH2UmvZQtN4ayx1wKmex7vG58hDwMohGpyk Diff:
OldNewDifferences
6969 else received)
7070 then false
7171 else true
72- let result = if (!(trexists))
72+ let result = if (trexists)
7373 then if ((trtime > time))
7474 then ("out of time range: " + toString(trtime))
7575 else ("" + (if ((callerAdress != trsender))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let token = base58'GZc7eKnq2KJwqetRmUzSqr2ZaCGseDZufSocz83sUNoo'
55
66 let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV')
77
88 @Callable(i)
99 func reset () = [DeleteEntry(toBase58String(i.caller.bytes)), IntegerEntry("burningstage", 0)]
1010
1111
1212
1313 @Callable(i)
1414 func call (id58) = {
1515 let currenttime = match blockInfoByHeight(height) {
1616 case block: BlockInfo =>
1717 block.timestamp
1818 case _ =>
1919 throw("Can't find block")
2020 }
2121 let balance = assetBalance(airdrop, token)
2222 let burnamount = match getInteger("burningstage") {
2323 case a: Int =>
2424 if (if ((getIntegerValue("burningstage") == 0))
2525 then (currenttime > 1639131654752)
2626 else false)
2727 then fraction(balance, 10, 100)
2828 else 0
2929 case _ =>
3030 throw("no burningstage")
3131 }
3232 let dropamount = 100
3333 let isenough = if ((balance > dropamount))
3434 then true
3535 else throw("not enough")
3636 if ((isenough == isenough))
3737 then {
3838 let id = fromBase58String(id58)
3939 let callerAdress = Address(i.caller.bytes)
4040 let time = 1639148135492
4141 let trexists = match transferTransactionById(id) {
4242 case ttx: TransferTransaction =>
4343 true
4444 case _ =>
4545 false
4646 }
4747 let trtime = match transferTransactionById(id) {
4848 case ttx: TransferTransaction =>
4949 ttx.timestamp
5050 case _ =>
5151 9999999999999
5252 }
5353 let trsender = match transferTransactionById(id) {
5454 case ttx: TransferTransaction =>
5555 ttx.sender
5656 case _ =>
5757 airdrop
5858 }
5959 let received = match getInteger(toBase58String(i.caller.bytes)) {
6060 case a: Int =>
6161 true
6262 case _ =>
6363 false
6464 }
6565 let isprooved = if (if (if ((trtime > time))
6666 then true
6767 else (callerAdress != trsender))
6868 then true
6969 else received)
7070 then false
7171 else true
72- let result = if (!(trexists))
72+ let result = if (trexists)
7373 then if ((trtime > time))
7474 then ("out of time range: " + toString(trtime))
7575 else ("" + (if ((callerAdress != trsender))
7676 then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
7777 else ("" + (if (received)
7878 then " allready received "
7979 else ("" + (if (isprooved)
8080 then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime))
8181 else ""))))))
8282 else "cant find transaction"
8383 if (isprooved)
8484 then if ((burnamount > 0))
8585 then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), Burn(token, 999)]
8686 else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)]
8787 else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)]
8888 }
8989 else throw("Strict value is not equal to itself.")
9090 }
9191
9292

github/deemru/w8io/026f985 
27.50 ms