Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(anvil): remove old ethers-dependent anvil core types #6842

Merged
merged 11 commits into from
Jan 19, 2024
6 changes: 1 addition & 5 deletions crates/anvil/src/eth/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Aggregated error type for this module

use crate::eth::pool::transactions::PoolTransaction;
use alloy_dyn_abi::DynSolType;
use alloy_primitives::{Bytes, SignatureError as AlloySignatureError, U256};
use alloy_signer::Error as AlloySignerError;
use alloy_transport::TransportError;
Expand Down Expand Up @@ -266,10 +265,7 @@ pub(crate) fn decode_revert_reason(out: impl AsRef<[u8]>) -> Option<String> {
if out.len() < SELECTOR_LEN {
return None
}
DynSolType::String
.abi_decode(&out[SELECTOR_LEN..])
.ok()
.and_then(|v| v.as_str().map(|s| s.to_owned()))
Some(foundry_evm::decode::decode_revert(&out[SELECTOR_LEN..], None, None))
}

/// Helper trait to easily convert results to rpc results
Expand Down
Loading