diff --git a/contracts/network/BancorNetwork.sol b/contracts/network/BancorNetwork.sol index 06f72c200..33c5ea2a5 100644 --- a/contracts/network/BancorNetwork.sol +++ b/contracts/network/BancorNetwork.sol @@ -925,21 +925,6 @@ contract BancorNetwork is IBancorNetwork, Upgradeable, ReentrancyGuardUpgradeabl _addToWhitelist(addr); } - /** - * @dev adds multiple addresses to the fee exemption whitelist - * - * requirements: - * - * - the caller must be the admin of the contract - */ - function addAddressesToWhitelist(address[] calldata addrs) external onlyAdmin { - uint256 length = addrs.length; - - for (uint256 i = 0; i < length; ++i) { - _addToWhitelist(addrs[i]); - } - } - /** * @dev removes an address from the fee exemption whitelist * diff --git a/hardhat.config.ts b/hardhat.config.ts index 0e7731cb5..53135eb2d 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -124,7 +124,7 @@ const config: HardhatUserConfig = { settings: { optimizer: { enabled: true, - runs: 180 + runs: 200 }, metadata: { bytecodeHash: 'none' diff --git a/test/network/BancorNetwork.ts b/test/network/BancorNetwork.ts index df2a46f2f..2aac8888f 100644 --- a/test/network/BancorNetwork.ts +++ b/test/network/BancorNetwork.ts @@ -3378,43 +3378,6 @@ describe('BancorNetwork', () => { expect(await network.isWhitelisted(user1.address)).to.be.true; expect(await network.feeExemptionWhitelist()).to.include(user1.address); }); - - it('should revert when a non-admin attempts to add addresses', async () => { - await expect( - network.connect(nonOwner).addAddressesToWhitelist([user1.address]) - ).to.be.revertedWithError('AccessDenied'); - }); - - it('should revert when adding invalid addresses', async () => { - await expect(network.addAddressesToWhitelist([ZERO_ADDRESS])).to.be.revertedWithError( - 'InvalidExternalAddress' - ); - }); - - it('should revert when adding already whitelisted addresses in the same transaction', async () => { - await expect(network.addAddressesToWhitelist([user1.address, user1.address])).to.be.revertedWithError( - 'AlreadyExists' - ); - }); - - it('should revert when adding already whitelisted addresses in different transactions', async () => { - await network.addAddressesToWhitelist([user1.address]); - await expect(network.addAddressesToWhitelist([user1.address])).to.be.revertedWithError('AlreadyExists'); - }); - - it('should whitelist addresses', async () => { - expect(await network.isWhitelisted(user1.address)).to.be.false; - expect(await network.isWhitelisted(user2.address)).to.be.false; - expect(await network.feeExemptionWhitelist()).not.to.have.members([user1.address, user2.address]); - - const res = await network.addAddressesToWhitelist([user1.address, user2.address]); - await expect(res).to.emit(network, 'AddressAddedToWhitelist').withArgs(user1.address); - await expect(res).to.emit(network, 'AddressAddedToWhitelist').withArgs(user2.address); - - expect(await network.isWhitelisted(user1.address)).to.be.true; - expect(await network.isWhitelisted(user2.address)).to.be.true; - expect(await network.feeExemptionWhitelist()).to.have.members([user1.address, user2.address]); - }); }); describe('removing', () => {