Skip to content
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

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

garyghayrat
Copy link
Member

No description provided.

@garyghayrat garyghayrat linked an issue Oct 21, 2024 that may be closed by this pull request
@@ -13,13 +13,15 @@ contract CompoundGovernorTest is Test, CompoundGovernorConstants {
IComp token;
ICompoundTimelock timelock;
address owner;
address proxyAdmin;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
address proxyAdmin;
address proxyAdminOwner;

Copy link
Member Author

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");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
proxyAdmin = makeAddr("PROXY_ADMIN_ADDRESS");
proxyAdmin = COMPOUND_TIMELOCK;

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
function run(
address _owner,
address _proxyAdmin,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
address _proxyAdmin,
address _compoundTimelock,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -46,7 +48,7 @@ contract DeployCompoundGovernor is Script, CompoundGovernorConstants {
)
);
TransparentUpgradeableProxy _proxy =
new TransparentUpgradeableProxy(address(_implementation), address(this), _initData);
new TransparentUpgradeableProxy(address(_implementation), _proxyAdmin, _initData);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
new TransparentUpgradeableProxy(address(_implementation), _proxyAdmin, _initData);
new TransparentUpgradeableProxy(address(_implementation), _compoundTimelock, _initData);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@garyghayrat garyghayrat force-pushed the feat/accept-proxy-admin-in-script branch from 0491481 to 54de5ad Compare October 23, 2024 05:21
@garyghayrat garyghayrat changed the base branch from feat/add-whitelists-and-guardians to main October 23, 2024 05:21
Copy link
Collaborator

@wildmolasses wildmolasses left a 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

{
function run(
address _owner,
address _compoundTimelock,
Copy link
Collaborator

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah, great point 92f02b7

@coveralls
Copy link

Pull Request Test Coverage Report for Build 11483322570

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 87.329%

Totals Coverage Status
Change from base Build 11461628746: 0.0%
Covered Lines: 318
Relevant Lines: 370

💛 - Coveralls

@wildmolasses wildmolasses changed the title Accept proxyAdmin as constructor arg in deploy script Use TIMELOCK_ADDRESS as proxy owner in deploy script Oct 23, 2024
@wildmolasses wildmolasses merged commit 16a2c2d into main Oct 23, 2024
3 checks passed
wildmolasses pushed a commit that referenced this pull request Nov 1, 2024
* Accept `proxyAdmin` as constructor arg in deploy script

* Make timelock `proxyAdminOwner` and rename vars

* Remove proxyAdminOwner as an arg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Take proxyAdmin contract owner as an argument in deploy script
3 participants