-
Notifications
You must be signed in to change notification settings - Fork 45
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
Provide Governance Token Bases to TokenVotingSetup
Constructor as Arguments to Avoid initCode
size limit on Goerli
#425
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 35 additions & 1 deletion
36
packages/contracts/deploy/new/30_plugins/00_plugin-setups/10_token_voting_setup.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,20 +57,16 @@ contract TokenVotingSetup is PluginSetup { | |
/// @param length The array length of passed helpers. | ||
error WrongHelpersArrayLength(uint256 length); | ||
|
||
/// @notice The contract constructor, that deploys the bases. | ||
constructor() { | ||
governanceERC20Base = address( | ||
new GovernanceERC20( | ||
IDAO(address(0)), | ||
"", | ||
"", | ||
GovernanceERC20.MintSettings(new address[](0), new uint256[](0)) | ||
) | ||
); | ||
governanceWrappedERC20Base = address( | ||
new GovernanceWrappedERC20(IERC20Upgradeable(address(0)), "", "") | ||
); | ||
/// @notice The contract constructor deploying the plugin implementation contract and receiving the governance token base contracts to clone from. | ||
/// @param _governanceERC20Base The base `GovernanceERC20` contract to create clones from. | ||
/// @param _governanceWrappedERC20Base The base `GovernanceWrappedERC20` contract to create clones from. | ||
constructor( | ||
GovernanceERC20 _governanceERC20Base, | ||
GovernanceWrappedERC20 _governanceWrappedERC20Base | ||
) { | ||
tokenVotingBase = new TokenVoting(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note that I intentionally left |
||
governanceERC20Base = address(_governanceERC20Base); | ||
governanceWrappedERC20Base = address(_governanceWrappedERC20Base); | ||
} | ||
|
||
/// @inheritdoc IPluginSetup | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We could re-use previously deployed
GovernanceERC20
orGovernanceWrappedERC20
bases, as they didn't change (except the OZ version bump).Should we do it? I would say it is better to pay a bit more for a fresh deployment (with the latest OZ updates) instead of having a potential address mix-up just to save a few bucks.
Other question: Will the new
active_contract.json
after the protocol upgrade contain the two governance token contract addresses automatically, or do we have to remember to add them there?It could generally make sense to add all implementation/base addresses there.
@mathewmeconry @Rekard0
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.
I would update them because they have changed with the OZ update.
Adding stuff to the active_contracts.json is a manual task and we can do that for sure