@tevm/voltaire / evm / Memory
Memory
Functions
mcopy()
mcopy(Defined in: src/evm/memory/0x5e_MCOPY.js:41 MCOPY opcode (0x5e) - Copy memory (EIP-5656, Cancun+) Pops dest, src, len from stack. Copies len bytes from src to dest. Handles overlapping regions correctly using temporary buffer. Gas cost: GasFastestStep (3) + memory expansion cost + copy cost (3 gas per word) Note: This opcode was introduced in the Cancun hardfork (EIP-5656). Implementation assumes hardfork check is done externally.frame):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if any
mload()
mload(Defined in: src/evm/memory/0x51_MLOAD.js:18 MLOAD opcode (0x51) - Load word from memory Pops offset from stack, reads 32 bytes from memory starting at offset, and pushes the result as a 256-bit value onto the stack. Gas cost: GasFastestStep (3) + memory expansion costframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if any
mstore()
mstore(Defined in: src/evm/memory/0x52_MSTORE.js:17 MSTORE opcode (0x52) - Save word to memory Pops offset and value from stack, writes 32 bytes to memory starting at offset. Value is stored in big-endian format. Gas cost: GasFastestStep (3) + memory expansion costframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if any
mstore8()
mstore8(Defined in: src/evm/memory/0x53_MSTORE8.js:17 MSTORE8 opcode (0x53) - Save byte to memory Pops offset and value from stack, writes the least significant byte of value to memory at offset. Gas cost: GasFastestStep (3) + memory expansion costframe):EvmError|null
Parameters
frame
BrandedFrame
Frame instance
Returns
EvmError | null
Error if any
