tx · 7hK8a7zXYK3DBh1zuntTrwhz9xhwexHkJb7rjSDgxwbB 3N1igUQKLXe2YovKAmAKAGdQ9x6TsVneN8P: -0.01400000 Waves 2019.08.16 13:17 [633501] smart account 3N1igUQKLXe2YovKAmAKAGdQ9x6TsVneN8P > SELF 0.00000000 Waves
{ "type": 13, "id": "7hK8a7zXYK3DBh1zuntTrwhz9xhwexHkJb7rjSDgxwbB", "fee": 1400000, "feeAssetId": null, "timestamp": 1565950429392, "version": 1, "sender": "3N1igUQKLXe2YovKAmAKAGdQ9x6TsVneN8P", "senderPublicKey": "3MZZz4a3omeSa9FgEs4os6VMyG9f23JiJsDG4PWWtgko", "proofs": [ "2zUhsVHCFYhMpoYB3ygChhM7w7C9eQfLi4Sr6eyjoQGHLgW9uKxcsL44qvYXksrieYwUMcnjjqrzzdYvAHR58meX" ], "script": "base64:AwQAAAADY21kCQACWAAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAQAAAACYTEJAAJYAAAAAQkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBAAAAAJkZAgFAAAAAWQAAAAEZGF0YQQAAAACZHMJAAGQAAAAAQUAAAACZGQDAwkAAAAAAAACBQAAAANjbWQCAAAAB3JlcXVlc3QJAAAAAAAAAgUAAAACZHMAAAAAAAAAAAEHBAAAAAVkYUtleQkAASwAAAACBQAAAAJhMQIAAAAQX2RlcG9zaXRfYWRkcmVzcwMDCQAAAAAAAAIICQABkQAAAAIFAAAAAmRkAAAAAAAAAAAAAAAAA2tleQUAAAAFZGFLZXkJAAAAAAAAAggJAAGRAAAAAgUAAAACZGQAAAAAAAAAAAAAAAAFdmFsdWUCAAAAAAcJAQAAAAEhAAAAAQkBAAAACWlzRGVmaW5lZAAAA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AEdGhpcwkAASwAAAACBQAAAAJhMQIAAAAEX291dAkAAlgAAAABCAUAAAACdHgAAAACaWQHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlvltae", "chainId": 84, "height": 633501, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let cmd = toBase58String(tx.proofs[0]) | |
4 | + | let a1 = toBase58String(tx.proofs[1]) | |
5 | + | match tx { | |
6 | + | case d: DataTransaction => | |
7 | + | let dd = d.data | |
8 | + | let ds = size(dd) | |
9 | + | if (if ((cmd == "request")) | |
10 | + | then (ds == 1) | |
11 | + | else false) | |
12 | + | then { | |
13 | + | let daKey = (a1 + "_deposit_address") | |
14 | + | if (if ((dd[0].key == daKey)) | |
15 | + | then (dd[0].value == "") | |
16 | + | else false) | |
17 | + | then !(isDefined(getString(this, daKey))) | |
18 | + | else false | |
19 | + | } | |
20 | + | else if (if ((cmd == "register")) | |
21 | + | then (ds == 1) | |
22 | + | else false) | |
23 | + | then { | |
24 | + | let daKey = (a1 + "_deposit_address") | |
25 | + | if (if (sigVerify(tx.bodyBytes, tx.proofs[2], tx.senderPublicKey)) | |
26 | + | then (dd[0].key == daKey) | |
27 | + | else false) | |
28 | + | then isDefined(getString(this, daKey)) | |
29 | + | else false | |
30 | + | } | |
31 | + | else if (if ((cmd == "depositin")) | |
32 | + | then (ds == 3) | |
33 | + | else false) | |
34 | + | then { | |
35 | + | let dhKey = (a1 + "_deposit_history") | |
36 | + | let txid = toBase58String(tx.proofs[2]) | |
37 | + | let pdRaw = getString(this, dhKey) | |
38 | + | let prevDeposit = if (isDefined(pdRaw)) | |
39 | + | then (extract(pdRaw) + ",") | |
40 | + | else "" | |
41 | + | if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[3], tx.senderPublicKey)) | |
42 | + | then (dd[0].key == dhKey) | |
43 | + | else false) | |
44 | + | then (dd[0].value == (prevDeposit + txid)) | |
45 | + | else false) | |
46 | + | then (dd[1].key == (txid + "_amount")) | |
47 | + | else false) | |
48 | + | then (dd[2].key == (txid + "_time")) | |
49 | + | else false) | |
50 | + | then !(isDefined(getInteger(this, (txid + "_amount")))) | |
51 | + | else false | |
52 | + | } | |
53 | + | else if (if ((cmd == "depositout")) | |
54 | + | then (ds == 2) | |
55 | + | else false) | |
56 | + | then { | |
57 | + | let outTxId = fromBase58String(extract(getString(dd, (a1 + "_out")))) | |
58 | + | let ohraw = getInteger(this, (a1 + "_out_height")) | |
59 | + | let oh = if (isDefined(ohraw)) | |
60 | + | then extract(ohraw) | |
61 | + | else 0 | |
62 | + | if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[2], tx.senderPublicKey)) | |
63 | + | then (dd[0].key == (a1 + "_out")) | |
64 | + | else false) | |
65 | + | then (dd[1].key == (a1 + "_out_height")) | |
66 | + | else false) | |
67 | + | then isDefined(getInteger(this, (a1 + "_amount"))) | |
68 | + | else false) | |
69 | + | then if (!(isDefined(getString(this, (a1 + "_out"))))) | |
70 | + | then true | |
71 | + | else if (!(isDefined(transferTransactionById(outTxId)))) | |
72 | + | then (height > (oh + 5)) | |
73 | + | else false | |
74 | + | else false | |
75 | + | } | |
76 | + | else if (if ((cmd == "withdrawin")) | |
77 | + | then (ds == 5) | |
78 | + | else false) | |
79 | + | then { | |
80 | + | let whKey = (a1 + "_withdraw_history") | |
81 | + | let pwRaw = getString(this, whKey) | |
82 | + | let prevWithdraw = if (isDefined(pwRaw)) | |
83 | + | then (extract(pwRaw) + ",") | |
84 | + | else "" | |
85 | + | let txid = toBase58String(tx.proofs[2]) | |
86 | + | if (if (if (if (if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[3], tx.proofs[1])) | |
87 | + | then (dd[0].key == whKey) | |
88 | + | else false) | |
89 | + | then (dd[0].value == (prevWithdraw + txid)) | |
90 | + | else false) | |
91 | + | then (dd[1].key == (txid + "_time")) | |
92 | + | else false) | |
93 | + | then (dd[2].key == (txid + "_destination")) | |
94 | + | else false) | |
95 | + | then (dd[3].key == (txid + "_amount")) | |
96 | + | else false) | |
97 | + | then (dd[4].key == (txid + "_key")) | |
98 | + | else false) | |
99 | + | then (dd[4].value == a1) | |
100 | + | else false) | |
101 | + | then !(isDefined(getString(this, (txid + "_amount")))) | |
102 | + | else false | |
103 | + | } | |
104 | + | else if (if ((cmd == "withdraw1ock")) | |
105 | + | then (ds == 2) | |
106 | + | else false) | |
107 | + | then if (if (if (if (sigVerify(tx.bodyBytes, tx.proofs[2], tx.senderPublicKey)) | |
108 | + | then (dd[0].key == (a1 + "_lock")) | |
109 | + | else false) | |
110 | + | then !(isDefined(getString(this, (a1 + "_lock")))) | |
111 | + | else false) | |
112 | + | then (dd[1].key == (a1 + "_lock_height")) | |
113 | + | else false) | |
114 | + | then match transferTransactionById(tx.proofs[1]) { | |
115 | + | case depositTx: TransferTransaction => | |
116 | + | if ((extract(getInteger(this, (a1 + "_amount"))) == depositTx.amount)) | |
117 | + | then (depositTx.senderPublicKey == fromBase58String(extract(getString(this, (a1 + "_key"))))) | |
118 | + | else false | |
119 | + | case _ => | |
120 | + | false | |
121 | + | } | |
122 | + | else false | |
123 | + | else if (if ((cmd == "withdrawout")) | |
124 | + | then (ds == 1) | |
125 | + | else false) | |
126 | + | then { | |
127 | + | let lockHeight = extract(getInteger(this, (a1 + "_lock_height"))) | |
128 | + | if (if (if (sigVerify(tx.bodyBytes, tx.proofs[2], tx.senderPublicKey)) | |
129 | + | then (dd[0].key == (a1 + "_out")) | |
130 | + | else false) | |
131 | + | then !(isDefined(getString(this, (a1 + "_out")))) | |
132 | + | else false) | |
133 | + | then (height >= (lockHeight + 5)) | |
134 | + | else false | |
135 | + | } | |
136 | + | else false | |
137 | + | case t: TransferTransaction => | |
138 | + | if ((cmd == "depositout")) | |
139 | + | then if (sigVerify(tx.bodyBytes, tx.proofs[2], tx.senderPublicKey)) | |
140 | + | then (getString(this, (a1 + "_out")) == toBase58String(tx.id)) | |
141 | + | else false | |
142 | + | else sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
143 | + | case _ => | |
144 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
145 | + | } |
github/deemru/w8io/169f3d6 21.27 ms ◑