We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9bc31e commit 6e38c00Copy full SHA for 6e38c00
crates/cast/src/tx.rs
@@ -460,7 +460,8 @@ where
460
/// Helper function that tries to decode custom error name and inputs from error payload data.
461
async fn decode_execution_revert(data: &RawValue) -> Result<Option<String>> {
462
if let Some(err_data) = serde_json::from_str::<String>(data.get())?.strip_prefix("0x") {
463
- let selector = err_data.get(..8).unwrap();
+ let Some(selector) = err_data.get(..8) else { return Ok(None) };
464
+
465
if let Some(known_error) = SignaturesIdentifier::new(Config::foundry_cache_dir(), false)?
466
.write()
467
.await
0 commit comments