mirror of
https://github.com/Instadapp/yield-contract.git
synced 2024-07-29 21:47:29 +00:00
Added whitelist logic mapping in deployer.sol
This commit is contained in:
parent
ba7c82862a
commit
6600facbfb
|
@ -7,6 +7,8 @@ contract Controller {
|
|||
event LogNewMaster(address indexed master);
|
||||
event LogUpdateMaster(address indexed master);
|
||||
event LogEnableConnector(address indexed connector);
|
||||
event LogDisableImplementation(address indexed logic);
|
||||
event LogEnableImplementation(address indexed logic);
|
||||
event LogDisableConnector(address indexed connector);
|
||||
event LogAddSigner(address indexed signer);
|
||||
event LogRemoveSigner(address indexed signer);
|
||||
|
@ -14,6 +16,7 @@ contract Controller {
|
|||
address private newMaster;
|
||||
address public master;
|
||||
mapping (address => bool) public connectors;
|
||||
mapping (address => bool) public implementationLogic;
|
||||
mapping (address => bool) public signer;
|
||||
|
||||
modifier isMaster() {
|
||||
|
@ -54,6 +57,21 @@ contract Controller {
|
|||
emit LogDisableConnector(_connector);
|
||||
}
|
||||
|
||||
// enable Implementation Logic
|
||||
function enableImplementationLogic(address _implementationLogic) external isMaster {
|
||||
require(!implementationLogic[_implementationLogic], "already-enabled");
|
||||
require(_implementationLogic != address(0), "invalid-logic");
|
||||
implementationLogic[_implementationLogic] = true;
|
||||
emit LogEnableImplementation(_implementationLogic);
|
||||
}
|
||||
|
||||
// disable Implementation Logic
|
||||
function disableImplementationLogic(address _implementationLogic) external isMaster {
|
||||
require(implementationLogic[_implementationLogic], "already-disabled");
|
||||
delete implementationLogic[_implementationLogic];
|
||||
emit LogDisableImplementation(_implementationLogic);
|
||||
}
|
||||
|
||||
// enable signer
|
||||
function enableSigner(address _signer) external isMaster {
|
||||
require(_signer != address(0), "invalid-address");
|
||||
|
|
Loading…
Reference in New Issue
Block a user