Documentation
¶
Index ¶
- Constants
- func NewAttemptBuilder(priceMaxKey func(common.Address) *assets.Wei, estimator gas.EvmFeeEstimator, ...) *attemptBuilder
- func NewStuckTxDetector(lggr logger.Logger, chaintype chaintype.ChainType, ...) *stuckTxDetector
- func NewTxmMetrics(chainID *big.Int) (*txmMetrics, error)
- type APIResponse
- type AttemptBuilder
- type Client
- type Config
- type DummyKeystore
- func (k *DummyKeystore) Add(privateKeyString string) error
- func (k *DummyKeystore) EnabledAddresses(_ context.Context) (addresses []common.Address, err error)
- func (k *DummyKeystore) SignMessage(ctx context.Context, address common.Address, data []byte) ([]byte, error)
- func (k *DummyKeystore) SignTx(_ context.Context, fromAddress common.Address, tx *types.Transaction) (*types.Transaction, error)
- type ErrorHandler
- type Keystore
- type NotEnabledError
- type Orchestrator
- func (o *Orchestrator[BLOCK_HASH, HEAD]) CalculateFee(feeParts txmgr.FeeParts) *big.Int
- func (o *Orchestrator[BLOCK_HASH, HEAD]) Close() (merr error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) CountTransactionsByState(ctx context.Context, state txmgrtypes.TxState) (uint32, error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) CreateTransaction(ctx context.Context, request txmgrtypes.TxRequest[common.Address, common.Hash]) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindEarliestUnconfirmedBroadcastTime(ctx context.Context) (time nullv4.Time, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindEarliestUnconfirmedTxAttemptBlock(ctx context.Context) (time nullv4.Int, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindTxesByMetaFieldAndStates(ctx context.Context, metaField string, metaValue string, ...) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithAttemptsAndReceiptsByIdsAndState(ctx context.Context, ids []int64, states []txmgrtypes.TxState, ...) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithMetaFieldByReceiptBlockNum(ctx context.Context, metaField string, blockNum int64, chainID *big.Int) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithMetaFieldByStates(ctx context.Context, metaField string, states []txmgrtypes.TxState, ...) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) GetForwarderForEOA(ctx context.Context, eoa common.Address) (forwarder common.Address, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) GetForwarderForEOAOCR2Feeds(ctx context.Context, eoa, ocr2AggregatorID common.Address) (forwarder common.Address, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionFee(ctx context.Context, transactionID string) (fee *evm.TransactionFee, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionReceipt(ctx context.Context, transactionID string) (receipt *txmgrtypes.ChainReceipt[BLOCK_HASH, BLOCK_HASH], err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionStatus(ctx context.Context, transactionID string) (status commontypes.TransactionStatus, err error)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) HealthReport() map[string]error
- func (o *Orchestrator[BLOCK_HASH, HEAD]) Name() string
- func (o *Orchestrator[BLOCK_HASH, HEAD]) OnNewLongestChain(ctx context.Context, head HEAD)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) RegisterResumeCallback(fn txmgr.ResumeCallback)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) Reset(addr common.Address, abandon bool) error
- func (o *Orchestrator[BLOCK_HASH, HEAD]) SendNativeToken(ctx context.Context, chainID *big.Int, from, to common.Address, value big.Int, ...) (...)
- func (o *Orchestrator[BLOCK_HASH, HEAD]) Start(ctx context.Context) error
- func (o *Orchestrator[BLOCK_HASH, HEAD]) Trigger(addr common.Address)
- type OrchestratorAttemptBuilder
- type OrchestratorTxStore
- type StuckTxDetector
- type StuckTxDetectorConfig
- type TxStore
- type Txm
- func (t *Txm) Abandon(address common.Address) error
- func (t *Txm) Close() error
- func (t *Txm) CreateTransaction(ctx context.Context, txRequest *types.TxRequest) (tx *types.Transaction, err error)
- func (t *Txm) HealthReport() map[string]error
- func (t *Txm) Start(ctx context.Context) error
- func (t *Txm) Trigger(address common.Address)
Constants ¶
View Source
const ( APIStatusPending = "PENDING" APIStatusIncluded = "INCLUDED" APIStatusFailed = "FAILED" APIStatusCancelled = "CANCELLED" APIStatusUnknown = "UNKNOWN" )
Variables ¶
This section is empty.
Functions ¶
func NewAttemptBuilder ¶
func NewStuckTxDetector ¶
func NewStuckTxDetector(lggr logger.Logger, chaintype chaintype.ChainType, config StuckTxDetectorConfig) *stuckTxDetector
func NewTxmMetrics ¶
Types ¶
type APIResponse ¶
type AttemptBuilder ¶
type DummyKeystore ¶
type DummyKeystore struct {
// contains filtered or unexported fields
}
func NewKeystore ¶
func NewKeystore(chainID *big.Int) *DummyKeystore
func (*DummyKeystore) Add ¶
func (k *DummyKeystore) Add(privateKeyString string) error
func (*DummyKeystore) EnabledAddresses ¶
func (*DummyKeystore) SignMessage ¶
func (*DummyKeystore) SignTx ¶
func (k *DummyKeystore) SignTx(_ context.Context, fromAddress common.Address, tx *types.Transaction) (*types.Transaction, error)
type ErrorHandler ¶
type NotEnabledError ¶
type NotEnabledError = txmgr.NotEnabledError[common.Address]
type Orchestrator ¶
type Orchestrator[ BLOCK_HASH chains.Hashable, HEAD chains.Head[BLOCK_HASH], ] struct { services.StateMachine // contains filtered or unexported fields }
Generics are necessary to keep TXMv2 backwards compatible
func NewTxmOrchestrator ¶
func NewTxmOrchestrator[BLOCK_HASH chains.Hashable, HEAD chains.Head[BLOCK_HASH]]( lggr logger.Logger, chainID *big.Int, txm *Txm, txStore OrchestratorTxStore, fwdMgr *forwarders.FwdMgr, keystore keys.Addresses, attemptBuilder OrchestratorAttemptBuilder[BLOCK_HASH, HEAD], ) *Orchestrator[BLOCK_HASH, HEAD]
func (*Orchestrator[BLOCK_HASH, HEAD]) CalculateFee ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) CalculateFee(feeParts txmgr.FeeParts) *big.Int
func (*Orchestrator[BLOCK_HASH, HEAD]) Close ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) Close() (merr error)
func (*Orchestrator[BLOCK_HASH, HEAD]) CountTransactionsByState ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) CountTransactionsByState(ctx context.Context, state txmgrtypes.TxState) (uint32, error)
CountTransactionsByState was required for backwards compatibility and it's used only for unconfirmed transactions.
func (*Orchestrator[BLOCK_HASH, HEAD]) CreateTransaction ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindEarliestUnconfirmedBroadcastTime ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindEarliestUnconfirmedTxAttemptBlock ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindTxesByMetaFieldAndStates ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithAttemptsAndReceiptsByIdsAndState ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithMetaFieldByReceiptBlockNum ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) FindTxesWithMetaFieldByStates ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) GetForwarderForEOA ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) GetForwarderForEOAOCR2Feeds ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) GetTransactionFee ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionFee(ctx context.Context, transactionID string) (fee *evm.TransactionFee, err error)
func (*Orchestrator[BLOCK_HASH, HEAD]) GetTransactionReceipt ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionReceipt(ctx context.Context, transactionID string) (receipt *txmgrtypes.ChainReceipt[BLOCK_HASH, BLOCK_HASH], err error)
func (*Orchestrator[BLOCK_HASH, HEAD]) GetTransactionStatus ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) GetTransactionStatus(ctx context.Context, transactionID string) (status commontypes.TransactionStatus, err error)
func (*Orchestrator[BLOCK_HASH, HEAD]) HealthReport ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) HealthReport() map[string]error
func (*Orchestrator[BLOCK_HASH, HEAD]) Name ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) Name() string
func (*Orchestrator[BLOCK_HASH, HEAD]) OnNewLongestChain ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) OnNewLongestChain(ctx context.Context, head HEAD)
func (*Orchestrator[BLOCK_HASH, HEAD]) RegisterResumeCallback ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) RegisterResumeCallback(fn txmgr.ResumeCallback)
func (*Orchestrator[BLOCK_HASH, HEAD]) Reset ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) Reset(addr common.Address, abandon bool) error
func (*Orchestrator[BLOCK_HASH, HEAD]) SendNativeToken ¶
func (*Orchestrator[BLOCK_HASH, HEAD]) Start ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) Start(ctx context.Context) error
func (*Orchestrator[BLOCK_HASH, HEAD]) Trigger ¶
func (o *Orchestrator[BLOCK_HASH, HEAD]) Trigger(addr common.Address)
type OrchestratorTxStore ¶
type StuckTxDetector ¶
type StuckTxDetectorConfig ¶
type TxStore ¶
type TxStore interface {
AbandonPendingTransactions(context.Context, common.Address) error
AppendAttemptToTransaction(context.Context, uint64, common.Address, *types.Attempt) error
CreateEmptyUnconfirmedTransaction(context.Context, common.Address, uint64, uint64) (*types.Transaction, error)
CreateTransaction(context.Context, *types.TxRequest) (*types.Transaction, error)
FetchUnconfirmedTransactionAtNonceWithCount(context.Context, uint64, common.Address) (*types.Transaction, int, error)
MarkConfirmedAndReorgedTransactions(context.Context, uint64, common.Address) ([]*types.Transaction, []uint64, error)
MarkUnconfirmedTransactionPurgeable(context.Context, uint64, common.Address) error
UpdateTransactionBroadcast(context.Context, uint64, uint64, common.Hash, common.Address) error
UpdateUnstartedTransactionWithNonce(context.Context, common.Address, uint64) (*types.Transaction, error)
// ErrorHandler
DeleteAttemptForUnconfirmedTx(context.Context, uint64, *types.Attempt, common.Address) error
MarkTxFatal(context.Context, *types.Transaction, common.Address) error
}
type Txm ¶
type Txm struct {
services.StateMachine
// contains filtered or unexported fields
}
func NewTxm ¶
func NewTxm(lggr logger.Logger, chainID *big.Int, client Client, attemptBuilder AttemptBuilder, txStore TxStore, stuckTxDetector StuckTxDetector, config Config, keystore keys.AddressLister) *Txm
func (*Txm) CreateTransaction ¶
func (*Txm) HealthReport ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.