Documentation ¶
Index ¶
- Variables
- func CallOnchainContract(data hexutil.Bytes, blockNumber string) (result []byte, err error)
- func GetAllChainIDs() (chainIDs []*big.Int, err error)
- func GetAllTokenIDs() (tokenIDs []string, err error)
- func GetBridgeByChainID(chainID string) tokens.IBridge
- func GetCachedMultichainToken(tokenID, chainID string) (tokenAddr string)
- func GetCachedMultichainTokens(tokenID string) map[string]string
- func GetChainConfig(chainID *big.Int) (*tokens.ChainConfig, error)
- func GetCustomConfig(chainID *big.Int, key string) (string, error)
- func GetMPCPubkey(mpcAddress string) (pubkey string, err error)
- func GetMultichainToken(tokenID string, chainID *big.Int) (tokenAddr string, err error)
- func GetSwapConfig(tokenID string, toChainID *big.Int) (*tokens.SwapConfig, error)
- func GetTokenConfig(chainID *big.Int, token string) (tokenCfg *tokens.TokenConfig, err error)
- func GetUserTokenConfig(chainID *big.Int, token string) (tokenCfg *tokens.TokenConfig, err error)
- func InitRouterConfigClients()
- func InitRouterConfigClientsWithArgs(configContract string, gateways []string)
- func InitWebSocketClients(wsServers []string) []*ethclient.Client
- func IsChainIDExist(chainID *big.Int) (exist bool, err error)
- func IsTokenIDExist(tokenID string) (exist bool, err error)
- func PrintMultichainTokens()
- func SubscribeRouterConfig(topics []ethcommon.Hash)
- func SubscribeUpdateConfig(callback func() bool)
- type MultichainToken
Constants ¶
This section is empty.
Variables ¶
var ( RouterBridges = make(map[string]tokens.IBridge) // key is chainID MultichainTokens = make(map[string]map[string]string) // key is tokenID,chainID AllChainIDs []*big.Int // all chainIDs is retrieved only once AllTokenIDs []string // all tokenIDs can be reload )
router bridges
Functions ¶
func CallOnchainContract ¶
CallOnchainContract call onchain contract
func GetBridgeByChainID ¶
GetBridgeByChainID get bridge by chain id
func GetCachedMultichainToken ¶
GetCachedMultichainToken get multichain token address by tokenid and chainid
func GetCachedMultichainTokens ¶
GetCachedMultichainTokens get multichain tokens of `tokenid`
func GetChainConfig ¶
func GetChainConfig(chainID *big.Int) (*tokens.ChainConfig, error)
GetChainConfig abi
func GetCustomConfig ¶
GetCustomConfig abi
func GetMPCPubkey ¶
GetMPCPubkey abi
func GetMultichainToken ¶
GetMultichainToken abi
func GetSwapConfig ¶ added in v3.2.0
GetSwapConfig abi
func GetTokenConfig ¶
GetTokenConfig abi
func GetUserTokenConfig ¶
GetUserTokenConfig abi
func InitRouterConfigClients ¶
func InitRouterConfigClients()
InitRouterConfigClients init router config clients
func InitRouterConfigClientsWithArgs ¶
InitRouterConfigClientsWithArgs init standalone
func InitWebSocketClients ¶
InitWebSocketClients init
func IsChainIDExist ¶
IsChainIDExist abi
func IsTokenIDExist ¶
IsTokenIDExist abi
func SubscribeRouterConfig ¶
SubscribeRouterConfig subscribe router config
func SubscribeUpdateConfig ¶
func SubscribeUpdateConfig(callback func() bool)
SubscribeUpdateConfig subscribe update ID and reload configs
Types ¶
type MultichainToken ¶
MultichainToken struct
func GetAllMultichainTokens ¶
func GetAllMultichainTokens(tokenID string) ([]MultichainToken, error)
GetAllMultichainTokens abi