evm

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: LGPL-3.0 Imports: 21 Imported by: 0

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(listener EventListener, writer ProposalVoter, blockstore *store.BlockStore, config *chain.EVMConfig) *EVMChain

func SetupDefaultEVMChain

func SetupDefaultEVMChain(openTelemetryInst *opentelemetry.OpenTelemetry, rawConfig map[string]interface{}, txFabric calls.TxFabric, blockstore *store.BlockStore) (*EVMChain, error)

SetupDefaultEVMChain sets up an EVMChain with all supported handlers configured

func (*EVMChain) BridgeContractAddress

func (c *EVMChain) BridgeContractAddress() *common.Address

func (*EVMChain) ChainID

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

func (*EVMChain) DomainID

func (c *EVMChain) DomainID() uint8

func (*EVMChain) ExecOnDest

func (c *EVMChain) ExecOnDest(msg *message.Message, signatures [][]byte, sleepDuration *big.Int) error

func (*EVMChain) Get

func (c *EVMChain) Get(msg *message.Message) (bool, error)

func (*EVMChain) GetSignatures

func (c *EVMChain) GetSignatures(msg *message.Message) ([][]byte, error)

func (*EVMChain) HandleEvent

func (c *EVMChain) HandleEvent(sourceID, destID uint8, nonce uint64, resourceID types.ResourceID, calldata, handlerResponse []byte) (*message.Message, error)

func (*EVMChain) HeadBlockLabels

func (c *EVMChain) HeadBlockLabels() []attribute.KeyValue

func (*EVMChain) PollEvents

func (c *EVMChain) PollEvents(stop <-chan struct{}, sysErr chan<- error, eventsChan chan *message.Message)

PollEvents is the goroutine that polls blocks and searches Deposit events in them. Events are then sent to eventsChan.

func (*EVMChain) RelayId

func (c *EVMChain) RelayId() uint8

func (*EVMChain) SignatureSubmit

func (c *EVMChain) SignatureSubmit() bool

func (*EVMChain) SyncBlockLabels

func (c *EVMChain) SyncBlockLabels() []attribute.KeyValue

func (*EVMChain) VoteOnDest

func (c *EVMChain) VoteOnDest(msg *message.Message) error

func (*EVMChain) VoteOnRelay

func (c *EVMChain) VoteOnRelay(msg *message.Message, chainID *big.Int, bridgeContractAddress *common.Address) error

type EventListener

type EventListener interface {
	ListenToEvents(startBlock, blockConfirmations *big.Int, blockWindow *big.Int, blockRetryInterval time.Duration, domainID uint8, blockstore *store.BlockStore, stopChn <-chan struct{}, errChn chan<- error) <-chan *message.Message
	HandleEvent(sourceID, destID uint8, nonce uint64, resourceID types.ResourceID, calldata, handlerResponse []byte) (*message.Message, error)
}

type ProposalVoter

type ProposalVoter interface {
	VoteProposal(message *message.Message) error

	SubmitSignature(message *message.Message, chainID *big.Int, address *common.Address) error

	GetSignatures(message *message.Message) ([][]byte, error)
	VoteProposals(message *message.Message, data [][]byte, sleepDuration *big.Int) error

	ChainID() (*big.Int, error)
	BridgeContractAddress() *common.Address
}

Directories

Path Synopsis
evmgaspricer/mock
Package mock_evmgaspricer is a generated GoMock package.
Package mock_evmgaspricer is a generated GoMock package.
mock
Package mock_calls is a generated GoMock package.
Package mock_calls is a generated GoMock package.
transactor/itx/mock
Package mock_itx is a generated GoMock package.
Package mock_itx is a generated GoMock package.
transactor/mock
Package mock_transactor is a generated GoMock package.
Package mock_transactor is a generated GoMock package.
cli
bridge/mock
Package mock_bridge is a generated GoMock package.
Package mock_bridge is a generated GoMock package.
mock
Package mock_listener is a generated GoMock package.
Package mock_listener is a generated GoMock package.
mock
Package mock_voter is a generated GoMock package.
Package mock_voter is a generated GoMock package.

Jump to

Keyboard shortcuts

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