Documentation ¶
Index ¶
Constants ¶
View Source
const ( // oracle chainType OracleEthChainType = "ethereum" OracleMoonChainType = "moon" OracleCfxChainType = "conflux" OracleBscChainType = "bsc" OraclePlatonChainType = "platon" OracleArweaveChainType = "arweave" OracleEverpayChainType = "everpay" // ever chainType ChainTypeArweave = "arweave" ChainTypeCrossArEth = "arweave,ethereum" // cross arweave, Only used AR token ChainTypeMoonbeam = "moonbeam" ChainTypeMoonbase = "moonbase" ChainTypeEth = "ethereum" ChainTypeCfx = "conflux" ChainTypeBsc = "bsc" ChainTypePlaton = "platon" ChainTypeEverpay = "everpay" )
View Source
const ( TxVersionV1 = "v1" TxActionTransfer = "transfer" TxActionMint = "mint" TxActionBurn = "burn" TxActionTransferOwner = "transferOwner" TxActionAddWhiteList = "addWhiteList" TxActionRemoveWhiteList = "removeWhiteList" TxActionPauseWhiteList = "pauseWhiteList" TxActionAddBlackList = "addBlackList" TxActionRemoveBlackList = "removeBlackList" TxActionPauseBlackList = "pauseBlackList" TxActionPause = "pause" ArAddress = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" EvmAddress = "0x0000000000000000000000000000000000000000" EthAddress = EvmAddress MoonAddress = EvmAddress // moonbeam native token GLMR CfxAddress = EvmAddress BscAddress = EvmAddress PlatonAddress = EvmAddress TNS101Type = 101 // token type TNS102Type = 102 ZeroAddress = "0x0000000000000000000000000000000000000000" )
Variables ¶
View Source
var EvmChainMetaMap = map[string]evmChainMeta{ OracleEthChainType: {Symbol: "ETH"}, OracleMoonChainType: {Symbol: "GLMR"}, OracleCfxChainType: {Symbol: "CFX"}, OracleBscChainType: {Symbol: "BNB"}, OraclePlatonChainType: {Symbol: "LAT"}, }
Functions ¶
func IsEvmChain ¶
Types ¶
type HeightLocker ¶
type Locker ¶
type Locker struct { ChainType string ChainId string List []HeightLocker }
func (Locker) CurLockerAddr ¶
func (Locker) GetLockerAddrFromHeight ¶
type TargetChain ¶
type TargetChain struct { ChainId string `json:"targetChainId"` ChainType string `json:"targetChainType"` // e.g: "avalanche" "arweave" "ethereum","moon" Decimals int `json:"targetDecimals"` // e.g: 18 TokenID string `json:"targetTokenId"` // target chain token address Locker *Locker `json:"-"` // for oracle verify Rpc string `json:"-"` // chain node url PstGw string `json:"-"` // pst token verify gateway }
Click to show internal directories.
Click to hide internal directories.