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