txsubmitter

package
v0.0.0-...-951c1a9 Latest Latest
Warning

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

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

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

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 {
	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.

Directories

Path Synopsis
Package evm submits transactions to EVM chains.
Package evm submits transactions to EVM chains.

Jump to

Keyboard shortcuts

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