tx · 9QD2vUGN6LJWaFWK1BZDDyGVL4pmhxAy6TBqDNTwCjnp

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.10 21:35 [1828504] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "9QD2vUGN6LJWaFWK1BZDDyGVL4pmhxAy6TBqDNTwCjnp", "fee": 1000000, "feeAssetId": null, "timestamp": 1639158350838, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "4PFbY11PtwpUwmzJLfxhCbbLx7YJMovxxwocRsPVaAadrKQPAbbBmdTiQAyeyo8SvTMe2B4gD71AvRXs2cdSbuMQ" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGJ1cm5pbmdzdGFnZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAABGNhbGwAAAABAAAABGlkNTgEAAAAC2N1cnJlbnR0aW1lBAAAAAckbWF0Y2gwCQAD7QAAAAEFAAAABmhlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAVibG9jawUAAAAHJG1hdGNoMAgFAAAABWJsb2NrAAAACXRpbWVzdGFtcAkAAAIAAA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AAAAQUAAAALY3VycmVudHRpbWUCAAAAAAIAAAAVY2FudCBmaW5kIHRyYW5zYWN0aW9uAwUAAAAJaXNwcm9vdmVkAwkAAGYAAAACBQAAAApidXJuYW1vdW50AAAAAAAAAAAACQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAC2N1cnJlbnR0aW1lCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGNhbGxlckFkcmVzcwUAAAAKZHJvcGFtb3VudAUAAAAFdG9rZW4JAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAAV0b2tlbgAAAAAAAAAD5wUAAAADbmlsCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAC2N1cnJlbnR0aW1lCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGNhbGxlckFkcmVzcwUAAAAKZHJvcGFtb3VudAUAAAAFdG9rZW4FAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAHX3Jlc3VsdAUAAAAGcmVzdWx0BQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAO/jPF4=", "height": 1828504, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DRA93Ydyj7RZ9FMwAD9Ff4SjwFQgNTkWRWz48CXGEYxt Next: 7VA5eTSCvYJbbaavFGcz8pMaUxaCuQ9jwSWQwLGDcx98 Diff:
OldNewDifferences
6969 else received)
7070 then false
7171 else true
72- let result = (((if ((trtime > time))
73- then ("out of time range: " + toString(trtime))
74- else "") + (if ((callerAdress != trsender))
75- then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
76- else "")) + (if (received)
77- then " allready received "
78- else ("" + (if (isprooved)
79- then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime))
80- else ""))))
72+ let result = if (!(trexists))
73+ then if ((trtime > time))
74+ then ("out of time range: " + toString(trtime))
75+ else ("" + (if ((callerAdress != trsender))
76+ then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
77+ else ("" + (if (received)
78+ then " allready received "
79+ else ("" + (if (isprooved)
80+ then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime))
81+ else ""))))))
82+ else "cant find transaction"
8183 if (isprooved)
8284 then if ((burnamount > 0))
8385 then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), Burn(token, 999)]
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 ((trtime > time))
73- then ("out of time range: " + toString(trtime))
74- else "") + (if ((callerAdress != trsender))
75- then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
76- else "")) + (if (received)
77- then " allready received "
78- else ("" + (if (isprooved)
79- then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime))
80- else ""))))
72+ let result = if (!(trexists))
73+ then if ((trtime > time))
74+ then ("out of time range: " + toString(trtime))
75+ else ("" + (if ((callerAdress != trsender))
76+ then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
77+ else ("" + (if (received)
78+ then " allready received "
79+ else ("" + (if (isprooved)
80+ then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime))
81+ else ""))))))
82+ else "cant find transaction"
8183 if (isprooved)
8284 then if ((burnamount > 0))
8385 then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), Burn(token, 999)]
8486 else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)]
8587 else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)]
8688 }
8789 else throw("Strict value is not equal to itself.")
8890 }
8991
9092

github/deemru/w8io/026f985 
23.13 ms