network

package
v0.185.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoerliChainIDs = []uint64{5, 421613, 420}
View Source
var SepoliaChainIDs = []uint64{11155111, 421614, 11155420}

Functions

This section is empty.

Types

type CombinedNetwork added in v0.162.1

type CombinedNetwork struct {
	Prod *params.Network
	Test *params.Network
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(db *sql.DB) *Manager

func (*Manager) Delete

func (nm *Manager) Delete(chainID uint64) error

func (*Manager) Find

func (nm *Manager) Find(chainID uint64) *params.Network

func (*Manager) Get

func (nm *Manager) Get(onlyEnabled bool) ([]*params.Network, error)

func (*Manager) GetActiveNetworks added in v0.180.31

func (nm *Manager) GetActiveNetworks() ([]*params.Network, error)

Returns all networks for active mode (test/prod) and in case of test mode, returns either Goerli or Sepolia networks based on the value of isGoerliEnabled

func (*Manager) GetAll added in v0.170.0

func (nm *Manager) GetAll() ([]*params.Network, error)

func (*Manager) GetCombinedNetworks added in v0.162.1

func (nm *Manager) GetCombinedNetworks() ([]*CombinedNetwork, error)

func (*Manager) GetConfiguredNetworks added in v0.109.1

func (nm *Manager) GetConfiguredNetworks() []params.Network

func (*Manager) GetTestNetworksEnabled added in v0.175.3

func (nm *Manager) GetTestNetworksEnabled() (result bool, err error)

func (*Manager) Init

func (nm *Manager) Init(networks []params.Network) error

func (*Manager) UpdateRelatedChainID added in v0.162.1

func (nm *Manager) UpdateRelatedChainID(chainID uint64, relatedChainID uint64) error

func (*Manager) Upsert

func (nm *Manager) Upsert(network *params.Network) error

type ManagerInterface added in v0.181.32

type ManagerInterface interface {
	Get(onlyEnabled bool) ([]*params.Network, error)
	GetAll() ([]*params.Network, error)
	Find(chainID uint64) *params.Network
	GetConfiguredNetworks() []params.Network
	GetTestNetworksEnabled() (bool, error)
}

Directories

Path Synopsis
Package mock_network is a generated GoMock package.
Package mock_network is a generated GoMock package.

Jump to

Keyboard shortcuts

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