Documentation ¶
Index ¶
- func ChainParams(obscuroChainID *big.Int) *params.ChainConfig
- func NewLegacyPoolConfig() legacypool.Config
- type EthChainAdapter
- func (e *EthChainAdapter) Config() *params.ChainConfig
- func (e *EthChainAdapter) CurrentBlock() *gethtypes.Header
- func (e *EthChainAdapter) GetBlock(_ gethcommon.Hash, number uint64) *gethtypes.Block
- func (e *EthChainAdapter) IngestNewBlock(batch *core.Batch) error
- func (e *EthChainAdapter) StateAt(root gethcommon.Hash) (*state.StateDB, error)
- func (e *EthChainAdapter) SubscribeChainHeadEvent(ch chan<- gethcore.ChainHeadEvent) event.Subscription
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 enclaveconfig.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
Click to show internal directories.
Click to hide internal directories.