chaincfg

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT, MIT Imports: 5 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var L2ChainIDToNetworkDisplayName = func() map[string]string {
	out := make(map[string]string)
	for _, netCfg := range superchain.Chains {
		cfg, err := netCfg.Config()
		if err != nil {
			panic(fmt.Errorf("failed to load chain config: %w", err))
		}
		out[fmt.Sprintf("%d", cfg.ChainID)] = netCfg.Name
	}
	return out
}()

Functions

func AvailableNetworks

func AvailableNetworks() []string

AvailableNetworks returns the selection of network configurations that is available by default.

func ChainByName added in v1.1.6

func ChainByName(name string) *superchain.ChainConfig

ChainByName returns a chain, from known available configurations, by name. ChainByName returns nil when the chain name is unknown.

func GetRollupConfig

func GetRollupConfig(name string) (*rollup.Config, error)

func OPSepolia added in v1.9.4

func OPSepolia() *rollup.Config

OPSepolia loads the op-sepolia rollup config. This is intended for tests that need an arbitrary, valid rollup config.

Types

This section is empty.

Jump to

Keyboard shortcuts

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