PermissionGroups
function
removeOperator
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
operator | address |
Outputs
(void)
function removeOperator (address operator) public onlyAdmin {
require(operators[operator]);
operators[operator] = false;
for (uint i = 0; i < operatorsGroup.length; ++i) {
if (operatorsGroup[i] == operator) {
operatorsGroup[i] = operatorsGroup[operatorsGroup.length - 1];
operatorsGroup.length -= 1;
OperatorAdded(operator, false);
break;
}
}
}
function
addOperator
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
newOperator | address |
Outputs
(void)
function
transferAdminQuickly
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
newAdmin | address |
Outputs
(void)
function
addAlerter
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
newAlerter | address |
Outputs
(void)
function
removeAlerter
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
alerter | address |
Outputs
(void)
function removeAlerter (address alerter) public onlyAdmin {
require(alerters[alerter]);
alerters[alerter] = false;
for (uint i = 0; i < alertersGroup.length; ++i) {
if (alertersGroup[i] == alerter) {
alertersGroup[i] = alertersGroup[alertersGroup.length - 1];
alertersGroup.length--;
AlerterAdded(alerter, false);
break;
}
}
}
SanityRates
function
setReasonableDiff
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
srcs | address[] | |
diff | uint256[] |
Outputs
(void)
function
setSanityRates
nonpayable
Restricted (onlyOperator)
Inputs
Parameter | Type | Description |
---|---|---|
srcs | address[] | |
rates | uint256[] |
Outputs
(void)
function
getSanityRate
view
Inputs
Parameter | Type | Description |
---|---|---|
src | address | |
dest | address |
Outputs
Type | Description |
---|---|
uint256 |
function getSanityRate(ERC20 src, ERC20 dest) public view returns(uint) {
if (src != ETH_TOKEN_ADDRESS && dest != ETH_TOKEN_ADDRESS) return 0;
uint rate;
address token;
if (src == ETH_TOKEN_ADDRESS) {
rate = (PRECISION*PRECISION)/tokenRate[dest];
token = dest;
} else {
rate = tokenRate[src];
token = src;
}
return rate * (10000 + reasonableDiffInBps[token])/10000;
}
Withdrawable
function
withdrawToken
nonpayable
Restricted (onlyAdmin)
Inputs
Parameter | Type | Description |
---|---|---|
token | address | |
amount | uint256 | |
sendTo | address |
Outputs
(void)