forked from aragon/osx-plugin-template-hardhat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
23 additions
and
24 deletions.
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 |
---|---|---|
|
@@ -20,7 +20,8 @@ import {MajorityVotingBase} from "./MajorityVotingBase.sol"; | |
/// @notice The majority voting implementation using an | ||
/// [OpenZeppelin `Votes`](https://docs.openzeppelin.com/contracts/4.x/api/governance#Votes) | ||
/// compatible governance token. | ||
/// @dev v1.3 (Release 1, Build 3). For each upgrade, if the reinitialization step is required, increment the version numbers in the modifier for both the initialize and initializeFrom functions. | ||
/// @dev v1.3 (Release 1, Build 3). For each upgrade, if the reinitialization step is required, | ||
/// increment the version numbers in the modifier for both the initialize and initializeFrom functions. | ||
/// @custom:security-contact [email protected] | ||
contract TokenVoting is IMembership, MajorityVotingBase { | ||
using SafeCastUpgradeable for uint256; | ||
|
@@ -62,10 +63,14 @@ contract TokenVoting is IMembership, MajorityVotingBase { | |
emit MembershipContractAnnounced({definingContract: address(_token)}); | ||
} | ||
|
||
/// @notice Reinitializes the TokenVoting after an upgrade from a previous protocol version.For each reinitialization step, use the `_fromBuild` version to decide which internal functions to call for reinitialization. | ||
/// @dev WARNING: The contract should only be upgradeable through PSP to ensure that _fromBuild is not incorrectly passed, and that the appropriate permissions for the upgrade are properly configured. | ||
/// @param _fromBuild The build version number of the previous implementation contract this upgrade is transitioning from. | ||
/// @param _initData The initialization data to be passed to via `upgradeToAndCall` (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)). | ||
/// @notice Reinitializes the TokenVoting after an upgrade from a previous protocol version. For each | ||
/// reinitialization step, use the `_fromBuild` version to decide which internal functions to | ||
/// call for reinitialization. | ||
/// @dev WARNING: The contract should only be upgradeable through PSP to ensure that _fromBuild is not | ||
/// incorrectly passed, and that the appropriate permissions for the upgrade are properly configured. | ||
/// @param _fromBuild Build version number of previous implementation contract this upgrade is transitioning from. | ||
/// @param _initData The initialization data to be passed to via `upgradeToAndCall` | ||
/// (see [ERC-1967](https://docs.openzeppelin.com/contracts/4.x/api/proxy#ERC1967Upgrade)). | ||
function initializeFrom(uint16 _fromBuild, bytes calldata _initData) external reinitializer(2) { | ||
if (_fromBuild < 3) { | ||
( | ||
|
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