From ae0ab988ff17418db9a17d75490bcf12b302758f Mon Sep 17 00:00:00 2001 From: Kingter <83567446+kingster-will@users.noreply.github.com> Date: Wed, 18 Sep 2024 21:09:11 -0700 Subject: [PATCH] Fix empty version in deploy output file name. (#250) --- script/foundry/deployment/Main.s.sol | 3 ++- script/foundry/utils/DeployHelper.sol | 3 ++- test/foundry/utils/BaseTest.t.sol | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/script/foundry/deployment/Main.s.sol b/script/foundry/deployment/Main.s.sol index b316d94f..04ce8485 100644 --- a/script/foundry/deployment/Main.s.sol +++ b/script/foundry/deployment/Main.s.sol @@ -47,7 +47,8 @@ contract Main is DeployHelper { super.run( seed, // create3 seed false, // runStorageLayoutCheck - true // writeDeployments, + true, // writeDeployments, + VERSION ); _writeDeployment(VERSION); // write deployment json to deployments/deployment-{chainId}.json } diff --git a/script/foundry/utils/DeployHelper.sol b/script/foundry/utils/DeployHelper.sol index afe9c445..ade7c332 100644 --- a/script/foundry/utils/DeployHelper.sol +++ b/script/foundry/utils/DeployHelper.sol @@ -157,9 +157,10 @@ contract DeployHelper is Script, BroadcastManager, JsonDeploymentHandler, Storag /// @dev To use, run the following command (e.g. for Sepolia): /// forge script script/foundry/deployment/Main.s.sol:Main --rpc-url $RPC_URL --broadcast --verify -vvvv - function run(uint256 create3SaltSeed_, bool runStorageLayoutCheck, bool writeDeploys_) public virtual { + function run(uint256 create3SaltSeed_, bool runStorageLayoutCheck, bool writeDeploys_, string memory version_) public virtual { create3SaltSeed = create3SaltSeed_; writeDeploys = writeDeploys_; + version = version_; // This will run OZ storage layout check for all contracts. Requires --ffi flag. if (runStorageLayoutCheck) super.run(); diff --git a/test/foundry/utils/BaseTest.t.sol b/test/foundry/utils/BaseTest.t.sol index d7c777a9..c6e8d116 100644 --- a/test/foundry/utils/BaseTest.t.sol +++ b/test/foundry/utils/BaseTest.t.sol @@ -83,7 +83,8 @@ contract BaseTest is Test, DeployHelper, LicensingHelper { super.run( CREATE3_DEFAULT_SEED, false, // runStorageLayoutCheck - false // writeDeploys + false, // writeDeploys + "test" // version ); initLicensingHelper(address(pilTemplate), address(royaltyPolicyLAP), address(erc20));