fix: feat: Specify latest block when sending transactions
This commit is contained in:
parent
27e5a6df3e
commit
cce530bfdd
@ -141,7 +141,7 @@ pub async fn call_write_function(
|
||||
log::debug!("Gas limit: {:?}", tx.gas);
|
||||
log::debug!("Network: {}", contract.network.name);
|
||||
|
||||
let pending_tx = match client.send_transaction(tx, None).await {
|
||||
let pending_tx = match client.send_transaction(tx, Some(BlockId::Number((BlockNumber::Latest).into()))).await {
|
||||
Ok(pending_tx) => {
|
||||
log::debug!("Transaction sent successfully: {:?}", pending_tx.tx_hash());
|
||||
log::info!("Transaction sent successfully: {:?}", pending_tx.tx_hash());
|
||||
|
@ -76,7 +76,7 @@ pub async fn send_eth(
|
||||
.gas(gas);
|
||||
|
||||
// Send the transaction
|
||||
let pending_tx = client.send_transaction(tx, None)
|
||||
let pending_tx = client.send_transaction(tx, Some(BlockId::Number((BlockNumber::Latest).into())))
|
||||
.await
|
||||
.map_err(|e| CryptoError::SerializationError(format!("Failed to send transaction: {}", e)))?;
|
||||
|
||||
@ -118,7 +118,7 @@ pub async fn send_eth_with_provider(
|
||||
.gas(gas);
|
||||
|
||||
// Send the transaction
|
||||
let pending_tx = client.send_transaction(tx, None)
|
||||
let pending_tx = client.send_transaction(tx, Some(BlockId::Number((BlockNumber::Latest).into())))
|
||||
.await
|
||||
.map_err(|e| CryptoError::SerializationError(format!("Failed to send transaction: {}", e)))?;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user