Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressContext ¶
AddressContext contains address information for contract creation
type PrecompileEnvironment ¶
type PrecompileEnvironment interface {
BlockHeader() (*vm.BlockHeader, error)
BlockNumber() *big.Int
BlockTime() uint64
Addresses() *vm.Addresses
ReadOnly() bool
ReadOnlyState() StateReader
StateDB() StateReader
ChainConfig() *vm.ChainConfig
}
PrecompileEnvironment provides the execution environment for precompiled contracts
type PrecompiledContract ¶
type PrecompiledContract interface {
Run(input []byte) ([]byte, error)
RequiredGas(input []byte) uint64
}
PrecompiledContract represents a precompiled contract
type RulesHooks ¶
type RulesHooks interface {
CanCreateContract(ac *AddressContext, gas uint64, state StateReader) (uint64, error)
CanExecuteTransaction(from common.Address, to *common.Address, state StateReader) error
ActivePrecompiles(existing []common.Address) []common.Address
MinimumGasConsumption(x uint64) uint64
PrecompileOverride(addr common.Address) (PrecompiledContract, bool)
}
RulesHooks interface for chain rules extensions
type StateReader ¶
type StateReader interface {
GetState(common.Address, common.Hash) common.Hash
GetBalance(common.Address) *big.Int
GetNonce(common.Address) uint64
GetCode(common.Address) []byte
GetCodeHash(common.Address) common.Hash
GetCodeSize(common.Address) int
Exist(common.Address) bool
Empty(common.Address) bool
}
StateReader interface for reading state
Click to show internal directories.
Click to hide internal directories.