tx · NR4GQqYLGivbNd9WFgjvZZPgqANfhUYq9QekWpGJogx 3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB: -0.01000000 Waves 2022.05.17 17:23 [2055775] smart account 3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB > SELF 0.00000000 Waves
{ "type": 13, "id": "NR4GQqYLGivbNd9WFgjvZZPgqANfhUYq9QekWpGJogx", "fee": 1000000, "feeAssetId": null, "timestamp": 1652797465173, "version": 2, "chainId": 84, "sender": "3MtEFgs9JgvadLTPHxmNTLoYdWeb2q6S8NB", "senderPublicKey": "1TPcHyMLh4VbFSScV3oHKxxgdSwY4XC6TaGyrqhFrhd", "proofs": [ "5jf1gqH5HiopTdPXYkALCbwkhHuoMtZXjFH9dXkswutgbRQFRQxJdFz71g1DMuUUATQRb6RX9xQjrotSFJhvoiPE" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAgEAAAAPY2hlY2tGZWVBc3NldElkAAAAAQAAAAFpBAAAAAckbWF0Y2gwCAUAAAABaQAAAApmZWVBc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAApCeXRlVmVjdG9yBAAAAAVhc3NldAUAAAAHJG1hdGNoMAkABEwAAAACCQACWAAAAAEFAAAABWFzc2V0BQAAAANuaWwJAARMAAAAAgIAAAAFd2F2ZXMFAAAAA25pbAEAAAAMY2hlY2tQYXltZW50AAAAAQAAAAFpBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkAAGYAAAACCAUAAAABcAAAAAZhbW91bnQAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAABWFzc2V0BQAAAAckbWF0Y2gwCQAETAAAAAIJAAJYAAAAAQUAAAAFYXNzZXQFAAAAA25pbAkABEwAAAACAgAAAAV3YXZlcwUAAAADbmlsCQAETAAA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2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleTIfrCE=", "height": 2055775, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7Psy88zd6DWu3stqF38cLMkJvWPZa3tLyw265et97FQU Next: 3ZoT7WiTHKzGU7ZT6PYfhBy7U8NQW8ut6iS3evdG6QdT Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let message = base58'emsY' | |
4 | + | func checkFeeAssetId (i) = match i.feeAssetId { | |
5 | + | case asset: ByteVector => | |
6 | + | [toBase58String(asset)] | |
7 | + | case _ => | |
8 | + | ["waves"] | |
9 | + | } | |
5 | 10 | ||
6 | - | let pub = base58'HnU9jfhpMcQNaG5yQ46eR43RnkWKGxerw2zVrbpnbGof' | |
7 | 11 | ||
8 | - | let sig = base58'4uXfw7162zaopAkTNa7eo6YK2mJsTiHGJL3dCtRRH63z1nrdoHBHyhbvrfZovkxf2jKsi2vPsaP2XykfZmUiwPeg' | |
9 | - | ||
10 | - | func complex () = if (if (if (if (if (if (if (if (sigVerify(message, sig, pub)) | |
11 | - | then sigVerify(message, sig, pub) | |
12 | - | else false) | |
13 | - | then sigVerify_128Kb(message, sig, pub) | |
14 | - | else false) | |
15 | - | then sigVerify(message, sig, pub) | |
16 | - | else false) | |
17 | - | then sigVerify(message, sig, pub) | |
18 | - | else false) | |
19 | - | then sigVerify_128Kb(message, sig, pub) | |
20 | - | else false) | |
21 | - | then sigVerify(message, sig, pub) | |
22 | - | else false) | |
23 | - | then sigVerify(message, sig, pub) | |
24 | - | else false) | |
25 | - | then sigVerify_128Kb(message, sig, pub) | |
26 | - | else false | |
12 | + | func checkPayment (i) = { | |
13 | + | let p = i.payments[0] | |
14 | + | if ((p.amount > 0)) | |
15 | + | then match p.assetId { | |
16 | + | case asset: ByteVector => | |
17 | + | [toBase58String(asset)] | |
18 | + | case _ => | |
19 | + | ["waves"] | |
20 | + | } | |
21 | + | else [0] | |
22 | + | } | |
27 | 23 | ||
28 | 24 | ||
29 | 25 | @Callable(i) | |
30 | - | func test (isFail) = if (isFail) | |
31 | - | then if (complex()) | |
32 | - | then [ScriptTransfer(i.caller, 1, base58'FE8UCWLXCU2AKwv4LzZEMBLvVJCV9'), StringEntry("result", "should fail on 1.4")] | |
33 | - | else nil | |
34 | - | else [ScriptTransfer(i.caller, 1, base58'FE8UCWLXCU2AKwv4LzZEMBLvVJCV9'), StringEntry("result", "should be rejected on 1.4")] | |
26 | + | func call () = { | |
27 | + | let caller = toBase58String(i.caller.bytes) | |
28 | + | let originCaller = toBase58String(i.originCaller.bytes) | |
29 | + | let callerPK = i.callerPublicKey | |
30 | + | let originCallerPK = i.originCallerPublicKey | |
31 | + | let fee = i.fee | |
32 | + | let feeAssetId = checkFeeAssetId(i)[0] | |
33 | + | let txId = i.transactionId | |
34 | + | [StringEntry("caller", caller), StringEntry("originCaller", originCaller), BinaryEntry("callerPK", callerPK), BinaryEntry("originCallerPK", originCallerPK), IntegerEntry("fee", fee), StringEntry("feeAssetId", feeAssetId), BinaryEntry("txId", txId)] | |
35 | + | } | |
35 | 36 | ||
36 | 37 | ||
37 | - | ||
38 | - | @Callable(i) | |
39 | - | func call () = nil | |
40 | - | ||
38 | + | @Verifier(tx) | |
39 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
41 | 40 |
github/deemru/w8io/169f3d6 27.69 ms ◑