evm

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

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) ChainID

func (c *EVMChain) ChainID() uint64

func (*EVMChain) GetArbiters

func (c *EVMChain) GetArbiters() []common.Address

func (*EVMChain) GetBridgeContract

func (c *EVMChain) GetBridgeContract() string

func (*EVMChain) GetESCState

func (c *EVMChain) GetESCState() (uint8, error)

func (*EVMChain) GetHashSalt

func (c *EVMChain) GetHashSalt() (*big.Int, error)

func (*EVMChain) GetSignatures

func (c *EVMChain) GetSignatures() ([][crypto.SignatureLength]byte, error)

func (*EVMChain) GetTotalCount

func (c *EVMChain) GetTotalCount() (uint64, error)

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 (c *EVMChain) SetESCState(state uint8) error

func (*EVMChain) SetManualArbiters

func (c *EVMChain) SetManualArbiters(arbiters []common.Address, totalSigner int) error

func (*EVMChain) WriteArbiters

func (c *EVMChain) WriteArbiters(arbiters []common.Address, signatures [][]byte, totalCount int) error

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL