tx · 7NHANp2Hf2HiHUuUrPw6hWToLxCT5ZrGHzCyKA1mL3qv 3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb: -0.01000000 Waves 2023.12.04 00:51 [2871020] smart account 3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb > SELF 0.00000000 Waves
{ "type": 13, "id": "7NHANp2Hf2HiHUuUrPw6hWToLxCT5ZrGHzCyKA1mL3qv", "fee": 1000000, "feeAssetId": null, "timestamp": 1701640296173, "version": 2, "chainId": 84, "sender": "3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb", "senderPublicKey": "FgdjGJ4tLFiavKEKf4WkWwkgvU8ARWP1WYZfmUrXo4CY", "proofs": [ "4sWrrCWgzctwcQUmyLano6dvHfigPF2wxFbEim6BU8MnAMkZzkELinm3gjjNbCWdqsiVkvzTjREYkrtxpMGxf5b1" ], "script": "base64:AAIFAAAAAAAAAAIIAgAAAAMAAAAACmFjYzFQdWJLZXkBAAAAINoqzDs5WpVhYDTUvUDFMunBHoYto6DfGaP0KadDFYl5AAAAAAphY2MyUHViS2V5AQAAACDEqrME/jjBGs4Mrxcvf2rYimlLp6n4e/JFPZGNpxSDUQAAAAAKYWNjM1B1YktleQEAAAAgUNvEPKDCChp09z9n6F1NbPXldSbE9+5rrmMBqTTu7wMAAAAAAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAGYWNjMV8xCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAKYWNjMVB1YktleQQAAAAGYWNjMV8yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAKYWNjMVB1YktleQQAAAAGYWNjMV8zCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29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WNjM18zBwYDBQAAAAZhY2MxXzIFAAAABmFjYzNfMQcGAwUAAAAGYWNjMV8yBQAAAAZhY2MzXzMHBgMFAAAABmFjYzFfMwUAAAAGYWNjM18xBwYDBQAAAAZhY2MxXzMFAAAABmFjYzNfMgcEAAAACGFjYzJhY2MzAwMDAwMDBQAAAAZhY2MzXzEFAAAABmFjYzJfMgcGAwUAAAAGYWNjM18xBQAAAAZhY2MyXzMHBgMFAAAABmFjYzNfMgUAAAAGYWNjMl8xBwYDBQAAAAZhY2MzXzIFAAAABmFjYzJfMwcGAwUAAAAGYWNjM18zBQAAAAZhY2MyXzEHBgMFAAAABmFjYzNfMwUAAAAGYWNjMl8yBwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwAwMFAAAACGFjYzFhY2MyBgUAAAAIYWNjMmFjYzMGBQAAAAhhY2MxYWNjMwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwAwMFAAAACGFjYzFhY2MyBgUAAAAIYWNjMmFjYzMGBQAAAAhhY2MxYWNjMwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAMDBQAAAAhhY2MxYWNjMgYFAAAACGFjYzJhY2MzBgUAAAAIYWNjMWFjYzMHawcjVQ==", "height": 2871020, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GnvVfXav8EFJBiR8xrXEbB7JGkxXjaG3oPdUfVVSJFiV Next: 4BVq6bAaEjLUtxFqVtrJ8PAycrcg6LpqREhXZnPA1mpt Full:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let acc1PubKey = base58'FgdjGJ4tLFiavKEKf4WkWwkgvU8ARWP1WYZfmUrXo4CY' | |
4 | 5 | ||
6 | + | let acc2PubKey = base58'EEhsp9Jd5MwVmYJMGAZJL3tTb5KcurTz8Aw7wksZuw3e' | |
5 | 7 | ||
6 | - | @Callable(i) | |
7 | - | func purchase () = { | |
8 | - | let pmt = extract(i.payment) | |
9 | - | if (isDefined(pmt.assetId)) | |
10 | - | then throw("can use WAVES only at the moment") | |
11 | - | else { | |
12 | - | let customerAddress = toBase58String(i.caller.bytes) | |
13 | - | let price = match getInteger(this, "item_A_coupon_price") { | |
14 | - | case a: Int => | |
15 | - | a | |
16 | - | case _ => | |
17 | - | 0 | |
18 | - | } | |
19 | - | if ((price > pmt.amount)) | |
20 | - | then throw("purchase amount cannot be less than item price") | |
21 | - | else if ((pmt.amount > price)) | |
22 | - | then throw("purchase amount cannot be higher than item price") | |
23 | - | else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)]) | |
24 | - | } | |
25 | - | } | |
8 | + | let acc3PubKey = base58'6SdykacJeMCbeNvVJY71gWMJeXt9ZT44X4KexwZxHEYz' | |
26 | 9 | ||
27 | 10 | ||
28 | 11 | @Verifier(tx) | |
29 | - | func verify () = match tx { | |
30 | - | case d: SetScriptTransaction => | |
31 | - | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
32 | - | case d: DataTransaction => | |
33 | - | true | |
34 | - | case d: TransferTransaction => | |
35 | - | true | |
36 | - | case _ => | |
37 | - | false | |
38 | - | } | |
12 | + | func verify () = { | |
13 | + | let acc1_1 = sigVerify(tx.bodyBytes, tx.proofs[0], acc1PubKey) | |
14 | + | let acc1_2 = sigVerify(tx.bodyBytes, tx.proofs[1], acc1PubKey) | |
15 | + | let acc1_3 = sigVerify(tx.bodyBytes, tx.proofs[2], acc1PubKey) | |
16 | + | let acc2_1 = sigVerify(tx.bodyBytes, tx.proofs[0], acc2PubKey) | |
17 | + | let acc2_2 = sigVerify(tx.bodyBytes, tx.proofs[1], acc2PubKey) | |
18 | + | let acc2_3 = sigVerify(tx.bodyBytes, tx.proofs[2], acc2PubKey) | |
19 | + | let acc3_1 = sigVerify(tx.bodyBytes, tx.proofs[0], acc3PubKey) | |
20 | + | let acc3_2 = sigVerify(tx.bodyBytes, tx.proofs[1], acc3PubKey) | |
21 | + | let acc3_3 = sigVerify(tx.bodyBytes, tx.proofs[2], acc3PubKey) | |
22 | + | let acc1acc2 = if (if (if (if (if (if (acc1_1) | |
23 | + | then acc2_2 | |
24 | + | else false) | |
25 | + | then true | |
26 | + | else if (acc1_1) | |
27 | + | then acc2_3 | |
28 | + | else false) | |
29 | + | then true | |
30 | + | else if (acc1_2) | |
31 | + | then acc2_1 | |
32 | + | else false) | |
33 | + | then true | |
34 | + | else if (acc1_2) | |
35 | + | then acc2_3 | |
36 | + | else false) | |
37 | + | then true | |
38 | + | else if (acc1_3) | |
39 | + | then acc2_1 | |
40 | + | else false) | |
41 | + | then true | |
42 | + | else if (acc1_3) | |
43 | + | then acc2_2 | |
44 | + | else false | |
45 | + | let acc1acc3 = if (if (if (if (if (if (acc1_1) | |
46 | + | then acc3_2 | |
47 | + | else false) | |
48 | + | then true | |
49 | + | else if (acc1_1) | |
50 | + | then acc3_3 | |
51 | + | else false) | |
52 | + | then true | |
53 | + | else if (acc1_2) | |
54 | + | then acc3_1 | |
55 | + | else false) | |
56 | + | then true | |
57 | + | else if (acc1_2) | |
58 | + | then acc3_3 | |
59 | + | else false) | |
60 | + | then true | |
61 | + | else if (acc1_3) | |
62 | + | then acc3_1 | |
63 | + | else false) | |
64 | + | then true | |
65 | + | else if (acc1_3) | |
66 | + | then acc3_2 | |
67 | + | else false | |
68 | + | let acc2acc3 = if (if (if (if (if (if (acc3_1) | |
69 | + | then acc2_2 | |
70 | + | else false) | |
71 | + | then true | |
72 | + | else if (acc3_1) | |
73 | + | then acc2_3 | |
74 | + | else false) | |
75 | + | then true | |
76 | + | else if (acc3_2) | |
77 | + | then acc2_1 | |
78 | + | else false) | |
79 | + | then true | |
80 | + | else if (acc3_2) | |
81 | + | then acc2_3 | |
82 | + | else false) | |
83 | + | then true | |
84 | + | else if (acc3_3) | |
85 | + | then acc2_1 | |
86 | + | else false) | |
87 | + | then true | |
88 | + | else if (acc3_3) | |
89 | + | then acc2_2 | |
90 | + | else false | |
91 | + | match tx { | |
92 | + | case d: SetScriptTransaction => | |
93 | + | if (if (acc1acc2) | |
94 | + | then true | |
95 | + | else acc2acc3) | |
96 | + | then true | |
97 | + | else acc1acc3 | |
98 | + | case d: DataTransaction => | |
99 | + | if (if (acc1acc2) | |
100 | + | then true | |
101 | + | else acc2acc3) | |
102 | + | then true | |
103 | + | else acc1acc3 | |
104 | + | case d: TransferTransaction => | |
105 | + | if (if (acc1acc2) | |
106 | + | then true | |
107 | + | else acc2acc3) | |
108 | + | then true | |
109 | + | else acc1acc3 | |
110 | + | case _ => | |
111 | + | false | |
112 | + | } | |
113 | + | } | |
39 | 114 |
github/deemru/w8io/169f3d6 53.58 ms ◑