txsubmitter

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package txsubmitter simulates, signs, and broadcasts transactions for the relayer.

Index

Constants

This section is empty.

Variables

View Source
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

func NewFromConfig(cfg config.Config, signers *signer.Set) (*Set, error)

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

func (*Set) Get

func (s *Set) Get(chainID, signerAlias string) (TxSubmitter, bool)

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.

Directories

Path Synopsis
Package evm signs and broadcasts EVM transactions.
Package evm signs and broadcasts EVM transactions.

Jump to

Keyboard shortcuts

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