Core Types
Opcode
Branded number type for EVM instructions (0x00-0xFF).Instruction
Opcode with program counter offset and optional immediate data.Execution Types
Frame
EVM execution frame with stack, memory, and execution state.Host
Interface for external state access (accounts, storage, code) and nested execution.The
call and create methods are optional. When not provided, system opcodes (CALL, CREATE, etc.) return a NotImplemented error. For full EVM execution with nested calls, use:- guillotine: Production EVM with async state, tracing, full EIP support
- guillotine-mini: Lightweight synchronous EVM for testing
InstructionHandler
Function signature for opcode implementations.Call Types
CallParams
Parameters for cross-contract calls (CALL, STATICCALL, DELEGATECALL).CallResult
Result of call operation.Creation Types
CreateParams
Parameters for contract deployment (CREATE, CREATE2).CreateResult
Result of contract creation.Error Types
EvmError
Execution errors that halt the EVM.The
NotImplemented error is returned by system opcodes (CALL, CREATE, etc.) when the host doesn’t provide call or create methods. This is intentional - these low-level primitives don’t include an execution engine. Use guillotine or guillotine-mini for full EVM execution.Opcode Metadata
Info
Opcode metadata (gas cost, stack effect).Type Safety Benefits
Prevents Type Confusion
Compile-Time Validation
IDE Autocomplete
TypeScript provides full IntelliSense:Zero Runtime Overhead
Branded types are compile-time only:Architecture
Execution Flow
Pluggable Backend
Host interface allows custom state implementations:Related Documentation
Opcode
Opcode type and constants
Bytecode
Bytecode analysis and instruction parsing
Instructions
All 166 opcode handlers
Address
Address type for account references
References
- Yellow Paper - EVM formal specification
- evm.codes - Interactive opcode reference
- guillotine-mini - Reference architecture
- Branded Types - Type pattern explanation

