Versions in this module Expand all Collapse all v1 v1.0.19 Dec 16, 2022 Changes in this version + var Sleep = time.Sleep + func ERC20MessageHandler(m *message.Message, handlerAddr, bridgeAddress common.Address) (*proposal.Proposal, error) + func ERC721MessageHandler(msg *message.Message, handlerAddr, bridgeAddress common.Address) (*proposal.Proposal, error) + func GenericMessageHandler(msg *message.Message, handlerAddr, bridgeAddress common.Address) (*proposal.Proposal, error) + type BridgeContract interface + GetThreshold func() (uint8, error) + IsFeeClaimThresholdReached func() (bool, error) + IsProposalVotedBy func(by common.Address, p *proposal.Proposal) (bool, error) + ProposalStatus func(p *proposal.Proposal) (message.ProposalStatus, error) + RelayerClaimFees func(destDomainID uint8, opts transactor.TransactOptions) (*common.Hash, error) + SimulateVoteProposal func(proposal *proposal.Proposal) error + VoteProposal func(proposal *proposal.Proposal, opts transactor.TransactOptions) (*common.Hash, error) + type ChainClient interface + CallContract func(ctx context.Context, callArgs map[string]interface{}, blockNumber *big.Int) ([]byte, error) + RelayerAddress func() common.Address + SubscribePendingTransactions func(ctx context.Context, ch chan<- common.Hash) (*rpc.ClientSubscription, error) + TransactionByHash func(ctx context.Context, hash common.Hash) (tx *ethereumTypes.Transaction, isPending bool, err error) + type EVMMessageHandler struct + func NewEVMMessageHandler(handlerMatcher HandlerMatcher) *EVMMessageHandler + func (mh *EVMMessageHandler) HandleMessage(m *message.Message) (*proposal.Proposal, error) + func (mh *EVMMessageHandler) MatchAddressWithHandlerFunc(addr common.Address) (MessageHandlerFunc, error) + func (mh *EVMMessageHandler) RegisterMessageHandler(address string, handler MessageHandlerFunc) + type EVMVoter struct + func NewVoter(mh MessageHandler, client ChainClient, bridgeContract BridgeContract) *EVMVoter + func NewVoterWithSubscription(mh MessageHandler, client ChainClient, bridgeContract BridgeContract) (*EVMVoter, error) + func (v *EVMVoter) Execute(m *message.Message) error + func (v *EVMVoter) FeeClaimByRelayer(p *message.Message) error + func (v *EVMVoter) IsFeeThresholdReached() bool + type HandlerMatcher interface + ContractAddress func() *common.Address + GetHandlerAddressForResourceID func(resourceID types.ResourceID) (common.Address, error) + type MessageHandler interface + HandleMessage func(m *message.Message) (*proposal.Proposal, error) + type MessageHandlerFunc func(m *message.Message, handlerAddr, bridgeAddress common.Address) (*proposal.Proposal, error)