tx · 2RrhLdF3EkWedR1ViV8qJJtNKQ8fL3HgB1Ps8VVYcLvn 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV: -0.01400000 Waves 2021.12.10 14:39 [1828095] smart account 3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV > SELF 0.00000000 Waves
{ "type": 13, "id": "2RrhLdF3EkWedR1ViV8qJJtNKQ8fL3HgB1Ps8VVYcLvn", "fee": 1400000, "feeAssetId": null, "timestamp": 1639136384844, "version": 2, "chainId": 84, "sender": "3N7Gg64FJ3ESaqn41qu1ete7zmzbmoP1AAV", "senderPublicKey": "5amLtMwixiEesBDKPy9dkFWntG2fNxhTs5n69JbQE9F7", "proofs": [ "3GYvY41kTDnTb2ZZsBJFwLXPFvk7MeeWGgMkm3xbT2kCXJGm4UTK3fD8R8Vp41qkL9Yq1GEQERdqX5k8xeJVX5Ev" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAAAgAAAAAFdG9rZW4BAAAAIOc5mAuQ0CpHzn2Eeqy2bd/5bxix/Zvv2ghyN3nN6l5mAAAAAAdhaXJkcm9wCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUvl8ZsNRuQjR8RHdkDfsNYL0aRkcYXOeKAAAAAQAAAAFpAQAAAARjYWxsAAAAAQAAAARpZDU4BAAAAAdiYWxhbmNlCQAD8AAAAAIFAAAAB2FpcmRyb3AFAAAABXRva2VuBAAAAApkcm9wYW1vdW50AAAAAAAAAABkBAAAAAhpc2Vub3VnaAMJAABmAAAAAgUAAAAHYmFsYW5jZQUAAAAKZHJvcGFtb3VudAYJAAACAAAAAQIAAAAKbm90IGVub3VnaAMJAAAAAAAAAgUAAAAIaXNlbm91Z2gFAAAACGlzZW5vdWdoBAAAAAJpZAkAAlkAAAABBQAAAARpZDU4BAAAAAxjYWxsZXJBZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAEdGltZQAAA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AAAACHJlY2VpdmVkAgAAAAdwcm9vdmVkAwUAAAAJaXNwcm9vdmVkCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwUAAAAEbWVzcwUAAAADbmlsCQAAAgAAAAECAAAAC25vdCBwcm9vdmVkCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5kAt7CQ==", "height": 1828095, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9PR7nSqRiRramspw2BLGZ3pEWwXAenLj18AE9FWgTSxW Next: 48efv1TpfzhnXjMiFrRV49iyFePySZ9ogH6MSd7Bck6z Diff:
Old | New | Differences | |
---|---|---|---|
30 | 30 | throw("Can't find transaction") | |
31 | 31 | } | |
32 | 32 | let received = match getString(toBase58String(i.caller.bytes)) { | |
33 | - | case a: Unit => | |
33 | + | case a: String => | |
34 | + | false | |
35 | + | case _ => | |
34 | 36 | true | |
35 | - | case _ => | |
36 | - | false | |
37 | 37 | } | |
38 | 38 | let isprooved = if (if (if ((trtime > time)) | |
39 | 39 | then true | |
50 | 50 | then "received" | |
51 | 51 | else "prooved" | |
52 | 52 | if (isprooved) | |
53 | - | then [StringEntry(toBase58String(i.caller.bytes), mess) | |
53 | + | then [StringEntry(toBase58String(i.caller.bytes), mess)] | |
54 | 54 | else throw("not prooved") | |
55 | 55 | } | |
56 | 56 | 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 call (id58) = { | |
10 | 10 | let balance = assetBalance(airdrop, token) | |
11 | 11 | let dropamount = 100 | |
12 | 12 | let isenough = if ((balance > dropamount)) | |
13 | 13 | then true | |
14 | 14 | else throw("not enough") | |
15 | 15 | if ((isenough == isenough)) | |
16 | 16 | then { | |
17 | 17 | let id = fromBase58String(id58) | |
18 | 18 | let callerAdress = Address(i.caller.bytes) | |
19 | 19 | let time = 1639131654752 | |
20 | 20 | let trtime = match transferTransactionById(id) { | |
21 | 21 | case ttx: TransferTransaction => | |
22 | 22 | ttx.timestamp | |
23 | 23 | case _ => | |
24 | 24 | throw("Can't find transaction") | |
25 | 25 | } | |
26 | 26 | let trsender = match transferTransactionById(id) { | |
27 | 27 | case ttx: TransferTransaction => | |
28 | 28 | ttx.sender | |
29 | 29 | case _ => | |
30 | 30 | throw("Can't find transaction") | |
31 | 31 | } | |
32 | 32 | let received = match getString(toBase58String(i.caller.bytes)) { | |
33 | - | case a: Unit => | |
33 | + | case a: String => | |
34 | + | false | |
35 | + | case _ => | |
34 | 36 | true | |
35 | - | case _ => | |
36 | - | false | |
37 | 37 | } | |
38 | 38 | let isprooved = if (if (if ((trtime > time)) | |
39 | 39 | then true | |
40 | 40 | else (callerAdress != trsender)) | |
41 | 41 | then true | |
42 | 42 | else received) | |
43 | 43 | then false | |
44 | 44 | else true | |
45 | 45 | let mess = if ((trtime > time)) | |
46 | 46 | then ("overtime: " + toString(trtime)) | |
47 | 47 | else if ((callerAdress != trsender)) | |
48 | 48 | then ((("incorrect sender: " + toString(callerAdress)) + " / ") + toString(trsender)) | |
49 | 49 | else if (received) | |
50 | 50 | then "received" | |
51 | 51 | else "prooved" | |
52 | 52 | if (isprooved) | |
53 | - | then [StringEntry(toBase58String(i.caller.bytes), mess) | |
53 | + | then [StringEntry(toBase58String(i.caller.bytes), mess)] | |
54 | 54 | else throw("not prooved") | |
55 | 55 | } | |
56 | 56 | else throw("Strict value is not equal to itself.") | |
57 | 57 | } | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | @Verifier(tx) | |
61 | 61 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
62 | 62 |
github/deemru/w8io/026f985 19.81 ms ◑