Factory smart contract to make easier and safer usage of the `CREATE` and `CREATE2` EVM opcodes as well as of `CREATE3`-based (i.e. without an initcode factor) contract creations.
This PR fixes a fuzzing edge case where the fuzzed address msgSender equals arg3 and thus the test assert:
// Since everything was returned in the previous call, the balance must be equal to the original
// refund amount.
assertEq(arg3.balance, cachedBalance, "1800");
in the testFuzz_WhenTheCreateXContractHasANonZeroBalanceAndWhenTheRefundTransactionIsSuccessful tests fail.
Furthermore, I also add an additional assume condition to prevent the fuzzed address originalDeployer to have collisions with arg3 as well. Eventually, for the CREATE tests, I add an additional assume condition to prevent the test contract sender to collide with arg3.
🕓 Changelog
This PR fixes a fuzzing edge case where the fuzzed address
msgSender
equalsarg3
and thus the test assert:in the
testFuzz_WhenTheCreateXContractHasANonZeroBalanceAndWhenTheRefundTransactionIsSuccessful
tests fail.Furthermore, I also add an additional
assume
condition to prevent the fuzzed addressoriginalDeployer
to have collisions witharg3
as well. Eventually, for theCREATE
tests, I add an additionalassume
condition to prevent the test contract sender to collide witharg3
.🐶 Cute Animal Picture