Documentation ¶
Overview ¶
Package chain contains a common interface for running commands against evm rpc's.
Index ¶
- type Chaindeprecated
- func New(ctx context.Context, config *client.Config) (evmClient Chain, err error)
- func NewFromClient(ctx context.Context, config *client.Config, evmClient client.EVMClient) (chain Chain, err error)
- func NewFromMeteredClient(ctx context.Context, config *client.Config, ...) (chain Chain, err error)
- func NewFromURL(ctx context.Context, url string) (Chain, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain
deprecated
type Chain interface { client.MeteredEVMClient // GetBigChainID gets the chain id as a big int. GetBigChainID() *big.Int // GetChainID gets chain id GetChainID() uint // RPCAddress gets the rpc address of the chain (if available) RPCAddress() string // GetHeightWatcher gets the block height watcher for the chain GetHeightWatcher() chainwatcher.BlockHeightWatcher // ChainID retrieves the current chain ID for transaction replay protection. ChainID(ctx context.Context) (*big.Int, error) // PendingNonceAt returns the account nonce of the given account in the pending state. // This is the nonce that should be used for the next transaction. PendingNonceAt(ctx context.Context, account common.Address) (uint64, error) // ChainName gets the chain name ChainName() string // Estimator returns the gas price estimator // Deprecated: use gas setter Estimator() gas.PriceEstimator // GasSetter gets the gas setter GasSetter() gas.Setter // ChainConfig gets the chain config. ChainConfig() *params.ChainConfig // SetChainConfig sets the config for a chain SetChainConfig(config *params.ChainConfig) // HeaderByTime gets the closest block to the given time. HeaderByTime(ctx context.Context, startBlock *big.Int, searchTime time.Time) (*ethTypes.Header, error) }
Chain is a chain.
Deprecated: will be removed in a future version
func New ¶
New creates a new rpc client for querying an evm-based rpc server and attempts to connect to the chain.
func NewFromClient ¶
func NewFromClient(ctx context.Context, config *client.Config, evmClient client.EVMClient) (chain Chain, err error)
NewFromClient gets a chain from client. nolint: staticcheck
func NewFromMeteredClient ¶
func NewFromMeteredClient(ctx context.Context, config *client.Config, meteredClient client.MeteredEVMClient) (chain Chain, err error)
NewFromMeteredClient creaates a new client from a metered evm client.
Directories ¶
Path | Synopsis |
---|---|
Package chainwatcher provides methods/interfaces for chain agnostic event tracking
|
Package chainwatcher provides methods/interfaces for chain agnostic event tracking |
Package client provides a common interface for eth-based clients used with chain It defines the minimum necessary methods to create a chain and implements a rate limiter and metrics around client usage- useful for monitoring and debugging.
|
Package client provides a common interface for eth-based clients used with chain It defines the minimum necessary methods to create a chain and implements a rate limiter and metrics around client usage- useful for monitoring and debugging. |
near
Package near contains workaround for the aurora rpc
|
Package near contains workaround for the aurora rpc |
Package gas handles generating deterministic gas price estimates.
|
Package gas handles generating deterministic gas price estimates. |
backend
Package backend contains the common oracle backend for gas estimators
|
Package backend contains the common oracle backend for gas estimators |
londinium
Package londinium as the name implies, contains the pre-london version of the gas price estimation
|
Package londinium as the name implies, contains the pre-london version of the gas price estimation |
london
Package london provides wrappers to deterministically generate a tip cap + fee cap for evm based chains.
|
Package london provides wrappers to deterministically generate a tip cap + fee cap for evm based chains. |
Package watcher watches the chain for events
|
Package watcher watches the chain for events |
Click to show internal directories.
Click to hide internal directories.