ethchainadapter

package
v0.24.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChainParams

func ChainParams(obscuroChainID *big.Int) *params.ChainConfig

ChainParams defines the forks of the EVM machine obscuro should typically be on the last fork version

func NewLegacyPoolConfig

func NewLegacyPoolConfig() legacypool.Config

Types

type EthChainAdapter

type EthChainAdapter struct {
	// contains filtered or unexported fields
}

EthChainAdapter is an obscuro wrapper around the ethereum core.Blockchain object

func NewEthChainAdapter

func NewEthChainAdapter(chainID *big.Int, batchRegistry components.BatchRegistry, storage storage.Storage, gethEncoding gethencoding.EncodingService, config config.EnclaveConfig, logger gethlog.Logger) *EthChainAdapter

NewEthChainAdapter returns a new instance

func (*EthChainAdapter) Config

func (e *EthChainAdapter) Config() *params.ChainConfig

Config retrieves the chain's fork configuration.

func (*EthChainAdapter) CurrentBlock

func (e *EthChainAdapter) CurrentBlock() *gethtypes.Header

CurrentBlock returns the current head of the chain.

func (*EthChainAdapter) GetBlock

func (e *EthChainAdapter) GetBlock(_ gethcommon.Hash, number uint64) *gethtypes.Block

GetBlock retrieves a specific block, used during pool resets.

func (*EthChainAdapter) IngestNewBlock

func (e *EthChainAdapter) IngestNewBlock(batch *core.Batch) error

func (*EthChainAdapter) StateAt

func (e *EthChainAdapter) StateAt(root gethcommon.Hash) (*state.StateDB, error)

StateAt returns a state database for a given root hash (generally the head).

func (*EthChainAdapter) SubscribeChainHeadEvent

func (e *EthChainAdapter) SubscribeChainHeadEvent(ch chan<- gethcore.ChainHeadEvent) event.Subscription

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL