Documentation ¶
Index ¶
- Variables
- func NewChainSet[N Node, S ChainService](chains map[string]S, opts ChainSetOpts[string, N]) (types.ChainSet[string, S], error)
- type ChainConfigs
- type ChainService
- type ChainSetOpts
- type ChainStatuser
- type ChainsKV
- type Configs
- type ConfigsV2
- type ID
- type Node
- type NodeConfigs
- type NodesStatuser
Constants ¶
This section is empty.
Variables ¶
var ( // ErrChainIDEmpty is returned when chain is required but was empty. ErrChainIDEmpty = errors.New("chain id empty") ErrNotFound = errors.New("not found") )
var ErrLOOPPUnsupported = errors.New("LOOPP not yet supported")
var ErrNoSuchChainID = errors.New("chain id does not exist")
Functions ¶
func NewChainSet ¶
func NewChainSet[N Node, S ChainService]( chains map[string]S, opts ChainSetOpts[string, N], ) (types.ChainSet[string, S], error)
NewChainSet returns a new immutable ChainSet for the given ChainSetOpts.
Types ¶
type ChainConfigs ¶
type ChainService ¶
type ChainService interface { services.ServiceCtx SendTx(ctx context.Context, from, to string, amount *big.Int, balanceCheck bool) error }
ChainService is a live, runtime chain instance, with supporting services.
type ChainSetOpts ¶
type ChainSetOpts[I ID, N Node] interface { Validate() error ConfigsAndLogger() (Configs[I, N], logger.Logger) }
ChainSetOpts holds options for configuring a ChainSet via NewChainSet.
type ChainStatuser ¶ added in v2.5.0
type ChainStatuser interface { // must return [ErrNotFound] if the id is not found ChainStatus(ctx context.Context, id string) (types.ChainStatus, error) ChainStatuses(ctx context.Context, offset, limit int) ([]types.ChainStatus, int, error) }
ChainStatuser is a generic interface for chain configuration.
type ChainsKV ¶ added in v2.5.0
type ChainsKV[T ChainService] struct { // contains filtered or unexported fields }
func NewChainsKV ¶ added in v2.5.0
func NewChainsKV[T ChainService](cs map[string]T) *ChainsKV[T]
func (*ChainsKV[T]) Get ¶ added in v2.5.0
Get return ErrNoSuchChainID if [id] is not found
type Configs ¶
type Configs[I ID, N Node] interface { ChainConfigs NodeConfigs[I, N] }
Configs holds chain and node configurations.
type ID ¶
type ID any
ID types represent unique identifiers within a particular chain type. Using string is recommended.
type Node ¶
type Node any
Node types should be a struct including these default fields:
ID int32 Name string
type NodeConfigs ¶
type NodesStatuser ¶ added in v2.5.0
type NodesStatuser interface {
NodeStatuses(ctx context.Context, offset, limit int, chainIDs ...string) (nodes []types.NodeStatus, count int, err error)
}
NodesStatuser is an interface for node configuration and state. TODO BCF2440, BCF-2511 may need Node(ctx,name) to get a node status by name
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
gas/cmd/arbgas
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator.
|
arbgas takes a single URL argument and prints the result of three GetLegacyGas calls to the Arbitrum gas estimator. |
logpoller
Package logpoller is a service for querying EVM log data.
|
Package logpoller is a service for querying EVM log data. |