Versions in this module Expand all Collapse all v2 v2.4.0 Nov 13, 2024 v2.3.0 Nov 13, 2024 v2.1.1 Nov 13, 2024 v2.1.0 Nov 11, 2024 Changes in this version + const TransmitCheckerTypeSimulate + const TransmitCheckerTypeVRFV1 + const TransmitCheckerTypeVRFV2 + const TransmitCheckerTypeVRFV2Plus + var ErrCouldNotGetReceipt = "could not get receipt" + var ErrInvalidQOpt = errors.New("evmTxStore: Invalid QOpt") + 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 DbReceiptFromEvmReceipt(evmReceipt *evmtypes.Receipt) dbReceipt + func DbReceiptToEvmReceipt(receipt *dbReceipt) *evmtypes.Receipt + func GetGethSignedTx(signedRawTx []byte) (*types.Transaction, error) + func MakeTestConfigs(t *testing.T) (*MockConfig, *TestDatabaseConfig, *TestEvmConfig) + func NewEvmTxAttemptBuilder(chainID big.Int, feeConfig evmTxAttemptBuilderFeeConfig, ...) *evmTxAttemptBuilder + func NewEvmTxmClient(c client.Client) *evmTxmClient + func NewEvmTxmConfig(c ChainConfig) *evmTxmConfig + func NewEvmTxmFeeConfig(c FeeConfig) *evmTxmFeeConfig + func NewTxStore(db *sqlx.DB, lggr logger.Logger, cfg pg.QConfig) *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() config.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, chainConfig txmgrtypes.ConfirmerChainConfig, ...) *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 uint32 + 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 uint32 + CreatedAt time.Time + EthTxID int64 + GasFeeCap *assets.Wei + GasPrice *assets.Wei + GasTipCap *assets.Wei + Hash common.Hash + ID int64 + SignedRawTx []byte + State string + TxType int + func (db *DbEthTxAttempt) FromTxAttempt(attempt *TxAttempt) + func (db DbEthTxAttempt) ToTxAttempt(attempt *TxAttempt) + type EvmBroadcasterConfig txmgrtypes.BroadcasterChainConfig + type EvmConfirmerConfig txmgrtypes.ConfirmerChainConfig + type EvmReaperConfig txmgrtypes.ReaperChainConfig + type EvmResenderConfig txmgrtypes.ResenderChainConfig + type EvmTxStore interface + 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() uint32 + PriceDefault func() *assets.Wei + PriceMax func() *assets.Wei + PriceMaxKey func(gethcommon.Address) *assets.Wei + PriceMin func() *assets.Wei + TipCapMin func() *assets.Wei + type FwdMgr = txmgrtypes.ForwarderManager[common.Address] + type KeyStore = txmgrtypes.KeyStore[common.Address, *big.Int, evmtypes.Nonce] + type ListenerConfig interface + FallbackPollInterval func() time.Duration + type MockConfig struct + EvmConfig *TestEvmConfig + RpcDefaultBatchSize uint32 + func (c *MockConfig) ChainType() commonconfig.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) RPCDefaultBatchSize() uint32 + func (c *MockConfig) SetFinalityDepth(fd uint32) + type NonceSyncer = txmgr.SequenceSyncer[common.Address, common.Hash, common.Hash, evmtypes.Nonce] + func NewNonceSyncer(txStore EvmTxStore, lggr logger.Logger, ethClient evmclient.Client) NonceSyncer + 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 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 TestDatabaseConfig struct + func (d *TestDatabaseConfig) DefaultQueryTimeout() time.Duration + func (d *TestDatabaseConfig) Listener() config.Listener + func (d *TestDatabaseConfig) LogSQL() bool + type TestEvmConfig struct + BumpThreshold uint64 + MaxInFlight uint32 + MaxQueued uint64 + ReaperInterval time.Duration + ReaperThreshold time.Duration + ResendAfterThreshold time.Duration + func (e *TestEvmConfig) FinalityDepth() uint32 + func (e *TestEvmConfig) GasEstimator() evmconfig.GasEstimator + func (e *TestEvmConfig) NonceAutoSync() bool + 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(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(receipt *evmtypes.Receipt) (int64, error) + InsertTx func(etx *Tx) error + InsertTxAttempt func(attempt *TxAttempt) error + LoadTxesAttempts func(etxs []*Tx, qopts ...pg.QOpt) error + UpdateTxAttemptBroadcastBeforeBlockNum func(ctx context.Context, id int64, blockNum uint) error + 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) EIP1559DynamicFees() bool + func (g *TestGasEstimatorConfig) FeeCapDefault() *assets.Wei + func (g *TestGasEstimatorConfig) LimitDefault() uint32 + func (g *TestGasEstimatorConfig) LimitJobType() evmconfig.LimitJobType + func (g *TestGasEstimatorConfig) LimitMax() uint32 + func (g *TestGasEstimatorConfig) LimitMultiplier() float32 + func (g *TestGasEstimatorConfig) LimitTransfer() uint32 + 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) 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 TxAttemptSigner interface + SignTx func(fromAddress ADDR, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) + type TxManager = txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee] + func NewTxm(db *sqlx.DB, chainConfig ChainConfig, fCfg FeeConfig, ...) (txm TxManager, err 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(hash common.Hash) (*TxAttempt, error) + FindTxAttemptConfirmedByTxIDs func(ids []int64) ([]TxAttempt, error) + FindTxByHash func(hash common.Hash) (*Tx, error) + FindTxWithAttempts func(etxID int64) (etx Tx, err error) + Transactions func(offset, limit int) ([]Tx, int, error) + TransactionsWithAttempts func(offset, limit int) ([]Tx, int, error) + TxAttempts func(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) (*types.Head, error) + RequestBlockNumber *big.Int + func (v *VRFV2Checker) Check(ctx context.Context, l logger.SugaredLogger, tx Tx, _ TxAttempt) error