chainid

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RpcUriMap = StringMap{
	Arbitrum:  "https://arb1.arbitrum.io/rpc",
	Aurora:    "https://mainnet.aurora.dev",
	Avalanche: "https://api.avax.network/ext/bc/C/rpc",
	BSC:       "https://bsc-dataseed1.binance.org/",
	Boba:      "https://replica-oolong.boba.network/",
	Ethereum:  "https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161",
	Fantom:    "https://rpc.ftm.tools/",
	Harmony:   "https://api.harmony.one/",
	Moonbeam:  "https://rpc.api.moonbeam.network",
	Moonriver: "https://rpc.moonriver.moonbeam.network",
	Optimism:  "https://mainnet.optimism.io",
	Polygon:   "https://polygon-rpc.com/",
}

Functions

This section is empty.

Types

type AddressMap

type AddressMap map[ChainID]common.Address

func (AddressMap) TryGet

func (m AddressMap) TryGet(c ChainID) *common.Address

type BoolMap

type BoolMap map[ChainID]bool

func (BoolMap) TryGet

func (m BoolMap) TryGet(c ChainID) *bool

type ChainID

type ChainID uint64
const (
	Ethereum  ChainID = 1
	Optimism  ChainID = 10
	BSC       ChainID = 56
	Polygon   ChainID = 137
	Fantom    ChainID = 250
	Boba      ChainID = 288
	Moonbeam  ChainID = 1284
	Moonriver ChainID = 1285
	Arbitrum  ChainID = 42161
	Avalanche ChainID = 43114
	Aurora    ChainID = 1313161554
	Harmony   ChainID = 1666600000
)

func AllChains

func AllChains() []ChainID

func FromBigInt

func FromBigInt(n *big.Int) ChainID

func FromUint64

func FromUint64(n uint64) ChainID

func (ChainID) BaseCurrency

func (c ChainID) BaseCurrency() string

func (ChainID) BigInt

func (c ChainID) BigInt() *big.Int

func (ChainID) ChainName

func (c ChainID) ChainName() string

func (ChainID) Explorer

func (c ChainID) Explorer() string
func (c ChainID) ExplorerAddressLink(val common.Address) string
func (c ChainID) ExplorerTransactionLink(val common.Hash) string

func (ChainID) RpcUri

func (c ChainID) RpcUri() string

func (ChainID) String

func (c ChainID) String() string

func (ChainID) Uint64

func (c ChainID) Uint64() uint64

type HashMap

type HashMap map[ChainID]common.Hash

func (HashMap) TryGet

func (m HashMap) TryGet(c ChainID) *common.Hash

type StringMap

type StringMap map[ChainID]string

func (StringMap) TryGet

func (m StringMap) TryGet(c ChainID) *string

type Uint64Map

type Uint64Map map[ChainID]uint64

func (Uint64Map) TryGet

func (m Uint64Map) TryGet(c ChainID) *uint64

type Uint8Map

type Uint8Map map[ChainID]uint8

func (Uint8Map) TryGet

func (m Uint8Map) TryGet(c ChainID) *uint8

Jump to

Keyboard shortcuts

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