Documentation ¶
Index ¶
Constants ¶
View Source
const FlagMultiChain = "multichain"
Variables ¶
This section is empty.
Functions ¶
func ReloadConfig ¶
func ReloadConfig() error
func StartMonitoring ¶
func StartMonitoring(filters contracts.ReceiverContracts, signers map[uint64][]eth.Addr)
func StopMonitoring ¶
func StopMonitoring()
Types ¶
type Chain ¶
type Chain struct { *OneChainConfig *Contracts EthClient *ethclient.Client // contains filtered or unexported fields }
func GetChainMustExist ¶
func (*Chain) GetMsgBridgeAddr ¶
func (c *Chain) GetMsgBridgeAddr(t msgtypes.TransferType) common.Address
func (*Chain) IsTransferReady ¶
type Chains ¶
type Chains struct {
// contains filtered or unexported fields
}
func InitChains ¶
func InitChains() *Chains
type Contracts ¶
type Contracts struct { MessageBus *eth.MsgBusContract LiqBridge *eth.BridgeContract PegBridge *eth.PegBridgeContract PegBridgeV2 *eth.PegBridgeV2Contract PegVault *eth.PegVaultContract PegVaultV2 *eth.PegVaultV2Contract }
func NewContracts ¶
func NewContracts(ec *ethclient.Client, config *OneChainConfig) *Contracts
type OneChainConfig ¶
type OneChainConfig struct { ChainID uint64 Name, Gateway string BlkInterval, BlkDelay, MaxBlkDelta, ForwardBlkDelay uint64 GasLimit uint64 AddGasEstimateRatio float64 // Legacy gas price flags AddGasGwei uint64 MinGasGwei uint64 MaxGasGwei uint64 ForceGasGwei string // EIP-1559 gas price flags MaxFeePerGasGwei uint64 MaxPriorityFeePerGasGwei uint64 // cbridge contract address CBridge string // OriginalTokenVault contract address OTVault string // PeggedTokenBridge contract address PTBridge string // OriginalTokenVaultV2 contract address OTVault2 string // PeggedTokenBridgeV2 contract address PTBridge2 string // WithdrawInbox contract address WdInbox string // MsgBus contract address MsgBus string // MsgRecvAdapters contract address MsgRecvAdapters []string // FarmingRewards contract address FarmingRewards string // VeToken contract address VeToken string // if ProxyPort > 0, a proxy with this port will be created to support some special chain such as harmony, celo. // chainID will be used to determined which type proxy to create, so make sure the chainID is supported in the "endpoint-proxy" // create a proxy to the Gateway, and eth-client will be created to "127.0.0.1:ProxyPort" // more detail, https://github.com/celer-network/endpoint-proxy ProxyPort int }
represent one chain in config file, include necessary info like chainid, gateway, cbridge address etc
Click to show internal directories.
Click to hide internal directories.