package
0.0.0-20220616152218-3da4c06c590a
Repository: https://github.com/astra-net/astra-network.git
Documentation: pkg.go.dev
# Packages
Package runtime provides a basic execution model for executing EVM code.
# Functions
EnableEIP enables the given EIP on the config.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
NewContract returns a new contract environment for the execution of EVM.
NewEVM returns a new EVM.
NewEVMInterpreter returns a new instance of the Interpreter.
NewJSONLogger creates a new EVM tracer that prints execution steps as JSON objects into the provided stream.
NewMemory returns a new memory model.
NewStructLogger returns a new logger.
RunPrecompiledContract runs and evaluates the output of a precompiled contract.
RunWriteCapablePrecompiledContract runs and evaluates the output of a write capable 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.
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.
0x40 range - block operations.
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.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x50 range - 'storage' and execution.
Gas costs.
Gas costs.
Gas costs.
0x40 range - block operations.
Gas costs.
0x30 range - closure state.
Gas costs.
Gas costs.
0x10 range - comparison ops.
0x10 range - comparison ops.
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.
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.
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 execution errors.
List execution errors.
List execution errors.
No description provided by the author
List execution errors.
List execution errors.
List execution errors.
List execution errors.
PrecompiledContractsByzantium contains the default set of pre-compiled Ethereum contracts used in the Byzantium release.
PrecompiledContractsHomestead contains the default set of pre-compiled Ethereum contracts used in the Frontier and Homestead releases.
PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum contracts used in the Istanbul release.
PrecompiledContractsSHA3FIPS contains the default set of pre-compiled Ethereum contracts used in the Istanbul release.
PrecompiledContractsStaking contains the default set of pre-compiled Ethereum contracts used in the Istanbul release.
PrecompiledContractsIstanbul contains the default set of pre-compiled Ethereum contracts used in the Istanbul release.
WriteCapablePrecompiledContractsCrossXfer lists out the write capable precompiled contracts which are available after the CrossShardXferPrecompileEpoch It includes the staking precompile and the cross-shard transfer precompile.
WriteCapablePrecompiledContractsStaking lists out the write capable precompiled contracts which are available after the StakingPrecompileEpoch for now, we have only one contract at 252 or 0xfc - which is the staking precompile.
# Structs
Config are the configuration options for the Interpreter.
Context provides the EVM with auxiliary information.
Contract represents an ethereum contract in the state database.
EVM is the Ethereum Virtual Machine base object and provides the necessary tools to run a contract on the given state with the provided context.
EVMInterpreter represents an EVM interpreter.
JSONLogger ...
LogConfig are the configuration options for structured logger the EVM.
Memory implements a simple memory model for the ethereum virtual machine.
No description provided by the author
Stack is an object for basic stack operations.
StructLog is emitted to the EVM each cycle and lists information about the current internal state prior to the execution of the statement.
StructLogger is an EVM state logger and implements Tracer.
# Interfaces
CallContext provides a basic interface for the EVM calling conventions.
ContractRef is a reference to the contract's backing object.
Interpreter is used to run Ethereum based contracts and will utilise the passed environment to query external sources for state information.
PrecompiledContract is the basic interface for native Go contracts.
No description provided by the author
StateDB is an EVM database for full state querying.
Tracer is used to collect execution traces from an EVM transaction execution.
WriteCapablePrecompiledContract represents the interface for Native Go contracts which are available as a precompile in the EVM As with (read-only) PrecompiledContracts, these need a RequiredGas function Note that these contracts have the capability to alter the state while those in contracts.go do not.
# Type aliases
AccountRef implements ContractRef.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
JumpTable contains the EVM opcodes supported at a given fork.
No description provided by the author
OpCode is an EVM opcode.
Storage represents a contract's storage.
No description provided by the author
No description provided by the author