Skip to content

Commit 745872c

Browse files
committed
chore: migrate cheatcodes/error
1 parent 94bbc4a commit 745872c

File tree

1 file changed

+3
-2
lines changed
  • crates/evm/src/executor/inspector/cheatcodes

1 file changed

+3
-2
lines changed

crates/evm/src/executor/inspector/cheatcodes/error.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use crate::executor::backend::{error::NoCheatcodeAccessError, DatabaseError};
2+
use alloy_dyn_abi::DynSolValue;
23
use alloy_primitives::Bytes;
3-
use ethers::{abi::AbiEncode, prelude::k256::ecdsa::signature::Error as SignatureError};
4+
use ethers::prelude::k256::ecdsa::signature::Error as SignatureError;
45
use foundry_common::errors::FsPathError;
56
use foundry_config::UnresolvedEnvVarError;
67
use foundry_utils::error::{encode_error, SolError};
@@ -178,7 +179,7 @@ impl SolError for Error {
178179
fn encode_string(&self) -> Bytes {
179180
match self {
180181
Self::CustomBytes(cow) => cow_to_bytes(cow),
181-
e => e.to_string().encode().into(),
182+
e => DynSolValue::String(e.to_string()).encode_single().into(),
182183
}
183184
}
184185
}

0 commit comments

Comments
 (0)