Documentation
¶
Index ¶
- type BlockChain
- type ChainMetadata
- func (c ChainMetadata) ChainSelector() uint64
- func (c ChainMetadata) Family() string
- func (c ChainMetadata) IsNetworkType(networkType chainsel.NetworkType) bool
- func (c ChainMetadata) Name() string
- func (c ChainMetadata) NetworkType() (chainsel.NetworkType, error)
- func (c ChainMetadata) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockChain ¶ added in v0.100.0
type BlockChain interface {
// String returns chain name and selector "<name> (<selector>)"
String() string
// Name returns the name of the chain (e.g. Ethereum Mainnet, Solana Mainnet, Aptos Mainnet, etc.)
Name() string
// ChainSelector returns the chain's selector
ChainSelector() uint64
// Family returns the family of the chain (e.g. evm, solana, aptos, etc.)
Family() string
// NetworkType returns the type of network the chain is on (e.g. mainnet, testnet)
NetworkType() (chainsel.NetworkType, error)
// IsNetworkType checks if the chain is on the given network type
IsNetworkType(networkType chainsel.NetworkType) bool
ReadOnly() (BlockChain, error)
}
type ChainMetadata ¶
type ChainMetadata struct {
Selector uint64
}
ChainMetadata provides metadata about a chain.
func (ChainMetadata) ChainSelector ¶
func (c ChainMetadata) ChainSelector() uint64
ChainSelector returns the chain selector of the chain
func (ChainMetadata) Family ¶ added in v0.5.1
func (c ChainMetadata) Family() string
Family returns the family of the chain
func (ChainMetadata) IsNetworkType ¶ added in v0.78.0
func (c ChainMetadata) IsNetworkType(networkType chainsel.NetworkType) bool
IsNetworkType checks if the chain is on the given network type
func (ChainMetadata) NetworkType ¶ added in v0.78.0
func (c ChainMetadata) NetworkType() (chainsel.NetworkType, error)
NetworkType returns the type of network the chain represents.
func (ChainMetadata) String ¶
func (c ChainMetadata) String() string
String returns chain name and selector "<name> (<selector>)"
Click to show internal directories.
Click to hide internal directories.