statement edits

This commit is contained in:
Sowmay Jain 2020-08-25 03:33:44 +10:00
parent 8b20da9574
commit ad1d396045

View File

@ -67,7 +67,7 @@ contract Registry {
* @param _signer Address of the new signer. * @param _signer Address of the new signer.
*/ */
function enableSigner(address _signer) external isChief { function enableSigner(address _signer) external isChief {
require(_signer != address(0), "address-not-valid"); require(_signer != address(0), "invalid-address");
require(!signer[_signer], "signer-already-enabled"); require(!signer[_signer], "signer-already-enabled");
signer[_signer] = true; signer[_signer] = true;
emit LogAddSigner(_signer); emit LogAddSigner(_signer);
@ -78,7 +78,7 @@ contract Registry {
* @param _signer Address of the existing signer. * @param _signer Address of the existing signer.
*/ */
function disableSigner(address _signer) external isChief { function disableSigner(address _signer) external isChief {
require(_signer != address(0), "address-not-valid"); require(_signer != address(0), "invalid-address");
require(signer[_signer], "signer-already-disabled"); require(signer[_signer], "signer-already-disabled");
delete signer[_signer]; delete signer[_signer];
emit LogRemoveSigner(_signer); emit LogRemoveSigner(_signer);
@ -90,7 +90,7 @@ contract Registry {
* @param pool pool address * @param pool pool address
*/ */
function addPool(address token, address pool) external isMaster { // TODO: all good? function addPool(address token, address pool) external isMaster { // TODO: all good?
require(token != address(0) && pool != address(0), "address-not-valid"); require(token != address(0) && pool != address(0), "invalid-address");
poolToken[token] = pool; poolToken[token] = pool;
emit LogAddPool(token, pool); emit LogAddPool(token, pool);
} }
@ -100,7 +100,7 @@ contract Registry {
* @param token ERC20 token address * @param token ERC20 token address
*/ */
function removePool(address token) external isMaster { // TODO: all good? function removePool(address token) external isMaster { // TODO: all good?
require(token != address(0), "address-not-valid"); require(token != address(0), "invalid-address");
address poolAddr = poolToken[token]; address poolAddr = poolToken[token];
delete poolToken[token]; delete poolToken[token];
emit LogRemovePool(token, poolAddr); emit LogRemovePool(token, poolAddr);
@ -112,20 +112,20 @@ contract Registry {
} }
function updatePoolCap(address _pool, uint _newCap) external isChief { function updatePoolCap(address _pool, uint _newCap) external isChief {
require(isPool[_pool], "not-a-pool"); require(isPool[_pool], "not-pool");
poolCap[_pool] = _newCap; poolCap[_pool] = _newCap;
emit LogUpdatePoolCap(_pool, _newCap); emit LogUpdatePoolCap(_pool, _newCap);
} }
function updatePoolLogic(address _pool, address _newLogic) external isChief { function updatePoolLogic(address _pool, address _newLogic) external isChief {
require(isPool[_pool], "not-a-pool"); require(isPool[_pool], "not-pool");
require(_newLogic != address(0), "address-0"); require(_newLogic != address(0), "invalid-address");
poolLogic[_pool] = _newLogic; poolLogic[_pool] = _newLogic;
emit LogUpdatePoolLogic(_pool, _newLogic); emit LogUpdatePoolLogic(_pool, _newLogic);
} }
function updateInsureFee(address _pool, uint _newFee) external isChief { function updateInsureFee(address _pool, uint _newFee) external isChief {
require(isPool[_pool], "not-a-pool"); require(isPool[_pool], "not-pool");
require(_newFee < 1000000000000000000, "insure-fee-limit-reached"); require(_newFee < 1000000000000000000, "insure-fee-limit-reached");
insureFee[_pool] = _newFee; insureFee[_pool] = _newFee;
emit LogUpdateInsureFee(_pool, _newFee); emit LogUpdateInsureFee(_pool, _newFee);