From f5dbb044bd8ca35beb92c6c5d248badcc5cfcccf Mon Sep 17 00:00:00 2001 From: Pascal Marco Caversaccio Date: Wed, 13 Mar 2024 19:17:59 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20=20Fix=20`assume`=20in=20`?= =?UTF-8?q?CreateX=5FGenerateSalt=5FInternal=5FTest`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pascal Marco Caversaccio --- .gas-snapshot | 2 +- test/internal/CreateX._generateSalt.t.sol | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index d9b3d403..c3276123 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -98,7 +98,7 @@ CreateX_DeployCreate_Public_Test:testFuzz_WhenTheInitCodeSuccessfullyCreatesARun CreateX_DeployCreate_Public_Test:testFuzz_WhenTheInitCodeSuccessfullyCreatesARuntimeBytecodeWithAZeroLength(uint64,uint256) (runs: 256, μ: 52370, ~: 52406) CreateX_EfficientHash_Internal_Test:testFuzz_MatchesTheOutputOfAHighLevelHashAndShouldNeverRevert(bytes32,bytes32) (runs: 256, μ: 9167, ~: 9167) CreateX_GenerateSalt_Internal_Test:testFuzz_NeverReverts(uint256) (runs: 256, μ: 19073, ~: 19073) -CreateX_GenerateSalt_Internal_Test:testFuzz_ShouldBeAFunctionOfMultipleBlockPropertiesAndTheCaller(uint256,address,string,uint64,address) (runs: 256, μ: 62617, ~: 62382) +CreateX_GenerateSalt_Internal_Test:testFuzz_ShouldBeAFunctionOfMultipleBlockPropertiesAndTheCaller(uint256,address,string,uint64,address) (runs: 256, μ: 60472, ~: 60279) CreateX_Guard_Internal_Test:testFuzz_WhenTheFirst20BytesOfTheSaltDoNotEqualTheCallerOrTheZeroAddress(address,bytes32) (runs: 256, μ: 33848, ~: 33849) CreateX_Guard_Internal_Test:testFuzz_WhenTheFirst20BytesOfTheSaltDoNotEqualTheCallerOrTheZeroAddressAndWhenTheSaltValueIsGeneratedPseudorandomly(address,uint256,address,string,uint64) (runs: 256, μ: 41608, ~: 41372) CreateX_Guard_Internal_Test:testFuzz_WhenTheFirst20BytesOfTheSaltEqualsTheCallerAndWhenThe21stByteOfTheSaltEquals0x00(address,bytes32) (runs: 256, μ: 33276, ~: 33276) diff --git a/test/internal/CreateX._generateSalt.t.sol b/test/internal/CreateX._generateSalt.t.sol index 605a38b8..7d36d71c 100644 --- a/test/internal/CreateX._generateSalt.t.sol +++ b/test/internal/CreateX._generateSalt.t.sol @@ -41,9 +41,7 @@ contract CreateX_GenerateSalt_Internal_Test is BaseTest { // We test their dependencies by determining the current salt, changing any of those // values, and verifying that the salt changes. increment = bound(increment, 1, type(uint128).max); - vm.assume( - coinbase != zeroAddress && chainId != block.chainid && chainId != 0 && msgSender != createXHarnessAddr - ); + vm.assume(coinbase != zeroAddress && chainId != block.chainid && chainId != 0 && msgSender != SELF); uint256 snapshotId = vm.snapshot(); bytes32 originalSalt = createXHarness.exposed_generateSalt();