diff --git a/script/A_DeployLensV2Upgrade.s.sol b/script/S01_DeployLensV2Upgrade.s.sol similarity index 99% rename from script/A_DeployLensV2Upgrade.s.sol rename to script/S01_DeployLensV2Upgrade.s.sol index 639ebd6..c6ad857 100644 --- a/script/A_DeployLensV2Upgrade.s.sol +++ b/script/S01_DeployLensV2Upgrade.s.sol @@ -21,7 +21,7 @@ import {LegacyCollectNFT} from 'contracts/misc/LegacyCollectNFT.sol'; import {ArrayHelpers} from 'script/helpers/ArrayHelpers.sol'; -contract A_DeployLensV2Upgrade is Script, ForkManagement, ArrayHelpers { +contract S01_DeployLensV2Upgrade is Script, ForkManagement, ArrayHelpers { // add this to be excluded from coverage report function testLensV2UpgradeDeployment() public {} diff --git a/script/B_DeployLensV2Periphery.s.sol b/script/S02_DeployLensV2Periphery.s.sol similarity index 98% rename from script/B_DeployLensV2Periphery.s.sol rename to script/S02_DeployLensV2Periphery.s.sol index f74a1f3..67647bb 100644 --- a/script/B_DeployLensV2Periphery.s.sol +++ b/script/S02_DeployLensV2Periphery.s.sol @@ -10,7 +10,6 @@ import {TokenHandleRegistry} from 'contracts/namespaces/TokenHandleRegistry.sol' import {TransparentUpgradeableProxy} from '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {LensV2UpgradeContract} from 'contracts/misc/LensV2UpgradeContract.sol'; -import {ProxyAdmin} from 'contracts/misc/access/ProxyAdmin.sol'; import {LensHubInitializable} from 'contracts/misc/LensHubInitializable.sol'; import {ILensHub} from 'contracts/interfaces/ILensHub.sol'; import {ILensHandles} from 'contracts/interfaces/ILensHandles.sol'; @@ -24,10 +23,7 @@ import {RevertFollowModule} from 'contracts/modules/follow/RevertFollowModule.so import {DegreesOfSeparationReferenceModule} from 'contracts/modules/reference/DegreesOfSeparationReferenceModule.sol'; import {FollowerOnlyReferenceModule} from 'contracts/modules/reference/FollowerOnlyReferenceModule.sol'; import {TokenGatedReferenceModule} from 'contracts/modules/reference/TokenGatedReferenceModule.sol'; -import {Types} from 'contracts/libraries/constants/Types.sol'; import {ModuleRegistry} from 'contracts/misc/ModuleRegistry.sol'; -import {IModuleRegistry} from 'contracts/interfaces/IModuleRegistry.sol'; -import {BaseFeeCollectModuleInitData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {PublicActProxy} from 'contracts/misc/PublicActProxy.sol'; import {LitAccessControl} from 'contracts/misc/access/LitAccessControl.sol'; diff --git a/script/C_ChangeLensV1Admins.s.sol b/script/S03_ChangeLensV1Admins.s.sol similarity index 96% rename from script/C_ChangeLensV1Admins.s.sol rename to script/S03_ChangeLensV1Admins.s.sol index de88a9e..529996f 100644 --- a/script/C_ChangeLensV1Admins.s.sol +++ b/script/S03_ChangeLensV1Admins.s.sol @@ -5,11 +5,10 @@ import {ForkManagement} from 'script/helpers/ForkManagement.sol'; import 'forge-std/Script.sol'; import {ILensGovernable} from 'contracts/interfaces/ILensGovernable.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; -import {LensV2UpgradeContract} from 'contracts/misc/LensV2UpgradeContract.sol'; import {ProxyAdmin} from 'contracts/misc/access/ProxyAdmin.sol'; import {TransparentUpgradeableProxy} from '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol'; -contract C_ChangeLensV1Admins is Script, ForkManagement { +contract S03_ChangeLensV1Admins is Script, ForkManagement { // add this to be excluded from coverage report function testLensV1ChangeAdmins() public {} diff --git a/script/D_PerformV2Upgrade.s.sol b/script/S04_PerformV2Upgrade.s.sol similarity index 100% rename from script/D_PerformV2Upgrade.s.sol rename to script/S04_PerformV2Upgrade.s.sol diff --git a/script/E_GovernanceActions.s.sol b/script/S05_GovernanceActions.s.sol similarity index 98% rename from script/E_GovernanceActions.s.sol rename to script/S05_GovernanceActions.s.sol index 620d024..f443fd5 100644 --- a/script/E_GovernanceActions.s.sol +++ b/script/S05_GovernanceActions.s.sol @@ -8,10 +8,8 @@ import {FollowNFT} from 'contracts/FollowNFT.sol'; import {LensHandles} from 'contracts/namespaces/LensHandles.sol'; import {TokenHandleRegistry} from 'contracts/namespaces/TokenHandleRegistry.sol'; import {TransparentUpgradeableProxy} from '@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol'; -import {FeeConfig, FeeFollowModule} from 'contracts/modules/follow/FeeFollowModule.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {LensV2UpgradeContract} from 'contracts/misc/LensV2UpgradeContract.sol'; -import {ProxyAdmin} from 'contracts/misc/access/ProxyAdmin.sol'; import {LensHubInitializable} from 'contracts/misc/LensHubInitializable.sol'; import {ILensHub} from 'contracts/interfaces/ILensHub.sol'; import {ILensHandles} from 'contracts/interfaces/ILensHandles.sol'; @@ -28,7 +26,6 @@ import {TokenGatedReferenceModule} from 'contracts/modules/reference/TokenGatedR import {Types} from 'contracts/libraries/constants/Types.sol'; import {ModuleRegistry} from 'contracts/misc/ModuleRegistry.sol'; import {IModuleRegistry} from 'contracts/interfaces/IModuleRegistry.sol'; -import {BaseFeeCollectModuleInitData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {PublicActProxy} from 'contracts/misc/PublicActProxy.sol'; import {LitAccessControl} from 'contracts/misc/access/LitAccessControl.sol'; @@ -36,7 +33,7 @@ import {LibString} from 'solady/utils/LibString.sol'; import {ArrayHelpers} from 'script/helpers/ArrayHelpers.sol'; -contract E_GovernanceActions is Script, ForkManagement, ArrayHelpers { +contract S05_GovernanceActions is Script, ForkManagement, ArrayHelpers { // TODO: Use from test/ContractAddresses struct Module { address addy; diff --git a/script/F_InteractWithLensV2.s.sol b/script/S06_InteractWithLensV2.s.sol similarity index 96% rename from script/F_InteractWithLensV2.s.sol rename to script/S06_InteractWithLensV2.s.sol index f55a9d1..27377e5 100644 --- a/script/F_InteractWithLensV2.s.sol +++ b/script/S06_InteractWithLensV2.s.sol @@ -11,7 +11,6 @@ import {TransparentUpgradeableProxy} from '@openzeppelin/contracts/proxy/transpa import {FeeConfig, FeeFollowModule} from 'contracts/modules/follow/FeeFollowModule.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {LensV2UpgradeContract} from 'contracts/misc/LensV2UpgradeContract.sol'; -import {ProxyAdmin} from 'contracts/misc/access/ProxyAdmin.sol'; import {LensHubInitializable} from 'contracts/misc/LensHubInitializable.sol'; import {ILensHub} from 'contracts/interfaces/ILensHub.sol'; import {ILensHandles} from 'contracts/interfaces/ILensHandles.sol'; @@ -27,7 +26,6 @@ import {FollowerOnlyReferenceModule} from 'contracts/modules/reference/FollowerO import {TokenGatedReferenceModule} from 'contracts/modules/reference/TokenGatedReferenceModule.sol'; import {Types} from 'contracts/libraries/constants/Types.sol'; import {ModuleRegistry} from 'contracts/misc/ModuleRegistry.sol'; -import {IModuleRegistry} from 'contracts/interfaces/IModuleRegistry.sol'; import {BaseFeeCollectModuleInitData} from 'contracts/modules/interfaces/IBaseFeeCollectModule.sol'; import {Governance} from 'contracts/misc/access/Governance.sol'; import {PublicActProxy} from 'contracts/misc/PublicActProxy.sol'; @@ -36,8 +34,8 @@ import {LibString} from 'solady/utils/LibString.sol'; import {ArrayHelpers} from 'script/helpers/ArrayHelpers.sol'; -contract F_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers { - // TODO: Use from test/ContractAddresses +contract S06_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers { + // TODO: Use from test/ContractAddresses struct Module { address addy; string name; @@ -193,7 +191,9 @@ contract F_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers { vm.label(profileCreator, 'ProfileCreator'); console.log('ProfileCreator: %s', profileCreator); - proxyAdminContractAdmin = json.readAddress(string(abi.encodePacked('.', targetEnv, '.ProxyAdminContractAdmin'))); + proxyAdminContractAdmin = json.readAddress( + string(abi.encodePacked('.', targetEnv, '.ProxyAdminContractAdmin')) + ); vm.label(proxyAdminContractAdmin, 'ProxyAdminContractAdmin'); console.log('ProxyAdminContractAdmin: %s', proxyAdminContractAdmin); @@ -221,13 +221,14 @@ contract F_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers { vm.label(address(governanceContract), 'GovernanceContract'); console.log('Governance Contract: %s', address(governanceContract)); - Module[] memory actModules = abi.decode( vm.parseJson(json, string(abi.encodePacked('.', targetEnv, '.Modules.v2.act'))), (Module[]) ); - collectPublicationAction = CollectPublicationAction(findModuleHelper(actModules, 'CollectPublicationAction').addy); + collectPublicationAction = CollectPublicationAction( + findModuleHelper(actModules, 'CollectPublicationAction').addy + ); vm.label(address(collectPublicationAction), 'CollectPublicationAction'); console.log('CollectPublicationAction: %s', address(collectPublicationAction)); @@ -236,11 +237,15 @@ contract F_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers { (Module[]) ); - simpleFeeCollectModule = SimpleFeeCollectModule(findModuleHelper(collectModules, 'SimpleFeeCollectModule').addy); + simpleFeeCollectModule = SimpleFeeCollectModule( + findModuleHelper(collectModules, 'SimpleFeeCollectModule').addy + ); vm.label(address(simpleFeeCollectModule), 'SimpleFeeCollectModule'); console.log('SimpleFeeCollectModule: %s', address(simpleFeeCollectModule)); - multirecipientFeeCollectModule = MultirecipientFeeCollectModule(findModuleHelper(collectModules, 'MultirecipientFeeCollectModule').addy); + multirecipientFeeCollectModule = MultirecipientFeeCollectModule( + findModuleHelper(collectModules, 'MultirecipientFeeCollectModule').addy + ); vm.label(address(multirecipientFeeCollectModule), 'MultirecipientFeeCollectModule'); console.log('MultirecipientFeeCollectModule: %s', address(multirecipientFeeCollectModule)); } diff --git a/script/fullV2Run.sh b/script/fullV2Run.sh index fb2f376..716d515 100644 --- a/script/fullV2Run.sh +++ b/script/fullV2Run.sh @@ -13,31 +13,31 @@ fi echo "Running Full Lens V2 Deployment on $TARGET environment" echo "Deploying Lens V2 Implementation and upgrade contracts..." -bash script/run.sh A_DeployLensV2Upgrade $TARGET _ $CATAPULTA +bash script/run.sh S01_DeployLensV2Upgrade $TARGET _ $CATAPULTA read -p "Continue?" CONFIRMATION echo "Deploying Lens V2 Periphery..." -bash script/run.sh B_DeployLensV2Periphery $TARGET _ $CATAPULTA +bash script/run.sh S02_DeployLensV2Periphery $TARGET _ $CATAPULTA read -p "Continue?" CONFIRMATION # Run addBalance script if the following fails: echo "Changing Lens V1 Admins..." -bash script/run.sh C_ChangeLensV1Admins $TARGET s +bash script/run.sh S03_ChangeLensV1Admins $TARGET s read -p "Continue?" CONFIRMATION echo "Performing Lens V2 Upgrade..." -bash script/run.sh D_PerformV2Upgrade $TARGET +bash script/run.sh S04_PerformV2Upgrade $TARGET read -p "Continue?" CONFIRMATION echo "Running Governance Actions (whitelisting profile creator, registering currencies and modules)..." -bash script/run.sh E_GovernanceActions $TARGET +bash script/run.sh S05_GovernanceActions $TARGET read -p "Continue?" CONFIRMATION echo "Interacting with Lens V2..." -bash script/run.sh F_InteractWithLensV2 $TARGET +bash script/run.sh S06_InteractWithLensV2 $TARGET