We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideally it should look like this:
(defmacro define-opcode (op-name op-code op-hex-code (&rest args) &body (doc &rest body)) "Define opcode function named OP-NAME for a given OP-CODE. OP-HEX-CODE is ignored and used only for documentation purposes. - Arithmetic: (define-opcode op_add 147 #x93 (state (a :integer) (b :integer)) :integer (@push (+ a b)) t) (define-opcode op_add 147 #x93 (state) (when (>= (length (@stack state)) 2) (let ((b (decode-integer (pop (@stack state)))) (a (decode-integer (pop (@stack state))))) (push (encode-integer (+ a b)) (@stack state)) t))) - Stack: (define-opcode op_pick 121 #x79 (state (n :integer) :null (when (>= (length (@stack state)) (1- n)) (push (nth (1- n) (@stack state)) (@stack state)) t)))) (define-opcode op_pick 121 #x79 (state) (when (>= (length (@stack state)) 1) (let ((n (decode-integer (pop (@stack state))))) (when (>= (length (@stack state)) (1- n)) (push (nth (1- n) (@stack state)) (@stack state)) t)))) - Crypto: (define-opcode op_ripemd160 166 #xa6 (state (a :bytes)) :bytes (@push (ripemd160 a)) t) (define-opcode op_ripemd160 166 #xa6 (state) (when (>= (length (@stack state)) 1) (push (ripemd160 (pop (@stack state))) (@stack state)) t)) " )
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Ideally it should look like this:
The text was updated successfully, but these errors were encountered: