Documentation
¶
Index ¶
- type BalancesProvider
- type BaseFeeProvider
- type BlockReplaysProvider
- type BlocksProvider
- type CallOpts
- type CallProvider
- type ChainHeightProvider
- type ChainIDProvider
- type EventsProvider
- type GasEstimationProvide
- type IssuanceProvider
- type NetworkIDProvider
- type NewPendingTransactionsProvider
- type Service
- type SyncingProvider
- type TransactionReceiptsProvider
- type TransactionsProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BalancesProvider ¶ added in v0.7.0
type BalancesProvider interface {
// Balance obtains the balance for the given address at the given block ID.
Balance(ctx context.Context, address types.Address, blockID string) (*big.Int, error)
}
BalancesProvider is the interface for providing balances.
type BaseFeeProvider ¶ added in v0.8.9
type BaseFeeProvider interface {
// BaseFee provides the base fee of the chain at the given block ID.
BaseFee(ctx context.Context, blockID string) (*big.Int, error)
}
BaseFeeProvider is the interface for providing the base fee.
type BlockReplaysProvider ¶
type BlockReplaysProvider interface {
// ReplayBlockTransactions obtains traces for all transactions in a block.
ReplayBlockTransactions(ctx context.Context, blockID string) ([]*api.TransactionResult, error)
}
BlockReplaysProvider is the interface for providing block replays.
type BlocksProvider ¶
type BlocksProvider interface {
// Block returns the block with the given ID.
Block(ctx context.Context, blockID string) (*spec.Block, error)
}
BlocksProvider is the interface for providing blocks.
type CallOpts ¶ added in v0.8.0
type CallOpts struct {
From *types.Address
To *types.Address
Gas *big.Int
GasPrice *big.Int
Value *big.Int
Data []byte
Block string
}
CallOpts are the options to Call().
type CallProvider ¶ added in v0.8.0
type CallProvider interface {
// Call makes a call to the execution client.
Call(ctx context.Context, opts *CallOpts) ([]byte, error)
}
CallProvider is the interface for making calls to the execution client.
type ChainHeightProvider ¶
type ChainHeightProvider interface {
// ChainHeight returns the height of the chain as understood by the node.
ChainHeight(ctx context.Context) (uint32, error)
}
ChainHeightProvider is the interface for providing chain height.
type ChainIDProvider ¶ added in v0.7.3
type ChainIDProvider interface {
// ChainID returns the chain ID.
ChainID(ctx context.Context) (uint64, error)
}
ChainIDProvider is the interface for providing the chain ID.
type EventsProvider ¶ added in v0.3.0
type EventsProvider interface {
// Events returns the events matching the filter.
Events(ctx context.Context, filter *api.EventsFilter) ([]*spec.BerlinTransactionEvent, error)
}
EventsProvider is the interface for providing events.
type GasEstimationProvide ¶ added in v0.8.9
type GasEstimationProvide interface {
// EstimateGas estimates the gas required for a transaction.
EstimateGas(ctx context.Context, tx *spec.TransactionSubmission) (*big.Int, error)
}
GasEstimationProvide is the interface for providing gas estimations.
type IssuanceProvider ¶ added in v0.2.1
type IssuanceProvider interface {
// Issuance returns the issuance of a block.
Issuance(ctx context.Context, blockID string) (*api.Issuance, error)
}
IssuanceProvider is the interface for providing issuance.
type NetworkIDProvider ¶
type NetworkIDProvider interface {
// NetworkID returns the network ID.
NetworkID(ctx context.Context) (uint64, error)
}
NetworkIDProvider is the interface for providing the network ID.
type NewPendingTransactionsProvider ¶ added in v0.6.0
type NewPendingTransactionsProvider interface {
// NewPendingTransactions subscribes to new pending transactions.
NewPendingTransactions(ctx context.Context, ch chan *spec.Transaction) (*util.Subscription, error)
}
NewPendingTransactionsProvider is the interface for providing new pending transactions.
type Service ¶
type Service interface {
// Name returns the name of the client implementation.
Name() string
// Address returns the address of the client.
Address() string
}
Service is the service providing a connection to an execution client.
type SyncingProvider ¶ added in v0.2.0
type SyncingProvider interface {
// Syncing obtains information about the sync state of the node.
Syncing(ctx context.Context) (*api.SyncState, error)
}
SyncingProvider is the interface for providing syncing information.
type TransactionReceiptsProvider ¶
type TransactionReceiptsProvider interface {
// TransactionReceipt returns the transaction receipt for the given transaction hash.
TransactionReceipt(ctx context.Context, hash types.Hash) (*spec.BerlinTransactionReceipt, error)
}
TransactionReceiptsProvider is the interface for providing transaction receipts.
type TransactionsProvider ¶ added in v0.6.0
type TransactionsProvider interface {
// Transaction returns the transaction for the given transaction hash.
Transaction(ctx context.Context, hash types.Hash) (*spec.Transaction, error)
// TransactionInBlock returns the transaction for the given transaction in a block at the given index.
TransactionInBlock(ctx context.Context, blockHash types.Hash, index uint32) (*spec.Transaction, error)
}
TransactionsProvider is the interface for providing transactions.