misc: deployment scripts improved

This commit is contained in:
vicnaum
2023-11-06 18:34:26 +01:00
parent d0e0e1d1d1
commit 8920664801
2 changed files with 19 additions and 7 deletions

View File

@@ -178,13 +178,21 @@ contract S06_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers {
address governanceContractAdmin = json.readAddress(
string(abi.encodePacked('.', targetEnv, '.GovernanceContractAdmin'))
);
if (governance.owner != governanceContractAdmin) {
console.log(
'Mock Governance %s != Governance contract admin %s',
governance.owner,
governanceContractAdmin
);
revert();
if (isEnvSet('DEPLOYMENT_ENVIRONMENT')) {
if (!LibString.eq(vm.envString('DEPLOYMENT_ENVIRONMENT'), 'production')) {
console.log('DEPLOYMENT_ENVIRONMENT is not production');
revert();
}
} else {
if (governance.owner != governanceContractAdmin) {
console.log(
'Mock Governance %s != Governance contract admin %s',
governance.owner,
governanceContractAdmin
);
revert();
}
}
profileCreator = json.readAddress(string(abi.encodePacked('.', targetEnv, '.ProfileCreator')));
@@ -260,6 +268,7 @@ contract S06_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers {
});
vm.stopBroadcast();
// TODO: Replace this with a true governance for a fork from production
vm.startBroadcast(governance.ownerPk);
governanceContract.lensHub_whitelistProfileCreator(address(temporarilyCreationProxy), true);
vm.stopBroadcast();
@@ -440,6 +449,7 @@ contract S06_InteractWithLensV2 is Script, ForkManagement, ArrayHelpers {
vm.stopBroadcast();
// TODO: Replace this with a true governance for a fork from production
vm.startBroadcast(governance.ownerPk);
governanceContract.lensHub_whitelistProfileCreator(address(temporarilyCreationProxy), false);
vm.stopBroadcast();

View File

@@ -4,3 +4,5 @@
ADDRESS=$1
cast rpc --rpc-url mumbai tenderly_addBalance "[[\"$ADDRESS\"], \"0x8AC7230489E80000\"]" --raw
# cast rpc --rpc-url polygon anvil_autoImpersonateAccount "[true]" --raw