tx · Co8j2KeLtaH2UmvZQtN4ayx1wKmex7vG58hDwMohGpyk 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV: -0.01000000 Waves 2021.12.10 21:55 [1828526] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves
{ "type": 13, "id": "Co8j2KeLtaH2UmvZQtN4ayx1wKmex7vG58hDwMohGpyk", "fee": 1000000, "feeAssetId": null, "timestamp": 1639162578807, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "3CjRmDmNBB2TEv3qK47qiWixtrpZRi1U7NLqxECcWSTH7w8rRR6sqwoFXXkRZ3K1u3d9d3J8nCHkgEzqtvuE1wkh" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGJ1cm5pbmdzdGFnZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAABGNhbGwAAAABAAAABGlkNTgEAAAAC2N1cnJlbnR0aW1lBAAAAAckbWF0Y2gwCQAD7QAAAAEFAAAABmhlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAVibG9jawUAAAAHJG1hdGNoMAgFAAAABWJsb2NrAAAACXRpbWVzdGFtcAkAAAIAAAABAgAAAB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AAAAC2N1cnJlbnR0aW1lAgAAAAACAAAAFWNhbnQgZmluZCB0cmFuc2FjdGlvbgMFAAAACWlzcHJvb3ZlZAMJAABmAAAAAgUAAAAKYnVybmFtb3VudAAAAAAAAAAAAAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAtjdXJyZW50dGltZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAxjYWxsZXJBZHJlc3MFAAAACmRyb3BhbW91bnQFAAAABXRva2VuCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAgAAAAdfcmVzdWx0BQAAAAZyZXN1bHQJAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAAV0b2tlbgAAAAAAAAAD5wUAAAADbmlsCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAAC2N1cnJlbnR0aW1lCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGNhbGxlckFkcmVzcwUAAAAKZHJvcGFtb3VudAUAAAAFdG9rZW4FAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwIAAAAHX3Jlc3VsdAUAAAAGcmVzdWx0BQAAAANuaWwJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAL/XATs=", "height": 1828526, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7VA5eTSCvYJbbaavFGcz8pMaUxaCuQ9jwSWQwLGDcx98 Next: GhEPN8EooDq7rcMqKPKFXdJoNwKEPoAv5PXoAvgKABSv Diff:
Old | New | Differences | |
---|---|---|---|
82 | 82 | else "cant find transaction" | |
83 | 83 | if (isprooved) | |
84 | 84 | then if ((burnamount > 0)) | |
85 | - | then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), Burn(token, 999)] | |
85 | + | then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), StringEntry((toBase58String(i.caller.bytes) + "_result"), result), Burn(token, 999)] | |
86 | 86 | else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)] | |
87 | 87 | else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)] | |
88 | 88 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let token = base58'GZc7eKnq2KJwqetRmUzSqr2ZaCGseDZufSocz83sUNoo' | |
5 | 5 | ||
6 | 6 | let airdrop = Address(base58'3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV') | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func reset () = [DeleteEntry(toBase58String(i.caller.bytes)), IntegerEntry("burningstage", 0)] | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | ||
13 | 13 | @Callable(i) | |
14 | 14 | func call (id58) = { | |
15 | 15 | let currenttime = match blockInfoByHeight(height) { | |
16 | 16 | case block: BlockInfo => | |
17 | 17 | block.timestamp | |
18 | 18 | case _ => | |
19 | 19 | throw("Can't find block") | |
20 | 20 | } | |
21 | 21 | let balance = assetBalance(airdrop, token) | |
22 | 22 | let burnamount = match getInteger("burningstage") { | |
23 | 23 | case a: Int => | |
24 | 24 | if (if ((getIntegerValue("burningstage") == 0)) | |
25 | 25 | then (currenttime > 1639131654752) | |
26 | 26 | else false) | |
27 | 27 | then fraction(balance, 10, 100) | |
28 | 28 | else 0 | |
29 | 29 | case _ => | |
30 | 30 | throw("no burningstage") | |
31 | 31 | } | |
32 | 32 | let dropamount = 100 | |
33 | 33 | let isenough = if ((balance > dropamount)) | |
34 | 34 | then true | |
35 | 35 | else throw("not enough") | |
36 | 36 | if ((isenough == isenough)) | |
37 | 37 | then { | |
38 | 38 | let id = fromBase58String(id58) | |
39 | 39 | let callerAdress = Address(i.caller.bytes) | |
40 | 40 | let time = 1639148135492 | |
41 | 41 | let trexists = match transferTransactionById(id) { | |
42 | 42 | case ttx: TransferTransaction => | |
43 | 43 | true | |
44 | 44 | case _ => | |
45 | 45 | false | |
46 | 46 | } | |
47 | 47 | let trtime = match transferTransactionById(id) { | |
48 | 48 | case ttx: TransferTransaction => | |
49 | 49 | ttx.timestamp | |
50 | 50 | case _ => | |
51 | 51 | 9999999999999 | |
52 | 52 | } | |
53 | 53 | let trsender = match transferTransactionById(id) { | |
54 | 54 | case ttx: TransferTransaction => | |
55 | 55 | ttx.sender | |
56 | 56 | case _ => | |
57 | 57 | airdrop | |
58 | 58 | } | |
59 | 59 | let received = match getInteger(toBase58String(i.caller.bytes)) { | |
60 | 60 | case a: Int => | |
61 | 61 | true | |
62 | 62 | case _ => | |
63 | 63 | false | |
64 | 64 | } | |
65 | 65 | let isprooved = if (if (if ((trtime > time)) | |
66 | 66 | then true | |
67 | 67 | else (callerAdress != trsender)) | |
68 | 68 | then true | |
69 | 69 | else received) | |
70 | 70 | then false | |
71 | 71 | else true | |
72 | 72 | let result = if (trexists) | |
73 | 73 | then if ((trtime > time)) | |
74 | 74 | then ("out of time range: " + toString(trtime)) | |
75 | 75 | else ("" + (if ((callerAdress != trsender)) | |
76 | 76 | then (((" incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender)) | |
77 | 77 | else ("" + (if (received) | |
78 | 78 | then " allready received " | |
79 | 79 | else ("" + (if (isprooved) | |
80 | 80 | then ((toBase58String(i.caller.bytes) + " reseived in ") + toString(currenttime)) | |
81 | 81 | else "")))))) | |
82 | 82 | else "cant find transaction" | |
83 | 83 | if (isprooved) | |
84 | 84 | then if ((burnamount > 0)) | |
85 | - | then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), Burn(token, 999)] | |
85 | + | then [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token), StringEntry((toBase58String(i.caller.bytes) + "_result"), result), Burn(token, 999)] | |
86 | 86 | else [IntegerEntry(toBase58String(i.caller.bytes), currenttime), ScriptTransfer(callerAdress, dropamount, token)] | |
87 | 87 | else [StringEntry((toBase58String(i.caller.bytes) + "_result"), result)] | |
88 | 88 | } | |
89 | 89 | else throw("Strict value is not equal to itself.") | |
90 | 90 | } | |
91 | 91 | ||
92 | 92 |
github/deemru/w8io/026f985 23.80 ms ◑