It's so cool to see more and more people interested in Bitcoin Script! I test the opcodes in this way:
1. clone the bsv js repo: <a href='https://github.com/scrypt-sv/bsv'>https://github.com/scrypt-sv/bsv</a>
2. add these line below in `index.js`
3. run `node index.js`
```
let c = 'OP_2 OP_2 OP_ADD OP_EQUAL'
let s = bsv.Script.fromASM(c);
let i = bsv.Script.Interpreter();
i.flags = bsv.Script.Interpreter.SCRIPT_ENABLE_MAGNETIC_OPCODES | bsv.Script.Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES;
i.script = s;
i.evaluate();
console.log(i);
```
It's so cool to see more and more people interested in Bitcoin Script! I test the opcodes in this way:
1. clone the bsv js repo: <a href='https://github.com/scrypt-sv/bsv'>https://github.com/scrypt-sv/bsv</a>
2. add these line below in `index.js`
3. run `node index.js`
```
let c = 'OP_2 OP_2 OP_ADD OP_EQUAL'
let s = bsv.Script.fromASM(c);
let i = bsv.Script.Interpreter();
i.flags = bsv.Script.Interpreter.SCRIPT_ENABLE_MAGNETIC_OPCODES | bsv.Script.Interpreter.SCRIPT_ENABLE_MONOLITH_OPCODES;
i.script = s;
i.evaluate();
console.log(i);
```