Documentation
¶
Overview ¶
Package txsubmitter simulates, signs, and broadcasts transactions for the relayer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrBusy = evm.ErrBusy
ErrBusy indicates that a submission should be retried when capacity is available.
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 {
// SimulateRelayTx returns decoded outcomes in execution order, including failures.
SimulateRelayTx(ctx context.Context, tx v2.RelayTx) (v2.RelaySimulation, error)
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 simulates, signs, and broadcasts transactions on a single chain; implementations own nonce selection and gas pricing.