tx · 2LSSjZ9U2cZsGDULUmFm88j6VH6Uac6mehJm5uDNqwSu 3Mxe3HYDHbWbDCjBY2cg5m61ua794YZUrAq: -0.01400000 Waves 2019.03.15 22:01 [537650] smart account 3Mxe3HYDHbWbDCjBY2cg5m61ua794YZUrAq > SELF 0.00000000 Waves
{ "type": 13, "id": "2LSSjZ9U2cZsGDULUmFm88j6VH6Uac6mehJm5uDNqwSu", "fee": 1400000, "feeAssetId": null, "timestamp": 1552676507464, "version": 1, "sender": "3Mxe3HYDHbWbDCjBY2cg5m61ua794YZUrAq", "senderPublicKey": "8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK", "proofs": [ "2fcr6mfVDAmvPDrKZLR16JJ2LNBQ7DxxkvneZs64ZAvLCrjsTFWvBccdht9mN1qQy9WjDqXhNn4eJo6E7KQA7dhF" ], "script": "base64:AQQAAAAGYXV0aG9yAgAAABVNYURhTWEgTGFicyBAZGFpZGFsb3MEAAAACG9uZVdhdmVzAAAAAAAF9eEABAAAAApwYWlkQW1vdW50CQAAaAAAAAIAAAAAAAAAAAEFAAAACG9uZVdhdmVzBAAAAAl3aW5BbW91bnQJAABoAAAAAgAAAAAAAAAACgUAAAAIb25lV2F2ZXMEAAAACXBhaWRUeEZlZQkAAGkAAAACBQAAAAhvbmVXYXZlcwAAAAAAAAAAZAQAAAAJZGF0YVR4RmVlCQAAaQAAAAIFAAAACG9uZVdhdmVzAAAAAAAAAABkBAAAAAh3aW5UeEZlZQkAAGkAAAACBQAAAAhvbmVXYXZlcwAAAAAAAAAAZAQAAAAIc3RhcnRQb3MAAAAAAAAAAAAEAAAABmVuZFBvcwAAAAAAAAAAGAQAAAAKc2FsdExlbmd0aAAAAAAAAAAAMgQAAAAJbWVBZGRyZXNzCAUAAAACdHgAAAAGc2VuZGVyBAAAAAttZVB1YmxpY0tleQgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQMJAQAAAAIhPQAAAAIFAAAACW1lQWRkcmVzcw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sYW5jZQAAAAEFAAAACW1lQWRkcmVzcwMJAQAAAAEhAAAAAQUAAAAOd2F2ZXNSZXN0Q2hlY2sJAAACAAAAAQIAAAApVFQ6IFdBVkVTIGJhbGFuY2UgaXMgbW9yZSB0aGVuIHdpbiBhbW91bnQEAAAAEnNlcnZlckFkZHJlc3NDaGVjawkAAAAAAAACCAUAAAAJc2VydmljZVR4AAAACXJlY2lwaWVudAUAAAANc2VydmVyQWRkcmVzcwMJAQAAAAEhAAAAAQUAAAASc2VydmVyQWRkcmVzc0NoZWNrCQAAAgAAAAECAAAAG1RUOiBTRVJWRVIgQUREUkVTUyBpcyB3cm9uZwMJAAH0AAAAAwgFAAAACXNlcnZpY2VUeAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAACXNlcnZpY2VUeAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAC21lUHVibGljS2V5CQAAAAAAAAIIBQAAAAlzZXJ2aWNlVHgAAAADZmVlBQAAAAh3aW5UeEZlZQcJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAttZVB1YmxpY0tlecIuRUo=", "chainId": 84, "height": 537650, "spentComplexity": 0 } View: original | compacted Prev: BR2PBdLKL5kkgRUkPtob5qTvBq1FqMeXhoEcAA8ZJgxv Next: 4fFAMR4c75H1X5i9Mz6WjMfsi7W6nsfE58msBg3rgbi6 Diff:
Old | New | Differences | |
---|---|---|---|
68 | 68 | if ((addressFromPublicKey(paymentTx.attachment) != addressFromPublicKey(base58'8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK'))) | |
69 | 69 | then if ((paymentTx.attachment == base58'8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK')) | |
70 | 70 | then throw("base58 EQ") | |
71 | - | else if ((paymentTx.attachment == | |
72 | - | then throw(" | |
71 | + | else if ((paymentTx.attachment == tx.senderPublicKey)) | |
72 | + | then throw("mePublicKey EQ") | |
73 | 73 | else if ((paymentTx.attachment == fromBase58String("8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK"))) | |
74 | - | then throw("string fromBase58String EQ") | |
75 | - | else throw("string NOEQ NOEQ") | |
74 | + | then throw("fromBase58String EQ") | |
75 | + | else if ((paymentTx.attachment == toBytes("8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK"))) | |
76 | + | then throw("toBytes EQ") | |
77 | + | else throw("toBytes NOEQ") | |
76 | 78 | else if (if (if (if (if (if (if (if (dataTransactionIsValid) | |
77 | 79 | then (paymentTx.sender != meAddress) | |
78 | 80 | else false) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let author = "MaDaMa Labs @daidalos" | |
4 | 4 | let oneWaves = 100000000 | |
5 | 5 | let paidAmount = (1 * oneWaves) | |
6 | 6 | let winAmount = (10 * oneWaves) | |
7 | 7 | let paidTxFee = (oneWaves / 100) | |
8 | 8 | let dataTxFee = (oneWaves / 100) | |
9 | 9 | let winTxFee = (oneWaves / 100) | |
10 | 10 | let startPos = 0 | |
11 | 11 | let endPos = 24 | |
12 | 12 | let saltLength = 50 | |
13 | 13 | let meAddress = tx.sender | |
14 | 14 | let mePublicKey = tx.senderPublicKey | |
15 | 15 | if ((meAddress != addressFromPublicKey(mePublicKey))) | |
16 | 16 | then throw("INIT: SENDER IS WRONG") | |
17 | 17 | else { | |
18 | 18 | let serverAddressPublicKey = fromBase58String(extract(getString(tx.sender, "serverAddress"))) | |
19 | 19 | let serverAddress = addressFromPublicKey(serverAddressPublicKey) | |
20 | 20 | match tx { | |
21 | 21 | case dataTx: DataTransaction => | |
22 | 22 | let insertPosCheck = isDefined(getInteger(dataTx.data, "pos")) | |
23 | 23 | if (!(insertPosCheck)) | |
24 | 24 | then throw("DT: POSITION value is not an integer") | |
25 | 25 | else { | |
26 | 26 | let insertPos = extract(getInteger(dataTx.data, "pos")) | |
27 | 27 | let validPos = if ((insertPos >= startPos)) | |
28 | 28 | then (endPos >= insertPos) | |
29 | 29 | else false | |
30 | 30 | if (!(validPos)) | |
31 | 31 | then throw("DT: POSITION is not valid") | |
32 | 32 | else { | |
33 | 33 | let insertPosStringTemp = if ((insertPos > 9)) | |
34 | 34 | then toString(insertPos) | |
35 | 35 | else ("0" + toString(insertPos)) | |
36 | 36 | let insertPosString = ("pos" + insertPosStringTemp) | |
37 | 37 | let paymentTxId = extract(getString(dataTx.data, insertPosString)) | |
38 | 38 | let satisfiesFormat = if (if (if (if ((size(dataTx.data) == 3)) | |
39 | 39 | then insertPosCheck | |
40 | 40 | else false) | |
41 | 41 | then isDefined(getString(dataTx.data, insertPosString)) | |
42 | 42 | else false) | |
43 | 43 | then isDefined(getBoolean(dataTx.data, paymentTxId)) | |
44 | 44 | else false) | |
45 | 45 | then (extract(getBoolean(dataTx.data, paymentTxId)) == true) | |
46 | 46 | else false | |
47 | 47 | if (!(satisfiesFormat)) | |
48 | 48 | then throw("DT: DATA FORMAT is not valid") | |
49 | 49 | else { | |
50 | 50 | let posNotUsed = !(isDefined(getString(meAddress, insertPosString))) | |
51 | 51 | if (!(posNotUsed)) | |
52 | 52 | then throw("DT: POSISTION alredy used") | |
53 | 53 | else { | |
54 | 54 | let txIdNotUsed = !(isDefined(getBoolean(meAddress, paymentTxId))) | |
55 | 55 | if (!(txIdNotUsed)) | |
56 | 56 | then throw("DT: TXID alredy used") | |
57 | 57 | else { | |
58 | 58 | let dataTransactionIsValid = if (if (if (validPos) | |
59 | 59 | then satisfiesFormat | |
60 | 60 | else false) | |
61 | 61 | then posNotUsed | |
62 | 62 | else false) | |
63 | 63 | then txIdNotUsed | |
64 | 64 | else false | |
65 | 65 | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
66 | 66 | match paymentTx { | |
67 | 67 | case paymentTx: TransferTransaction => | |
68 | 68 | if ((addressFromPublicKey(paymentTx.attachment) != addressFromPublicKey(base58'8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK'))) | |
69 | 69 | then if ((paymentTx.attachment == base58'8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK')) | |
70 | 70 | then throw("base58 EQ") | |
71 | - | else if ((paymentTx.attachment == | |
72 | - | then throw(" | |
71 | + | else if ((paymentTx.attachment == tx.senderPublicKey)) | |
72 | + | then throw("mePublicKey EQ") | |
73 | 73 | else if ((paymentTx.attachment == fromBase58String("8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK"))) | |
74 | - | then throw("string fromBase58String EQ") | |
75 | - | else throw("string NOEQ NOEQ") | |
74 | + | then throw("fromBase58String EQ") | |
75 | + | else if ((paymentTx.attachment == toBytes("8pPUMAXxsa4yNxqRncDVJ5FBmc9ygzMTbxfEtPLcVnnK"))) | |
76 | + | then throw("toBytes EQ") | |
77 | + | else throw("toBytes NOEQ") | |
76 | 78 | else if (if (if (if (if (if (if (if (dataTransactionIsValid) | |
77 | 79 | then (paymentTx.sender != meAddress) | |
78 | 80 | else false) | |
79 | 81 | then (paymentTx.sender != serverAddress) | |
80 | 82 | else false) | |
81 | 83 | then (paymentTx.recipient == serverAddress) | |
82 | 84 | else false) | |
83 | 85 | then (paymentTx.amount >= (paidAmount - paidTxFee)) | |
84 | 86 | else false) | |
85 | 87 | then !(isDefined(paymentTx.assetId)) | |
86 | 88 | else false) | |
87 | 89 | then !(isDefined(paymentTx.feeAssetId)) | |
88 | 90 | else false) | |
89 | 91 | then sigVerify(dataTx.bodyBytes, dataTx.proofs[0], paymentTx.senderPublicKey) | |
90 | 92 | else false) | |
91 | 93 | then (dataTx.fee == dataTxFee) | |
92 | 94 | else false | |
93 | 95 | case _ => | |
94 | 96 | throw("DT: TRANSACTION type is not a TransferTransaction") | |
95 | 97 | } | |
96 | 98 | } | |
97 | 99 | } | |
98 | 100 | } | |
99 | 101 | } | |
100 | 102 | } | |
101 | 103 | case winTx: MassTransferTransaction => | |
102 | 104 | let winTransferAttachment = winTx.attachment | |
103 | 105 | if ((size(winTransferAttachment) != (saltLength + 5))) | |
104 | 106 | then throw("MTT: ATTACHMENT SIZE is wrong") | |
105 | 107 | else { | |
106 | 108 | let unitsBytes = takeRightBytes(take(winTransferAttachment, 2), 1) | |
107 | 109 | let tensBytes = take(winTransferAttachment, 1) | |
108 | 110 | let winBytes = takeRightBytes(take(winTransferAttachment, 4), 1) | |
109 | 111 | let unitsInt = if ((unitsBytes == toBytes("0"))) | |
110 | 112 | then 0 | |
111 | 113 | else if ((unitsBytes == toBytes("1"))) | |
112 | 114 | then 1 | |
113 | 115 | else if ((unitsBytes == toBytes("2"))) | |
114 | 116 | then 2 | |
115 | 117 | else if ((unitsBytes == toBytes("3"))) | |
116 | 118 | then 3 | |
117 | 119 | else if ((unitsBytes == toBytes("4"))) | |
118 | 120 | then 4 | |
119 | 121 | else if ((unitsBytes == toBytes("5"))) | |
120 | 122 | then 5 | |
121 | 123 | else if ((unitsBytes == toBytes("6"))) | |
122 | 124 | then 6 | |
123 | 125 | else if ((unitsBytes == toBytes("7"))) | |
124 | 126 | then 7 | |
125 | 127 | else if ((unitsBytes == toBytes("8"))) | |
126 | 128 | then 8 | |
127 | 129 | else if ((unitsBytes == toBytes("9"))) | |
128 | 130 | then 9 | |
129 | 131 | else 0 | |
130 | 132 | let tensInt = if ((tensBytes == toBytes("0"))) | |
131 | 133 | then 0 | |
132 | 134 | else if ((tensBytes == toBytes("1"))) | |
133 | 135 | then 10 | |
134 | 136 | else if ((tensBytes == toBytes("2"))) | |
135 | 137 | then 20 | |
136 | 138 | else 0 | |
137 | 139 | let posInt = (tensInt + unitsInt) | |
138 | 140 | let validPos = if ((posInt >= startPos)) | |
139 | 141 | then (endPos >= posInt) | |
140 | 142 | else false | |
141 | 143 | if (!(validPos)) | |
142 | 144 | then throw("MTT: POSITION NUMBER is not valid") | |
143 | 145 | else { | |
144 | 146 | let posString = if ((posInt > 9)) | |
145 | 147 | then toString(posInt) | |
146 | 148 | else ("0" + toString(posInt)) | |
147 | 149 | let posHashDefined = isDefined(getString(meAddress, ("hash" + posString))) | |
148 | 150 | if (!(posHashDefined)) | |
149 | 151 | then throw("MTT: POSITION HASH did not found in data") | |
150 | 152 | else { | |
151 | 153 | let posHash = extract(getString(meAddress, ("hash" + posString))) | |
152 | 154 | let validateAttachment = (sha256(winTransferAttachment) == fromBase58String(posHash)) | |
153 | 155 | if (!(validateAttachment)) | |
154 | 156 | then throw("MTT: ATTACHMENT HASH is not valid") | |
155 | 157 | else { | |
156 | 158 | let serverAddressCheck = if ((winTx.transfers[0].recipient == serverAddress)) | |
157 | 159 | then (size(winTx.transfers) == 2) | |
158 | 160 | else false | |
159 | 161 | if (!(serverAddressCheck)) | |
160 | 162 | then throw("MTT: SERVER ADDRESS is wrong") | |
161 | 163 | else { | |
162 | 164 | let isWinner = (winBytes == toBytes("1")) | |
163 | 165 | if (!(isWinner)) | |
164 | 166 | then throw("MTT: POSITION is not winner") | |
165 | 167 | else { | |
166 | 168 | let paymentTxId = extract(getString(meAddress, ("pos" + posString))) | |
167 | 169 | let paymentTx = transactionById(fromBase58String(paymentTxId)) | |
168 | 170 | match paymentTx { | |
169 | 171 | case paymentTx: TransferTransaction => | |
170 | 172 | let recipientIsThePayment = (winTx.transfers[1].recipient == paymentTx.sender) | |
171 | 173 | if (!(recipientIsThePayment)) | |
172 | 174 | then throw("MTT: WINNER RECIPIENT is wrong") | |
173 | 175 | else if (if (if (if (if ((winTx.transfers[0].amount == ((wavesBalance(meAddress) - winAmount) - winTxFee))) | |
174 | 176 | then (winTx.transfers[1].amount == winAmount) | |
175 | 177 | else false) | |
176 | 178 | then !(isDefined(paymentTx.assetId)) | |
177 | 179 | else false) | |
178 | 180 | then !(isDefined(paymentTx.feeAssetId)) | |
179 | 181 | else false) | |
180 | 182 | then (winTx.fee == winTxFee) | |
181 | 183 | else false) | |
182 | 184 | then if (sigVerify(winTx.bodyBytes, winTx.proofs[0], mePublicKey)) | |
183 | 185 | then true | |
184 | 186 | else sigVerify(winTx.bodyBytes, winTx.proofs[0], paymentTx.senderPublicKey) | |
185 | 187 | else false | |
186 | 188 | case _ => | |
187 | 189 | throw("MTT: TRANSACTION type is not a TransferTransaction") | |
188 | 190 | } | |
189 | 191 | } | |
190 | 192 | } | |
191 | 193 | } | |
192 | 194 | } | |
193 | 195 | } | |
194 | 196 | } | |
195 | 197 | case serviceTx: TransferTransaction => | |
196 | 198 | let wavesRestCheck = ((winAmount + winTxFee) > wavesBalance(meAddress)) | |
197 | 199 | if (!(wavesRestCheck)) | |
198 | 200 | then throw("TT: WAVES balance is more then win amount") | |
199 | 201 | else { | |
200 | 202 | let serverAddressCheck = (serviceTx.recipient == serverAddress) | |
201 | 203 | if (!(serverAddressCheck)) | |
202 | 204 | then throw("TT: SERVER ADDRESS is wrong") | |
203 | 205 | else if (sigVerify(serviceTx.bodyBytes, serviceTx.proofs[0], mePublicKey)) | |
204 | 206 | then (serviceTx.fee == winTxFee) | |
205 | 207 | else false | |
206 | 208 | } | |
207 | 209 | case _ => | |
208 | 210 | sigVerify(tx.bodyBytes, tx.proofs[0], mePublicKey) | |
209 | 211 | } | |
210 | 212 | } |
github/deemru/w8io/026f985 68.79 ms ◑