Documentation ¶
Overview ¶
Package evm TODO description
Index ¶
- func NewAttestationCollectorContract(ctx context.Context, client chain.Chain, attestationAddress common.Address) (domains.AttestationCollectorContract, error)
- func NewDestinationContract(ctx context.Context, client chain.Chain, destinationAddress common.Address) (domains.DestinationContract, error)
- func NewEVM(ctx context.Context, name string, domain config.DomainConfig) (domains.DomainClient, error)
- func NewOriginContract(ctx context.Context, client chain.Chain, originAddress common.Address) (domains.OriginContract, error)
- func NewPingPongClientContract(ctx context.Context, client chain.Chain, pingPongClientAddress common.Address) (domains.PingPongClientContract, error)
- func NewTestClientContract(ctx context.Context, client chain.Chain, testClientAddress common.Address) (domains.TestClientContract, error)
- type ChainTransactor
- type LogInfo
- type RangeFilter
- func (f *RangeFilter) Done() bool
- func (f *RangeFilter) Drain(ctx context.Context) (filteredLogs []types.Log, err error)
- func (f *RangeFilter) FilterLogs(ctx context.Context, chunk *util.Chunk) (*LogInfo, error)
- func (f *RangeFilter) GetLogChan() chan *LogInfo
- func (f *RangeFilter) Start(ctx context.Context) error
- type TxQueueTransactor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAttestationCollectorContract ¶
func NewAttestationCollectorContract(ctx context.Context, client chain.Chain, attestationAddress common.Address) (domains.AttestationCollectorContract, error)
NewAttestationCollectorContract returns a bound attestation collector contract.
func NewDestinationContract ¶ added in v0.0.60
func NewDestinationContract(ctx context.Context, client chain.Chain, destinationAddress common.Address) (domains.DestinationContract, error)
NewDestinationContract returns a bound destination contract.
func NewEVM ¶
func NewEVM(ctx context.Context, name string, domain config.DomainConfig) (domains.DomainClient, error)
NewEVM creates a new evm client.
func NewOriginContract ¶
func NewOriginContract(ctx context.Context, client chain.Chain, originAddress common.Address) (domains.OriginContract, error)
NewOriginContract returns a new bound origin contract.
Types ¶
type ChainTransactor ¶
type ChainTransactor interface { // GetBigChainID gets the chain id as a big int. GetBigChainID() *big.Int // NonceAt gets the nonce of a chain transactor NonceAt(ctx context.Context, account common.Address, blockNumber *big.Int) (uint64, error) }
ChainTransactor is the location of the chain.
type LogInfo ¶
type LogInfo struct {
// contains filtered or unexported fields
}
LogInfo is the log info.
type RangeFilter ¶
type RangeFilter struct {
// contains filtered or unexported fields
}
RangeFilter pre-fetches filter logs into a channel in deterministic order.
func NewRangeFilter ¶
func NewRangeFilter(address ethCommon.Address, filterer bind.ContractFilterer, startBlock, endBlock *big.Int, chunkSize int, reverse bool) *RangeFilter
NewRangeFilter creates a new filtering interface for a range of blocks. If reverse is not set, block heights are filtered from start->end.
func (*RangeFilter) Done ¶
func (f *RangeFilter) Done() bool
Done returns a bool indicating whether or not the filtering operation is done.
func (*RangeFilter) Drain ¶
Drain fetches all logs and concatenated them into a single slice. Deprecated: use the channel.
func (*RangeFilter) FilterLogs ¶
FilterLogs safely calls FilterLogs with the filtering implementing a backoff in the case of rate limiting and respecting context cancellation.
func (*RangeFilter) GetLogChan ¶
func (f *RangeFilter) GetLogChan() chan *LogInfo
GetLogChan retursn a log chan with the logs filtered ahead to bufferSize. Iteration oder is only guaranteed with up to one consumer.
type TxQueueTransactor ¶
type TxQueueTransactor struct {
// contains filtered or unexported fields
}
TxQueueTransactor contains a submission queue for transactions on evm-based chains. The queue increments nonces and bumps gases for transactions on a single-chain. the transaction queue is thread safe
Limitations:
- Once a transaction is submitted to the queue, it cannot be removed. Gas for the transaction is bumped until it is processed as a result every call to the transactor is treated as unique. Nonce's passed into the transactor are overridden
func NewTxQueue ¶
func NewTxQueue(signer signer.Signer, db db.TxQueueDB, chain ChainTransactor) *TxQueueTransactor
NewTxQueue creates a new transaction submission queue. TODO: we still need the transactor loop.
func (TxQueueTransactor) GetNonce ¶
func (t TxQueueTransactor) GetNonce(parentCtx context.Context) (nonce uint64, err error)
GetNonce uses the greatest of the database nonce or the on-chain nonce for the next transaction.
func (*TxQueueTransactor) GetTransactor ¶
func (t *TxQueueTransactor) GetTransactor(ctx context.Context, chainID *big.Int) (*bind.TransactOpts, error)
GetTransactor gets the transactor used for transacting.