tx · 8spTQiJ3MzQL2dxNGvwvL7xMozTzUdPoJX2s1ZV5GjqC 3N2YWFCKNRhxtcvCLehMzmZf9av9bExW1rk: -0.00200000 Waves 2022.09.18 20:12 [2234837] smart account 3N2YWFCKNRhxtcvCLehMzmZf9av9bExW1rk > SELF 0.00000000 Waves
{ "type": 13, "id": "8spTQiJ3MzQL2dxNGvwvL7xMozTzUdPoJX2s1ZV5GjqC", "fee": 200000, "feeAssetId": null, "timestamp": 1663521155424, "version": 2, "chainId": 84, "sender": "3N2YWFCKNRhxtcvCLehMzmZf9av9bExW1rk", "senderPublicKey": "5XfCuPt4yLnPetpnodqkajCLdF2HUswbpXaBh2MAuWHd", "proofs": [ "3o714pqnFJAuFqi3A4Pk8SYKxrKeLPQGd7xWw4dZnpLVUTMcDxoiQTddw11Wb5kXofLieW1dHp1gWbHSfsTpkRN2" ], "script": "base64:AAIDAAAAAAAAAAIIAQAAAAMAAAAAC2FsaWNlUHViS2V5AQAAACBDSV7quvh3zKk03oW8XfkZknrNzlOlDwuXNnJui8zVSAAAAAAJYm9iUHViS2V5AQAAACCFfB+Jmr+9esxo6+e0DdrKru04lGYQbnlVizOOmu5ANQAAAAAMY29vcGVyUHViS2V5AQAAACA45QX3YNTop5zdIIvtWn1+p/ta2aBpS9Mcp3/71AiYFQAAAAAAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAVhbGljZQMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALYWxpY2VQdWJLZXkGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAALYWxpY2VQdWJLZXkGCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAgUAAAALYWxpY2VQdWJLZXkEAAAAA2JvYgMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAJYm9iUHViS2V5BgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAEFAAAACWJvYlB1YktleQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAlib2JQdWJLZXkEAAAABmNvb3BlcgMDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAMY29vcGVyUHViS2V5BgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADGNvb3BlclB1YktleQYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxjb29wZXJQdWJLZXkEAAAABHNpZzEDBQAAAAVhbGljZQUAAAADYm9iBwQAAAAEc2lnMgMFAAAABWFsaWNlBQAAAAZjb29wZXIHBAAAAARzaWczAwUAAAADYm9iBQAAAAZjb29wZXIHBAAAAAckbWF0Y2gwBQAAAAJ0eAMDBQAAAARzaWcxBgUAAAAEc2lnMgYFAAAABHNpZzMjiCoC", "height": 2234837, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 93UUKzLwnAdX5MuoZ3A5yYe6VcoFtsChjuMNfvwn5Ph3 Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let alicePubKey = base58'5XfCuPt4yLnPetpnodqkajCLdF2HUswbpXaBh2MAuWHd' | |
4 | 5 | ||
6 | + | let bobPubKey = base58'9z4zwaiWgTnb3ik31XSBGtVfwnAcCPB2hrWiu1ArkgZJ' | |
7 | + | ||
8 | + | let cooperPubKey = base58'4q6P4prcUP5oSBomB3nX6n8MjvLzc87ovftEorkbW7Lg' | |
5 | 9 | ||
6 | 10 | ||
7 | 11 | @Verifier(tx) | |
8 | - | func verify () = match tx { | |
9 | - | case d: SetScriptTransaction => | |
10 | - | true | |
11 | - | case d: DataTransaction => | |
12 | - | true | |
13 | - | case _ => | |
14 | - | false | |
15 | - | } | |
12 | + | func verify () = { | |
13 | + | let alice = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], alicePubKey)) | |
14 | + | then true | |
15 | + | else sigVerify(tx.bodyBytes, tx.proofs[1], alicePubKey)) | |
16 | + | then true | |
17 | + | else sigVerify(tx.bodyBytes, tx.proofs[2], alicePubKey) | |
18 | + | let bob = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], bobPubKey)) | |
19 | + | then true | |
20 | + | else sigVerify(tx.bodyBytes, tx.proofs[1], bobPubKey)) | |
21 | + | then true | |
22 | + | else sigVerify(tx.bodyBytes, tx.proofs[2], bobPubKey) | |
23 | + | let cooper = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)) | |
24 | + | then true | |
25 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey)) | |
26 | + | then true | |
27 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], cooperPubKey) | |
28 | + | let sig1 = if (alice) | |
29 | + | then bob | |
30 | + | else false | |
31 | + | let sig2 = if (alice) | |
32 | + | then cooper | |
33 | + | else false | |
34 | + | let sig3 = if (bob) | |
35 | + | then cooper | |
36 | + | else false | |
37 | + | match tx { | |
38 | + | case _ => | |
39 | + | if (if (sig1) | |
40 | + | then true | |
41 | + | else sig2) | |
42 | + | then true | |
43 | + | else sig3 | |
44 | + | } | |
45 | + | } | |
16 | 46 |
github/deemru/w8io/169f3d6 43.42 ms ◑