tx · 8E2j3XCQouCGp449rKAMjZtrgwsEW2ke4nB2wHjX4czr 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV: -0.01000000 Waves 2021.12.11 13:59 [1829483] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves
{ "type": 13, "id": "8E2j3XCQouCGp449rKAMjZtrgwsEW2ke4nB2wHjX4czr", "fee": 1000000, "feeAssetId": null, "timestamp": 1639220380472, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "2ZvybfnyxvRRxjGhjDaswBdph3tsCctgEmMeNAWPq25G1fjuMx67obEeB1hR9SrW11TQX2oFBDk7sbUpTWTC7Kyp" ], "script": "base64:AAIFAAAAAAAAAAkIAhIAEgMKAQgAAAACAAAAAAV0b2tlbgEAAAAg5zmYC5DQKkfOfYR6rLZt3/lvGLH9m+/aCHI3ec3qXmYAAAAAB2FpcmRyb3AJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVS+Xxmw1G5CNHxEd2QN+w1gvRpGRxhc54oAAAACAAAAAWkBAAAABXJlc2V0AAAAAAkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAADGJ1cm5pbmdzdGFnZQAAAAAAAAAAAAUAAAADbmlsAAAAAWkBAAAABGNhbGwAAAABAAAABGlkNTgEAAAAC2N1cnJlbnR0aW1lBAAAAAckbWF0Y2gwCQAD7QAAAAEFAAAABmhlaWdodAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAJQmxvY2tJbmZvBAAAAAVibG9jawUAAAAHJG1hdGNoMAgFAAAABWJsb2NrAAAACXRpbWVzdGFtcAkAAAIAAAABAgAAABBDYW4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AGkAAAAAQUAAAALY3VycmVudHRpbWUCAAAAAAIAAAAVY2FudCBmaW5kIHRyYW5zYWN0aW9uAwUAAAAJaXNwcm9vdmVkAwkAAGYAAAACBQAAAApidXJuYW1vdW50AAAAAAAAAAAACQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGNhbGxlckFkcmVzcwUAAAAKZHJvcGFtb3VudAUAAAAFdG9rZW4JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBQAAAAZyZXN1bHQJAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAAV0b2tlbgAAAAAAAAAD5wUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAGcmVzdWx0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAADGNhbGxlckFkcmVzcwUAAAAKZHJvcGFtb3VudAUAAAAFdG9rZW4FAAAAA25pbAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMFAAAABnJlc3VsdAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAByZ95w", "height": 1829483, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6hAR8Lyx1XZ6uBvpWBi1e9hkttvMKa13CMB9MoS8cLNz Next: FBTU6Vdp9nUivavwvFpp7MKRcP6aCFFUiVujTZZrDsjf Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | if (isprooved) | |
81 | 81 | then if ((burnamount > 0)) | |
82 | 82 | then [ScriptTransfer(callerAdress, dropamount, token), StringEntry(toBase58String(i.caller.bytes), result), Burn(token, 999)] | |
83 | - | else [ | |
83 | + | else [StringEntry(toBase58String(i.caller.bytes), result), ScriptTransfer(callerAdress, dropamount, token)] | |
84 | 84 | else [StringEntry(toBase58String(i.caller.bytes), result)] | |
85 | 85 | } | |
86 | 86 | else throw("Strict value is not equal to itself.") |
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 = if ((take(valueOrElse(getString(toBase58String(i.caller.bytes)), ""), 8) == "received")) | |
60 | 60 | then true | |
61 | 61 | else false | |
62 | 62 | let isprooved = if (if (if ((trtime > time)) | |
63 | 63 | then true | |
64 | 64 | else (callerAdress != trsender)) | |
65 | 65 | then true | |
66 | 66 | else received) | |
67 | 67 | then false | |
68 | 68 | else true | |
69 | 69 | let result = if (trexists) | |
70 | 70 | then if ((trtime > time)) | |
71 | 71 | then ("transaction is out of time range: " + toString(trtime)) | |
72 | 72 | else ("" + (if ((callerAdress != trsender)) | |
73 | 73 | then ((("it is incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender)) | |
74 | 74 | else ("" + (if (received) | |
75 | 75 | then getStringValue(toBase58String(i.caller.bytes)) | |
76 | 76 | else ("" + (if (isprooved) | |
77 | 77 | then ("reseived in " + toString(currenttime)) | |
78 | 78 | else "")))))) | |
79 | 79 | else "cant find transaction" | |
80 | 80 | if (isprooved) | |
81 | 81 | then if ((burnamount > 0)) | |
82 | 82 | then [ScriptTransfer(callerAdress, dropamount, token), StringEntry(toBase58String(i.caller.bytes), result), Burn(token, 999)] | |
83 | - | else [ | |
83 | + | else [StringEntry(toBase58String(i.caller.bytes), result), ScriptTransfer(callerAdress, dropamount, token)] | |
84 | 84 | else [StringEntry(toBase58String(i.caller.bytes), result)] | |
85 | 85 | } | |
86 | 86 | else throw("Strict value is not equal to itself.") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 |
github/deemru/w8io/026f985 42.16 ms ◑