From ff5af899d5ef6074c0837f15fc58a8bc07371b41 Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Fri, 28 Aug 2020 22:42:21 +0530 Subject: [PATCH] Updated file structure --- contracts/{tokenPool.sol => pools/erc20.sol} | 0 contracts/{ethPool.sol => pools/eth.sol} | 0 contracts/registry.sol | 3 +++ 3 files changed, 3 insertions(+) rename contracts/{tokenPool.sol => pools/erc20.sol} (100%) rename contracts/{ethPool.sol => pools/eth.sol} (100%) diff --git a/contracts/tokenPool.sol b/contracts/pools/erc20.sol similarity index 100% rename from contracts/tokenPool.sol rename to contracts/pools/erc20.sol diff --git a/contracts/ethPool.sol b/contracts/pools/eth.sol similarity index 100% rename from contracts/ethPool.sol rename to contracts/pools/eth.sol diff --git a/contracts/registry.sol b/contracts/registry.sol index 40c337f..25d90d5 100644 --- a/contracts/registry.sol +++ b/contracts/registry.sol @@ -124,6 +124,7 @@ contract Registry { function updatePoolCap(address _pool, uint _newCap) external isMaster { require(isPool[_pool], "not-pool"); + require(poolCap[_pool] != _newCap, "same-pool-cap"); poolCap[_pool] = _newCap; emit LogUpdatePoolCap(_pool, _newCap); } @@ -131,6 +132,7 @@ contract Registry { function updatePoolLogic(address _pool, address _newLogic) external isMaster { require(isPool[_pool], "not-pool"); require(_newLogic != address(0), "invalid-address"); + require( poolLogic[_pool] != _newLogic, "same-pool-logic"); poolLogic[_pool] = _newLogic; emit LogUpdatePoolLogic(_pool, _newLogic); } @@ -138,6 +140,7 @@ contract Registry { function updateInsureFee(address _pool, uint _newFee) external isMaster { require(isPool[_pool], "not-pool"); require(_newFee < 10 ** 18, "insure-fee-limit-reached"); + require(insureFee[_pool] != _newFee, "same-pool-fee"); insureFee[_pool] = _newFee; emit LogUpdateInsureFee(_pool, _newFee); }