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