Documentation
¶
Index ¶
- Constants
- Variables
- 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
- type ChainConfig
- type ChainReceipt
- type CheckerFactory
- type Confirmer
- type DatabaseConfig
- type DbEthTx
- type DbEthTxAttempt
- type DbReceipt
- type EvmBroadcasterConfig
- type EvmResenderConfig
- type EvmTxStore
- type EvmTxmConfig
- type EvmTxmFeeConfig
- type FeeConfig
- type Finalizer
- type FwdMgr
- type KeyStore
- type ListenerConfig
- type MockConfig
- type NonceTracker
- type NonceTrackerClient
- type NonceTrackerTxStore
- type NullTxManager
- type Reaper
- type Receipt
- type ReceiptPlus
- type Resender
- type SimulateChecker
- type StuckTxDetector
- type TestBlockHistoryConfig
- type TestDAOracleConfig
- type TestDatabaseConfig
- type TestEvmConfig
- 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
- type TestFeeHistoryConfig
- type TestGasEstimatorConfig
- 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
- type TestListenerConfig
- type Tracker
- type TransactionClient
- type TransactionStore
- type TransmitChecker
- type TransmitCheckerFactory
- type TransmitCheckerSpec
- type Tx
- type TxAttempt
- type TxAttemptBuilder
- type TxManager
- type TxMeta
- type TxRequest
- type TxStore
- type TxStoreWebApi
- type Txm
- type TxmClient
- type VRFV1Checker
- type VRFV2Checker
Constants ¶
const ( // TransmitCheckerTypeSimulate is a checker that simulates the transaction before executing on // chain. TransmitCheckerTypeSimulate = txmgrtypes.TransmitCheckerType("simulate") // TransmitCheckerTypeVRFV1 is a checker that will not submit VRF V1 fulfillment requests that // have already been fulfilled. This could happen if the request was fulfilled by another node. TransmitCheckerTypeVRFV1 = txmgrtypes.TransmitCheckerType("vrf_v1") // TransmitCheckerTypeVRFV2 is a checker that will not submit VRF V2 fulfillment requests that // have already been fulfilled. This could happen if the request was fulfilled by another node. TransmitCheckerTypeVRFV2 = txmgrtypes.TransmitCheckerType("vrf_v2") // TransmitCheckerTypeVRFV2Plus is a checker that will not submit VRF V2 plus fulfillment requests that // have already been fulfilled. This could happen if the request was fulfilled by another node. TransmitCheckerTypeVRFV2Plus = txmgrtypes.TransmitCheckerType("vrf_v2plus") )
Variables ¶
var ( // ErrCouldNotGetReceipt is the error string we save if we reach our LatestFinalizedBlockNum for a confirmed transaction // without ever getting a receipt. This most likely happened because an external wallet used the account for this nonce ErrCouldNotGetReceipt = "could not get receipt" )
var (
ErrKeyNotUpdated = errors.New("evmTxStore: Key not updated")
)
Functions ¶
func DbEthTxAttemptStateToTxAttemptState ¶
func DbEthTxAttemptStateToTxAttemptState(state string) txmgrtypes.TxAttemptState
func DbReceiptToEvmReceipt ¶
func GetGethSignedTx ¶
func GetGethSignedTx(signedRawTx []byte) (*types.Transaction, error)
GetGethSignedTx decodes the SignedRawTx into a types.Transaction struct
func MakeTestConfigs ¶
func MakeTestConfigs(tb testing.TB) (*MockConfig, *TestDatabaseConfig, *TestEvmConfig)
func NewEVMTxmMetrics ¶
func NewEvmFinalizer ¶
func NewEvmTxAttemptBuilder ¶
func NewEvmTxmClient ¶
func NewEvmTxmClient(c client.Client, clientErrors config.ClientErrors) *evmTxmClient
func NewEvmTxmConfig ¶
func NewEvmTxmConfig(c ChainConfig) *evmTxmConfig
func NewEvmTxmFeeConfig ¶
func NewEvmTxmFeeConfig(c FeeConfig) *evmTxmFeeConfig
func NewNonceTracker ¶
func NewNonceTracker(lggr logger.Logger, txStore NonceTrackerTxStore, client NonceTrackerClient) *nonceTracker
func NewStuckTxDetector ¶
func NewTxStore ¶
func NewTxStore( db sqlutil.DataSource, lggr logger.Logger, ) *evmTxStore
Types ¶
type Broadcaster ¶
type Broadcaster = txmgr.Broadcaster[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
func NewEvmBroadcaster ¶
func NewEvmBroadcaster( txStore TransactionStore, client TransactionClient, chainConfig txmgrtypes.BroadcasterChainConfig, feeConfig txmgrtypes.BroadcasterFeeConfig, txConfig txmgrtypes.BroadcasterTransactionsConfig, listenerConfig txmgrtypes.BroadcasterListenerConfig, keystore KeyStore, txAttemptBuilder TxAttemptBuilder, logger logger.Logger, checkerFactory TransmitCheckerFactory, autoSyncNonce bool, chainType chaintype.ChainType, metrics metrics.GenericTXMMetrics, ) *Broadcaster
NewEvmBroadcaster returns a new concrete EvmBroadcaster
type ChainConfig ¶
type ChainConfig interface {
ChainType() chaintype.ChainType
FinalityDepth() uint32
FinalityTagEnabled() bool
NonceAutoSync() bool
RPCDefaultBatchSize() uint32
}
ChainConfig encompasses config used by txmgr package Unless otherwise specified, these should support changing at runtime
type ChainReceipt ¶
type ChainReceipt = txmgrtypes.ChainReceipt[common.Hash, common.Hash]
Type aliases for EVM
type CheckerFactory ¶
CheckerFactory is a real implementation of TransmitCheckerFactory.
func (*CheckerFactory) BuildChecker ¶
func (c *CheckerFactory) BuildChecker(spec TransmitCheckerSpec) (TransmitChecker, error)
BuildChecker satisfies the TransmitCheckerFactory interface.
type Confirmer ¶
type Confirmer = txmgr.Confirmer[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
func NewEvmConfirmer ¶
func NewEvmConfirmer( txStore TxStore, client TxmClient, feeConfig txmgrtypes.ConfirmerFeeConfig, txConfig txmgrtypes.ConfirmerTransactionsConfig, dbConfig txmgrtypes.ConfirmerDatabaseConfig, keystore KeyStore, txAttemptBuilder TxAttemptBuilder, lggr logger.Logger, stuckTxDetector StuckTxDetector, metrics metrics.GenericTXMMetrics, ) *Confirmer
NewEvmConfirmer instantiates a new EVM confirmer
type DatabaseConfig ¶
type DbEthTx ¶
type DbEthTx struct {
ID int64
IdempotencyKey *string
Nonce *int64
FromAddress common.Address
ToAddress common.Address
EncodedPayload []byte
Value assets.Eth
// GasLimit on the EthTx is always the conceptual gas limit, which is not
// necessarily the same as the on-chain encoded value (i.e. Optimism)
GasLimit uint64
Error nullv4.String
// BroadcastAt is updated every time an attempt for this eth_tx is re-sent
// In almost all cases it will be within a second or so of the actual send time.
BroadcastAt *time.Time
// InitialBroadcastAt is recorded once, the first ever time this eth_tx is sent
CreatedAt time.Time
State txmgrtypes.TxState
// Marshalled EvmTxMeta
// Used for additional context around transactions which you want to log
// at send time.
Meta *sqlutil.JSON
Subject uuid.NullUUID
PipelineTaskRunID uuid.NullUUID
MinConfirmations null.Uint32
EVMChainID ubig.Big
// TransmitChecker defines the check that should be performed before a transaction is submitted on
// chain.
TransmitChecker *sqlutil.JSON
InitialBroadcastAt *time.Time
// Marks tx requiring callback
SignalCallback bool
// Marks tx callback as signaled
CallbackCompleted bool
}
Directly maps to columns of database table "evm.txes". This is exported, as tests and other external code still directly reads DB using this schema.
type DbEthTxAttempt ¶
type DbEthTxAttempt struct {
ID int64
EthTxID int64
GasPrice *assets.Wei
SignedRawTx []byte
Hash common.Hash
BroadcastBeforeBlockNum *int64
State string
CreatedAt time.Time
ChainSpecificGasLimit uint64
TxType int
GasTipCap *assets.Wei
GasFeeCap *assets.Wei
IsPurgeAttempt bool
}
Directly maps to columns of database table "evm.tx_attempts". This is exported, as tests and other external code still directly reads DB using this schema.
func (*DbEthTxAttempt) FromTxAttempt ¶
func (db *DbEthTxAttempt) FromTxAttempt(attempt *TxAttempt)
func (DbEthTxAttempt) ToTxAttempt ¶
func (db DbEthTxAttempt) ToTxAttempt(attempt *TxAttempt)
type DbReceipt ¶
type DbReceipt struct {
ID int64
TxHash common.Hash
BlockHash common.Hash
BlockNumber int64
TransactionIndex uint
Receipt types.Receipt
CreatedAt time.Time
}
Directly maps to columns of database table "evm.receipts". Do not modify type unless you intend to modify the database schema
func DbReceiptFromEvmReceipt ¶
type EvmBroadcasterConfig ¶
type EvmBroadcasterConfig txmgrtypes.BroadcasterChainConfig
type EvmResenderConfig ¶
type EvmResenderConfig txmgrtypes.ResenderChainConfig
type EvmTxStore ¶
type EvmTxStore interface {
// redeclare TxStore for mockery
txmgrtypes.TxStore[common.Address, *big.Int, common.Hash, common.Hash, *types.Receipt, types.Nonce, gas.EvmFee]
TxStoreWebApi
// methods used solely in EVM components
DeleteReceiptByTxHash(ctx context.Context, txHash common.Hash) error
FindAttemptsRequiringReceiptFetch(ctx context.Context, chainID *big.Int) (hashes []TxAttempt, err error)
FindConfirmedTxesReceipts(ctx context.Context, finalizedBlockNum int64, chainID *big.Int) (receipts []*types.Receipt, err error)
FindTxesPendingCallback(ctx context.Context, latest, finalized int64, chainID *big.Int) (receiptsPlus []ReceiptPlus, err error)
FindTxesByIDs(ctx context.Context, etxIDs []int64, chainID *big.Int) (etxs []*Tx, err error)
SaveFetchedReceipts(ctx context.Context, r []*types.Receipt) (err error)
UpdateTxStatesToFinalizedUsingTxHashes(ctx context.Context, txHashes []common.Hash, chainID *big.Int) error
}
EvmTxStore combines the txmgr tx store interface and the interface needed for the API to read from the tx DB
type EvmTxmConfig ¶
type EvmTxmConfig txmgrtypes.TransactionManagerChainConfig
type EvmTxmFeeConfig ¶
type EvmTxmFeeConfig txmgrtypes.TransactionManagerFeeConfig
type ListenerConfig ¶
type MockConfig ¶
type MockConfig struct {
EvmConfig *TestEvmConfig
// contains filtered or unexported fields
}
func (*MockConfig) ChainType ¶
func (c *MockConfig) ChainType() chaintype.ChainType
func (*MockConfig) EVM ¶
func (c *MockConfig) EVM() evmconfig.EVM
func (*MockConfig) FinalityDepth ¶
func (c *MockConfig) FinalityDepth() uint32
func (*MockConfig) FinalityTagEnabled ¶
func (c *MockConfig) FinalityTagEnabled() bool
func (*MockConfig) NonceAutoSync ¶
func (c *MockConfig) NonceAutoSync() bool
func (*MockConfig) SetFinalityDepth ¶
func (c *MockConfig) SetFinalityDepth(fd uint32)
type NonceTracker ¶
type NonceTracker = txmgrtypes.SequenceTracker[common.Address, evmtypes.Nonce]
Type aliases for EVM
type NonceTrackerClient ¶
type NonceTrackerTxStore ¶
type NullTxManager ¶
type NullTxManager = txmgr.NullTxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type Reaper ¶
Type aliases for EVM
func NewEvmReaper ¶
func NewEvmReaper(lggr logger.Logger, store txmgrtypes.TxHistoryReaper[*big.Int], txConfig txmgrtypes.ReaperTransactionsConfig, chainID *big.Int) *Reaper
NewEvmReaper instantiates a new EVM-specific reaper object
type Receipt ¶
type Receipt = DbReceipt // DbReceipt is the exported DB table model for receipts
Type aliases for EVM
type ReceiptPlus ¶
type ReceiptPlus = txmgrtypes.ReceiptPlus[*evmtypes.Receipt]
Type aliases for EVM
type Resender ¶
type Resender = txmgr.Resender[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
func NewEvmResender ¶
func NewEvmResender( lggr logger.Logger, txStore TransactionStore, client TransactionClient, tracker *Tracker, ks KeyStore, pollInterval time.Duration, config EvmResenderConfig, txConfig txmgrtypes.ResenderTransactionsConfig, ) *Resender
NewEvmResender creates a new concrete EvmResender
type SimulateChecker ¶
SimulateChecker simulates transactions, producing an error if they revert on chain.
func (*SimulateChecker) Check ¶
func (s *SimulateChecker) Check( ctx context.Context, l logger.SugaredLogger, tx Tx, a TxAttempt, ) error
Check satisfies the TransmitChecker interface.
type StuckTxDetector ¶
type StuckTxDetector = txmgrtypes.StuckTxDetector[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TestBlockHistoryConfig ¶
type TestBlockHistoryConfig struct {
evmconfig.BlockHistory
}
func (*TestBlockHistoryConfig) BatchSize ¶
func (b *TestBlockHistoryConfig) BatchSize() uint32
func (*TestBlockHistoryConfig) BlockDelay ¶
func (b *TestBlockHistoryConfig) BlockDelay() uint16
func (*TestBlockHistoryConfig) BlockHistorySize ¶
func (b *TestBlockHistoryConfig) BlockHistorySize() uint16
func (*TestBlockHistoryConfig) EIP1559FeeCapBufferBlocks ¶
func (b *TestBlockHistoryConfig) EIP1559FeeCapBufferBlocks() uint16
func (*TestBlockHistoryConfig) TransactionPercentile ¶
func (b *TestBlockHistoryConfig) TransactionPercentile() uint16
type TestDAOracleConfig ¶
func (*TestDAOracleConfig) CustomGasPriceCalldata ¶
func (d *TestDAOracleConfig) CustomGasPriceCalldata() *string
func (*TestDAOracleConfig) OracleAddress ¶
func (d *TestDAOracleConfig) OracleAddress() *types.EIP55Address
func (*TestDAOracleConfig) OracleType ¶
func (d *TestDAOracleConfig) OracleType() *toml.DAOracleType
type TestDatabaseConfig ¶
type TestDatabaseConfig struct {
DatabaseConfig
// contains filtered or unexported fields
}
func (*TestDatabaseConfig) DefaultQueryTimeout ¶
func (d *TestDatabaseConfig) DefaultQueryTimeout() time.Duration
func (*TestDatabaseConfig) Listener ¶
func (d *TestDatabaseConfig) Listener() ListenerConfig
func (*TestDatabaseConfig) LogSQL ¶
func (d *TestDatabaseConfig) LogSQL() bool
type TestEvmConfig ¶
type TestEvmConfig struct {
evmconfig.EVM
MaxInFlight uint32
ReaperInterval time.Duration
ReaperThreshold time.Duration
ResendAfterThreshold time.Duration
BumpThreshold uint64
MaxQueued uint64
Enabled bool
Threshold uint32
MinAttempts uint32
DetectionApiUrl *url.URL
RpcDefaultBatchSize uint32
}
func (*TestEvmConfig) ChainType ¶
func (e *TestEvmConfig) ChainType() chaintype.ChainType
func (*TestEvmConfig) FinalityDepth ¶
func (e *TestEvmConfig) FinalityDepth() uint32
func (*TestEvmConfig) GasEstimator ¶
func (e *TestEvmConfig) GasEstimator() evmconfig.GasEstimator
func (*TestEvmConfig) NonceAutoSync ¶
func (e *TestEvmConfig) NonceAutoSync() bool
func (*TestEvmConfig) RPCDefaultBatchSize ¶
func (e *TestEvmConfig) RPCDefaultBatchSize() uint32
func (*TestEvmConfig) Transactions ¶
func (e *TestEvmConfig) Transactions() evmconfig.Transactions
type TestEvmTxStore ¶
type TestEvmTxStore interface {
EvmTxStore
// methods only used for testing purposes
InsertReceipt(ctx context.Context, receipt *types.Receipt) (int64, error)
InsertTx(ctx context.Context, etx *Tx) error
FindTxAttemptsByTxIDs(ctx context.Context, ids []int64) ([]TxAttempt, error)
InsertTxAttempt(ctx context.Context, attempt *TxAttempt) error
LoadTxesAttempts(ctx context.Context, etxs []*Tx) error
GetFatalTransactions(ctx context.Context) (txes []*Tx, err error)
GetAllTxes(ctx context.Context) (txes []*Tx, err error)
GetAllTxAttempts(ctx context.Context) (attempts []TxAttempt, err error)
CountTxesByStateAndSubject(ctx context.Context, state txmgrtypes.TxState, subject uuid.UUID) (count int, err error)
FindTxesByFromAddressAndState(ctx context.Context, fromAddress common.Address, state string) (txes []*Tx, err error)
UpdateTxAttemptBroadcastBeforeBlockNum(ctx context.Context, id int64, blockNum uint) error
}
type TestFeeHistoryConfig ¶
type TestFeeHistoryConfig struct {
evmconfig.FeeHistory
}
func (*TestFeeHistoryConfig) CacheTimeout ¶
func (b *TestFeeHistoryConfig) CacheTimeout() time.Duration
type TestGasEstimatorConfig ¶
type TestGasEstimatorConfig struct {
// contains filtered or unexported fields
}
func (*TestGasEstimatorConfig) BlockHistory ¶
func (g *TestGasEstimatorConfig) BlockHistory() evmconfig.BlockHistory
func (*TestGasEstimatorConfig) BumpMin ¶
func (g *TestGasEstimatorConfig) BumpMin() *assets.Wei
func (*TestGasEstimatorConfig) BumpPercent ¶
func (g *TestGasEstimatorConfig) BumpPercent() uint16
func (*TestGasEstimatorConfig) BumpThreshold ¶
func (g *TestGasEstimatorConfig) BumpThreshold() uint64
func (*TestGasEstimatorConfig) BumpTxDepth ¶
func (g *TestGasEstimatorConfig) BumpTxDepth() uint32
func (*TestGasEstimatorConfig) DAOracle ¶
func (g *TestGasEstimatorConfig) DAOracle() evmconfig.DAOracle
func (*TestGasEstimatorConfig) EIP1559DynamicFees ¶
func (g *TestGasEstimatorConfig) EIP1559DynamicFees() bool
func (*TestGasEstimatorConfig) EstimateLimit ¶
func (g *TestGasEstimatorConfig) EstimateLimit() bool
func (*TestGasEstimatorConfig) FeeCapDefault ¶
func (g *TestGasEstimatorConfig) FeeCapDefault() *assets.Wei
func (*TestGasEstimatorConfig) FeeHistory ¶
func (g *TestGasEstimatorConfig) FeeHistory() evmconfig.FeeHistory
func (*TestGasEstimatorConfig) LimitDefault ¶
func (g *TestGasEstimatorConfig) LimitDefault() uint64
func (*TestGasEstimatorConfig) LimitJobType ¶
func (g *TestGasEstimatorConfig) LimitJobType() evmconfig.LimitJobType
func (*TestGasEstimatorConfig) LimitMax ¶
func (g *TestGasEstimatorConfig) LimitMax() uint64
func (*TestGasEstimatorConfig) LimitMultiplier ¶
func (g *TestGasEstimatorConfig) LimitMultiplier() float32
func (*TestGasEstimatorConfig) LimitTransfer ¶
func (g *TestGasEstimatorConfig) LimitTransfer() uint64
func (*TestGasEstimatorConfig) Mode ¶
func (g *TestGasEstimatorConfig) Mode() string
func (*TestGasEstimatorConfig) PriceDefault ¶
func (g *TestGasEstimatorConfig) PriceDefault() *assets.Wei
func (*TestGasEstimatorConfig) PriceMax ¶
func (g *TestGasEstimatorConfig) PriceMax() *assets.Wei
func (*TestGasEstimatorConfig) PriceMaxKey ¶
func (g *TestGasEstimatorConfig) PriceMaxKey(addr common.Address) *assets.Wei
func (*TestGasEstimatorConfig) PriceMin ¶
func (g *TestGasEstimatorConfig) PriceMin() *assets.Wei
func (*TestGasEstimatorConfig) SenderAddress ¶
func (g *TestGasEstimatorConfig) SenderAddress() *types.EIP55Address
func (*TestGasEstimatorConfig) TipCapDefault ¶
func (g *TestGasEstimatorConfig) TipCapDefault() *assets.Wei
func (*TestGasEstimatorConfig) TipCapMin ¶
func (g *TestGasEstimatorConfig) TipCapMin() *assets.Wei
type TestLimitJobTypeConfig ¶
type TestLimitJobTypeConfig struct {
}
func (*TestLimitJobTypeConfig) DR ¶
func (l *TestLimitJobTypeConfig) DR() *uint32
func (*TestLimitJobTypeConfig) FM ¶
func (l *TestLimitJobTypeConfig) FM() *uint32
func (*TestLimitJobTypeConfig) Keeper ¶
func (l *TestLimitJobTypeConfig) Keeper() *uint32
func (*TestLimitJobTypeConfig) OCR ¶
func (l *TestLimitJobTypeConfig) OCR() *uint32
func (*TestLimitJobTypeConfig) OCR2 ¶
func (l *TestLimitJobTypeConfig) OCR2() *uint32
func (*TestLimitJobTypeConfig) VRF ¶
func (l *TestLimitJobTypeConfig) VRF() *uint32
type TestListenerConfig ¶
type TestListenerConfig struct {
ListenerConfig
}
func (*TestListenerConfig) FallbackPollInterval ¶
func (l *TestListenerConfig) FallbackPollInterval() time.Duration
type Tracker ¶
type Tracker = txmgr.Tracker[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TransactionClient ¶
type TransactionClient = txmgrtypes.TransactionClient[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TransactionStore ¶
type TransactionStore = txmgrtypes.TransactionStore[common.Address, *big.Int, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TransmitChecker ¶
type TransmitChecker = txmgr.TransmitChecker[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
var ( // NoChecker is a TransmitChecker that always determines a transaction should be submitted. NoChecker TransmitChecker = noChecker{} )
type TransmitCheckerFactory ¶
type TransmitCheckerFactory = txmgr.TransmitCheckerFactory[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TransmitCheckerSpec ¶
type TransmitCheckerSpec = txmgrtypes.TransmitCheckerSpec[common.Address]
type Tx ¶
type Tx = txmgrtypes.Tx[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TxAttempt ¶
type TxAttempt = txmgrtypes.TxAttempt[*big.Int, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TxAttemptBuilder ¶
type TxAttemptBuilder = txmgrtypes.TxAttemptBuilder[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TxManager ¶
type TxManager = txmgr.TxManager[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
func NewTxm ¶
func NewTxm( ds sqlutil.DataSource, chainConfig ChainConfig, fCfg FeeConfig, txConfig config.Transactions, clientErrors config.ClientErrors, dbConfig DatabaseConfig, listenerConfig ListenerConfig, client client.Client, lggr logger.Logger, logPoller logpoller.LogPoller, keyStore keys.ChainStore, estimator gas.EvmFeeEstimator, headTracker latestAndFinalizedBlockHeadTracker, txmv2wrapper TxManager, ) (txm TxManager, err error, )
NewTxm constructs the necessary dependencies for the EvmTxm (broadcaster, confirmer, etc) and returns a new EvmTxManager
func NewTxmV2 ¶
func NewTxmV2( ds sqlutil.DataSource, chainConfig ChainConfig, fCfg FeeConfig, txConfig config.Transactions, txmV2Config config.TransactionManagerV2, client client.Client, lggr logger.Logger, logPoller logpoller.LogPoller, keyStore keys.ChainStore, estimator gas.EvmFeeEstimator, ) (TxManager, error)
type TxStore ¶
type TxStore = txmgrtypes.TxStore[common.Address, *big.Int, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type TxStoreWebApi ¶
type TxStoreWebApi interface {
FindTxAttemptConfirmedByTxIDs(ctx context.Context, ids []int64) ([]TxAttempt, error)
FindTxByHash(ctx context.Context, hash common.Hash) (*Tx, error)
Transactions(ctx context.Context, offset, limit int) ([]Tx, int, error)
TxAttempts(ctx context.Context, offset, limit int) ([]TxAttempt, int, error)
TransactionsWithAttempts(ctx context.Context, offset, limit int) ([]Tx, int, error)
FindTxAttempt(ctx context.Context, hash common.Hash) (*TxAttempt, error)
FindTxWithAttempts(ctx context.Context, etxID int64) (etx Tx, err error)
FindTxsByStateAndFromAddresses(ctx context.Context, addresses []common.Address, state txmgrtypes.TxState, chainID *big.Int) (txs []*Tx, err error)
}
TxStoreWebApi encapsulates the methods that are not used by the txmgr and only used by the various web controllers, readers, or evm specific components
type Txm ¶
type Txm = txmgr.Txm[*big.Int, *evmtypes.Head, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
func NewEvmTxm ¶
func NewEvmTxm( chainId *big.Int, cfg txmgrtypes.TransactionManagerChainConfig, txCfg txmgrtypes.TransactionManagerTransactionsConfig, keyStore KeyStore, lggr logger.Logger, checkerFactory TransmitCheckerFactory, fwdMgr FwdMgr, txAttemptBuilder TxAttemptBuilder, txStore TxStore, broadcaster *Broadcaster, confirmer *Confirmer, resender *Resender, tracker *Tracker, finalizer Finalizer, txmv2wrapper TxManager, ) *Txm
NewEvmTxm creates a new concrete EvmTxm
type TxmClient ¶
type TxmClient = txmgrtypes.TxmClient[*big.Int, common.Address, common.Hash, common.Hash, *evmtypes.Receipt, evmtypes.Nonce, gas.EvmFee]
Type aliases for EVM
type VRFV1Checker ¶
type VRFV1Checker struct {
// Callbacks checks whether a VRF V1 request has already been fulfilled on the VRFCoordinator
// Solidity contract
Callbacks func(opts *bind.CallOpts, reqID [32]byte) (v1.Callbacks, error)
Client evmclient.Client
}
VRFV1Checker is an implementation of TransmitChecker that checks whether a VRF V1 fulfillment has already been fulfilled.
func (*VRFV1Checker) Check ¶
func (v *VRFV1Checker) Check( ctx context.Context, l logger.SugaredLogger, tx Tx, _ TxAttempt, ) error
Check satisfies the TransmitChecker interface.
type VRFV2Checker ¶
type VRFV2Checker struct {
// GetCommitment checks whether a VRF V2 request has been fulfilled on the VRFCoordinatorV2
// Solidity contract.
GetCommitment func(opts *bind.CallOpts, requestID *big.Int) ([32]byte, error)
// HeadByNumber fetches the head given the number. If nil is provided,
// the latest header is fetched.
HeadByNumber func(ctx context.Context, n *big.Int) (*evmtypes.Head, error)
// RequestBlockNumber is the block number of the VRFV2 request.
RequestBlockNumber *big.Int
}
VRFV2Checker is an implementation of TransmitChecker that checks whether a VRF V2 fulfillment has already been fulfilled.
func (*VRFV2Checker) Check ¶
func (v *VRFV2Checker) Check( ctx context.Context, l logger.SugaredLogger, tx Tx, _ TxAttempt, ) error
Check satisfies the TransmitChecker interface.