mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Change in names.
This commit is contained in:
parent
7b554cf461
commit
4863c0c415
|
@ -46,12 +46,12 @@ contract AddressRegistry {
|
||||||
/// @dev LogicRegistry
|
/// @dev LogicRegistry
|
||||||
contract LogicRegistry is AddressRegistry {
|
contract LogicRegistry is AddressRegistry {
|
||||||
|
|
||||||
event LogEnableDefaultLogic(address logicAddress);
|
event LogEnableStaticLogic(address logicAddress);
|
||||||
event LogEnableLogic(address logicAddress);
|
event LogEnableLogic(address logicAddress);
|
||||||
event LogDisableLogic(address logicAddress);
|
event LogDisableLogic(address logicAddress);
|
||||||
|
|
||||||
/// @notice Map of default proxy state
|
/// @notice Map of static proxy state
|
||||||
mapping(address => bool) public defaultLogicProxies;
|
mapping(address => bool) public logicProxiesStatic;
|
||||||
|
|
||||||
/// @notice Map of logic proxy state
|
/// @notice Map of logic proxy state
|
||||||
mapping(address => bool) public logicProxies;
|
mapping(address => bool) public logicProxies;
|
||||||
|
@ -60,7 +60,7 @@ contract LogicRegistry is AddressRegistry {
|
||||||
/// @param _logicAddress (address)
|
/// @param _logicAddress (address)
|
||||||
/// @return (bool)
|
/// @return (bool)
|
||||||
function logic(address _logicAddress) public view returns (bool) {
|
function logic(address _logicAddress) public view returns (bool) {
|
||||||
if (defaultLogicProxies[_logicAddress] || logicProxies[_logicAddress]) {
|
if (logicProxiesStatic[_logicAddress] || logicProxies[_logicAddress]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,20 +69,20 @@ contract LogicRegistry is AddressRegistry {
|
||||||
/// @dev
|
/// @dev
|
||||||
/// @param _logicAddress (address)
|
/// @param _logicAddress (address)
|
||||||
/// @return (bool)
|
/// @return (bool)
|
||||||
function defaultLogic(address _logicAddress) public view returns (bool) {
|
function logicStatic(address _logicAddress) public view returns (bool) {
|
||||||
if (defaultLogicProxies[_logicAddress]) {
|
if (logicProxiesStatic[_logicAddress]) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Sets the default logic proxy to true
|
/// @dev Sets the static logic proxy to true
|
||||||
/// default proxies mostly contains the logic for withdrawal of assets
|
/// static proxies mostly contains the logic for withdrawal of assets
|
||||||
/// and can never be false to freely let user withdraw their assets
|
/// and can never be false to freely let user withdraw their assets
|
||||||
/// @param _logicAddress (address)
|
/// @param _logicAddress (address)
|
||||||
function enableDefaultLogic(address _logicAddress) public isAdmin {
|
function enableStaticLogic(address _logicAddress) public isAdmin {
|
||||||
defaultLogicProxies[_logicAddress] = true;
|
logicProxiesStatic[_logicAddress] = true;
|
||||||
emit LogEnableDefaultLogic(_logicAddress);
|
emit LogEnableStaticLogic(_logicAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Enable logic proxy address
|
/// @dev Enable logic proxy address
|
||||||
|
|
Loading…
Reference in New Issue
Block a user