onchain

package
v0.0.0-...-21d01d2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ethereum.LogFilterer
	ethereum.ChainReader
	ethereum.ContractCaller
	ethereum.TransactionSender
	ethereum.PendingStateReader
	ethereum.TransactionReader
	ethereum.ChainStateReader
	ethereum.GasPricer
}

Client represents the behavior of the on-chain data provider

type NodeAddrProvider

type NodeAddrProvider interface {
	// Address returns the address by the given chain ID
	Address(chainID uint64) (string, bool)
}

NodeAddrProvider represents the behaviour of the RPC node address provider

type Provider

type Provider interface {
	// GetClient returns the Client by the given chain ID
	GetClient(ctx context.Context, chainID uint64) (Client, error)
}

Provider represents the behavior of the on-chain data provider

func NewProvider

func NewProvider(addrProvider NodeAddrProvider) Provider

NewProvider is the constructor of provider

Jump to

Keyboard shortcuts

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