package
0.0.0-20241122061421-fc2991dfa3c1
Repository: https://github.com/ch-iron/go-evm.git
Documentation: pkg.go.dev

# Functions

ApplyMessage computes the new state by applying the given message against the old state within the environment.
CanTransfer checks whether there are enough funds in the address' account to make a transfer.
GetHashFn returns a GetHashFunc which retrieves header hashes by number.
IntrinsicGas computes the 'intrinsic gas' for a message with the given data.
NewEVMBlockContext creates a new context for use in the EVM.
NewEVMTxContext creates a new transaction context for a single transaction.
NewStateTransition initialises and returns a new state transition object.
TransactionToMessage converts a transaction into a Message.
Transfer subtracts amount from sender and adds amount to recipient using the given Db.

# Variables

ErrBlobFeeCapTooLow is returned if the transaction fee cap is less than the blob gas fee of the block.
ErrBlobTxCreate is returned if a blob transaction has no explicit to field.
ErrFeeCapTooLow is returned if the transaction fee cap is less than the base fee of the block.
ErrFeeCapVeryHigh is a sanity error to avoid extremely big numbers specified in the fee cap field.
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.
ErrGasUintOverflow is returned when calculating gas usage.
ErrInsufficientBalanceWitness is returned if the transaction sender has enough funds to cover the transfer, but not enough to pay for witness access/modification costs for the transaction.
ErrInsufficientFunds is returned if the total cost of executing a transaction is higher than the balance of the user's account.
ErrInsufficientFundsForTransfer is returned if the transaction sender doesn't have enough funds for transfer(topmost call only).
ErrIntrinsicGas is returned if the transaction is specified to use less gas than required to start the invocation.
ErrKnownBlock is returned when a block to import is already known locally.
ErrMaxInitCodeSizeExceeded is returned if creation transaction provides the init code bigger than init code size limit.
ErrMissingBlobHashes is returned if a blob transaction has no blob hashes.
ErrNoGenesis is returned when there is no Genesis Block.
ErrNonceMax is returned if the nonce of a transaction sender account has maximum allowed value and would become invalid if incremented.
ErrNonceTooHigh is returned if the nonce of a transaction is higher than the next one expected based on the local chain.
ErrNonceTooLow is returned if the nonce of a transaction is lower than the one present in the local chain.
ErrSenderNoEOA is returned if the sender of a transaction is a contract.
ErrTipAboveFeeCap is a sanity error to ensure no one is able to specify a transaction with a tip higher than the total fee cap.
ErrTipVeryHigh is a sanity error to avoid extremely big numbers specified in the tip field.
ErrTxTypeNotSupported is returned if a transaction is not supported in the current network configuration.

# Structs

ExecutionResult includes all output after executing given evm message no matter the execution itself is successful or not.
A Message contains the data derived from a single transaction that is relevant to state processing.
StateTransition represents a state transition.

# Interfaces

ChainContext supports retrieving headers and consensus parameters from the current blockchain to be used during transaction processing.

# Type aliases

GasPool tracks the amount of gas available during execution of the transactions in a block.