From 8c59c61f371b7eb7e6a9e40a9e88cc7f9753b20b Mon Sep 17 00:00:00 2001 From: j1mbo64 Date: Sat, 27 Jul 2024 17:34:48 +0200 Subject: [PATCH] fix: md lint --- resources/how-to-add-an-opcode.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/how-to-add-an-opcode.md b/resources/how-to-add-an-opcode.md index 88e9122c..9fc19c02 100644 --- a/resources/how-to-add-an-opcode.md +++ b/resources/how-to-add-an-opcode.md @@ -4,10 +4,10 @@ - [Bitcoin Script Wiki](https://en.bitcoin.it/wiki/Script) - [Reference implementation in btcd](https://github.com/btcsuite/btcd/blob/b161cd6a199b4e35acec66afc5aad221f05fe1e3/txscript/opcode.go#L312) - In btcd find the function that matches the last element in `opcodeArray` for the specified opcode, that will be the reference implementation. -2. Add the Opcode to `src/opcodes/opcodes.cairo` +1. Add the Opcode to `src/opcodes/opcodes.cairo`. - Add the Opcode byte const like `pub const OP_ADD: u8 = 147;` - Create the function implementing the opcode like `fn opcode_add(ref engine: Engine) {` - Add the function to the `execute` method like `147 => opcode_add(ref engine),` -3. Add the Opcode to the compiler dict at `src/compiler.cairo` like `opcodes.insert('OP_ADD', Opcode::OP_ADD);`. -4. Create a test for your opcode at `src/opcodes/tests/test_opcodes.cairo` and ensure all the logic works as expected. -5. Create a PR, ensure CI passes, and await review. +1. Add the Opcode to the compiler dict at `src/compiler.cairo` like `opcodes.insert('OP_ADD', Opcode::OP_ADD);`. +1. Create a test for your opcode at `src/opcodes/tests/test_opcodes.cairo` and ensure all the logic works as expected. +1. Create a PR, ensure CI passes, and await review.