Documentation ¶
Index ¶
- func ComputeTxEnv(ctx context.Context, engine consensus.EngineReader, block *types.Block, ...) (core.Message, evmtypes.BlockContext, evmtypes.TxContext, ...)
- func DoCall(ctx context.Context, engine consensus.EngineReader, args ethapi2.CallArgs, ...) (*core.ExecutionResult, error)
- func MakeHeaderGetter(requireCanonical bool, tx kv.Tx, headerReader services.HeaderReader) func(uint64) libcommon.Hash
- func NewEVMBlockContext(engine consensus.EngineReader, header *types.Header, requireCanonical bool, ...) evmtypes.BlockContext
- func TraceTx(ctx context.Context, message core.Message, blockCtx evmtypes.BlockContext, ...) error
- type BlockGetter
- type ReusableCaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeTxEnv ¶
func ComputeTxEnv(ctx context.Context, engine consensus.EngineReader, block *types.Block, cfg *chain.Config, headerReader services.HeaderReader, dbtx kv.Tx, txIndex int, historyV3 bool) (core.Message, evmtypes.BlockContext, evmtypes.TxContext, *state.IntraBlockState, state.StateReader, error)
ComputeTxEnv returns the execution environment of a certain transaction.
func DoCall ¶
func DoCall( ctx context.Context, engine consensus.EngineReader, args ethapi2.CallArgs, tx kv.Tx, blockNrOrHash rpc.BlockNumberOrHash, header *types.Header, overrides *ethapi2.StateOverrides, gasCap uint64, chainConfig *chain.Config, stateReader state.StateReader, headerReader services.HeaderReader, callTimeout time.Duration, ) (*core.ExecutionResult, error)
func MakeHeaderGetter ¶
func NewEVMBlockContext ¶
func NewEVMBlockContext(engine consensus.EngineReader, header *types.Header, requireCanonical bool, tx kv.Tx, headerReader services.HeaderReader) evmtypes.BlockContext
func TraceTx ¶
func TraceTx( ctx context.Context, message core.Message, blockCtx evmtypes.BlockContext, txCtx evmtypes.TxContext, ibs evmtypes.IntraBlockState, config *tracers.TraceConfig, chainConfig *chain.Config, stream *jsoniter.Stream, callTimeout time.Duration, ) error
TraceTx configures a new tracer according to the provided configuration, and executes the given message in the provided environment. The return value will be tracer dependent.
Types ¶
type BlockGetter ¶
type BlockGetter interface { // GetBlockByHash retrieves a block from the database by hash, caching it if found. GetBlockByHash(hash libcommon.Hash) (*types.Block, error) // GetBlock retrieves a block from the database by hash and number, // caching it if found. GetBlock(hash libcommon.Hash, number uint64) *types.Block }
type ReusableCaller ¶
type ReusableCaller struct {
// contains filtered or unexported fields
}
func NewReusableCaller ¶
func NewReusableCaller( engine consensus.EngineReader, stateReader state.StateReader, overrides *ethapi2.StateOverrides, header *types.Header, initialArgs ethapi2.CallArgs, gasCap uint64, blockNrOrHash rpc.BlockNumberOrHash, tx kv.Tx, headerReader services.HeaderReader, chainConfig *chain.Config, callTimeout time.Duration, ) (*ReusableCaller, error)
func (*ReusableCaller) DoCallWithNewGas ¶
func (r *ReusableCaller) DoCallWithNewGas( ctx context.Context, newGas uint64, ) (*core.ExecutionResult, error)
Click to show internal directories.
Click to hide internal directories.