set external call interface

This commit is contained in:
mingda
2020-11-06 16:03:18 +08:00
parent bdc8e7f6b1
commit 52a40fec8f
7 changed files with 90 additions and 54 deletions

View File

@@ -53,6 +53,7 @@ library DODOMath {
note: another root is negative, abondan
if deltaBSig=true, then Q2>Q1
if deltaBSig=false, then Q2<Q1
return |Q1-Q2|
*/
function _SolveQuadraticFunctionForTrade(
uint256 Q0,

View File

@@ -17,25 +17,25 @@ interface IPermissionManager {
}
contract PermissionManager is InitializableOwnable {
bool public _BLACKLIST_MODE_ON_;
bool public _WHITELIST_MODE_ON_;
mapping(address => bool) internal _whitelist_;
mapping(address => bool) internal _blacklist_;
function isAllowed(address account) external view returns (bool) {
if (_BLACKLIST_MODE_ON_) {
return !_blacklist_[account];
} else {
if (_WHITELIST_MODE_ON_) {
return _whitelist_[account];
} else {
return !_blacklist_[account];
}
}
function openBlacklist() external onlyOwner {
_BLACKLIST_MODE_ON_ = true;
function openBlacklistMode() external onlyOwner {
_WHITELIST_MODE_ON_ = false;
}
function openWhitelist() external onlyOwner {
_BLACKLIST_MODE_ON_ = true;
function openWhitelistMode() external onlyOwner {
_WHITELIST_MODE_ON_ = true;
}
function addToWhitelist(address account) external onlyOwner {