chain

package
v0.0.0-...-bd61a53 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportChainId = map[string]ChainId{
	"eth":      ChainEth,
	"ETH":      ChainEth,
	"ethereum": ChainEth,
	"ropsten":  ChainRopsten,
	"Ropsten":  ChainRopsten,
	"near":     ChainNear,
	"NEAR":     ChainNear,
	"Near":     ChainNear,
}
View Source
var SupportChainName = map[ChainId]string{
	ChainEth:     "ethereum",
	ChainRopsten: "ropsten",
	ChainNear:    "near",
}
View Source
var SupportList = []Group{
	{
		SourceChain: ChainEth,
		Token:       TokenEth,
		TargetChain: ChainNear,
	},
	{
		SourceChain: ChainRopsten,
		Token:       TokenEth,
		TargetChain: ChainNear,
	},
}
View Source
var SupportTokenId = map[string]TokenId{
	"oin":       TokenErc20Oin,
	"Oin":       TokenErc20Oin,
	"OIN":       TokenErc20Oin,
	"ERC20-OIN": TokenErc20Oin,
	"ERC20-Oin": TokenErc20Oin,
	"eth":       TokenEth,
	"ETH":       TokenEth,
	"Eth":       TokenEth,
}
View Source
var SupportTokenName = map[TokenId]string{
	TokenErc20Oin: "OIN ERC20",
	TokenEth:      "ETH",
}

Functions

func ChainIdByName

func ChainIdByName(name string) ChainId

func GetParentChain

func GetParentChain() types.ParentChain

func SupportedGroup

func SupportedGroup(sourceChain, targetChain, tokenName string) bool

func TokenIdByName

func TokenIdByName(name string) TokenId

Types

type Group

type Group struct {
	SourceChain ChainId
	TargetChain ChainId
	Token       TokenId
}

type ParentConfig

type ParentConfig struct {
	ParentId types.ChainId
	TokenId  types.TokenId
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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