-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use TIMELOCK_ADDRESS
as proxy owner in deploy script
#34
Conversation
@@ -13,13 +13,15 @@ contract CompoundGovernorTest is Test, CompoundGovernorConstants { | |||
IComp token; | |||
ICompoundTimelock timelock; | |||
address owner; | |||
address proxyAdmin; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address proxyAdmin; | |
address proxyAdminOwner; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address whitelistGuardian; | ||
CompoundGovernor.ProposalGuardian proposalGuardian; | ||
uint96 constant PROPOSAL_GUARDIAN_EXPIRY = 1_739_768_400; | ||
|
||
function setUp() public virtual { | ||
// set the owner of the governor (use the anvil default account #0, if no environment variable is set) | ||
owner = vm.envOr("DEPLOYER_ADDRESS", 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266); | ||
proxyAdmin = makeAddr("PROXY_ADMIN_ADDRESS"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proxyAdmin = makeAddr("PROXY_ADMIN_ADDRESS"); | |
proxyAdmin = COMPOUND_TIMELOCK; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script/DeployCompoundGovernor.s.sol
Outdated
{ | ||
function run( | ||
address _owner, | ||
address _proxyAdmin, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address _proxyAdmin, | |
address _compoundTimelock, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
script/DeployCompoundGovernor.s.sol
Outdated
@@ -46,7 +48,7 @@ contract DeployCompoundGovernor is Script, CompoundGovernorConstants { | |||
) | |||
); | |||
TransparentUpgradeableProxy _proxy = | |||
new TransparentUpgradeableProxy(address(_implementation), address(this), _initData); | |||
new TransparentUpgradeableProxy(address(_implementation), _proxyAdmin, _initData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new TransparentUpgradeableProxy(address(_implementation), _proxyAdmin, _initData); | |
new TransparentUpgradeableProxy(address(_implementation), _compoundTimelock, _initData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0491481
to
54de5ad
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one more nit
script/DeployCompoundGovernor.s.sol
Outdated
{ | ||
function run( | ||
address _owner, | ||
address _compoundTimelock, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry @garyghayrat, one more nit, if we already have the CompoundGovernorConstants.TIMELOCK_ADDRESS, why not use it here instead of passing in the timelock as an arg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah, great point 92f02b7
Pull Request Test Coverage Report for Build 11483322570Details
💛 - Coveralls |
proxyAdmin
as constructor arg in deploy scriptTIMELOCK_ADDRESS
as proxy owner in deploy script
* Accept `proxyAdmin` as constructor arg in deploy script * Make timelock `proxyAdminOwner` and rename vars * Remove proxyAdminOwner as an arg
No description provided.