This commit is contained in:
Michal Iskierko 2024-07-11 14:36:24 +02:00
parent 02b822802c
commit 5d69646b25
1 changed files with 6 additions and 2 deletions

View File

@ -114,10 +114,13 @@ func (t *Transactor) NextNonce(rpcClient rpc.ClientInterface, chainID uint64, fr
if err != nil { if err != nil {
return 0, err return 0, err
} }
fmt.Println("!!! Nonce: ", nonce)
fmt.Println("!!! countOfPendingTXs: ", countOfPendingTXs)
return nonce + countOfPendingTXs, nil return nonce + countOfPendingTXs, nil
} }
} }
fmt.Println("!!! Nonce: ", nonce)
return nonce, err return nonce, err
} }
@ -487,7 +490,7 @@ func (t *Transactor) buildTransactionWithOverrides(nonce uint64, value *big.Int,
} }
} }
tx = gethtypes.NewTx(txData) tx = gethtypes.NewTx(txData)
t.logNewTx(args, gas, gasPrice, value) t.logNewTx(args, gas, gasPrice, value, nonce)
} else { } else {
if args.IsDynamicFeeTx() { if args.IsDynamicFeeTx() {
gasTipCap := (*big.Int)(args.MaxPriorityFeePerGas) gasTipCap := (*big.Int)(args.MaxPriorityFeePerGas)
@ -511,13 +514,14 @@ func (t *Transactor) buildTransactionWithOverrides(nonce uint64, value *big.Int,
return tx return tx
} }
func (t *Transactor) logNewTx(args SendTxArgs, gas uint64, gasPrice *big.Int, value *big.Int) { func (t *Transactor) logNewTx(args SendTxArgs, gas uint64, gasPrice *big.Int, value *big.Int, nonce uint64) {
t.log.Info("New transaction", t.log.Info("New transaction",
"From", args.From, "From", args.From,
"To", *args.To, "To", *args.To,
"Gas", gas, "Gas", gas,
"GasPrice", gasPrice, "GasPrice", gasPrice,
"Value", value, "Value", value,
"Nonce", nonce,
) )
} }