chaindata

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 1 Imported by: 1

Documentation

Overview

Package chaindata provides the chain metadata. TODO: this more elegantly. nolint: mnd

Index

Constants

This section is empty.

Variables

View Source
var ChainMetadataList = []ChainMetadata{
	{
		ChainID:   1,
		ChainName: "ethereum",
		Explorer:  "https://etherscan.io",
	},
	{
		ChainID:   56,
		ChainName: "bsc",
		Explorer:  "https://bscscan.com",
	},
	{
		ChainID:   137,
		ChainName: "polygon",
		Explorer:  "https://polygonscan.com",
	},
	{
		ChainID:   80001,
		ChainName: "mumbai",
		Explorer:  "https://mumbai.polygonscan.com",
	},
	{
		ChainID:   250,
		ChainName: "fantom",
		Explorer:  "https://ftmscan.com",
	},
	{
		ChainID:   43114,
		ChainName: "avalanche",
		Explorer:  "https://snowtrace.io/",
	},
	{
		ChainID:   42161,
		ChainName: "arbitrum",
		Explorer:  "https://arbiscan.io",
	},
	{
		ChainID:   1337,
		ChainName: "local",
		Explorer:  "http://localhost:1337",
	},
	{
		ChainID:   42220,
		ChainName: "celo",
		Explorer:  "https://explorer.celo.org",
	},
	{
		ChainID:   128,
		ChainName: "heco",
		Explorer:  "https://hecoinfo.com",
	},
	{
		ChainID:   66,
		ChainName: "okexchain",
		Explorer:  "https://www.oklink.com/okexchain",
	},
	{
		ChainID:   100,
		ChainName: "xdai",
		Explorer:  "https://blockscout.com/poa/xdai",
	},
	{
		ChainID:   10,
		ChainName: "optimism",
		Explorer:  "https://optimistic.etherscan.io",
	},
	{
		ChainID:   25,
		ChainName: "cronos",
		Explorer:  "https://cronoscan.com",
	},
	{
		ChainID:   1285,
		ChainName: "moonriver",
		Explorer:  "https://moonriver.moonscan.io",
	},
	{
		ChainID:   1284,
		ChainName: "moonbeam",
		Explorer:  "https://moonbeam.moonscan.io",
	},
	{
		ChainID:   66,
		ChainName: "okc",
		Explorer:  "https://www.oklink.com/en/okc",
	},
	{
		ChainID:   9001,
		ChainName: "evmos",
		Explorer:  "https://evm.evmos.org",
	},
	{
		ChainID:   7700,
		ChainName: "canto",
		Explorer:  "https://tuber.build/",
	},
	{
		ChainID:   53935,
		ChainName: "dfk chain",
		Explorer:  "https://subnets.avax.network/defi-kingdoms",
	},
	{
		ChainID:   8217,
		ChainName: "klaytn",
		Explorer:  "https://scope.klaytn.com",
	},
	{
		ChainID:   288,
		ChainName: "boba",
		Explorer:  "https://bobascan.com",
	},
	{
		ChainID:   1088,
		ChainName: "metis",
		Explorer:  "https://andromeda-explorer.metis.io",
	},
	{
		ChainID:   1313161554,
		ChainName: "aurora",
		Explorer:  "https://explorer.mainnet.aurora.dev",
	},
	{
		ChainID:   1666600000,
		ChainName: "harmony",
		Explorer:  "https://explorer.harmony.one",
	},
	{
		ChainID:   2000,
		ChainName: "dogechain",
		Explorer:  "https://explorer.dogechain.dog",
	},
	{
		ChainID:   8453,
		ChainName: "base",
		Explorer:  "https://basescan.org",
	},
	{
		ChainID:   81457,
		ChainName: "blast",
		Explorer:  "https://blastscan.io",
	},
	{
		ChainID:   534352,
		ChainName: "scroll",
		Explorer:  "https://scrollscan.com",
	},
}

ChainMetadataList is the list of chain metadata.

Functions

func ChainIDToChainName

func ChainIDToChainName(chainID int64, isUpper bool) string

ChainIDToChainName converts the chain id to the chain name.

func ChainIDToExplorer

func ChainIDToExplorer(chainID int64) string

ChainIDToExplorer converts the chain id to the chain explorer.

func ChainNameToChainID added in v0.17.10

func ChainNameToChainID(chainName string) uint64

ChainNameToChainID converts the chain name to the chain id. It returns 0 if the chain name is not found.

func ToTXLink(chainID int64, hash string) string

ToTXLink converts the chain id and hash to the explorer link.

Types

type ChainMetadata

type ChainMetadata struct {
	// ChainID is the chain id.
	ChainID int64
	// ChainName is the chain name.
	ChainName string
	// Explorer is the chain explorer.
	Explorer string
}

ChainMetadata represents the chain metadata.

Jump to

Keyboard shortcuts

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