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

fix: revert if strategy contract does not implement method #398

Merged
merged 3 commits into from
Feb 2, 2024

Conversation

gabririgo
Copy link
Contributor

@gabririgo gabririgo commented Dec 2, 2023

resolves #396

📓 Overview

The governance proxy deployment should revert in case the input strategy contract does not implement the assertValidInitParams method. This is a remote scenario that only happens when a user accidentally inputs a rogue strategy contract address. However, as the deployment does not fail, it is an undesired behavior as the same user won't be able to deploy a governance with the same name. This is relevant for multi-chain governance.

  • revert proxy initialization if the input strategy contract does not implement the method assertValidInitParams to prevent accidental governance proxy deployment with rogue strategy contract.
  • assert pool initialization fails with either incorrect strategy contract or rogue init params

- revert pool initialization if the input strategy contract does not implement the method assertValidInitParams to prevent accidental governance proxy deployment with rogue strategy contract.
- assert pool initialization fails with either incorrect strategy contract, or rogue init params
@gabririgo gabririgo added enhancement New feature or request contracts updates contracts folder packages/v3-contracts updates v3 contracts package labels Dec 2, 2023
Copy link

github-actions bot commented Dec 2, 2023

Pull Request Test Coverage Report for Build 7071049321

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.001%) to 97.98%

Totals Coverage Status
Change from base Build 7043072306: 0.001%
Covered Lines: 1287
Relevant Lines: 1295

💛 - Coveralls

Copy link

openzeppelin-code bot commented Dec 7, 2023

fix: revert if strategy contract does not implement method

Generated at commit: 36b549f8d94a0cf255b07cf99e9f925291f5aaab

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
0
0
14
36
51
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

@gabririgo gabririgo merged commit ac0902c into development Feb 2, 2024
2 checks passed
@gabririgo gabririgo deleted the fix/governance-init-assertion branch February 2, 2024 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contracts updates contracts folder enhancement New feature or request packages/v3-contracts updates v3 contracts package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Governance: assert proxy initialization did not fail silently
1 participant