From 70cd74151953c1efd425be64e373d89a0ab499da Mon Sep 17 00:00:00 2001 From: Ragnar Date: Mon, 27 Oct 2025 11:46:32 +0100 Subject: [PATCH] Update core.py --- vyper/evm/assembler/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vyper/evm/assembler/core.py b/vyper/evm/assembler/core.py index 5c553fd4d2..2fa8a96aa2 100644 --- a/vyper/evm/assembler/core.py +++ b/vyper/evm/assembler/core.py @@ -17,8 +17,13 @@ from vyper.evm.opcodes import get_opcodes from vyper.exceptions import CompilerPanic +# EVM opcode base values for PUSH, DUP, and SWAP instructions +# These constants are used to calculate opcodes: OFFSET + instruction_number +# PUSH0 = 0x5F, PUSH1 = 0x60, PUSH2 = 0x61, etc. PUSH_OFFSET = 0x5F +# DUP1 = 0x80, DUP2 = 0x81, DUP3 = 0x82, etc. DUP_OFFSET = 0x7F +# SWAP1 = 0x90, SWAP2 = 0x91, SWAP3 = 0x92, etc. SWAP_OFFSET = 0x8F