tx · BaB2ZSVurzRA2AMMuFm9a2mQ6PckCLZqWm9gt4XRLqBu 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua: -0.01400000 Waves 2021.03.28 16:10 [1457652] smart account 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua > SELF 0.00000000 Waves
{ "type": 13, "id": "BaB2ZSVurzRA2AMMuFm9a2mQ6PckCLZqWm9gt4XRLqBu", "fee": 1400000, "feeAssetId": null, "timestamp": 1616937075176, "version": 2, "chainId": 84, "sender": "3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua", "senderPublicKey": "CTyHhnVTxf16Z4CmGGneAK8WB5g2QyT4MB8kUn8vPPcu", "proofs": [ "4aV4b4eD6r3sZjHjxjPsLZLpC3voLosNeYifyQwfLNh3LvdBjMJFDsxBA9cZAebmVMABkEwBrM6iuZUZyZLn7gsS" ], "script": "base64:AAIEAAAAAAAAABAIAhIECgIICBIECgIICBIAAAAAFgAAAAAEc2VsZgkABCUAAAABBQAAAAR0aGlzAAAAAA1nZW5lc2lzSGVpZ2h0AAAAAAAAFjhmAAAAAAd3YXZlc0lkAgAAAAVXQVZFUwAAAAAGbWF4SW50AH/////////9AAAAABNtYXhEZXNjcmlwdGlvbkJ5dGVzAAAAAAAAAAPoAAAAAAxjb250cmFjdE5hbWUCAAAADVZhdWx0Q29udHJhY3QAAAAADGNvbnRyYWN0VGV4dAkAASwAAAACCQABLAAAAAICAAAARERvbid0IHRydXN0LCB2ZXJpZnkgISBUaGUgTkZUIElzc3VlciBhbmQgZEFwcCBhcmUgdGhlIHNhbWUgYWRkcmVzcyA8BQAAAARzZWxmAgAAAAI+LgAAAAARY29udHJhY3RTZXBhcmF0b3ICAAAAA19fXwAAAAALcmVjZWlwdE5hbWUCAAAADFZhdWx0UmVjZWlwdAAAAAALcmVjZWlwdFRleHQCAAAACGZ1Y2sgb2ZmAAAAAAx2ZXJpZmllck5hbWUCAAAADVZhdWx0VmVyaWZpZXIAAAAADXZlc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BQAAAAVub25jZQkABEwAAAACCQEAAAAEQnVybgAAAAIFAAAAFGNvbnRyYWN0SWRCeXRlVmVjdG9yAAAAAAAAAAABCQAETAAAAAIFAAAADHJlY2VpcHRJc3N1ZQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIIBQAAAAxyZWNlaXB0SXNzdWUAAAAIcXVhbnRpdHkFAAAACXJlY2VpcHRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAFWNvbnRyYWN0QXNzZXRRdWFudGl0eQgFAAAAEWNvbnRyYWN0QXNzZXRJbmZvAAAAAmlkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWlFIYY=", "height": 1457652, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FQ6Z3YShkphw2GdKkLmzkf8HoEhK6oRnrF9wZeofBXap Next: 7JEYE11GjyFnuMy1Kd4D5b89HsfxPu6KrQvdsvyvMdTK Diff:
Old | New | Differences | |
---|---|---|---|
188 | 188 | } | |
189 | 189 | let errorsString = makeString(errorsList, errorsSeparator) | |
190 | 190 | let nonce = generateNonce() | |
191 | - | let rulesSHA256 = | |
191 | + | let rulesSHA256 = toBase64String(sha256(toBytes(rulesString))) | |
192 | 192 | let verifierDescription = ((((((verifierText1 + " <") + rulesSHA256) + "> ") + verifierText2) + " ") + errorsString) | |
193 | 193 | if ((size(toBytes(verifierDescription)) > maxDescriptionBytes)) | |
194 | 194 | then throw("ERROR: Too much errors") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let self = toString(this) | |
5 | 5 | ||
6 | 6 | let genesisHeight = 1456230 | |
7 | 7 | ||
8 | 8 | let wavesId = "WAVES" | |
9 | 9 | ||
10 | 10 | let maxInt = 9223372036854775805 | |
11 | 11 | ||
12 | 12 | let maxDescriptionBytes = 1000 | |
13 | 13 | ||
14 | 14 | let contractName = "VaultContract" | |
15 | 15 | ||
16 | 16 | let contractText = (("Don't trust, verify ! The NFT Issuer and dApp are the same address <" + self) + ">.") | |
17 | 17 | ||
18 | 18 | let contractSeparator = "___" | |
19 | 19 | ||
20 | 20 | let receiptName = "VaultReceipt" | |
21 | 21 | ||
22 | 22 | let receiptText = "fuck off" | |
23 | 23 | ||
24 | 24 | let verifierName = "VaultVerifier" | |
25 | 25 | ||
26 | 26 | let verifierText1 = "SHA256 Checksum:" | |
27 | 27 | ||
28 | 28 | let verifierText2 = "Errors:" | |
29 | 29 | ||
30 | 30 | let rulesSeparator = "_" | |
31 | 31 | ||
32 | 32 | let rulesNestedSeparator = "+" | |
33 | 33 | ||
34 | 34 | let rulesUndefined = "null" | |
35 | 35 | ||
36 | 36 | let errorsSeparator = "|" | |
37 | 37 | ||
38 | 38 | let keyRules = "_rules" | |
39 | 39 | ||
40 | 40 | let keyNonceCount = "NONCE_COUNT" | |
41 | 41 | ||
42 | 42 | func isInRange (number) = if ((number >= 0)) | |
43 | 43 | then (maxInt > number) | |
44 | 44 | else false | |
45 | 45 | ||
46 | 46 | ||
47 | 47 | func generateNonce () = match getInteger(this, keyNonceCount) { | |
48 | 48 | case isInt: Int => | |
49 | 49 | if ((isInt >= maxInt)) | |
50 | 50 | then 1 | |
51 | 51 | else (isInt + 1) | |
52 | 52 | case _ => | |
53 | 53 | 1 | |
54 | 54 | } | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func verifyRule (acc,rule) = if ((rule == rulesUndefined)) | |
58 | 58 | then acc | |
59 | 59 | else { | |
60 | 60 | let ruleValues = split(rule, rulesNestedSeparator) | |
61 | 61 | if ((size(ruleValues) != 4)) | |
62 | 62 | then (("<" + rule) + "> Broken structure") :: acc | |
63 | 63 | else match parseInt(ruleValues[0]) { | |
64 | 64 | case blockStart: Int => | |
65 | 65 | if ((isInRange(blockStart) != true)) | |
66 | 66 | then (("<" + rule) + "> blockStart out-of-range") :: acc | |
67 | 67 | else match parseInt(ruleValues[1]) { | |
68 | 68 | case blockEnd: Int => | |
69 | 69 | if ((isInRange(blockEnd) != true)) | |
70 | 70 | then (("<" + rule) + "> blockEnd out-of-range") :: acc | |
71 | 71 | else match parseInt(ruleValues[2]) { | |
72 | 72 | case isWhitelist: Int => | |
73 | 73 | if (if ((isWhitelist != 0)) | |
74 | 74 | then true | |
75 | 75 | else (isWhitelist != 1)) | |
76 | 76 | then (("<" + rule) + "> isWhitelist is 0 (false) or 1 (true)") :: acc | |
77 | 77 | else acc | |
78 | 78 | case _ => | |
79 | 79 | (("<" + rule) + "> isWhitelist not Integer") :: acc | |
80 | 80 | } | |
81 | 81 | case _ => | |
82 | 82 | (("<" + rule) + "> blockEnd not Integer") :: acc | |
83 | 83 | } | |
84 | 84 | case _ => | |
85 | 85 | (("<" + rule) + "> blockStart not Integer") :: acc | |
86 | 86 | } | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func verifyRules (incRulerAddress,incRulerKey) = { | |
92 | 92 | let rulerAddress = Address(fromBase58String(incRulerAddress)) | |
93 | 93 | let rulesString = match getString(rulerAddress, (incRulerKey + keyRules)) { | |
94 | 94 | case isString: String => | |
95 | 95 | isString | |
96 | 96 | case _ => | |
97 | 97 | throw("ERROR: Data not found") | |
98 | 98 | } | |
99 | 99 | let rulesList = split(rulesString, rulesSeparator) | |
100 | 100 | if ((size(rulesList) != 15)) | |
101 | 101 | then throw("ERROR: Wrong amount of rules") | |
102 | 102 | else { | |
103 | 103 | let errorsList = { | |
104 | 104 | let $list32903325 = rulesList | |
105 | 105 | let $size32903325 = size($list32903325) | |
106 | 106 | let $acc032903325 = nil | |
107 | 107 | if (($size32903325 == 0)) | |
108 | 108 | then $acc032903325 | |
109 | 109 | else { | |
110 | 110 | let $acc132903325 = verifyRule($acc032903325, $list32903325[0]) | |
111 | 111 | if (($size32903325 == 1)) | |
112 | 112 | then $acc132903325 | |
113 | 113 | else { | |
114 | 114 | let $acc232903325 = verifyRule($acc132903325, $list32903325[1]) | |
115 | 115 | if (($size32903325 == 2)) | |
116 | 116 | then $acc232903325 | |
117 | 117 | else { | |
118 | 118 | let $acc332903325 = verifyRule($acc232903325, $list32903325[2]) | |
119 | 119 | if (($size32903325 == 3)) | |
120 | 120 | then $acc332903325 | |
121 | 121 | else { | |
122 | 122 | let $acc432903325 = verifyRule($acc332903325, $list32903325[3]) | |
123 | 123 | if (($size32903325 == 4)) | |
124 | 124 | then $acc432903325 | |
125 | 125 | else { | |
126 | 126 | let $acc532903325 = verifyRule($acc432903325, $list32903325[4]) | |
127 | 127 | if (($size32903325 == 5)) | |
128 | 128 | then $acc532903325 | |
129 | 129 | else { | |
130 | 130 | let $acc632903325 = verifyRule($acc532903325, $list32903325[5]) | |
131 | 131 | if (($size32903325 == 6)) | |
132 | 132 | then $acc632903325 | |
133 | 133 | else { | |
134 | 134 | let $acc732903325 = verifyRule($acc632903325, $list32903325[6]) | |
135 | 135 | if (($size32903325 == 7)) | |
136 | 136 | then $acc732903325 | |
137 | 137 | else { | |
138 | 138 | let $acc832903325 = verifyRule($acc732903325, $list32903325[7]) | |
139 | 139 | if (($size32903325 == 8)) | |
140 | 140 | then $acc832903325 | |
141 | 141 | else { | |
142 | 142 | let $acc932903325 = verifyRule($acc832903325, $list32903325[8]) | |
143 | 143 | if (($size32903325 == 9)) | |
144 | 144 | then $acc932903325 | |
145 | 145 | else { | |
146 | 146 | let $acc1032903325 = verifyRule($acc932903325, $list32903325[9]) | |
147 | 147 | if (($size32903325 == 10)) | |
148 | 148 | then $acc1032903325 | |
149 | 149 | else { | |
150 | 150 | let $acc1132903325 = verifyRule($acc1032903325, $list32903325[10]) | |
151 | 151 | if (($size32903325 == 11)) | |
152 | 152 | then $acc1132903325 | |
153 | 153 | else { | |
154 | 154 | let $acc1232903325 = verifyRule($acc1132903325, $list32903325[11]) | |
155 | 155 | if (($size32903325 == 12)) | |
156 | 156 | then $acc1232903325 | |
157 | 157 | else { | |
158 | 158 | let $acc1332903325 = verifyRule($acc1232903325, $list32903325[12]) | |
159 | 159 | if (($size32903325 == 13)) | |
160 | 160 | then $acc1332903325 | |
161 | 161 | else { | |
162 | 162 | let $acc1432903325 = verifyRule($acc1332903325, $list32903325[13]) | |
163 | 163 | if (($size32903325 == 14)) | |
164 | 164 | then $acc1432903325 | |
165 | 165 | else { | |
166 | 166 | let $acc1532903325 = verifyRule($acc1432903325, $list32903325[14]) | |
167 | 167 | if (($size32903325 == 15)) | |
168 | 168 | then $acc1532903325 | |
169 | 169 | else { | |
170 | 170 | let $acc1632903325 = verifyRule($acc1532903325, $list32903325[15]) | |
171 | 171 | throw("List size exceed 15") | |
172 | 172 | } | |
173 | 173 | } | |
174 | 174 | } | |
175 | 175 | } | |
176 | 176 | } | |
177 | 177 | } | |
178 | 178 | } | |
179 | 179 | } | |
180 | 180 | } | |
181 | 181 | } | |
182 | 182 | } | |
183 | 183 | } | |
184 | 184 | } | |
185 | 185 | } | |
186 | 186 | } | |
187 | 187 | } | |
188 | 188 | } | |
189 | 189 | let errorsString = makeString(errorsList, errorsSeparator) | |
190 | 190 | let nonce = generateNonce() | |
191 | - | let rulesSHA256 = | |
191 | + | let rulesSHA256 = toBase64String(sha256(toBytes(rulesString))) | |
192 | 192 | let verifierDescription = ((((((verifierText1 + " <") + rulesSHA256) + "> ") + verifierText2) + " ") + errorsString) | |
193 | 193 | if ((size(toBytes(verifierDescription)) > maxDescriptionBytes)) | |
194 | 194 | then throw("ERROR: Too much errors") | |
195 | 195 | else { | |
196 | 196 | let veriferIssue = Issue(verifierName, verifierDescription, 1, 0, false, unit, nonce) | |
197 | 197 | let verifierId = calculateAssetId(veriferIssue) | |
198 | 198 | [IntegerEntry(keyNonceCount, nonce), veriferIssue, ScriptTransfer(i.caller, veriferIssue.quantity, verifierId)] | |
199 | 199 | } | |
200 | 200 | } | |
201 | 201 | } | |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | @Callable(i) | |
206 | 206 | func deposit (incRulerAddress,incRulerTag) = if ((genesisHeight > height)) | |
207 | 207 | then throw(("ERROR: Deposits are denied until block " + toString(genesisHeight))) | |
208 | 208 | else if ((this == i.caller)) | |
209 | 209 | then throw("ERROR: Self-invoke is forbidden") | |
210 | 210 | else if ((size(i.payments) != 1)) | |
211 | 211 | then throw("ERROR: Attached Payment != 1") | |
212 | 212 | else if (if ((1 > i.payments[0].amount)) | |
213 | 213 | then true | |
214 | 214 | else (i.payments[0].amount > maxInt)) | |
215 | 215 | then throw("ERROR: Payment amount") | |
216 | 216 | else { | |
217 | 217 | let contractAssetId = match i.payments[0].assetId { | |
218 | 218 | case isByteVector: ByteVector => | |
219 | 219 | match assetInfo(isByteVector) { | |
220 | 220 | case isAsset: Asset => | |
221 | 221 | toBase58String(isAsset.id) | |
222 | 222 | case _ => | |
223 | 223 | throw("ERROR: Asset not found") | |
224 | 224 | } | |
225 | 225 | case isWaves: Unit => | |
226 | 226 | wavesId | |
227 | 227 | case _ => | |
228 | 228 | throw("ERROR: Unknown Asset type") | |
229 | 229 | } | |
230 | 230 | let nonce = generateNonce() | |
231 | 231 | let contractDescription = makeString([contractText, toString(height), toString(i.caller), contractAssetId, toString(i.payments[0].amount)], contractSeparator) | |
232 | 232 | if ((size(toBytes(contractDescription)) > maxDescriptionBytes)) | |
233 | 233 | then throw("ERROR: Too long contract") | |
234 | 234 | else { | |
235 | 235 | let contractIssue = Issue(contractName, contractDescription, 1, 0, false, unit, nonce) | |
236 | 236 | let contractId = calculateAssetId(contractIssue) | |
237 | 237 | [IntegerEntry(keyNonceCount, nonce), contractIssue, ScriptTransfer(i.caller, contractIssue.quantity, contractId)] | |
238 | 238 | } | |
239 | 239 | } | |
240 | 240 | ||
241 | 241 | ||
242 | 242 | ||
243 | 243 | @Callable(i) | |
244 | 244 | func withdraw () = if ((this == i.caller)) | |
245 | 245 | then throw("ERROR: Self-invoke is forbidden") | |
246 | 246 | else if ((size(i.payments) != 1)) | |
247 | 247 | then throw("ERROR: Attached Payment != 1") | |
248 | 248 | else if ((i.payments[0].amount != 1)) | |
249 | 249 | then throw("ERROR: Payment amount != 1") | |
250 | 250 | else { | |
251 | 251 | let contractIdByteVector = match i.payments[0].assetId { | |
252 | 252 | case isByteVector: ByteVector => | |
253 | 253 | isByteVector | |
254 | 254 | case _ => | |
255 | 255 | throw("ERROR: Contract type") | |
256 | 256 | } | |
257 | 257 | let contractInfo = match assetInfo(contractIdByteVector) { | |
258 | 258 | case isAsset: Asset => | |
259 | 259 | isAsset | |
260 | 260 | case _ => | |
261 | 261 | throw("ERROR: Unknown Contract") | |
262 | 262 | } | |
263 | 263 | if ((contractInfo.issuer != this)) | |
264 | 264 | then throw("ERROR: Contract Issuer") | |
265 | 265 | else if ((contractInfo.name != contractName)) | |
266 | 266 | then throw("ERROR: Contract name") | |
267 | 267 | else if (if (if (if ((contractInfo.decimals != 0)) | |
268 | 268 | then true | |
269 | 269 | else (contractInfo.quantity != 1)) | |
270 | 270 | then true | |
271 | 271 | else (contractInfo.reissuable != false)) | |
272 | 272 | then true | |
273 | 273 | else (contractInfo.scripted != false)) | |
274 | 274 | then throw("ERROR: Contract not NFT") | |
275 | 275 | else { | |
276 | 276 | let contractDescription = split(contractInfo.description, contractSeparator) | |
277 | 277 | let contractHeight = parseIntValue(contractDescription[1]) | |
278 | 278 | let contractCallerAddress = contractDescription[2] | |
279 | 279 | let contractAssetId = contractDescription[3] | |
280 | 280 | let contractAssetQuantity = parseIntValue(contractDescription[4]) | |
281 | 281 | let contractAssetInfo = match assetInfo(fromBase58String(contractAssetId)) { | |
282 | 282 | case isAsset: Asset => | |
283 | 283 | isAsset | |
284 | 284 | case _ => | |
285 | 285 | throw("ERROR: Unknown Asset") | |
286 | 286 | } | |
287 | 287 | if ((size(contractDescription) != 5)) | |
288 | 288 | then throw("ERROR: Contract description") | |
289 | 289 | else if (if ((genesisHeight >= contractHeight)) | |
290 | 290 | then true | |
291 | 291 | else (contractHeight >= height)) | |
292 | 292 | then throw("ERROR: Height") | |
293 | 293 | else if (if ((1 > contractAssetQuantity)) | |
294 | 294 | then true | |
295 | 295 | else (contractAssetQuantity > contractAssetInfo.quantity)) | |
296 | 296 | then throw("ERROR: Asset quantity") | |
297 | 297 | else if ((contractAssetQuantity > assetBalance(this, contractAssetInfo.id))) | |
298 | 298 | then throw("ERROR: Vault balance") | |
299 | 299 | else { | |
300 | 300 | let nonce = generateNonce() | |
301 | 301 | let receiptDescription = makeString([receiptText, toString(contractHeight), toString(height), toBase58String(contractIdByteVector), contractCallerAddress, toString(i.caller), contractAssetId, toString(contractAssetQuantity)], contractSeparator) | |
302 | 302 | let receiptIssue = Issue(receiptName, receiptDescription, 1, 0, false, unit, nonce) | |
303 | 303 | let receiptId = calculateAssetId(receiptIssue) | |
304 | 304 | [IntegerEntry(keyNonceCount, nonce), Burn(contractIdByteVector, 1), receiptIssue, ScriptTransfer(i.caller, receiptIssue.quantity, receiptId), ScriptTransfer(i.caller, contractAssetQuantity, contractAssetInfo.id)] | |
305 | 305 | } | |
306 | 306 | } | |
307 | 307 | } | |
308 | 308 | ||
309 | 309 | ||
310 | 310 | @Verifier(tx) | |
311 | 311 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
312 | 312 |
github/deemru/w8io/169f3d6 74.45 ms ◑