Documentation ¶
Index ¶
- type Config
- type Driver
- func (d *Driver) ClearPendingTx(ctx context.Context, txMgr txmgr.TxManager, l1Client *ethclient.Client) error
- func (d *Driver) CraftBatchTx(ctx context.Context, start, end, nonce *big.Int) (*types.Transaction, error)
- func (d *Driver) FraudProofAppendStateBatch(opts *bind.TransactOpts, batch [][32]byte, shouldStartAtElement *big.Int, ...) (*types.Transaction, error)
- func (d *Driver) GetBatchBlockRange(ctx context.Context) (*big.Int, *big.Int, error)
- func (d *Driver) Metrics() metrics.Metrics
- func (d *Driver) Name() string
- func (d *Driver) RequestTssSignature(requestType uint64, start, offsetStartsAtIndex *big.Int, challenge string, ...) (*tssClient.TssResponse, error)
- func (d *Driver) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (d *Driver) UpdateGasPrice(ctx context.Context, tx *types.Transaction) (*types.Transaction, error)
- func (d *Driver) WalletAddr() common.Address
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string L1Client *ethclient.Client L2Client *l2ethclient.Client TssClient *tssClient.Client BlockOffset uint64 MaxStateRootElements uint64 MinStateRootElements uint64 SCCAddr common.Address CTCAddr common.Address FPRollupAddr common.Address ChainID *big.Int PrivKey *ecdsa.PrivateKey SccRollback bool RollupTimeout time.Duration PollInterval time.Duration FinalityConfirmations uint64 EnableProposerHsm bool ProposerHsmCreden string ProposerHsmAddress string ProposerHsmAPIName string AllowL2AutoRollback bool MinTimeoutStateRootElements uint64 }
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func (*Driver) ClearPendingTx ¶
func (d *Driver) ClearPendingTx( ctx context.Context, txMgr txmgr.TxManager, l1Client *ethclient.Client, ) error
ClearPendingTx a publishes a transaction at the next available nonce in order to clear any transactions in the mempool left over from a prior running instance of the batch submitter.
func (*Driver) CraftBatchTx ¶
func (d *Driver) CraftBatchTx( ctx context.Context, start, end, nonce *big.Int, ) (*types.Transaction, error)
CraftBatchTx transforms the L2 blocks between start and end into a batch transaction using the given nonce. A dummy gas price is used in the resulting transaction to use for size estimation.
NOTE: This method SHOULD NOT publish the resulting transaction.
func (*Driver) FraudProofAppendStateBatch ¶
func (*Driver) GetBatchBlockRange ¶
GetBatchBlockRange returns the start and end L2 block heights that need to be processed. Note that the end value is *exclusive*, therefore if the returned values are identical nothing needs to be processed.
func (*Driver) RequestTssSignature ¶
func (*Driver) SendTransaction ¶
SendTransaction injects a signed transaction into the pending pool for execution.
func (*Driver) UpdateGasPrice ¶
func (d *Driver) UpdateGasPrice( ctx context.Context, tx *types.Transaction, ) (*types.Transaction, error)
UpdateGasPrice signs an otherwise identical txn to the one provided but with updated gas prices sampled from the existing network conditions.
NOTE: Thie method SHOULD NOT publish the resulting transaction.
func (*Driver) WalletAddr ¶
WalletAddr is the wallet address used to pay for batch transaction fees.