Documentation
¶
Index ¶
- Constants
- Variables
- type BaseEthereumClienter
- type BlockNumber
- type BlockNumberFinality
- func (b BlockNumberFinality) IsEmpty() bool
- func (b BlockNumberFinality) IsFinalized() bool
- func (b BlockNumberFinality) IsSafe() bool
- func (BlockNumberFinality) JSONSchema() *jsonschema.Schema
- func (b BlockNumberFinality) String() string
- func (b *BlockNumberFinality) ToBlockNum() (*big.Int, error)
- func (d *BlockNumberFinality) UnmarshalText(data []byte) error
- type DefaultEthClient
- type EthClienter
- type NoopRPCClient
- type RPCClienter
Constants ¶
View Source
const ( Safe = BlockNumber(-4) Finalized = BlockNumber(-3) Latest = BlockNumber(-2) Pending = BlockNumber(-1) Earliest = BlockNumber(0) )
Variables ¶
View Source
var ( SafeBlock = BlockNumberFinality{"SafeBlock"} FinalizedBlock = BlockNumberFinality{"FinalizedBlock"} LatestBlock = BlockNumberFinality{"LatestBlock"} PendingBlock = BlockNumberFinality{"PendingBlock"} EarliestBlock = BlockNumberFinality{"EarliestBlock"} )
Functions ¶
This section is empty.
Types ¶
type BaseEthereumClienter ¶
type BaseEthereumClienter interface {
ethereum.LogFilterer
ethereum.BlockNumberReader
ethereum.ChainReader
ethereum.ChainIDReader
bind.ContractBackend
}
BaseEthereumClienter defines the methods required to interact with an Ethereum client.
type BlockNumber ¶
type BlockNumber int64
type BlockNumberFinality ¶
type BlockNumberFinality struct {
// contains filtered or unexported fields
}
func NewBlockNumberFinality ¶
func NewBlockNumberFinality(s string) BlockNumberFinality
func (BlockNumberFinality) IsEmpty ¶
func (b BlockNumberFinality) IsEmpty() bool
func (BlockNumberFinality) IsFinalized ¶
func (b BlockNumberFinality) IsFinalized() bool
func (BlockNumberFinality) IsSafe ¶
func (b BlockNumberFinality) IsSafe() bool
func (BlockNumberFinality) JSONSchema ¶
func (BlockNumberFinality) JSONSchema() *jsonschema.Schema
func (BlockNumberFinality) String ¶
func (b BlockNumberFinality) String() string
func (*BlockNumberFinality) ToBlockNum ¶
func (b *BlockNumberFinality) ToBlockNum() (*big.Int, error)
func (*BlockNumberFinality) UnmarshalText ¶
func (d *BlockNumberFinality) UnmarshalText(data []byte) error
UnmarshalText unmarshalls BlockNumberFinality from text.
type DefaultEthClient ¶
type DefaultEthClient struct {
BaseEthereumClienter
RPCClienter
}
DefaultEthClient is the default implementation of EthClienter.
func NewDefaultEthClient ¶
func NewDefaultEthClient(baseClient BaseEthereumClienter, rpcClient RPCClienter) *DefaultEthClient
NewDefaultEthClient creates a new DefaultEthClient.
type EthClienter ¶
type EthClienter interface {
BaseEthereumClienter
RPCClienter
}
EthClienter defines the methods for an Ethereum RPC client.
type NoopRPCClient ¶
type NoopRPCClient struct{}
NoopRPCClient is no operation implementation for the RPCClienter interface
Click to show internal directories.
Click to hide internal directories.