Documentation ¶
Index ¶
- Variables
- func CanTransfer(db evm.StateDB, addr common.Address, amount *big.Int) bool
- func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash
- func NewEVMContext(msg Message, header *types.Header, chain ChainContext, author *common.Address) evm.Context
- func Transfer(db evm.StateDB, sender, recipient common.Address, amount *big.Int)
- type ChainContext
- type GasPool
- type Message
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrOutOfGas = errors.New("out of gas") ErrCodeStoreOutOfGas = errors.New("contract creation code storage out of gas") ErrDepth = errors.New("max call depth exceeded") ErrTraceLimitReached = errors.New("the number of logs reached the specified limit") ErrInsufficientBalance = errors.New("insufficient balance for transfer") ErrContractAddressCollision = errors.New("contract address collision") // ErrGasLimitReached is returned by the gas pool if the amount of gas required // by a transaction is higher than what's left in the block. ErrGasLimitReached = errors.New("gas limit reached") )
Functions ¶
func CanTransfer ¶
CanTransfer checks wether there are enough funds in the address' account to make a transfer. This does not take the necessary gas in to account to make the transfer valid.
func NewEVMContext ¶
func NewEVMContext(msg Message, header *types.Header, chain ChainContext, author *common.Address) evm.Context
NewEVMContext creates a new context for use in the EVM.
Types ¶
type ChainContext ¶
type ChainContext interface { // Engine retrieves the chain's consensus engine. Engine() consensus.Engine // GetHeader returns the hash corresponding to their hash. GetHeader(common.Hash, uint64) *types.Header }
ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.
Click to show internal directories.
Click to hide internal directories.