Versions in this module Expand all Collapse all v0 v0.3.3 Sep 5, 2025 v0.3.2 Aug 20, 2025 v0.3.2-svr Sep 5, 2025 v0.3.1 Aug 11, 2025 v0.3.0 Aug 8, 2025 v0.2.2 Aug 8, 2025 v0.2.1 Aug 8, 2025 v0.2.0 Aug 8, 2025 v0.1.0 Jul 17, 2025 Changes in this version + const TransmitCheckerTypeSimulate + const TransmitCheckerTypeVRFV1 + const TransmitCheckerTypeVRFV2 + const TransmitCheckerTypeVRFV2Plus + var ErrCouldNotGetReceipt = "could not get receipt" + var ErrKeyNotUpdated = errors.New("evmTxStore: Key not updated") + var Max256BitUInt = big.NewInt(0).Exp(big.NewInt(2), big.NewInt(256), nil) + func DbEthTxAttemptStateToTxAttemptState(state string) txmgrtypes.TxAttemptState + func DbReceiptToEvmReceipt(receipt *DbReceipt) *types.Receipt + func GetGethSignedTx(signedRawTx []byte) (*types.Transaction, error) + func MakeTestConfigs(tb testing.TB) (*MockConfig, *TestDatabaseConfig, *TestEvmConfig) + func NewEVMTxmMetrics(chainID string) (*evmTxmMetrics, error) + func NewEvmFinalizer(lggr logger.Logger, chainID *big.Int, rpcBatchSize uint32, ...) *evmFinalizer + func NewEvmTxAttemptBuilder(chainID big.Int, feeConfig evmTxAttemptBuilderFeeConfig, ...) *evmTxAttemptBuilder + func NewEvmTxmClient(c client.Client, clientErrors config.ClientErrors) *evmTxmClient + func NewEvmTxmConfig(c ChainConfig) *evmTxmConfig + func NewEvmTxmFeeConfig(c FeeConfig) *evmTxmFeeConfig + func NewNonceTracker(lggr logger.Logger, txStore NonceTrackerTxStore, client NonceTrackerClient) *nonceTracker + func NewStuckTxDetector(lggr logger.Logger, chainID *big.Int, chainType chaintype.ChainType, ...) *stuckTxDetector + func NewTxStore(db sqlutil.DataSource, lggr logger.Logger) *evmTxStore + type Broadcaster = txmgr.Broadcaster[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + func NewEvmBroadcaster(txStore TransactionStore, client TransactionClient, ...) *Broadcaster + type ChainConfig interface + ChainType func() chaintype.ChainType + FinalityDepth func() uint32 + FinalityTagEnabled func() bool + NonceAutoSync func() bool + RPCDefaultBatchSize func() uint32 + type ChainReceipt = txmgrtypes.ChainReceipt[common.Hash, common.Hash] + type CheckerFactory struct + Client evmclient.Client + func (c *CheckerFactory) BuildChecker(spec TransmitCheckerSpec) (TransmitChecker, error) + type Confirmer = txmgr.Confirmer[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + func NewEvmConfirmer(txStore TxStore, client TxmClient, feeConfig txmgrtypes.ConfirmerFeeConfig, ...) *Confirmer + type DatabaseConfig interface + DefaultQueryTimeout func() time.Duration + LogSQL func() bool + type DbEthTx struct + BroadcastAt *time.Time + CallbackCompleted bool + CreatedAt time.Time + EVMChainID ubig.Big + EncodedPayload []byte + Error nullv4.String + FromAddress common.Address + GasLimit uint64 + ID int64 + IdempotencyKey *string + InitialBroadcastAt *time.Time + Meta *sqlutil.JSON + MinConfirmations null.Uint32 + Nonce *int64 + PipelineTaskRunID uuid.NullUUID + SignalCallback bool + State txmgrtypes.TxState + Subject uuid.NullUUID + ToAddress common.Address + TransmitChecker *sqlutil.JSON + Value assets.Eth + func (db *DbEthTx) FromTx(tx *Tx) + func (db DbEthTx) ToTx(tx *Tx) + type DbEthTxAttempt struct + BroadcastBeforeBlockNum *int64 + ChainSpecificGasLimit uint64 + CreatedAt time.Time + EthTxID int64 + GasFeeCap *assets.Wei + GasPrice *assets.Wei + GasTipCap *assets.Wei + Hash common.Hash + ID int64 + IsPurgeAttempt bool + SignedRawTx []byte + State string + TxType int + func (db *DbEthTxAttempt) FromTxAttempt(attempt *TxAttempt) + func (db DbEthTxAttempt) ToTxAttempt(attempt *TxAttempt) + type DbReceipt struct + BlockHash common.Hash + BlockNumber int64 + CreatedAt time.Time + ID int64 + Receipt types.Receipt + TransactionIndex uint + TxHash common.Hash + func DbReceiptFromEvmReceipt(evmReceipt *types.Receipt) DbReceipt + type EvmBroadcasterConfig txmgrtypes.BroadcasterChainConfig + type EvmResenderConfig txmgrtypes.ResenderChainConfig + type EvmTxStore interface + DeleteReceiptByTxHash func(ctx context.Context, txHash common.Hash) error + FindAttemptsRequiringReceiptFetch func(ctx context.Context, chainID *big.Int) (hashes []TxAttempt, err error) + FindConfirmedTxesReceipts func(ctx context.Context, finalizedBlockNum int64, chainID *big.Int) (receipts []*types.Receipt, err error) + FindTxesByIDs func(ctx context.Context, etxIDs []int64, chainID *big.Int) (etxs []*Tx, err error) + FindTxesPendingCallback func(ctx context.Context, latest, finalized int64, chainID *big.Int) (receiptsPlus []ReceiptPlus, err error) + SaveFetchedReceipts func(ctx context.Context, r []*types.Receipt) (err error) + UpdateTxStatesToFinalizedUsingTxHashes func(ctx context.Context, txHashes []common.Hash, chainID *big.Int) error + type EvmTxmConfig txmgrtypes.TransactionManagerChainConfig + type EvmTxmFeeConfig txmgrtypes.TransactionManagerFeeConfig + type FeeConfig interface + BumpPercent func() uint16 + BumpThreshold func() uint64 + BumpTxDepth func() uint32 + EIP1559DynamicFees func() bool + LimitDefault func() uint64 + PriceDefault func() *assets.Wei + PriceMax func() *assets.Wei + PriceMaxKey func(gethcommon.Address) *assets.Wei + PriceMin func() *assets.Wei + TipCapMin func() *assets.Wei + type Finalizer = txmgrtypes.Finalizer[common.Hash, *evmtypes.Head] + type FwdMgr = txmgrtypes.ForwarderManager[common.Address] + type KeyStore = txmgrtypes.KeyStore[common.Address] + type ListenerConfig interface + FallbackPollInterval func() time.Duration + type MockConfig struct + EvmConfig *TestEvmConfig + func (c *MockConfig) ChainType() chaintype.ChainType + func (c *MockConfig) EVM() evmconfig.EVM + func (c *MockConfig) FinalityDepth() uint32 + func (c *MockConfig) FinalityTagEnabled() bool + func (c *MockConfig) NonceAutoSync() bool + func (c *MockConfig) SetFinalityDepth(fd uint32) + type NonceTracker = txmgrtypes.SequenceTracker[common.Address, evmtypes.Nonce] + type NonceTrackerClient interface + ConfiguredChainID func() *big.Int + PendingSequenceAt func(context.Context, common.Address) (evmtypes.Nonce, error) + SequenceAt func(ctx context.Context, addr common.Address, blockNum *big.Int) (evmtypes.Nonce, error) + type NonceTrackerTxStore interface + FindLatestSequence func(context.Context, common.Address, *big.Int) (evmtypes.Nonce, error) + type NullTxManager = txmgr.NullTxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type Reaper = txmgr.Reaper[*big.Int] + func NewEvmReaper(lggr logger.Logger, store txmgrtypes.TxHistoryReaper[*big.Int], ...) *Reaper + type Receipt = DbReceipt + type ReceiptPlus = txmgrtypes.ReceiptPlus[*evmtypes.Receipt] + type Resender = txmgr.Resender[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + func NewEvmResender(lggr logger.Logger, txStore TransactionStore, client TransactionClient, ...) *Resender + type SimulateChecker struct + Client evmclient.Client + func (s *SimulateChecker) Check(ctx context.Context, l logger.SugaredLogger, tx Tx, a TxAttempt) error + type StuckTxDetector = txmgrtypes.StuckTxDetector[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TestBlockHistoryConfig struct + func (b *TestBlockHistoryConfig) BatchSize() uint32 + func (b *TestBlockHistoryConfig) BlockDelay() uint16 + func (b *TestBlockHistoryConfig) BlockHistorySize() uint16 + func (b *TestBlockHistoryConfig) EIP1559FeeCapBufferBlocks() uint16 + func (b *TestBlockHistoryConfig) TransactionPercentile() uint16 + type TestDAOracleConfig struct + func (d *TestDAOracleConfig) CustomGasPriceCalldata() *string + func (d *TestDAOracleConfig) OracleAddress() *types.EIP55Address + func (d *TestDAOracleConfig) OracleType() *toml.DAOracleType + type TestDatabaseConfig struct + func (d *TestDatabaseConfig) DefaultQueryTimeout() time.Duration + func (d *TestDatabaseConfig) Listener() ListenerConfig + func (d *TestDatabaseConfig) LogSQL() bool + type TestEvmConfig struct + BumpThreshold uint64 + DetectionApiUrl *url.URL + Enabled bool + MaxInFlight uint32 + MaxQueued uint64 + MinAttempts uint32 + ReaperInterval time.Duration + ReaperThreshold time.Duration + ResendAfterThreshold time.Duration + RpcDefaultBatchSize uint32 + Threshold uint32 + func (e *TestEvmConfig) ChainType() chaintype.ChainType + func (e *TestEvmConfig) FinalityDepth() uint32 + func (e *TestEvmConfig) GasEstimator() evmconfig.GasEstimator + func (e *TestEvmConfig) NonceAutoSync() bool + func (e *TestEvmConfig) RPCDefaultBatchSize() uint32 + func (e *TestEvmConfig) Transactions() evmconfig.Transactions + type TestEvmTxStore interface + CountTxesByStateAndSubject func(ctx context.Context, state txmgrtypes.TxState, subject uuid.UUID) (count int, err error) + FindTxAttemptsByTxIDs func(ctx context.Context, ids []int64) ([]TxAttempt, error) + FindTxesByFromAddressAndState func(ctx context.Context, fromAddress common.Address, state string) (txes []*Tx, err error) + GetAllTxAttempts func(ctx context.Context) (attempts []TxAttempt, err error) + GetAllTxes func(ctx context.Context) (txes []*Tx, err error) + GetFatalTransactions func(ctx context.Context) (txes []*Tx, err error) + InsertReceipt func(ctx context.Context, receipt *types.Receipt) (int64, error) + InsertTx func(ctx context.Context, etx *Tx) error + InsertTxAttempt func(ctx context.Context, attempt *TxAttempt) error + LoadTxesAttempts func(ctx context.Context, etxs []*Tx) error + UpdateTxAttemptBroadcastBeforeBlockNum func(ctx context.Context, id int64, blockNum uint) error + type TestFeeHistoryConfig struct + func (b *TestFeeHistoryConfig) CacheTimeout() time.Duration + type TestGasEstimatorConfig struct + func (g *TestGasEstimatorConfig) BlockHistory() evmconfig.BlockHistory + func (g *TestGasEstimatorConfig) BumpMin() *assets.Wei + func (g *TestGasEstimatorConfig) BumpPercent() uint16 + func (g *TestGasEstimatorConfig) BumpThreshold() uint64 + func (g *TestGasEstimatorConfig) BumpTxDepth() uint32 + func (g *TestGasEstimatorConfig) DAOracle() evmconfig.DAOracle + func (g *TestGasEstimatorConfig) EIP1559DynamicFees() bool + func (g *TestGasEstimatorConfig) EstimateLimit() bool + func (g *TestGasEstimatorConfig) FeeCapDefault() *assets.Wei + func (g *TestGasEstimatorConfig) FeeHistory() evmconfig.FeeHistory + func (g *TestGasEstimatorConfig) LimitDefault() uint64 + func (g *TestGasEstimatorConfig) LimitJobType() evmconfig.LimitJobType + func (g *TestGasEstimatorConfig) LimitMax() uint64 + func (g *TestGasEstimatorConfig) LimitMultiplier() float32 + func (g *TestGasEstimatorConfig) LimitTransfer() uint64 + func (g *TestGasEstimatorConfig) Mode() string + func (g *TestGasEstimatorConfig) PriceDefault() *assets.Wei + func (g *TestGasEstimatorConfig) PriceMax() *assets.Wei + func (g *TestGasEstimatorConfig) PriceMaxKey(addr common.Address) *assets.Wei + func (g *TestGasEstimatorConfig) PriceMin() *assets.Wei + func (g *TestGasEstimatorConfig) SenderAddress() *types.EIP55Address + func (g *TestGasEstimatorConfig) TipCapDefault() *assets.Wei + func (g *TestGasEstimatorConfig) TipCapMin() *assets.Wei + type TestLimitJobTypeConfig struct + func (l *TestLimitJobTypeConfig) DR() *uint32 + func (l *TestLimitJobTypeConfig) FM() *uint32 + func (l *TestLimitJobTypeConfig) Keeper() *uint32 + func (l *TestLimitJobTypeConfig) OCR() *uint32 + func (l *TestLimitJobTypeConfig) OCR2() *uint32 + func (l *TestLimitJobTypeConfig) VRF() *uint32 + type TestListenerConfig struct + func (l *TestListenerConfig) FallbackPollInterval() time.Duration + type Tracker = txmgr.Tracker[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + func NewEvmTracker(txStore TxStore, keyStore KeyStore, chainID *big.Int, lggr logger.Logger) *Tracker + type TransactionClient = txmgrtypes.TransactionClient[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TransactionStore = txmgrtypes.TransactionStore[common.Address, *big.Int, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TransmitChecker = txmgr.TransmitChecker[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + var NoChecker TransmitChecker = noChecker{} + type TransmitCheckerFactory = txmgr.TransmitCheckerFactory[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TransmitCheckerSpec = txmgrtypes.TransmitCheckerSpec[common.Address] + type Tx = txmgrtypes.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TxAttempt = txmgrtypes.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TxAttemptBuilder = txmgrtypes.TxAttemptBuilder[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + type TxManager = txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + func NewTxm(ds sqlutil.DataSource, chainConfig ChainConfig, fCfg FeeConfig, ...) (txm TxManager, err error) + func NewTxmV2(ds sqlutil.DataSource, chainConfig ChainConfig, fCfg FeeConfig, ...) (TxManager, error) + type TxMeta = txmgrtypes.TxMeta[common.Address, common.Hash] + type TxRequest = txmgrtypes.TxRequest[common.Address, common.Hash] + type TxStore = txmgrtypes.TxStore[common.Address, *big.Int, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + type TxStoreWebApi interface + FindTxAttempt func(ctx context.Context, hash common.Hash) (*TxAttempt, error) + FindTxAttemptConfirmedByTxIDs func(ctx context.Context, ids []int64) ([]TxAttempt, error) + FindTxByHash func(ctx context.Context, hash common.Hash) (*Tx, error) + FindTxWithAttempts func(ctx context.Context, etxID int64) (etx Tx, err error) + FindTxsByStateAndFromAddresses func(ctx context.Context, addresses []common.Address, state txmgrtypes.TxState, ...) (txs []*Tx, err error) + Transactions func(ctx context.Context, offset, limit int) ([]Tx, int, error) + TransactionsWithAttempts func(ctx context.Context, offset, limit int) ([]Tx, int, error) + TxAttempts func(ctx context.Context, offset, limit int) ([]TxAttempt, int, error) + type Txm = txmgr.Txm[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + func NewEvmTxm(chainId *big.Int, cfg txmgrtypes.TransactionManagerChainConfig, ...) *Txm + type TxmClient = txmgrtypes.TxmClient[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee] + type VRFV1Checker struct + Callbacks func(opts *bind.CallOpts, reqID [32]byte) (v1.Callbacks, error) + Client evmclient.Client + func (v *VRFV1Checker) Check(ctx context.Context, l logger.SugaredLogger, tx Tx, _ TxAttempt) error + type VRFV2Checker struct + GetCommitment func(opts *bind.CallOpts, requestID *big.Int) ([32]byte, error) + HeadByNumber func(ctx context.Context, n *big.Int) (*evmtypes.Head, error) + RequestBlockNumber *big.Int + func (v *VRFV2Checker) Check(ctx context.Context, l logger.SugaredLogger, tx Tx, _ TxAttempt) error