diff --git a/Cargo.toml b/Cargo.toml index a61ca4f..9f3c875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,15 +78,3 @@ features = [ inherits = "release" lto = true codegen-units = 1 - -# We set the `panic` behavior to `unwind` in both the `release` and `dev` profiles since our async -# runtime attempts to catch panics and it can only catch panics if we compile our code with unwind -# as the panic behavior. For more information, please see the `catch_unwind` documentation where it -# mentions that panics can only be caught if they unwind and not if they abort: -# https://doc.rust-lang.org/std/panic/fn.catch_unwind.html#notes - -[profile.release] -panic = "unwind" - -[profile.dev] -panic = "unwind" diff --git a/crates/core/src/driver/mod.rs b/crates/core/src/driver/mod.rs index d38aac5..cca0be0 100644 --- a/crates/core/src/driver/mod.rs +++ b/crates/core/src/driver/mod.rs @@ -223,7 +223,17 @@ where 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!( "Calculated nonce {}, for contract {}, having address {} on node: {}", @@ -236,7 +246,17 @@ where // 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 // 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 = { let tx = TransactionRequest::default() .nonce(nonce)