chains

package
v0.0.0-...-3674750 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrChainIDEmpty is returned when chain is required but was empty.
	ErrChainIDEmpty = errors.New("chain id empty")
	ErrNotFound     = errors.New("not found")
)
View Source
var (
	ErrLOOPPUnsupported = errors.New("LOOPP not yet supported")
	ErrChainDisabled    = errors.New("chain is disabled")
)
View Source
var ErrNoSuchChainID = errors.New("chain id does not exist")

Functions

This section is empty.

Types

type ChainOpts

type ChainOpts interface {
	Validate() error
}

ChainOpts holds options for configuring a Chain

type ChainsKV

type ChainsKV[T types.ChainService] struct {
	// contains filtered or unexported fields
}

func NewChainsKV

func NewChainsKV[T types.ChainService](cs map[string]T) *ChainsKV[T]

func (*ChainsKV[T]) Get

func (c *ChainsKV[T]) Get(id string) (T, error)

Get return ErrNoSuchChainID if [id] is not found

func (*ChainsKV[T]) Len

func (c *ChainsKV[T]) Len() int

func (*ChainsKV[T]) List

func (c *ChainsKV[T]) List(ids ...string) ([]T, error)

func (*ChainsKV[T]) Slice

func (c *ChainsKV[T]) Slice() []T

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

Directories

Path Synopsis
evm
client
The simulated backend cannot access old blocks and will return an error if anything other than `latest`, `nil`, or the latest block are passed to `CallContract`.
The simulated backend cannot access old blocks and will return an error if anything other than `latest`, `nil`, or the latest block are passed to `CallContract`.
gas
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.
log
logpoller
Package logpoller is a service for querying EVM log data.
Package logpoller is a service for querying EVM log data.

Jump to

Keyboard shortcuts

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