types

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Index

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

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

func (*NoopRPCClient) Call

func (c *NoopRPCClient) Call(result any, method string, args ...any) error

type RPCClienter

type RPCClienter interface {
	Call(result any, method string, args ...any) error
}

RPCClienter defines an interface for making generic RPC calls.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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