tx · 85gpZfgFMmUQNQpmkjP2FaMhNDZVFvvE53GNeLzADvRL

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01000000 Waves

2021.12.11 11:45 [1829350] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "85gpZfgFMmUQNQpmkjP2FaMhNDZVFvvE53GNeLzADvRL", "fee": 1000000, "feeAssetId": null, "timestamp": 1639212349801, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "3j6iWEcz4x38yTNrzyf8ZDqaP44bP4jB7LGSZ6jHxXfuuR8FwTiQUjAHNd4kSQAUNz1ua6xBqkb3xSmzucJL63gF" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGJ1cm5pbmdzdGFnZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAABGNhbGwAAAABAAAABGlkNTgEAAAAC2N1cnJlbnR0aW1lBAAAAAckbWF0Y2gwCQAD7QAAAAEFAAAABmhlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAVibG9jawUAAAAHJG1hdGNoMAgFAAAABWJsb2NrAAAACXRpbWVzdGFtcAkAAAIAAAABAgA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AAEsAAAAAgIAAAAMcmVzZWl2ZWQgaW4gCQABpAAAAAEFAAAAC2N1cnJlbnR0aW1lAgAAAAACAAAAFWNhbnQgZmluZCB0cmFuc2FjdGlvbgMFAAAACWlzcHJvb3ZlZAMJAABmAAAAAgUAAAAKYnVybmFtb3VudAAAAAAAAAAAAAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACmRyb3BhbW91bnQFAAAABXRva2VuCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAGcmVzdWx0CQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAFdG9rZW4AAAAAAAAAA+cFAAAAA25pbAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAtjdXJyZW50dGltZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACmRyb3BhbW91bnQFAAAABXRva2VuBQAAAANuaWwJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAZyZXN1bHQFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAAAjpTt/w==", "height": 1829350, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2AyZ25iTsheeDdqQ3g2X6zrAY7bEAcjyCwjghGcxmAGx Next: BKiUxiX31xrvnKvU4fKkyBxwGt2PdizczEBMmjdAMHpq Diff:
OldNewDifferences
5656 case _ =>
5757 airdrop
5858 }
59- let received = match getInteger(toBase58String(i.caller.bytes)) {
60- case a: Int =>
61- true
62- case _ =>
63- false
64- }
59+ let received = if ((take(valueOrElse(getStringValue(toBase58String(i.caller.bytes)), ""), 8) == "received"))
60+ then true
61+ else false
6562 let isprooved = if (if (if ((trtime > time))
6663 then true
6764 else (callerAdress != trsender))
7168 else true
7269 let result = if (trexists)
7370 then if ((trtime > time))
74- then ("out of time range: " + toString(trtime))
71+ then ("transaction is out of time range: " + toString(trtime))
7572 else ("" + (if ((callerAdress != trsender))
76- then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
73+ then ((("it is incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
7774 else ("" + (if (received)
78- then getStringValue((toBase58String(i.caller.bytes) + "_result"))
75+ then getStringValue(toBase58String(i.caller.bytes))
7976 else ("" + (if (isprooved)
8077 then ("reseived in " + toString(currenttime))
8178 else ""))))))
8279 else "cant find transaction"
8380 if (isprooved)
8481 then if ((burnamount > 0))
85- then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), StringEntry((toBase58String(i.caller.bytes) + "_result"), result), Burn(token, 999)]
82+ then [ScriptTransfer(callerAdress, dropamount, token), StringEntry(toBase58String(i.caller.bytes), result), Burn(token, 999)]
8683 else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)]
87- else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)]
84+ else [StringEntry(toBase58String(i.caller.bytes), result)]
8885 }
8986 else throw("Strict value is not equal to itself.")
9087 }
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 }
59- let received = match getInteger(toBase58String(i.caller.bytes)) {
60- case a: Int =>
61- true
62- case _ =>
63- false
64- }
59+ let received = if ((take(valueOrElse(getStringValue(toBase58String(i.caller.bytes)), ""), 8) == "received"))
60+ then true
61+ else false
6562 let isprooved = if (if (if ((trtime > time))
6663 then true
6764 else (callerAdress != trsender))
6865 then true
6966 else received)
7067 then false
7168 else true
7269 let result = if (trexists)
7370 then if ((trtime > time))
74- then ("out of time range: " + toString(trtime))
71+ then ("transaction is out of time range: " + toString(trtime))
7572 else ("" + (if ((callerAdress != trsender))
76- then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
73+ then ((("it is incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
7774 else ("" + (if (received)
78- then getStringValue((toBase58String(i.caller.bytes) + "_result"))
75+ then getStringValue(toBase58String(i.caller.bytes))
7976 else ("" + (if (isprooved)
8077 then ("reseived in " + toString(currenttime))
8178 else ""))))))
8279 else "cant find transaction"
8380 if (isprooved)
8481 then if ((burnamount > 0))
85- then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), StringEntry((toBase58String(i.caller.bytes) + "_result"), result), Burn(token, 999)]
82+ then [ScriptTransfer(callerAdress, dropamount, token), StringEntry(toBase58String(i.caller.bytes), result), Burn(token, 999)]
8683 else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)]
87- else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)]
84+ else [StringEntry(toBase58String(i.caller.bytes), result)]
8885 }
8986 else throw("Strict value is not equal to itself.")
9087 }
9188
9289

github/deemru/w8io/026f985 
29.53 ms