network

package
v0.88.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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) *Network

func (*Manager) Get

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

func (*Manager) Init

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

func (*Manager) Upsert

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

type Network

type Network struct {
	ChainID                uint64 `json:"chainId"`
	ChainName              string `json:"chainName"`
	RPCURL                 string `json:"rpcUrl"`
	BlockExplorerURL       string `json:"blockExplorerUrl,omitempty"`
	IconURL                string `json:"iconUrl,omitempty"`
	NativeCurrencyName     string `json:"nativeCurrencyName,omitempty"`
	NativeCurrencySymbol   string `json:"nativeCurrencySymbol,omitempty"`
	NativeCurrencyDecimals uint64 `json:"nativeCurrencyDecimals"`
	IsTest                 bool   `json:"isTest"`
	Layer                  uint64 `json:"layer"`
	Enabled                bool   `json:"enabled"`
}

Jump to

Keyboard shortcuts

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