tx · AmWZMWRdqo4hcrQooQhXarbxqjfvSmzkxoynR3fwjX6N 3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb: -0.01000000 Waves 2023.12.03 18:17 [2870634] smart account 3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb > SELF 0.00000000 Waves
{ "type": 13, "id": "AmWZMWRdqo4hcrQooQhXarbxqjfvSmzkxoynR3fwjX6N", "fee": 1000000, "feeAssetId": null, "timestamp": 1701616640146, "version": 2, "chainId": 84, "sender": "3MxxygTia4uJRezgeXKtaWwV6dHBADJBAxb", "senderPublicKey": "FgdjGJ4tLFiavKEKf4WkWwkgvU8ARWP1WYZfmUrXo4CY", "proofs": [ "4nkjFy4qPrrVouSyo3XG39PJfAjpb4QpxYYECvevZQsAoWJNwh9Jv6udN5qXTUrRqD678tHL7wiaK81V9GN8K3h9" ], "script": "base64:AAIFAAAAAAAAAAIIAgAAAAMAAAAACmFjYzFQdWJLZXkBAAAAINoqzDs5WpVhYDTUvUDFMunBHoYto6DfGaP0KadDFYl5AAAAAAphY2MyUHViS2V5AQAAACDEqrME/jjBGs4Mrxcvf2rYimlLp6n4e/JFPZGNpxSDUQAAAAAKYWNjM1B1YktleQEAAAAgUNvEPKDCChp09z9n6F1NbPXldSbE9+5rrmMBqTTu7wMAAAAAAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAGYWNjMV8xCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAKYWNjMVB1YktleQQAAAAGYWNjMV8yCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAKYWNjMVB1YktleQQAAAAGYWNjMV8zCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAA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BwYDBQAAAAZhY2MxXzIFAAAABmFjYzNfMQcGAwUAAAAGYWNjMV8yBQAAAAZhY2MzXzMHBgMFAAAABmFjYzFfMwUAAAAGYWNjM18xBwYDBQAAAAZhY2MxXzMFAAAABmFjYzNfMgcEAAAACGFjYzJhY2MzAwMDAwMDBQAAAAZhY2MzXzEFAAAABmFjYzJfMgcGAwUAAAAGYWNjM18xBQAAAAZhY2MyXzMHBgMFAAAABmFjYzNfMgUAAAAGYWNjMl8xBwYDBQAAAAZhY2MzXzIFAAAABmFjYzJfMwcGAwUAAAAGYWNjM18zBQAAAAZhY2MyXzEHBgMFAAAABmFjYzNfMwUAAAAGYWNjMl8yBwQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwAwMFAAAACGFjYzFhY2MyBgUAAAAIYWNjMmFjYzMGBQAAAAhhY2MxYWNjMwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwAwMFAAAACGFjYzFhY2MyBgUAAAAIYWNjMmFjYzMGBQAAAAhhY2MxYWNjMwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAMDBQAAAAhhY2MxYWNjMgYFAAAACGFjYzJhY2MzBgUAAAAIYWNjMWFjYzMHawcjVQ==", "height": 2870634, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GbcY2RvbMst4j5Bam1VbAYPHzTH1wUQHf4GBt2G1asaZ Next: 4TW6j8WTQQiy822GVCxaqw6QVSA7Ao9EL811nsFEmgKo 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 deposit () = { | |
8 | - | let pmt = extract(i.payment) | |
9 | - | if (isDefined(pmt.assetId)) | |
10 | - | then throw("can hodl waves only at the moment") | |
11 | - | else { | |
12 | - | let currentKey = toBase58String(i.caller.bytes) | |
13 | - | let currentAmount = match getInteger(this, currentKey) { | |
14 | - | case a: Int => | |
15 | - | a | |
16 | - | case _ => | |
17 | - | 0 | |
18 | - | } | |
19 | - | let newAmount = (currentAmount + pmt.amount) | |
20 | - | WriteSet([DataEntry(currentKey, newAmount)]) | |
21 | - | } | |
22 | - | } | |
23 | - | ||
24 | - | ||
25 | - | ||
26 | - | @Callable(i) | |
27 | - | func withdraw (amount) = { | |
28 | - | let currentKey = toBase58String(i.caller.bytes) | |
29 | - | let currentAmount = match getInteger(this, currentKey) { | |
30 | - | case a: Int => | |
31 | - | a | |
32 | - | case _ => | |
33 | - | 0 | |
34 | - | } | |
35 | - | let newAmount = (currentAmount - amount) | |
36 | - | if ((0 > amount)) | |
37 | - | then throw("Can't withdraw negative amount") | |
38 | - | else if ((0 > newAmount)) | |
39 | - | then throw("Not enough balance") | |
40 | - | else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)])) | |
41 | - | } | |
8 | + | let acc3PubKey = base58'6SdykacJeMCbeNvVJY71gWMJeXt9ZT44X4KexwZxHEYz' | |
42 | 9 | ||
43 | 10 | ||
44 | 11 | @Verifier(tx) | |
45 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
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 | + | } | |
46 | 114 |
github/deemru/w8io/169f3d6 30.02 ms ◑