# Packages
Package runtime provides a basic execution model for executing CVM code.
# Functions
NewContract returns a new contract environment for the execution of CVM.
NewCVM returns a new CVM.
NewCVMInterpreter returns a new instance of the Interpreter.
NewJSONLogger creates a new CVM tracer that prints execution steps as JSON objects into the provided stream.
NewMarkdownLogger creates a logger which outputs information in a format adapted for human readability, and is also a valid markdown table.
NewMemory returns a new memory model.
NewStructLogger returns a new logger.
PrecompiledContracts contains the default set of pre-compiled Core contracts used in the release.
RunPrecompiledContract runs and evaluates the output of a precompiled contract.
StringToOp finds the opcode whose name is stored in `str`.
WriteLogs writes vm logs in a readable format to the given writer.
WriteTrace writes a formatted trace to the given writer.
# Constants
0x0 range - arithmetic ops.
0x0 range - arithmetic ops.
0x30 range - closure state.
0x10 range - comparison ops.
0x30 range - closure state.
0x50 range - 'storage' and execution.
0x40 range - block operations.
0x10 range - comparison ops.
0xf0 range - closures.
0xf0 range - closures.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x40 range - block operations.
0xf0 range - closures.
0xf0 range - closures.
0xf0 range - closures.
0x40 range - block operations.
0x0 range - arithmetic ops.
unofficial opcodes used for parsing.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x50 range - 'storage' and execution.
Energy costs.
Energy costs.
Energy costs.
0x40 range - block operations.
Energy costs.
0x30 range - closure state.
Energy costs.
Energy costs.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x10 range - comparison ops.
0x10 range - comparison ops.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
0xa0 range - logging ops.
0xa0 range - logging ops.
0xa0 range - logging ops.
0xa0 range - logging ops.
0xa0 range - logging ops.
0x10 range - comparison ops.
0x50 range - 'storage' and execution.
0x0 range - arithmetic ops.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
0x0 range - arithmetic ops.
0x0 range - arithmetic ops.
0x40 range - block operations.
0x10 range - comparison ops.
0x40 range - block operations.
0x10 range - comparison ops.
0x30 range - closure state.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
unofficial opcodes used for parsing.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0xf0 range - closures.
0x30 range - closure state.
0x30 range - closure state.
0x50 range - 'storage' and execution.
0xf0 range - closures.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x40 range - block operations.
0xf0 range - closures.
0x10 range - comparison ops.
0x10 range - comparison ops.
0x10 range - comparison ops.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x50 range - 'storage' and execution.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x50 range - 'storage' and execution.
0xf0 range - closures.
0x0 range - arithmetic ops.
0x0 range - arithmetic ops.
unofficial opcodes used for parsing.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x60 range.
0x40 range - block operations.
0x10 range - comparison ops.
# Variables
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
ErrInvalidSubroutineEntry means that a BEGINSUB was reached via iteration, as opposed to from a JUMPSUB instruction.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
List cvm execution errors.
No description provided by the author
# Structs
BlockContext provides the CVM with auxiliary information.
Config are the configuration options for the Interpreter.
Contract represents an core contract in the state database.
CVM is the Core Virtual Machine base object and provides the necessary tools to run a contract on the given state with the provided context.
CVMInterpreter represents an CVM interpreter.
ErrInvalidOpCode wraps an cvm error when an invalid opcode is encountered.
ErrStackOverflow wraps an cvm error when the items on the stack exceeds the maximum allowance.
ErrStackUnderflow wraps an cvm error when the items on the stack less than the minimal requirement.
No description provided by the author
LogConfig are the configuration options for structured logger the CVM.
Memory implements a simple memory model for the core virtual machine.
ReturnStack is an object for basic return stack operations.
Stack is an object for basic stack operations.
StructLog is emitted to the CVM each cycle and lists information about the current internal state prior to the execution of the statement.
StructLogger is an CVM state logger and implements Tracer.
TxContext provides the CVM with information about a transaction.
# Interfaces
CallContext provides a basic interface for the CVM calling conventions.
ContractRef is a reference to the contract's backing object.
Interpreter is used to run Core based contracts and will utilise the passed environment to query external sources for state information.
PrecompiledContract is the basic interface for native Go contracts.
StateDB is an CVM database for full state querying.
Tracer is used to collect execution traces from an CVM transaction execution.
# Type aliases
AccountRef implements ContractRef.
No description provided by the author
No description provided by the author
JumpTable contains the CVM opcodes supported at a given fork.
OpCode is an CVM opcode.
Storage represents a contract's storage.
No description provided by the author