diff --git a/crates/cheatcodes/src/inspector.rs b/crates/cheatcodes/src/inspector.rs index 8da6a1e9186e..24b756a5a246 100644 --- a/crates/cheatcodes/src/inspector.rs +++ b/crates/cheatcodes/src/inspector.rs @@ -1063,7 +1063,7 @@ where { initialized = false; old_balance = U256::ZERO; } - let kind: Vm::AccountAccessKind = match call.scheme { + let kind = match call.scheme { CallScheme::Call => crate::Vm::AccountAccessKind::Call, CallScheme::CallCode => crate::Vm::AccountAccessKind::CallCode, CallScheme::DelegateCall => crate::Vm::AccountAccessKind::DelegateCall, diff --git a/testdata/default/cheats/Prank.t.sol b/testdata/default/cheats/Prank.t.sol index 1e71cfbb04de..130e819606a2 100644 --- a/testdata/default/cheats/Prank.t.sol +++ b/testdata/default/cheats/Prank.t.sol @@ -194,7 +194,8 @@ contract PrankTest is DSTest { } function testFailPrankDelegateCallToEOA() public { - address alice = makeAddr("alice"); + uint256 privateKey = uint256(keccak256(abi.encodePacked("alice"))); + address alice = vm.addr(privateKey); ImplementationTest impl = new ImplementationTest(); vm.prank(alice, true); // Should fail when EOA pranked with delegatecall.