This repository has been archived by the owner on Nov 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: changed language to reflect governors rather than llama #36
Closed
Closed
Changes from all commits
Commits
Show all changes
2 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
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 |
---|---|---|
|
@@ -7,7 +7,7 @@ import {ERC20Votes} from "@openzeppelin/token/ERC20/extensions/ERC20Votes.sol"; | |
|
||
/// @title ERC20TokenholderCaster | ||
/// @author Llama ([email protected]) | ||
/// @notice This contract lets holders of a given governance ERC20Votes token cast approvals and disapprovals | ||
/// @notice This contract lets holders of a given governance ERC20Votes token cast approvals and vetos | ||
/// on created actions. | ||
contract ERC20TokenholderCaster is TokenholderCaster { | ||
ERC20Votes public token; | ||
|
@@ -23,17 +23,14 @@ contract ERC20TokenholderCaster is TokenholderCaster { | |
/// The `initializer` modifier ensures that this function can be invoked at most once. | ||
/// @param _token The ERC20 token to be used for voting. | ||
/// @param _llamaCore The `LlamaCore` contract for this Llama instance. | ||
/// @param _role The role used by this contract to cast approvals and disapprovals. | ||
/// @param _minApprovalPct The minimum % of approvals required to submit approvals to `LlamaCore`. | ||
/// @param _minDisapprovalPct The minimum % of disapprovals required to submit disapprovals to `LlamaCore`. | ||
function initialize( | ||
ERC20Votes _token, | ||
ILlamaCore _llamaCore, | ||
uint8 _role, | ||
uint256 _minApprovalPct, | ||
uint256 _minDisapprovalPct | ||
) external initializer { | ||
__initializeTokenholderCasterMinimalProxy(_llamaCore, _role, _minApprovalPct, _minDisapprovalPct); | ||
/// @param _role The role used by this contract to cast approvals and vetos. | ||
/// @param _voteQuorum The minimum % of approvals required to submit approvals to `LlamaCore`. | ||
/// @param _vetoQuorum The minimum % of vetos required to submit vetos to `LlamaCore`. | ||
function initialize(ERC20Votes _token, ILlamaCore _llamaCore, uint8 _role, uint256 _voteQuorum, uint256 _vetoQuorum) | ||
external | ||
initializer | ||
{ | ||
__initializeTokenholderCasterMinimalProxy(_llamaCore, _role, _voteQuorum, _vetoQuorum); | ||
token = _token; | ||
uint256 totalSupply = token.totalSupply(); | ||
if (totalSupply == 0) revert InvalidTokenAddress(); | ||
|
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ import {IERC721} from "@openzeppelin/token/ERC721/IERC721.sol"; | |
|
||
/// @title ERC721TokenholderCaster | ||
/// @author Llama ([email protected]) | ||
/// @notice This contract lets holders of a given governance ERC721Votes token cast approvals and disapprovals | ||
/// @notice This contract lets holders of a given governance ERC721Votes token cast approvals and vetos | ||
/// on created actions. | ||
contract ERC721TokenholderCaster is TokenholderCaster { | ||
ERC721Votes public token; | ||
|
@@ -24,17 +24,14 @@ contract ERC721TokenholderCaster is TokenholderCaster { | |
/// The `initializer` modifier ensures that this function can be invoked at most once. | ||
/// @param _token The ERC721 token to be used for voting. | ||
/// @param _llamaCore The `LlamaCore` contract for this Llama instance. | ||
/// @param _role The role used by this contract to cast approvals and disapprovals. | ||
/// @param _minApprovalPct The minimum % of approvals required to submit approvals to `LlamaCore`. | ||
/// @param _minDisapprovalPct The minimum % of disapprovals required to submit disapprovals to `LlamaCore`. | ||
function initialize( | ||
ERC721Votes _token, | ||
ILlamaCore _llamaCore, | ||
uint8 _role, | ||
uint256 _minApprovalPct, | ||
uint256 _minDisapprovalPct | ||
) external initializer { | ||
__initializeTokenholderCasterMinimalProxy(_llamaCore, _role, _minApprovalPct, _minDisapprovalPct); | ||
/// @param _role The role used by this contract to cast approvals and vetos. | ||
/// @param _voteQuorum The minimum % of approvals required to submit approvals to `LlamaCore`. | ||
/// @param _vetoQuorum The minimum % of vetos required to submit vetos to `LlamaCore`. | ||
function initialize(ERC721Votes _token, ILlamaCore _llamaCore, uint8 _role, uint256 _voteQuorum, uint256 _vetoQuorum) | ||
external | ||
initializer | ||
{ | ||
__initializeTokenholderCasterMinimalProxy(_llamaCore, _role, _voteQuorum, _vetoQuorum); | ||
token = _token; | ||
if (!token.supportsInterface(type(IERC721).interfaceId)) revert InvalidTokenAddress(); | ||
} | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
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.
There is still approval here. I'm assuming that should be
votes
?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.
And I can see it's still approvals in a bunch of other places. Might want to do a quick search and replace and confirm if the changes look good.