Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vyper/evm/assembler/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down