Documentation ¶
Index ¶
- Constants
- Variables
- type BlockHeaderHint
- type CachingOracle
- type Oracle
- type OracleL1Client
- func (o *OracleL1Client) FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
- func (o *OracleL1Client) InfoAndTxsByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, types.Transactions, error)
- func (o *OracleL1Client) InfoByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, error)
- func (o *OracleL1Client) L1BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L1BlockRef, error)
- func (o *OracleL1Client) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error)
- func (o *OracleL1Client) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
- type PreimageOracle
- type ReceiptsHint
- type TransactionsHint
Constants ¶
View Source
const ( HintL1BlockHeader = "l1-block-header" HintL1Transactions = "l1-transactions" HintL1Receipts = "l1-receipts" )
Variables ¶
View Source
var ( ErrNotFound = ethereum.NotFound ErrUnknownLabel = errors.New("unknown label") )
Functions ¶
This section is empty.
Types ¶
type BlockHeaderHint ¶
func (BlockHeaderHint) Hint ¶
func (l BlockHeaderHint) Hint() string
type CachingOracle ¶
type CachingOracle struct {
// contains filtered or unexported fields
}
CachingOracle is an implementation of Oracle that delegates to another implementation, adding caching of all results
func NewCachingOracle ¶
func NewCachingOracle(oracle Oracle) *CachingOracle
func (*CachingOracle) HeaderByBlockHash ¶
func (o *CachingOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
func (*CachingOracle) ReceiptsByBlockHash ¶
func (*CachingOracle) TransactionsByBlockHash ¶
func (o *CachingOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
type Oracle ¶
type Oracle interface { // HeaderByBlockHash retrieves the block header with the given hash. HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo // TransactionsByBlockHash retrieves the transactions from the block with the given hash. TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions) // ReceiptsByBlockHash retrieves the receipts from the block with the given hash. ReceiptsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Receipts) }
type OracleL1Client ¶
type OracleL1Client struct {
// contains filtered or unexported fields
}
func NewOracleL1Client ¶
func (*OracleL1Client) FetchReceipts ¶
func (*OracleL1Client) InfoAndTxsByHash ¶
func (o *OracleL1Client) InfoAndTxsByHash(ctx context.Context, hash common.Hash) (eth.BlockInfo, types.Transactions, error)
func (*OracleL1Client) InfoByHash ¶
func (*OracleL1Client) L1BlockRefByHash ¶
func (o *OracleL1Client) L1BlockRefByHash(ctx context.Context, hash common.Hash) (eth.L1BlockRef, error)
func (*OracleL1Client) L1BlockRefByLabel ¶
func (o *OracleL1Client) L1BlockRefByLabel(ctx context.Context, label eth.BlockLabel) (eth.L1BlockRef, error)
func (*OracleL1Client) L1BlockRefByNumber ¶
func (o *OracleL1Client) L1BlockRefByNumber(ctx context.Context, number uint64) (eth.L1BlockRef, error)
type PreimageOracle ¶
type PreimageOracle struct {
// contains filtered or unexported fields
}
PreimageOracle implements Oracle using by interfacing with the pure preimage.Oracle to fetch pre-images to decode into the requested data.
func NewPreimageOracle ¶
func NewPreimageOracle(raw preimage.Oracle, hint preimage.Hinter) *PreimageOracle
func (*PreimageOracle) HeaderByBlockHash ¶
func (p *PreimageOracle) HeaderByBlockHash(blockHash common.Hash) eth.BlockInfo
func (*PreimageOracle) ReceiptsByBlockHash ¶
func (*PreimageOracle) TransactionsByBlockHash ¶
func (p *PreimageOracle) TransactionsByBlockHash(blockHash common.Hash) (eth.BlockInfo, types.Transactions)
type ReceiptsHint ¶
func (ReceiptsHint) Hint ¶
func (l ReceiptsHint) Hint() string
type TransactionsHint ¶
func (TransactionsHint) Hint ¶
func (l TransactionsHint) Hint() string
Click to show internal directories.
Click to hide internal directories.