Documentation ¶
Index ¶
- type EVMChain
- func (c *EVMChain) ChainID() uint64
- func (c *EVMChain) GetArbiters() []common.Address
- func (c *EVMChain) GetBridgeContract() string
- func (c *EVMChain) GetESCState() (uint8, error)
- func (c *EVMChain) GetHashSalt() (*big.Int, error)
- func (c *EVMChain) GetSignatures() ([][crypto.SignatureLength]byte, error)
- func (c *EVMChain) GetTotalCount() (uint64, error)
- func (c *EVMChain) PollEvents(sysErr chan<- error, stop <-chan struct{}, ...)
- func (c *EVMChain) SetESCState(state uint8) error
- func (c *EVMChain) SetManualArbiters(arbiters []common.Address, totalSigner int) error
- func (c *EVMChain) WriteArbiters(arbiters []common.Address, signatures [][]byte, totalCount int) error
- type EventListener
- type ProposalVoter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EVMChain ¶
type EVMChain struct {
// contains filtered or unexported fields
}
EVMChain is struct that aggregates all data required for
func NewEVMChain ¶
func NewEVMChain(dr EventListener, writer ProposalVoter, chainID uint64, kvdb blockstore.KeyValueReaderWriter, config *config.GeneralChainConfig, arbiterManager *aribiters.ArbiterManager) *EVMChain
func (*EVMChain) GetArbiters ¶
func (*EVMChain) GetBridgeContract ¶
func (*EVMChain) GetESCState ¶
func (*EVMChain) GetSignatures ¶
func (c *EVMChain) GetSignatures() ([][crypto.SignatureLength]byte, error)
func (*EVMChain) GetTotalCount ¶
func (*EVMChain) PollEvents ¶
func (c *EVMChain) PollEvents(sysErr chan<- error, stop <-chan struct{}, eventsChan chan *relayer.SetArbiterListMsg)
PollEvents is the goroutine that polling blocks and searching Deposit Events in them. Event then sent to eventsChan
func (*EVMChain) SetESCState ¶
func (*EVMChain) SetManualArbiters ¶
type EventListener ¶
type EventListener interface {
ListenToEvents(startBlock *big.Int, chainID uint64, kvrw blockstore.KeyValueWriter, errChn chan<- error) <-chan *relayer.SetArbiterListMsg
}
type ProposalVoter ¶
type ProposalVoter interface { GetClient() voter.ChainClient GetPublicKey() ([]byte, error) GetSignerAddress() (common.Address, error) SetArbiterList(arbiters []common.Address, totalCount int, signature [][]byte, bridgeAddress string) error GetArbiterList(bridgeAddress string) ([]common.Address, error) GetSignatures(bridgeAddress string) ([][crypto.SignatureLength]byte, error) GetTotalCount(bridgeAddress string) (uint64, error) GetESCState(bridgeAddress string) (uint8, error) GetHashSalt(bridgeAddress string) (*big.Int, error) IsDeployedBridgeContract(bridgeAddress string) bool SetESCState(bridgeAddress string, state uint8) error SetManualArbiter(bridgeAddress string, arbiter []common.Address, totalSigner int) error }
Click to show internal directories.
Click to hide internal directories.