Compare commits

...

2 Commits

Author SHA1 Message Date
Omar Abdulla 83af9b750c Remove unneeded code 2025-07-16 19:35:32 +03:00
Omar Abdulla 3bce1b1545 Log certain errors better 2025-07-16 19:08:22 +03:00
+22 -2
View File
@@ -219,7 +219,17 @@ where
continue; continue;
}; };
let nonce = node.fetch_add_nonce(input.caller)?; let nonce = match node.fetch_add_nonce(input.caller) {
Ok(nonce) => nonce,
Err(error) => {
tracing::error!(
caller = ?input.caller,
?error,
"Failed to get the nonce for the caller"
);
return Err(error);
}
};
tracing::debug!( tracing::debug!(
"Calculated nonce {}, for contract {}, having address {} on node: {}", "Calculated nonce {}, for contract {}, having address {} on node: {}",
@@ -232,7 +242,17 @@ where
// We are using alloy for building and submitting the transactions and it will // We are using alloy for building and submitting the transactions and it will
// automatically fill in all of the missing fields from the provider that we // automatically fill in all of the missing fields from the provider that we
// are using. // are using.
let code = alloy::hex::decode(&code)?; let code = match alloy::hex::decode(&code) {
Ok(code) => code,
Err(error) => {
tracing::error!(
code,
?error,
"Failed to hex-decode the code of the contract. (This could possibly mean that it contains '_' and therefore it requires linking to be performed)"
);
return Err(error.into());
}
};
let tx = TransactionRequest::default() let tx = TransactionRequest::default()
.nonce(nonce) .nonce(nonce)
.from(input.caller) .from(input.caller)