Commit 55ee461e authored by Liam Horne's avatar Liam Horne Committed by GitHub

refactor: improve logging for transactions being submitted to chain with gasPrice (#1016)

* refactor: improve logging for transactions being submitted to chain with gasPrice

* lint: apply lint autofixes
parent 1c1e405c
......@@ -178,15 +178,18 @@ export class StateBatchSubmitter extends BatchSubmitter {
const nonce = await this.signer.getTransactionCount()
const contractFunction = async (gasPrice): Promise<TransactionReceipt> => {
this.logger.info('Submitting appendStateBatch transaction', {
gasPrice,
nonce,
contractAddr: this.chainContract.address,
})
const contractTx = await this.chainContract.appendStateBatch(
batch,
offsetStartsAtIndex,
{ nonce, gasPrice }
)
this.logger.info('Submitted appendStateBatch transaction', {
nonce,
txHash: contractTx.hash,
contractAddr: this.chainContract.address,
from: contractTx.from,
})
this.logger.debug('appendStateBatch transaction data', {
......
......@@ -143,14 +143,17 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
const contractFunction = async (
gasPrice
): Promise<TransactionReceipt> => {
this.logger.info('Submitting appendQueueBatch transaction', {
gasPrice,
nonce,
contractAddr: this.chainContract.address,
})
const tx = await this.chainContract.appendQueueBatch(99999999, {
nonce,
gasPrice,
})
this.logger.info('Submitted appendQueueBatch transaction', {
nonce,
txHash: tx.hash,
contractAddr: this.chainContract.address,
from: tx.from,
})
this.logger.debug('appendQueueBatch transaction data', {
......@@ -250,14 +253,17 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
const nonce = await this.signer.getTransactionCount()
const contractFunction = async (gasPrice): Promise<TransactionReceipt> => {
this.logger.info('Submitting appendSequencerBatch transaction', {
gasPrice,
nonce,
contractAddr: this.chainContract.address,
})
const tx = await this.chainContract.appendSequencerBatch(batchParams, {
nonce,
gasPrice,
})
this.logger.info('Submitted appendSequencerBatch transaction', {
nonce,
txHash: tx.hash,
contractAddr: this.chainContract.address,
from: tx.from,
})
this.logger.debug('appendSequencerBatch transaction data', {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment