Documentation ¶
Overview ¶
Package submitter provides a simple interface for submitting txs to multiple chains and retrying.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFetcher ¶
type ClientFetcher interface {
GetClient(ctx context.Context, chainID *big.Int) (client.EVM, error)
}
ClientFetcher is the interface for fetching a chain client.
type ContractCallType ¶
type ContractCallType func(transactor *bind.TransactOpts) (tx *types.Transaction, err error)
ContractCallType is a contract call that can be called safely.
type TransactionSubmitter ¶
type TransactionSubmitter interface { // Start starts the transaction submitter. Start(ctx context.Context) error // SubmitTransaction submits a transaction to the chain. // the transaction is not guaranteed to be executed immediately, only at some point in the future. // the nonce is returned, and can be used to track the status of the transaction. SubmitTransaction(parentCtx context.Context, chainID *big.Int, call ContractCallType) (nonce uint64, err error) }
TransactionSubmitter is the interface for submitting transactions to the chain.
func NewTransactionSubmitter ¶
func NewTransactionSubmitter(metrics metrics.Handler, signer signer.Signer, fetcher ClientFetcher, db db.Service, config config.IConfig) TransactionSubmitter
NewTransactionSubmitter creates a new transaction submitter.
Directories ¶
Path | Synopsis |
---|---|
Package config provides a configuration struct and getters for the submitter.
|
Package config provides a configuration struct and getters for the submitter. |
Package db provides a database interface for the submitter.
|
Package db provides a database interface for the submitter. |
txdb
Package txdb provides a database implementation that simplements the submitter db service.
|
Package txdb provides a database implementation that simplements the submitter db service. |
Click to show internal directories.
Click to hide internal directories.