Documentation
¶
Overview ¶
Package txsubmitter signs and broadcasts transactions for the relayer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set holds one tx submitter per (chain, signer) pair relayed by the configured routes. A chain may carry several signers when different clients on it are relayed by different routes.
func NewFromConfig ¶
NewFromConfig builds one tx submitter per (chain, signer) pair relayed by the configured routes. Routes naming the same pair share a tx submitter; a chain carries several when different clients on it are relayed with different signers.
func NewSet ¶
func NewSet(txSubmitters map[config.ChainSignerPair]TxSubmitter) *Set
type TxSubmitter ¶
type TxSubmitter interface {
Submit(ctx context.Context, intent v2.TxIntent) (*v2.Submission, error)
// ShouldRetry reports whether a transaction submitted at sentAt is failed
// or has been pending past the implementation's retry expiry and should be
// resubmitted.
ShouldRetry(ctx context.Context, txHash string, sentAt time.Time) (bool, error)
}
TxSubmitter signs and broadcasts transactions on a single chain; implementations own nonce selection and gas pricing.
Click to show internal directories.
Click to hide internal directories.