-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathscript_tests.json
492 lines (492 loc) · 20.2 KB
/
script_tests.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
[
{
"msg": "OK: minimal GENESIS",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: minimal GENESIS for token_type=41",
"script": "6a04534c500001410747454e455349534c004c004c004c0001004c00080000000000000001",
"code": null
},
{
"msg": "OK: minimal GENESIS for token_type=81",
"script": "6a04534c500001810747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: typical MINT without baton",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064",
"code": null
},
{
"msg": "OK: typical MINT without baton for token_type=81",
"script": "6a04534c50000181044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064",
"code": null
},
{
"msg": "(must be invalid: impossible state): typical MINT without baton for token_type=41",
"script": "6a04534c50000141044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064",
"code": 23
},
{
"msg": "OK: typical 1-output SEND",
"script": "6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": null
},
{
"msg": "OK: typical 2-output SEND",
"script": "6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000042080000000000000063",
"code": null
},
{
"msg": "OK: typical SEND for token_type=41",
"script": "6a04534c500001410453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001",
"code": null
},
{
"msg": "OK: typical SEND for token_type=81",
"script": "6a04534c500001810453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001",
"code": null
},
{
"msg": "Script ending mid-PUSH (one byte short) must be SLP-invalid",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c000800000000000064",
"code": 1
},
{
"msg": "Script ending mid-PUSH (no length) must be SLP-invalid",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c004c",
"code": 1
},
{
"msg": "Script ending mid-PUSH (length is one byte short) must be SLP-invalid",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c004d00",
"code": 1
},
{
"msg": "(must be invalid: forbidden opcode): uses opcode OP_0",
"script": "6a04534c500001010747454e455349534c00004c004c0001004c00080000000000000064",
"code": 2
},
{
"msg": "(must be invalid: forbidden opcode): uses opcode OP_1",
"script": "6a04534c5000510747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 2
},
{
"msg": "(must be invalid: forbidden opcode): uses opcode OP_1NEGATE",
"script": "6a04534c50004f0747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 2
},
{
"msg": "(must be invalid: forbidden opcode): uses opcode 0x50",
"script": "6a04534c5000500747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 2
},
{
"msg": "(not SLP): p2pkh address script",
"script": "76a914ffffffffffffffffffffffffffffffffffffffff88ac",
"code": 3
},
{
"msg": "(not SLP): empty op_return",
"script": "6a",
"code": 3
},
{
"msg": "(not SLP): first push is 9-byte 'yours.org'",
"script": "6a09796f7572732e6f7267",
"code": 3
},
{
"msg": "(not SLP): first push is 4-byte '\\x00BET'",
"script": "6a0400424554",
"code": 3
},
{
"msg": "(not SLP): first push is 4-byte '\\x00SLP'",
"script": "6a0400534c5001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 3
},
{
"msg": "(not SLP): first push is 3-byte 'SLP'",
"script": "6a03534c5001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 3
},
{
"msg": "(not SLP): first push is 5-byte 'SLP\\x00\\x00'",
"script": "6a05534c50000001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 3
},
{
"msg": "(not SLP): first push is 7-byte '\\xef\\xbb\\xbfSLP\\x00' (UTF8 byte order mark + 'SLP\\x00')",
"script": "6a07efbbbf534c500001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 3
},
{
"msg": "OK: lokad pushed using PUSHDATA1",
"script": "6a4c04534c500001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: lokad pushed using PUSHDATA2",
"script": "6a4d0400534c500001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: lokad pushed using PUSHDATA4",
"script": "6a4e04000000534c500001010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: 2 bytes for token_type=1",
"script": "6a04534c50000200010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: can have more than 1 SLP output for token_type=41 (we check quantity <=1 in tx_input_tests.py)",
"script": "6a04534c500001410453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001080000000000000001",
"code": null
},
{
"msg": "(unsupported token type, must be token_type=1, 65, or 129): 2 bytes for token_type=2",
"script": "6a04534c50000200020747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 255
},
{
"msg": "(must be invalid: wrong size): 3 bytes for token_type",
"script": "6a04534c5000030000010747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): 0 bytes for token_type",
"script": "6a04534c50004c000747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: too short): stopped after lokad ID",
"script": "6a04534c5000",
"code": 12
},
{
"msg": "(must be invalid: too short): stopped after token_type",
"script": "6a04534c50000101",
"code": 12
},
{
"msg": "(must be invalid: too short): stopped after transaction_type GENESIS",
"script": "6a04534c500001010747454e45534953",
"code": 12
},
{
"msg": "(must be invalid: too short): stopped after transaction_type MINT",
"script": "6a04534c50000101044d494e54",
"code": 12
},
{
"msg": "(must be invalid: too short): stopped after transaction_type SEND",
"script": "6a04534c500001010453454e44",
"code": 12
},
{
"msg": "(must be invalid: bad value): transaction_type null",
"script": "6a04534c500001014c004c00080000000000000064",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type 'INIT'",
"script": "6a04534c5000010104494e49544c004c004c004c0001004c00080000000000000064",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type 'TRAN'",
"script": "6a04534c50000101045452414e208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type 'send'",
"script": "6a04534c500001010473656e64208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type 'SENÄ'",
"script": "6a04534c500001010453454eC4208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type = 7-byte '\\xef\\xbb\\xbfSEND' (UTF8 byte order mark + 'SEND')",
"script": "6a04534c5000010107efbbbf53454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type = 10-byte UTF16 'SEND' (incl. BOM)",
"script": "6a04534c500001010afffe530045004e004400208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "(must be invalid: bad value): transaction_type = 20-byte UTF32 'SEND' (incl. BOM)",
"script": "6a04534c5000010114fffe000053000000450000004e00000044000000208888888888888888888888888888888888888888888888888888888888888888080000000000000042",
"code": 11
},
{
"msg": "OK: 8-character ticker 'NAKAMOTO' ascii",
"script": "6a04534c500001010747454e45534953084e414b414d4f544f4c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: 9-character ticker 'Satoshi_N' ascii",
"script": "6a04534c500001010747454e45534953095361746f7368695f4e4c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: 2-character ticker '\u4e2d\u672c' ('nakamoto' kanji) -- 6 bytes utf8",
"script": "6a04534c500001010747454e4553495306e4b8ade69cac4c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: 4-character ticker '\u30ca\u30ab\u30e2\u30c8' ('nakamoto' katakana) -- 12 bytes utf8",
"script": "6a04534c500001010747454e455349530ce3838ae382abe383a2e383884c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "(must be invalid: wrong size): Genesis with 0-byte decimals",
"script": "6a04534c500001010747454e455349534c004c004c004c004c004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): Genesis with 2-byte decimals",
"script": "6a04534c500001010747454e455349534c004c004c004c000200004c00080000000000000064",
"code": 10
},
{
"msg": "OK: Genesis with 32-byte dochash",
"script": "6a04534c500001010747454e455349534c004c004c0020ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01004c00080000000000000064",
"code": null
},
{
"msg": "(must be invalid: wrong size): Genesis with 31-byte dochash",
"script": "6a04534c500001010747454e455349534c004c004c001fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): Genesis with 33-byte dochash",
"script": "6a04534c500001010747454e455349534c004c004c0021ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): Genesis with 64-byte dochash",
"script": "6a04534c500001010747454e455349534c004c004c0040ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): Genesis with 20-byte dochash",
"script": "6a04534c500001010747454e455349534c004c004c0014ffffffffffffffffffffffffffffffffffffffff01004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with 0-byte token_id",
"script": "6a04534c500001010453454e444c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with 31-byte token_id",
"script": "6a04534c500001010453454e441fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with 33-byte token_id",
"script": "6a04534c500001010453454e4421ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): MINT with 0-byte token_id",
"script": "6a04534c50000101044d494e544c004c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): MINT with 31-byte token_id",
"script": "6a04534c50000101044d494e541fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): MINT with 33-byte token_id",
"script": "6a04534c50000101044d494e5421ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with a 7-byte amount",
"script": "6a04534c500001010453454e442088888888888888888888888888888888888888888888888888888888888888880800000000000000630700000000000042080000000000000063",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with a 9-byte amount",
"script": "6a04534c500001010453454e4420888888888888888888888888888888888888888888888888888888888888888808000000000000006309000000000000000042080000000000000063",
"code": 10
},
{
"msg": "(must be invalid: wrong size): SEND with a 0-byte amount",
"script": "6a04534c500001010453454e442088888888888888888888888888888888888888888888888888888888888888880800000000000000634c00080000000000000063",
"code": 10
},
{
"msg": "OK: Genesis with decimals=9",
"script": "6a04534c500001010747454e455349534c004c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "(must be invalid: bad value): Genesis with decimals=10",
"script": "6a04534c500001010747454e455349534c004c004c004c00010a4c00080000000000000064",
"code": 11
},
{
"msg": "OK: Genesis with mint_baton_vout=255",
"script": "6a04534c500001010747454e455349534c004c004c004c00010001ff080000000000000064",
"code": null
},
{
"msg": "(must be invalid: bad value): NFT1 Child Genesis with mint_baton_vout!==null",
"script": "6a04534c500001410747454e455349534c004c0001c04c0001000102080000000000000001",
"code": 23
},
{
"msg": "(must be invalid: bad value): NFT1 Child Genesis with divisibility!==0",
"script": "6a04534c500001410747454e455349534c004c0001c04c0001094c00080000000000000001",
"code": 22
},
{
"msg": "(must be invalid: bad value): NFT1 Child Genesis with quanitity!==1",
"script": "6a04534c50000200410747454e455349534c004c004c004c0001004c00080000000000000064",
"code": 22
},
{
"msg": "OK: Genesis with mint_baton_vout=95",
"script": "6a04534c500001010747454e455349534c004c004c004c000100015f080000000000000064",
"code": null
},
{
"msg": "OK: Genesis with mint_baton_vout=2",
"script": "6a04534c500001010747454e455349534c004c004c004c0001000102080000000000000064",
"code": null
},
{
"msg": "(must be invalid: bad value): Genesis with mint_baton_vout=1",
"script": "6a04534c500001010747454e455349534c004c004c004c0001000101080000000000000064",
"code": 11
},
{
"msg": "(must be invalid: bad value): Genesis with mint_baton_vout=0",
"script": "6a04534c500001010747454e455349534c004c004c004c0001000100080000000000000064",
"code": 11
},
{
"msg": "OK: MINT with mint_baton_vout=255",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01ff080000000000000064",
"code": null
},
{
"msg": "OK: MINT with mint_baton_vout=95",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015f080000000000000064",
"code": null
},
{
"msg": "OK: MINT with mint_baton_vout=2",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0102080000000000000064",
"code": null
},
{
"msg": "(must be invalid: bad value): MINT with mint_baton_vout=1",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0101080000000000000064",
"code": 11
},
{
"msg": "(must be invalid: bad value): MINT with mint_baton_vout=0",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0100080000000000000064",
"code": 11
},
{
"msg": "(must be invalid: wrong number of params) GENESIS with extra token amount",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c00080000000000000064080000000000000064",
"code": 12
},
{
"msg": "(must be invalid: wrong number of params) MINT with extra token amount",
"script": "6a04534c50000101044d494e5420ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4c00080000000000000064080000000000000064",
"code": 12
},
{
"msg": "OK: SEND with 19 token output amounts",
"script": "6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001",
"code": null
},
{
"msg": "(must be invalid: too many parameters): SEND with 20 token output amounts",
"script": "6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001",
"code": 21
},
{
"msg": "OK: all output amounts 0",
"script": "6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000000080000000000000000",
"code": null
},
{
"msg": "OK: three inputs of max value (2**64-1) whose sum overflows a 64-bit int",
"script": "6a04534c500001010453454e4420888888888888888888888888888888888888888888888888888888888888888808ffffffffffffffff08ffffffffffffffff08ffffffffffffffff",
"code": null
},
{
"msg": "OK: using opcode PUSHDATA1 for 8-byte push",
"script": "6a04534c500001010747454e455349534c004c004c004c0001004c004c080000000000000064",
"code": null
},
{
"msg": "OK: using opcode PUSHDATA2 for empty push",
"script": "6a04534c500001010747454e455349534c004d00004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: using opcode PUSHDATA4 for empty push",
"script": "6a04534c500001010747454e455349534c004e000000004c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: ticker is bad utf8 E08080 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e4553495303e080804c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: ticker is bad utf8 C0 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e4553495301c04c004c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: name is bad utf8 E08080 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e455349534c0003e080804c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: name is bad utf8 C0 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e455349534c0001c04c004c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: url is bad utf8 E08080 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e455349534c004c0003e080804c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: url is bad utf8 C0 (validators must not require decodeable strings)",
"script": "6a04534c500001010747454e455349534c004c0001c04c0001094c00080000000000000064",
"code": null
},
{
"msg": "OK: genesis with 300-byte name 'UUUUU...' (op_return over 223 bytes, validators must not refuse this)",
"script": "6a04534c500001010747454e455349534c004d2c015555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555554c004c0001004c00080000000000000064",
"code": null
},
{
"msg": "OK: genesis with 300-byte document url 'UUUUU...' (op_return over 223 bytes, validators must not refuse this)",
"script": "6a04534c500001010747454e455349534c004c004d2c015555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555554c0001004c00080000000000000064",
"code": null
}
]