Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const fixtures: Fixture[] = [
// function ifNarrowingMultiple(bytes data1, bytes data2, int x) {
+ 'OP_5 OP_NUMEQUALVERIFY '
// if (data1.length == 20 && data2.length == 10) {
+ 'OP_DUP OP_SIZE OP_NIP 14 OP_NUMEQUAL OP_2 OP_PICK OP_SIZE OP_NIP OP_10 OP_NUMEQUAL OP_BOOLAND OP_IF '
+ 'OP_SIZE 14 OP_NUMEQUAL OP_2 OP_PICK OP_SIZE OP_NIP OP_10 OP_NUMEQUAL OP_BOOLAND OP_IF '
// bytes20 narrowed1 = data1;
+ 'OP_DUP '
// bytes10 narrowed2 = data2;
Expand All @@ -122,10 +122,10 @@ export const fixtures: Fixture[] = [
+ 'OP_NIP OP_NIP '
// }
+ 'OP_ENDIF OP_ENDIF OP_ENDIF OP_ENDIF OP_ENDIF',
fingerprint: '6ce346c2b481330bafc5f23000655b8f033cd71635e01987a431885433b9de30',
fingerprint: '39a2f3c82a5c3f2d55a80bfe84f6288d3406f7c0afd6501807a38000d9f2da13',
debug: {
bytecode: '76009c6378827701149d7852798802a9147b7e01877e82770114a0776776519c6378827701149c63787653798875687b00a077776776529c630114527982779d787b87776776539c6378827701149c537900a09a63787653798875687b00a077776776549c6378827701149c537982775a9c9a697853797c537988537a8802a9147b7e01877e82770114a07767559d76827701149c527982775a9c9a63766f88765479886d687b00a077776868686868',
sourceMap: '2:4:7:5;;;;3:16:3:20;:::27:1;;:31::33:0;:8::35:1;4:27:4:31:0;5:28:5:32;;:8::34:1;6:16:6:47:0;:42::46;:16::47:1;;;:::54;;:57::59:0;:8::61:1;2:42:7:5;:4;9::15::0;;;;10:12:10:16;:::23:1;;:27::29:0;:12:::1;:31:13:9:0;11::11:35;12:20:12:28;:32::36;;:12::38:1;10:31:13:9;;14:16:14:17:0;:20::21;:8::23:1;9:44:15:5;;:4;17::21::0;;;;18:16:18:18;:22::26;;:::33:1;;:8::35;19:27:19:31:0;20:28:20:32;:8::34:1;17:44:21:5;:4;23::29::0;;;;24:12:24:16;:::23:1;;:27::29:0;:12:::1;:33::34:0;;:37::38;:33:::1;:12;:40:27:9:0;25:31:25:35;26:20:26:28;:32::36;;:12::38:1;24:40:27:9;;28:16:28:17:0;:20::21;:8::23:1;23:47:29:5;;:4;31::38::0;;;;32:16:32:21;:::28:1;;:32::34:0;:16:::1;:38::43:0;;:::50:1;;:54::56:0;:38:::1;:16;:8::58;33:28:33:33:0;34::34;;35:16:35:25;:29::34;;:8::36:1;36:29:36:34:0;;:8::36:1;37:16:37:48:0;:42::47;:16::48:1;;;:::55;;:58::60:0;:8::62:1;31:64:38:5;:4;40::48::0;;41:12:41:17;:::24:1;;:28::30:0;:12:::1;:34::39:0;;:::46:1;;:50::52:0;:34:::1;:12;:54:46:9:0;42:32:42:37;43::44:38;:::40:1;45:20:45:29:0;:33::38;;:12::40:1;41:54:46:9;;47:16:47:17:0;:20::21;:8::23:1;40:66:48:5;;1:0:49:1;;;;',
bytecode: '76009c6378827701149d7852798802a9147b7e01877e82770114a0776776519c6378827701149c63787653798875687b00a077776776529c630114527982779d787b87776776539c6378827701149c537900a09a63787653798875687b00a077776776549c6378827701149c537982775a9c9a697853797c537988537a8802a9147b7e01877e82770114a07767559d8201149c527982775a9c9a63766f88765479886d687b00a077776868686868',
sourceMap: '2:4:7:5;;;;3:16:3:20;:::27:1;;:31::33:0;:8::35:1;4:27:4:31:0;5:28:5:32;;:8::34:1;6:16:6:47:0;:42::46;:16::47:1;;;:::54;;:57::59:0;:8::61:1;2:42:7:5;:4;9::15::0;;;;10:12:10:16;:::23:1;;:27::29:0;:12:::1;:31:13:9:0;11::11:35;12:20:12:28;:32::36;;:12::38:1;10:31:13:9;;14:16:14:17:0;:20::21;:8::23:1;9:44:15:5;;:4;17::21::0;;;;18:16:18:18;:22::26;;:::33:1;;:8::35;19:27:19:31:0;20:28:20:32;:8::34:1;17:44:21:5;:4;23::29::0;;;;24:12:24:16;:::23:1;;:27::29:0;:12:::1;:33::34:0;;:37::38;:33:::1;:12;:40:27:9:0;25:31:25:35;26:20:26:28;:32::36;;:12::38:1;24:40:27:9;;28:16:28:17:0;:20::21;:8::23:1;23:47:29:5;;:4;31::38::0;;;;32:16:32:21;:::28:1;;:32::34:0;:16:::1;:38::43:0;;:::50:1;;:54::56:0;:38:::1;:16;:8::58;33:28:33:33:0;34::34;;35:16:35:25;:29::34;;:8::36:1;36:29:36:34:0;;:8::36:1;37:16:37:48:0;:42::47;:16::48:1;;;:::55;;:58::60:0;:8::62:1;31:64:38:5;:4;40::48::0;;41:12:41:24:1;:28::30:0;:12:::1;:34::39:0;;:::46:1;;:50::52:0;:34:::1;:12;:54:46:9:0;42:32:42:37;43::44:38;:::40:1;45:20:45:29:0;:33::38;;:12::40:1;41:54:46:9;;47:16:47:17:0;:20::21;:8::23:1;40:66:48:5;;1:0:49:1;;;;',
logs: [],
requires: [
{ ip: 8, line: 3 },
Expand All @@ -141,11 +141,11 @@ export const fixtures: Fixture[] = [
{ ip: 113, line: 35 },
{ ip: 116, line: 36 },
{ ip: 126, line: 37 },
{ ip: 145, line: 44 },
{ ip: 149, line: 45 },
{ ip: 155, line: 47 },
{ ip: 143, line: 44 },
{ ip: 147, line: 45 },
{ ip: 153, line: 47 },
],
sourceTags: '22:22:sc;39:39:sc;44:45:sc;60:60:sc;82:82:sc;87:88:sc;126:126:sc;150:150:sc;155:156:sc',
sourceTags: '22:22:sc;39:39:sc;44:45:sc;60:60:sc;82:82:sc;87:88:sc;126:126:sc;148:148:sc;153:154:sc',
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ export const fixtures: Fixture[] = [
contractName: 'Loopy',
constructorInputs: [],
abi: [{ name: 'doLoop', inputs: [] }],
bytecode: 'OP_0 OP_0 OP_0 OP_0 OP_BEGIN OP_DUP OP_UTXOVALUE OP_4 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_ROT OP_ROT OP_FROMALTSTACK OP_1ADD OP_TXOUTPUTCOUNT OP_2DUP OP_LESSTHAN OP_DUP OP_IF OP_2 OP_PICK OP_OUTPUTTOKENCATEGORY OP_0 OP_EQUAL OP_NOT OP_NIP OP_DUP OP_IF OP_4 OP_PICK OP_3 OP_PICK OP_OUTPUTVALUE OP_ADD OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_ROT OP_ROT OP_FROMALTSTACK OP_FROMALTSTACK OP_ELSE OP_3 OP_PICK OP_1ADD OP_4 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_ROT OP_ROT OP_FROMALTSTACK OP_ENDIF OP_ENDIF OP_2DROP OP_DUP OP_TXINPUTCOUNT OP_GREATERTHANOREQUAL OP_UNTIL OP_2SWAP OP_GREATERTHAN OP_VERIFY OP_SWAP OP_0 OP_GREATERTHAN OP_NIP',
bytecode: 'OP_0 OP_0 OP_0 OP_0 OP_BEGIN OP_DUP OP_UTXOVALUE OP_4 OP_ROLL OP_DROP OP_SWAP OP_2SWAP OP_ROT OP_1ADD OP_TXOUTPUTCOUNT OP_2DUP OP_LESSTHAN OP_DUP OP_IF OP_2 OP_PICK OP_OUTPUTTOKENCATEGORY OP_0 OP_EQUAL OP_NOT OP_NIP OP_DUP OP_IF OP_4 OP_PICK OP_3 OP_PICK OP_OUTPUTVALUE OP_ADD OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_2SWAP OP_ROT OP_FROMALTSTACK OP_ELSE OP_3 OP_ROLL OP_1ADD OP_SWAP OP_2SWAP OP_ROT OP_ENDIF OP_ENDIF OP_2DROP OP_DUP OP_TXINPUTCOUNT OP_GREATERTHANOREQUAL OP_UNTIL OP_2SWAP OP_GREATERTHAN OP_VERIFY OP_SWAP OP_0 OP_GREATERTHAN OP_NIP',
debug: {
bytecode: '000000006576c6547a757c6b7b7b6c8bc46e9f76635279d100879177766354795379cc93557a757c6b7c6b7b7b6c6c6753798b547a757c6b7b7b6c68686d76c3a26672a0697c00a077',
sourceMap: '3:23:3:24;4:24:4:25;5:25:5:26;6:16:6:17;8:8:26:39;9:33:9:34;:23::41:1;:12::42;;;;;;;;10::10:22;12:20:12:37:0;13:21:13:26;::::1;15:16:15:17:0;:19:25:13;16:31:16:32;;:20::47:1;:51::53:0;:20:::1;;:16::54;18:20:18:21:0;:23:20:17;19:32:19:41;;:55::56;;:44::63:1;:32;:20::64;;;;;;;;;;;20:23:22:17:0;21:33:21:43;;:::47:1;:20::48;;;;;;;;20:23:22:17;15:19:25:13;8:11:26:9;26:17::18:0;:21::37;8:8::39:1;;28:16:28:36:0;::::1;:8::38;29:16:29:26:0;:29::30;:8::32:1;2:22:30:5',
bytecode: '000000006576c6547a757c727b8bc46e9f76635279d100879177766354795379cc93557a757c6b7c727b6c67537a8b7c727b68686d76c3a26672a0697c00a077',
sourceMap: '3:23:3:24;4:24:4:25;5:25:5:26;6:16:6:17;8:8:26:39;9:33:9:34;:23::41:1;:12::42;;;;;;10::10:22;12:20:12:37:0;13:21:13:26;::::1;15:16:15:17:0;:19:25:13;16:31:16:32;;:20::47:1;:51::53:0;:20:::1;;:16::54;18:20:18:21:0;:23:20:17;19:32:19:41;;:55::56;;:44::63:1;:32;:20::64;;;;;;;;;20:23:22:17:0;21:20:21:48:1;;;;;;20:23:22:17;15:19:25:13;8:11:26:9;26:17::18:0;:21::37;8:8::39:1;;28:16:28:36:0;::::1;:8::38;29:16:29:26:0;:29::30;:8::32:1;2:22:30:5',
logs: [
{ ip: 60, line: 24, data: [{ stackIndex: 3, type: 'int', ip: 60 }] },
{ ip: 51, line: 24, data: [{ stackIndex: 3, type: 'int', ip: 51 }] },
],
requires: [
{ ip: 68, line: 28 },
{ ip: 72, line: 29 },
{ ip: 59, line: 28 },
{ ip: 63, line: 29 },
],
sourceTags: '61:61:sc;72:72:sc',
sourceTags: '52:52:sc;63:63:sc',
},
fingerprint: 'b91e25a054a9cad4ddfb496c397c5d7e7e24a7ed131326b91e93d48bbee00e24',
fingerprint: '0dfd8b49c1d5e3af83759f9921d61901e5dbfa99e2b2afbe490e9bb3fba813f5',
},
},
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { Fixture } from '../../fixture-utils.js';

export const fixtures: Fixture[] = [
{
artifact: {
contractName: 'DeepIncrementDecrement',
constructorInputs: [],
abi: [
{ name: 'loop', inputs: [{ name: 'budget', type: 'int' }] },
{
name: 'branch',
inputs: [{ name: 'x', type: 'int' }, { name: 'y', type: 'int' }, { name: 'z', type: 'int' }],
},
],
bytecode:
// function loop(int budget) {
'OP_DUP OP_0 OP_NUMEQUAL OP_IF '
// int remaining = budget;
+ 'OP_OVER '
// int steps = 0;
+ 'OP_0 '
// int a = 1;
+ 'OP_1 '
// int b = 2;
+ 'OP_2 '
// int c = 3;
+ 'OP_3 '
// for (int i = 0; i < 3; i++) {
+ 'OP_0 OP_BEGIN OP_DUP OP_3 OP_LESSTHAN OP_DUP OP_TOALTSTACK OP_IF '
// remaining = remaining - 1;
+ 'OP_5 OP_ROLL OP_1SUB OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_2SWAP OP_ROT OP_FROMALTSTACK OP_FROMALTSTACK '
// steps = steps + 1;
+ 'OP_4 OP_ROLL OP_1ADD OP_SWAP OP_TOALTSTACK OP_SWAP OP_2SWAP OP_ROT OP_FROMALTSTACK '
// i++
+ 'OP_1ADD '
// Loop condition
+ 'OP_ENDIF OP_FROMALTSTACK OP_NOT OP_UNTIL '
// Cleanup
+ 'OP_DROP '
// require(a + b + c == 6);
+ 'OP_ROT OP_ROT OP_ADD OP_ADD OP_6 OP_NUMEQUALVERIFY '
// require(remaining + steps == budget);
+ 'OP_ADD OP_ROT OP_NUMEQUAL '
// Cleanup
+ 'OP_NIP '
// }
+ 'OP_ELSE '
// function branch(int x, int y, int z) {
+ 'OP_1 OP_NUMEQUALVERIFY '
// if (x > y) {
+ 'OP_2DUP OP_LESSTHAN OP_IF '
// x = x - 1;
+ 'OP_1SUB '
// y = y - 1;
+ 'OP_SWAP OP_1SUB OP_SWAP '
// z = z - 1;
+ 'OP_ROT OP_1SUB OP_ROT OP_ROT '
// }
+ 'OP_ENDIF '
// require(x + y + z > 0);
+ 'OP_ADD OP_ADD OP_0 OP_GREATERTHAN '
// }
+ 'OP_ENDIF',
debug: {
bytecode: '76009c637800515253006576539f766b63557a8c7c6b7c6b7c727b6c6c547a8b7c6b7c727b6c8b686c9166757b7b9393569d937b9c7767519d6e9f638c7c8c7c7b8c7b7b68939300a068',
sourceMap: '2:4:16:5;;;;3:24:3:30;4:20:4:21;5:16:5:17;6::6;7::7;9:21:9:22;:8:12:9;:24:9:25;:28::29;:24:::1;;;:36:12:9:0;10:12:10:38:1;;;;;;;;;;;;11::11:30;;;;;;;;;9:31:9:34;:36:12:9;;:8;;;14:16:14:17:0;:20::21;:16:::1;:::25;:29::30:0;:8::32:1;15:16:15:33;:37::43:0;:8::45:1;2:30:16:5;:4;18::26::0;;19:12:19:17;::::1;:19:23:9:0;20:12:20:22:1;21::21;;;22::22;;;;19:19:23:9;25:16:25:21;:::25;:28::29:0;:8::31:1;1:0:27:1',
logs: [],
requires: [
{ ip: 49, line: 14 },
{ ip: 53, line: 15 },
{ ip: 73, line: 25 },
],
sourceTags: '38:38:fu;39:42:lc;43:43:sc;53:53:sc',
},
fingerprint: '98cc2394f050f139ea1b4e5816109403122c1381f60fb2379833fd772283fcbd',
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ export const fixtures: Fixture[] = [
// if (a < 3) {
+ 'OP_5 OP_PICK OP_3 OP_LESSTHAN OP_IF '
// a = 3 }
+ 'OP_3 OP_6 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP '
+ 'OP_TOALTSTACK OP_ROT OP_ROT OP_FROMALTSTACK OP_FROMALTSTACK OP_FROMALTSTACK OP_ENDIF '
+ 'OP_3 OP_6 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_SWAP OP_2SWAP '
+ 'OP_ROT OP_FROMALTSTACK OP_FROMALTSTACK OP_ENDIF '
// require(a > b + c + d + e + f);
+ 'OP_2ROT OP_5 OP_ROLL OP_ADD OP_4 OP_ROLL OP_ADD '
+ 'OP_3 OP_ROLL OP_ADD OP_ROT OP_ADD OP_GREATERTHAN',
debug: {
bytecode: '5152535455565579539f6353567a757c6b7c6b7c6b7b7b6c6c6c6871557a93547a93537a937b93a0',
bytecode: '5152535455565579539f6353567a757c6b7c6b7c727b6c6c6871557a93547a93537a937b93a0',
logs: [],
requires: [{ ip: 40, line: 14 }],
sourceMap: '3:16:3:17;4::4;5::5;6::6;7::7;8::8;10:12:10:13;;:16::17;:12:::1;:19:12:9:0;11:16:11:17;:12::18:1;;;;;;;;;;;;;;10:19:12:9;14:16:14:21:0;:24::25;;:20:::1;:28::29:0;;:20:::1;:32::33:0;;:20:::1;:36::37:0;:20:::1;:8::39',
requires: [{ ip: 38, line: 14 }],
sourceMap: '3:16:3:17;4::4;5::5;6::6;7::7;8::8;10:12:10:13;;:16::17;:12:::1;:19:12:9:0;11:16:11:17;:12::18:1;;;;;;;;;;;;10:19:12:9;14:16:14:21:0;:24::25;;:20:::1;:28::29:0;;:20:::1;:32::33:0;;:20:::1;:36::37:0;:20:::1;:8::39',
},
fingerprint: 'e586fb63aa0c9791cdf96f5472328a702565bd0e1da1bb101dc2619c5655f465',
fingerprint: '998cd5c0cd9a0da56cdbc8f0220ac98a3f33bf91fba3ce7f454c70144c3ec4b9',
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ export const fixtures: Fixture[] = [
contractName: 'Loopy',
constructorInputs: [],
abi: [{ name: 'doLoop', inputs: [] }],
bytecode: 'OP_0 OP_2 OP_BEGIN OP_OVER OP_1ADD OP_ROT OP_DROP OP_SWAP OP_2DUP OP_ADD OP_10 OP_LESSTHAN OP_VERIFY OP_OVER OP_10 OP_GREATERTHANOREQUAL OP_UNTIL OP_2DROP OP_1',
bytecode: 'OP_0 OP_2 OP_BEGIN OP_SWAP OP_1ADD OP_SWAP OP_2DUP OP_ADD OP_10 OP_LESSTHAN OP_VERIFY OP_OVER OP_10 OP_GREATERTHANOREQUAL OP_UNTIL OP_2DROP OP_1',
debug: {
bytecode: '005265788b7b757c6e935a9f69785aa2666d51',
sourceMap: '3:16:3:17;4::4;6:8:10:25;7:16:7:17;:::21:1;:12::22;;;9:20:9:25:0;::::1;:28::30:0;:20:::1;:12::32;10:17:10:18:0;:21::23;6:8::25:1;;2:22:11:5;',
bytecode: '0052657c8b7c6e935a9f69785aa2666d51',
sourceMap: '3:16:3:17;4::4;6:8:10:25;7:12:7:22:1;;;9:20:9:25:0;::::1;:28::30:0;:20:::1;:12::32;10:17:10:18:0;:21::23;6:8::25:1;;2:22:11:5;',
logs: [
{ ip: 8, line: 8, data: [{ stackIndex: 1, type: 'int', ip: 8 }] },
{ ip: 6, line: 8, data: [{ stackIndex: 1, type: 'int', ip: 6 }] },
],
requires: [
{ ip: 12, line: 9 },
{ ip: 10, line: 9 },
],
},
fingerprint: '39b67bb19440620390b83e3bc1e638ea6827998f4a14c2d6e29c2afa9815b2fd',
fingerprint: 'c593e0b3cba73663f3bb5fcbcdba620c02ce0e9dce951ff4e52b89c27a90ad6b',
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export const fixtures: Fixture[] = [
// int i = 0; bool done = false;
+ 'OP_0 OP_0 '
// do { i = i + 1;
+ 'OP_BEGIN OP_OVER OP_1ADD OP_ROT OP_DROP OP_SWAP '
+ 'OP_BEGIN OP_SWAP OP_1ADD OP_TUCK '
// done = i >= target;
+ 'OP_OVER OP_4 OP_PICK OP_GREATERTHANOREQUAL OP_NIP '
+ 'OP_4 OP_PICK OP_GREATERTHANOREQUAL OP_NIP '
// } while (!done) - OP_NOT OP_NOT OP_UNTIL is optimised to OP_UNTIL
+ 'OP_DUP OP_UNTIL '
// if (!!flag) - OP_NOT OP_NOT OP_IF becomes OP_NOT OP_NOTIF, which is optimised to OP_IF
Expand All @@ -26,17 +26,17 @@ export const fixtures: Fixture[] = [
// clean up i and done
+ 'OP_NIP OP_NIP',
debug: {
bytecode: '7669000065788b7b757c785479a27776667b637853799d687c00a07777',
sourceMap: '4:18:4:22;:8::24:1;6:16:6:17:0;7:20:7:25;9:8:13:24;10:16:10:17;:::21:1;:12::22;;;11:19:11:20:0;:24::30;;:19:::1;:12::31;13:18:13:22:0;9:8::24:1;16:14:16:18:0;:12:18:9;17:20:17:21;:25::31;;:12::33:1;16:20:18:9;20:16:20:17:0;:20::21;:8::23:1;2:31:21:5;',
bytecode: '76690000657c8b7d5479a27776667b637853799d687c00a07777',
sourceMap: '4:18:4:22;:8::24:1;6:16:6:17:0;7:20:7:25;9:8:13:24;10:12:10:22:1;;::11:20:0;11:24::30;;:19:::1;:12::31;13:18:13:22:0;9:8::24:1;16:14:16:18:0;:12:18:9;17:20:17:21;:25::31;;:12::33:1;16:20:18:9;20:16:20:17:0;:20::21;:8::23:1;2:31:21:5;',
logs: [],
requires: [
{ ip: 2, line: 4 },
{ ip: 23, line: 17 },
{ ip: 28, line: 20 },
{ ip: 20, line: 17 },
{ ip: 25, line: 20 },
],
sourceTags: '27:28:sc',
sourceTags: '24:25:sc',
},
fingerprint: 'ed0b5bc35f0130fa04d1fce813fbd7c183bb5346006d10c0808f0d9872712ded',
fingerprint: '5dd89e0fc04feb9dd9c02f890421b3883befee8f91a18ac05aee444d377ac4fc',
},
},
];
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const fixtures: Fixture[] = [
// int myVariable = 10 - int(false); // they can go at the end of the line
+ 'OP_10 OP_0 OP_SUB '
// int myOtherVariable = (i + myVariable) % 2;
+ 'OP_2 OP_PICK OP_OVER OP_ADD OP_2 OP_MOD '
+ 'OP_3DUP OP_NIP OP_ADD OP_2 OP_MOD '
// require(myOtherVariable /* And comments can be included within lines */ > i);
+ 'OP_DUP OP_4 OP_PICK OP_GREATERTHAN OP_VERIFY '
// myOtherVariable = i;
Expand All @@ -30,7 +30,7 @@ export const fixtures: Fixture[] = [
// if (i > 400) {
+ 'OP_4 OP_PICK 9001 OP_GREATERTHAN OP_IF '
// i = 400;
+ '9001 OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_TOALTSTACK OP_ROT OP_ROT OP_FROMALTSTACK OP_FROMALTSTACK '
+ '9001 OP_5 OP_ROLL OP_DROP OP_SWAP OP_TOALTSTACK OP_SWAP OP_2SWAP OP_ROT OP_FROMALTSTACK '
// }
+ 'OP_ENDIF '
// if (x > 10) {
Expand All @@ -47,20 +47,20 @@ export const fixtures: Fixture[] = [
+ 'OP_ELSE OP_DUP OP_1 OP_NUMEQUALVERIFY OP_ENDIF OP_ENDIF '
// }
+ 'OP_2DROP OP_2DROP OP_2DROP OP_2DROP OP_1',
fingerprint: 'db741271dde641b395ed7d3f282179c607d56f29b2ba7cddff3b7670a24072e2',
fingerprint: 'cff254ff1a7e9f95dfcac838cb9ac1ca6f75cc15db4ec1a19cb2215e1ed9759f',
debug: {
bytecode: '02900178930807364897987fe80753797e5a0094527978935297765479a06953795a547aa678a68802f401b275567a8277018a9f695479029001a063029001557a757c6b7c6b7b7b6c6c6855795aa063547901149f6956795879ad675579559f6300696776519d68686d6d6d6d51',
sourceMap: '9:16:9:19;:22::23;:16:::1;10:18:10:36:0;:45::46;;:18::47:1;12:25:12:27:0;:34::39;:25::40:1;13:31:13:32:0;;:35::45;:31:::1;:49::50:0;:30:::1;14:16:14:31:0;:82::83;;:16:::1;:8::85;16:26:16:27:0;;17:21:17:23;19:26:19:27;;:16::28:1;:48::58:0;:32::60:1;:8::62;20:28:20:31:0;:8::33:1;;21:16:21:17:0;;:::24:1;;:27::30:0;:16:::1;:8::32;23:12:23:13:0;;:16::19;:12:::1;:21:25:9:0;24:16:24:19;:12::20:1;;;;;;;;;;;23:21:25:9;27:12:27:13:0;;:16::18;:12:::1;:20:30:9:0;28::28:21;;:24::26;:20:::1;:12::28;29:29:29:30:0;;:32::34;;:12::37:1;30:15:33::0;:19:30:20;;:23::24;:19:::1;:26:32:9:0;31:20:31:25;:12::27:1;33::33:37:0;:20::30;:34::35;:12::37:1;;30:15;8:37:34:5;;;;',
bytecode: '02900178930807364897987fe80753797e5a00946f77935297765479a06953795a547aa678a68802f401b275567a8277018a9f695479029001a063029001557a757c6b7c727b6c6855795aa063547901149f6956795879ad675579559f6300696776519d68686d6d6d6d51',
sourceMap: '9:16:9:19;:22::23;:16:::1;10:18:10:36:0;:45::46;;:18::47:1;12:25:12:27:0;:34::39;:25::40:1;13:31:13:45:0;;::::1;:49::50:0;:30:::1;14:16:14:31:0;:82::83;;:16:::1;:8::85;16:26:16:27:0;;17:21:17:23;19:26:19:27;;:16::28:1;:48::58:0;:32::60:1;:8::62;20:28:20:31:0;:8::33:1;;21:16:21:17:0;;:::24:1;;:27::30:0;:16:::1;:8::32;23:12:23:13:0;;:16::19;:12:::1;:21:25:9:0;24:16:24:19;:12::20:1;;;;;;;;;23:21:25:9;27:12:27:13:0;;:16::18;:12:::1;:20:30:9:0;28::28:21;;:24::26;:20:::1;:12::28;29:29:29:30:0;;:32::34;;:12::37:1;30:15:33::0;:19:30:20;;:23::24;:19:::1;:26:32:9:0;31:20:31:25;:12::27:1;33::33:37:0;:20::30;:34::35;:12::37:1;;30:15;8:37:34:5;;;;',
logs: [],
requires: [
{ ip: 22, line: 14 },
{ ip: 31, line: 19 },
{ ip: 33, line: 20 },
{ ip: 41, line: 21 },
{ ip: 69, line: 28 },
{ ip: 74, line: 29 },
{ ip: 82, line: 31 },
{ ip: 86, line: 33 },
{ ip: 21, line: 14 },
{ ip: 30, line: 19 },
{ ip: 32, line: 20 },
{ ip: 40, line: 21 },
{ ip: 66, line: 28 },
{ ip: 71, line: 29 },
{ ip: 79, line: 31 },
{ ip: 83, line: 33 },
],
},
},
Expand Down
Loading
Loading