-
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.
Scaffolding the LockManager functions
- Loading branch information
Showing
6 changed files
with
77 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,58 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity ^0.8.13; | ||
|
||
import {IDAO} from "@aragon/osx/core/dao/IDAO.sol"; | ||
import {DaoAuthorizable} from "@aragon/osx/core/plugin/dao-authorizable/DaoAuthorizable.sol"; | ||
import {ILockManager} from "./interfaces/ILockManager.sol"; | ||
import {ILockToVote} from "./interfaces/ILockToVote.sol"; | ||
import {IVotesUpgradeable} from "@openzeppelin/contracts-upgradeable/governance/utils/IVotesUpgradeable.sol"; | ||
|
||
contract LockManager is ILockManager { | ||
struct PluginSettings { | ||
uint64 proposlDuration; | ||
contract LockManager is ILockManager, DaoAuthorizable { | ||
enum LockMode { | ||
STRICT, | ||
FLEXIBLE | ||
} | ||
struct Settings { | ||
LockMode lockMode; | ||
} | ||
|
||
Settings public settings; | ||
|
||
error InvalidLockMode(); | ||
|
||
constructor(IDAO _dao, Settings memory _settings) DaoAuthorizable(_dao) { | ||
if ( | ||
_settings.lockMode != LockMode.STRICT && | ||
_settings.lockMode != LockMode.FLEXIBLE | ||
) { | ||
revert InvalidLockMode(); | ||
} | ||
|
||
settings.lockMode = _settings.lockMode; | ||
} | ||
|
||
/// @inheritdoc ILockManager | ||
function lock() public { | ||
// | ||
} | ||
|
||
/// @inheritdoc ILockManager | ||
function lockAndVote(ILockToVote plugin, uint256 proposalId) public { | ||
// | ||
} | ||
|
||
/// @inheritdoc ILockManager | ||
function vote(ILockToVote plugin, uint256 proposalId) public { | ||
// | ||
} | ||
|
||
/// @inheritdoc ILockManager | ||
function unlock() public { | ||
// | ||
} | ||
|
||
/// @inheritdoc ILockManager | ||
function releaseLock(uint256 proposalId) public { | ||
// | ||
} | ||
} |
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