tx · 9PR7nSqRiRramspw2BLGZ3pEWwXAenLj18AE9FWgTSxW

3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV:  -0.01400000 Waves

2021.12.10 14:29 [1828087] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves

{ "type": 13, "id": "9PR7nSqRiRramspw2BLGZ3pEWwXAenLj18AE9FWgTSxW", "fee": 1400000, "feeAssetId": null, "timestamp": 1639135784328, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "3ojT8oizSvKd2rpEpdZFLsYtBKqHoCGUWXkcYywyiY91sTmqGuogqtjhsuXN5xSXr71nXep7aeJcHCJc24msTKcb" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAFdG9rZW4BAAAAIOc5mAuQ0CpHzn2Eeqy2bd/5bxix/Zvv2ghyN3nN6l5mAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUvl8ZsNRuQjR8RHdkDfsNYL0aRkcYXOeKAAAAAQAAAAFpAQAAAARjYWxsAAAAAQAAAARpZDU4BAAAAAdiYWxhbmNlCQAD8AAAAAIFAAAAB2FpcmRyb3AFAAAABXRva2VuBAAAAApkcm9wYW1vdW50AAAAAAAAAABkBAAAAAhpc2Vub3VnaAMJAABmAAAAAgUAAAAHYmFsYW5jZQUAAAAKZHJvcGFtb3VudAYJAAACAAAAAQIAAAAKbm90IGVub3VnaAMJAAAAAAAAAgUAAAAIaXNlbm91Z2gFAAAACGlzZW5vdWdoBAAAAAJpZAkAAlkAAAABBQAAAARpZDU4BAAAAAxjYWxsZXJBZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEdGltZQAAAAF9o9wqYAQAAAAGdHJ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WlzcHJvb3ZlZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAABG1lc3MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHYmFsYW5jZQkAAaQAAAABBQAAAAdiYWxhbmNlBQAAAANuaWwJAAACAAAAAQIAAAALbm90IHByb292ZWQJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnbiV6V", "height": 1828087, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CPHhfneoWM4KouQ85JUERQQ6waSXhBgC3vuKknUAGj8m Next: 2RrhLdF3EkWedR1ViV8qJJtNKQ8fL3HgB1Ps8VVYcLvn Diff:
OldNewDifferences
88 @Callable(i)
99 func call (id58) = {
1010 let balance = assetBalance(airdrop, token)
11- let dropamount = 1000000001
11+ let dropamount = 100
1212 let isenough = if ((balance > dropamount))
1313 then true
1414 else throw("not enough")
2929 case _ =>
3030 throw("Can't find transaction")
3131 }
32- let isprooved = if (if ((trtime > time))
32+ let received = match getString(toBase58String(i.caller.bytes)) {
33+ case a: Unit =>
34+ true
35+ case _ =>
36+ false
37+ }
38+ let isprooved = if (if (if ((trtime > time))
3339 then true
3440 else (callerAdress != trsender))
41+ then true
42+ else received)
3543 then false
3644 else true
3745 let mess = if ((trtime > time))
3846 then ("overtime: " + toString(trtime))
3947 else if ((callerAdress != trsender))
4048 then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
41- else "prooved"
49+ else if (received)
50+ then "received"
51+ else "prooved"
4252 if (isprooved)
4353 then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balance))]
4454 else throw("not prooved")
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 call (id58) = {
1010 let balance = assetBalance(airdrop, token)
11- let dropamount = 1000000001
11+ let dropamount = 100
1212 let isenough = if ((balance > dropamount))
1313 then true
1414 else throw("not enough")
1515 if ((isenough == isenough))
1616 then {
1717 let id = fromBase58String(id58)
1818 let callerAdress = Address(i.caller.bytes)
1919 let time = 1639131654752
2020 let trtime = match transferTransactionById(id) {
2121 case ttx: TransferTransaction =>
2222 ttx.timestamp
2323 case _ =>
2424 throw("Can't find transaction")
2525 }
2626 let trsender = match transferTransactionById(id) {
2727 case ttx: TransferTransaction =>
2828 ttx.sender
2929 case _ =>
3030 throw("Can't find transaction")
3131 }
32- let isprooved = if (if ((trtime > time))
32+ let received = match getString(toBase58String(i.caller.bytes)) {
33+ case a: Unit =>
34+ true
35+ case _ =>
36+ false
37+ }
38+ let isprooved = if (if (if ((trtime > time))
3339 then true
3440 else (callerAdress != trsender))
41+ then true
42+ else received)
3543 then false
3644 else true
3745 let mess = if ((trtime > time))
3846 then ("overtime: " + toString(trtime))
3947 else if ((callerAdress != trsender))
4048 then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender))
41- else "prooved"
49+ else if (received)
50+ then "received"
51+ else "prooved"
4252 if (isprooved)
4353 then [StringEntry(toBase58String(i.caller.bytes), mess), StringEntry("balance", toString(balance))]
4454 else throw("not prooved")
4555 }
4656 else throw("Strict value is not equal to itself.")
4757 }
4858
4959
5060 @Verifier(tx)
5161 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
5262

github/deemru/w8io/026f985 
41.85 ms