# Functions
BigMax returns the larger of x or y.
BigMin returns the smaller of x or y.
BigPow returns a ** b as a big integer.
Byte returns the byte at position n, with the supplied padlength in Little-Endian encoding.
Exp implements exponentiation by squaring.
FirstBitSet returns the index of the first 1 bit in v, counting from LSB.
FromECDSA exports a private key into a binary dump.
No description provided by the author
No description provided by the author
HexToECDSA parses a secp256k1 private key.
Keccak256 calculates and returns the Keccak256 hash of the input data.
Keccak256Hash calculates and returns the Keccak256 hash of the input data, converting it to an internal Hash data structure.
Keccak512 calculates and returns the Keccak512 hash of the input data.
LoadECDSA loads a secp256k1 private key from the given file.
No description provided by the author
MustParseBig256 parses s as a 256 bit big integer and panics if the string is invalid.
MustParseUint64 parses s as an integer and panics if the string is invalid.
NewContract returns a new contract environment for the execution of EVM.
No description provided by the author
NewEVM returns a new EVM.
NewInterpreter returns a new instance of the Interpreter.
NewMemory returns a new memory memory model.
NewStructLogger returns a new logger.
PaddedBigBytes encodes a big integer as a big-endian byte slice.
ParseBig256 parses s as a 256 bit integer in decimal or hexadecimal syntax.
ParseUint64 parses s as an integer in decimal or hexadecimal syntax.
No description provided by the author
ReadBits encodes the absolute value of bigint as big-endian bytes.
RunPrecompiledContract runs and evaluates the output of a precompiled contract.
S256 interprets x as a two's complement number.
SafeAdd returns the result and whether overflow occurred.
SafeMul returns multiplication result and whether overflow occurred.
SafeSub returns subtraction result and whether overflow occurred.
SaveECDSA saves a secp256k1 private key to the given file with restrictive permissions.
StringToOp finds the opcode whose name is stored in `str`.
ToECDSA creates a private key with the given D value.
ToECDSAUnsafe blindly converts a binary blob to a private key.
U256 encodes as a 256 bit two's complement number.
UnmarshalPubkey converts bytes to a secp256k1 public key.
ValidateSignatureValues verifies whether the signature values are valid with the given chain rules.
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.
Gas needed for an elliptic curve addition.
Base price for an elliptic curve pairing check.
Per-point price for an elliptic curve pairing check.
Gas needed for an elliptic curve scalar multiplication.
0x10 range - comparison ops.
0xf0 range - closures.
0xf0 range - closures.
Maximum depth of call/create stack.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
0x30 range - closure state.
Once per CALL operation & message call transaction.
Paid for CALL when the destination address didn't exist prior.
Free gas given at beginning of call.
0x30 range - closure state.
Paid for CALL when the value transfer is non-zero.
0x30 range - closure state.
0x30 range - closure state.
0x40 range - block operations.
.
0xf0 range - closures.
.
Once per CREATE operation & contract-creation transaction.
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.
Elliptic curve sender recovery gas price.
Duration between proof-of-work epochs.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
Times ceil(log256(exponent)) for the EXP instruction.
Once per EXP instruction.
0x30 range - closure state.
0x30 range - closure state.
0x50 range - 'storage' and execution.
Gas costs.
Gas costs.
Gas costs.
Gas costs.
0x40 range - block operations.
The bound divisor of the gas limit, used in update calculations.
Gas costs.
0x30 range - closure state.
Gas costs.
Gas costs.
Gas costs.
Gas costs.
Gas limit of the Genesis block.
0x10 range - comparison ops.
Base price for a data copy operation.
Per-work price for a data copy operation.
0x10 range - comparison ops.
0x50 range - 'storage' and execution.
0x50 range - 'storage' and execution.
Refunded gas, once per SSTORE operation if the zeroness changes to zero.
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.
Per byte in a LOG* operation's data.
Per LOG* operation.
Multiplied by the * of the LOG*, per LOG transaction.
0x10 range - comparison ops.
Maximum bytecode to permit for a contract.
Maximum size extra data may be after Genesis.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
Times the address of the (highest referenced byte in memory + 1).
Minimum the gas limit may ever be.
Integer limit values.
Integer limit values.
Integer limit values.
Integer limit values.
0x50 range - 'storage' and execution.
0x0 range - arithmetic ops.
Divisor for the quadratic particle of the big int modular exponentiation.
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.
Divisor for the quadratic particle of the memory cost equation.
0xf0 range - closures.
0x30 range - closure state.
0x30 range - closure state.
0xf0 range - closures.
Base price for a RIPEMD160 operation.
Per-word price for a RIPEMD160 operation.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0xf0 range - closures.
0x10 range - comparison ops.
Base price for a SHA256 operation.
Per-word price for a SHA256 operation.
0x10 range - comparison ops.
Once per SHA3 operation.
Once per word of the SHA3 operation's data.
0x10 range - comparison ops.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x50 range - 'storage' and execution.
Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added.
0x10 range - comparison ops.
0x0 range - arithmetic ops.
0x50 range - 'storage' and execution.
Once per SSTORE operation if the zeroness doesn't change.
Once per SSTORE operation if the zeroness changes to zero.
Once per SSTORE operation if the zeroness changes from zero.
Once per SLOAD operation.
Maximum size of VM stack allowed.
0xf0 range - closures.
0x0 range - arithmetic ops.
0x0 range - arithmetic ops.
Refunded following a suicide operation.
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.
Once per operation, for a selection of them.
0x40 range - block operations.
Per byte of data attached to a transaction that is not equal to zero.
Per byte of data attached to a transaction that equals zero.
Per transaction not creating a contract.
Per transaction that creates a contract.
0x10 range - comparison ops.
# Variables
AllCliqueProtocolChanges contains every protocol change (EIPs) introduced and accepted by the Ethereum core developers into the Clique consensus.
AllEthashProtocolChanges contains every protocol change (EIPs) introduced and accepted by the Ethereum core developers into the Ethash consensus.
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
List execution errors.
List execution errors.
List execution errors.
List execution errors.
List execution errors.
List execution errors.
GasTableEIP150 contain the gas re-prices for the EIP150 phase.
GasTableEIP158 contain the gas re-prices for the EIP15* phase.
GasTableHomestead contain the gas prices for the homestead phase.
MainnetChainConfig is the chain parameters to run a node on the main network.
Genesis hashes to enforce below configs on.
Various big integer limit values.
Various big integer limit values.
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.
RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network.
No description provided by the author
No description provided by the author
TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network.
Genesis hashes to enforce below configs on.
No description provided by the author
# Structs
No description provided by the author
ChainConfig is the core config which determines the blockchain settings.
CliqueConfig is the consensus engine configs for proof-of-authority based sealing.
Config are the configuration options for the Interpreter.
ConfigCompatError is raised if the locally-stored blockchain is initialised with a ChainConfig that would alter the past.
Context provides the EVM with auxiliary information.
Contract represents an ethereum contract in the state database.
EthashConfig is the consensus engine configs for proof-of-work based sealing.
No description provided by the author
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.
GasTable organizes gas prices for different ethereum phases.
Interpreter is used to run Ethereum based contracts and will utilise the passed environment to query external sources for state information.
Log represents a contract log event.
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
No description provided by the author
Rules wraps ChainConfig and is merely syntatic sugar or can be used for functions that do not have or require information about the block.
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
No description provided by the author
No description provided by the author
ContractRef is a reference to the contract's backing object.
No description provided by the author
PrecompiledContract is the basic interface for native Go contracts.
StateDB is an EVM database for full state querying.
No description provided by the author
Tracer is used to collect execution traces from an EVM transaction execution.
# Type aliases
AccountRef implements ContractRef.
HexOrDecimal256 marshals big.Int as hex or decimal.
HexOrDecimal64 marshals uint64 as hex or decimal.
OpCode is an EVM opcode.
Storage represents a contract's storage.