Skip to content

Commit 2d6f80b

Browse files
authored
fix DuplicateContract error (#325)
... when running something like this ``` function testPrank0AfterPrank1(address sender, address origin) public { vm.pvm(true); Victim victim = new Victim(); NestedVictim nestedVictim = new NestedVictim(victim); ``` Because nonce does get incremented on create we end up with the same address for 2 different contracts. Signed-off-by: Alexandru Gheorghe <[email protected]>
1 parent ea9950f commit 2d6f80b

File tree

1 file changed

+1
-1
lines changed
  • crates/revive-strategy/src/cheatcodes

1 file changed

+1
-1
lines changed

crates/revive-strategy/src/cheatcodes/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ impl foundry_cheatcodes::CheatcodeInspectorStrategyExt for PvmCheatcodeInspector
499499
),
500500
_ => None,
501501
};
502-
let bump_nonce = BumpNonce::No;
502+
let bump_nonce = BumpNonce::Yes;
503503

504504
Pallet::<Runtime>::bare_instantiate(
505505
origin,

0 commit comments

Comments
 (0)