Documentation ¶
Index ¶
- Constants
- type BridgeClient
- func (c *BridgeClient) DomainID() uint8
- func (c *BridgeClient) FormatAddressLink(address string) string
- func (c *BridgeClient) FormatTxHashLink(txHash string) string
- func (c *BridgeClient) ListenToTxs(ctx context.Context, resultChan chan interface{}, _ *big.Int)
- func (c *BridgeClient) Roles() map[ethCommon.Hash]string
- type BridgeConfig
- type BridgeProcessor
- type DepositMsg
- type EventMsg
- type RelayerAddedMsg
- type RelayerRemovedMsg
- type RetryMsg
- type RoleGrantedMsg
- type RoleRevokedMsg
Constants ¶
View Source
const ( DefaultAdminRole = "DefaultAdmin" BridgeRelayerRole = "BridgeRelayer" BridgeRetrierRole = "BridgeRetrier" BridgeOperatorRole = "BridgeOperator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BridgeClient ¶
type BridgeClient struct { Client *ethclient.Client Bridge *contracts.BridgeContract Cfg contracts.BridgeNetworkConfig // contains filtered or unexported fields }
BridgeClient holds all the contract of a Bridge.
func NewBridgeSuite ¶
func NewBridgeSuite(cfg contracts.BridgeNetworkConfig, log logger.Logger) (*BridgeClient, error)
NewBridgeSuite creates a new BridgeClient with the given parameters.
func (*BridgeClient) DomainID ¶
func (c *BridgeClient) DomainID() uint8
func (*BridgeClient) FormatAddressLink ¶
func (c *BridgeClient) FormatAddressLink(address string) string
func (*BridgeClient) FormatTxHashLink ¶
func (c *BridgeClient) FormatTxHashLink(txHash string) string
func (*BridgeClient) ListenToTxs ¶
func (c *BridgeClient) ListenToTxs(ctx context.Context, resultChan chan interface{}, _ *big.Int)
ListenToTxs retrieves all events for the current bridge.
type BridgeConfig ¶
type BridgeConfig struct { common.BaseConfig Chains map[string]contracts.BridgeNetworkConfig }
func DefaultConfig ¶
func DefaultConfig() BridgeConfig
func (*BridgeConfig) IsValid ¶
func (cfg *BridgeConfig) IsValid() (bool, error)
type BridgeProcessor ¶
type BridgeProcessor struct { *processorCommon.BaseProcessor // contains filtered or unexported fields }
func NewBridgeProcessor ¶
func NewBridgeProcessor(cfg BridgeConfig, db *store.Store, log logger.Logger, ) (*BridgeProcessor, error)
func (*BridgeProcessor) Process ¶
func (p *BridgeProcessor) Process(ctx context.Context, msg EventMsg) error
func (*BridgeProcessor) Queue ¶
func (p *BridgeProcessor) Queue(msg interface{})
func (*BridgeProcessor) Start ¶
func (p *BridgeProcessor) Start(ctx context.Context)
type DepositMsg ¶
type DepositMsg struct { From string To string FromNetwork string ToNetwork string Token string TokenName string TokenSymbol string Amount float64 TxHash string }
func (DepositMsg) String ¶
func (msg DepositMsg) String() string
type RelayerAddedMsg ¶
func (RelayerAddedMsg) String ¶
func (msg RelayerAddedMsg) String() string
type RelayerRemovedMsg ¶
func (RelayerRemovedMsg) String ¶
func (msg RelayerRemovedMsg) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.