.
diff --git a/packages/helpers/README.md b/packages/helpers/README.md
deleted file mode 100644
index 6221d7bc..00000000
--- a/packages/helpers/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
-
-DeFi automation platform
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Content •
- Setup •
- Security •
- License
-
-
----
-
-## Content
-
-This package contains a bunch of Solidity and TypeScript helpers used among all Mimic v3 repositories.
-
-## Setup
-
-To set up this project you'll need [git](https://git-scm.com) and [yarn](https://classic.yarnpkg.com) installed.
-From your command line:
-
-```bash
-# Clone this repository
-$ git clone https://github.com/mimic-fi/v3-core
-
-# Go into the repository's package
-$ cd v3-core/packages/helpers
-
-# Install dependencies
-$ yarn
-
-# Run tests to make sure everything is set up correctly
-$ yarn test
-```
-
-## Security
-
-To read more about our auditing and related security processes please refer to the [security section](https://docs.mimic.fi/miscellaneous/security) of our docs site.
-
-However, if you found any potential issue in any of our smart contracts or in any piece of code you consider critical
-for the safety of the protocol, please contact us through security@mimic.fi.
-
-## License
-
-GPL 3.0
-
----
-
-> Website [mimic.fi](https://mimic.fi) ·
-> GitHub [@mimic-fi](https://github.com/mimic-fi) ·
-> Twitter [@mimicfi](https://twitter.com/mimicfi) ·
-> Discord [mimic](https://discord.mimic.fi)
diff --git a/packages/helpers/contracts/math/FixedPoint.sol b/packages/helpers/contracts/math/FixedPoint.sol
deleted file mode 100644
index df98dac3..00000000
--- a/packages/helpers/contracts/math/FixedPoint.sol
+++ /dev/null
@@ -1,87 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-/**
- * @title FixedPoint
- * @dev Math library to operate with fixed point values with 18 decimals
- */
-library FixedPoint {
- // 1 in fixed point value: 18 decimal places
- uint256 internal constant ONE = 1e18;
-
- /**
- * @dev Multiplication overflow
- */
- error FixedPointMulOverflow(uint256 a, uint256 b);
-
- /**
- * @dev Division by zero
- */
- error FixedPointZeroDivision();
-
- /**
- * @dev Division internal error
- */
- error FixedPointDivInternal(uint256 a, uint256 aInflated);
-
- /**
- * @dev Multiplies two fixed point numbers rounding down
- */
- function mulDown(uint256 a, uint256 b) internal pure returns (uint256) {
- unchecked {
- uint256 product = a * b;
- if (a != 0 && product / a != b) revert FixedPointMulOverflow(a, b);
- return product / ONE;
- }
- }
-
- /**
- * @dev Multiplies two fixed point numbers rounding up
- */
- function mulUp(uint256 a, uint256 b) internal pure returns (uint256) {
- unchecked {
- uint256 product = a * b;
- if (a != 0 && product / a != b) revert FixedPointMulOverflow(a, b);
- return product == 0 ? 0 : (((product - 1) / ONE) + 1);
- }
- }
-
- /**
- * @dev Divides two fixed point numbers rounding down
- */
- function divDown(uint256 a, uint256 b) internal pure returns (uint256) {
- unchecked {
- if (b == 0) revert FixedPointZeroDivision();
- if (a == 0) return 0;
- uint256 aInflated = a * ONE;
- if (aInflated / a != ONE) revert FixedPointDivInternal(a, aInflated);
- return aInflated / b;
- }
- }
-
- /**
- * @dev Divides two fixed point numbers rounding up
- */
- function divUp(uint256 a, uint256 b) internal pure returns (uint256) {
- unchecked {
- if (b == 0) revert FixedPointZeroDivision();
- if (a == 0) return 0;
- uint256 aInflated = a * ONE;
- if (aInflated / a != ONE) revert FixedPointDivInternal(a, aInflated);
- return ((aInflated - 1) / b) + 1;
- }
- }
-}
diff --git a/packages/helpers/contracts/mocks/FeedMock.sol b/packages/helpers/contracts/mocks/FeedMock.sol
deleted file mode 100644
index 827d1bd4..00000000
--- a/packages/helpers/contracts/mocks/FeedMock.sol
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-contract FeedMock {
- uint8 public decimals;
- int256 public price;
-
- constructor(int256 _price, uint8 _decimals) {
- price = _price;
- decimals = _decimals;
- }
-
- function latestRoundData() external view returns (uint80, int256 answer, uint256, uint256, uint80) {
- return (0, price, 0, 0, 0);
- }
-}
diff --git a/packages/helpers/contracts/mocks/TokenMock.sol b/packages/helpers/contracts/mocks/TokenMock.sol
deleted file mode 100644
index 919b95fb..00000000
--- a/packages/helpers/contracts/mocks/TokenMock.sol
+++ /dev/null
@@ -1,21 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
-
-contract TokenMock is ERC20 {
- uint8 internal _decimals;
-
- constructor(string memory symbol, uint8 dec) ERC20(symbol, symbol) {
- _decimals = dec;
- }
-
- function mint(address account, uint256 amount) external {
- _mint(account, amount);
- }
-
- function decimals() public view override returns (uint8) {
- return _decimals;
- }
-}
diff --git a/packages/helpers/contracts/mocks/WrappedNativeTokenMock.sol b/packages/helpers/contracts/mocks/WrappedNativeTokenMock.sol
deleted file mode 100644
index 966e4ce0..00000000
--- a/packages/helpers/contracts/mocks/WrappedNativeTokenMock.sol
+++ /dev/null
@@ -1,61 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-import '../utils/IWrappedNativeToken.sol';
-
-contract WrappedNativeTokenMock is IWrappedNativeToken {
- uint8 public decimals = 18;
- string public name = 'Wrapped Native Token';
- string public symbol = 'WNT';
-
- event Deposit(address indexed to, uint256 amount);
- event Withdrawal(address indexed from, uint256 amount);
-
- mapping (address => uint256) public override balanceOf;
- mapping (address => mapping (address => uint256)) public override allowance;
-
- receive() external payable {
- deposit();
- }
-
- function deposit() public payable override {
- balanceOf[msg.sender] += msg.value;
- emit Deposit(msg.sender, msg.value);
- }
-
- function withdraw(uint256 amount) public override {
- require(balanceOf[msg.sender] >= amount, 'WNT_NOT_ENOUGH_BALANCE');
- balanceOf[msg.sender] -= amount;
- payable(msg.sender).transfer(amount);
- emit Withdrawal(msg.sender, amount);
- }
-
- function totalSupply() public view override returns (uint256) {
- return address(this).balance;
- }
-
- function approve(address spender, uint256 amount) public override returns (bool) {
- allowance[msg.sender][spender] = amount;
- emit Approval(msg.sender, spender, amount);
- return true;
- }
-
- function transfer(address to, uint256 amount) public override returns (bool) {
- return transferFrom(msg.sender, to, amount);
- }
-
- function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
- require(balanceOf[from] >= amount, 'NOT_ENOUGH_BALANCE');
-
- if (from != msg.sender && allowance[from][msg.sender] != type(uint256).max) {
- require(allowance[from][msg.sender] >= amount, 'NOT_ENOUGH_ALLOWANCE');
- allowance[from][msg.sender] -= amount;
- }
-
- balanceOf[from] -= amount;
- balanceOf[to] += amount;
- emit Transfer(from, to, amount);
- return true;
- }
-}
diff --git a/packages/helpers/contracts/test/math/FixedPointMock.sol b/packages/helpers/contracts/test/math/FixedPointMock.sol
deleted file mode 100644
index ae3be55d..00000000
--- a/packages/helpers/contracts/test/math/FixedPointMock.sol
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-import '../../math/FixedPoint.sol';
-
-contract FixedPointMock {
- using FixedPoint for uint256;
-
- function mulUp(uint256 a, uint256 b) external pure returns (uint256) {
- return a.mulUp(b);
- }
-
- function mulDown(uint256 a, uint256 b) external pure returns (uint256) {
- return a.mulDown(b);
- }
-
- function divUp(uint256 a, uint256 b) external pure returns (uint256) {
- return a.divUp(b);
- }
-
- function divDown(uint256 a, uint256 b) external pure returns (uint256) {
- return a.divDown(b);
- }
-}
diff --git a/packages/helpers/contracts/test/utils/ArraysMock.sol b/packages/helpers/contracts/test/utils/ArraysMock.sol
deleted file mode 100644
index eb6ed216..00000000
--- a/packages/helpers/contracts/test/utils/ArraysMock.sol
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '../../utils/Arrays.sol';
-
-library ArraysMock {
- function from1(address a, address b) external pure returns (address[] memory result) {
- return Arrays.from(a, b);
- }
-
- function from2(address a, address[] memory b, address c) external pure returns (address[] memory result) {
- return Arrays.from(a, b, c);
- }
-
- function from3(uint24 a, uint24[] memory b) external pure returns (uint24[] memory result) {
- return Arrays.from(a, b);
- }
-
- function from4(bytes32 a, bytes32[] memory b) external pure returns (bytes32[] memory result) {
- return Arrays.from(a, b);
- }
-}
diff --git a/packages/helpers/contracts/test/utils/BytesHelpersMock.sol b/packages/helpers/contracts/test/utils/BytesHelpersMock.sol
deleted file mode 100644
index 6607c5d1..00000000
--- a/packages/helpers/contracts/test/utils/BytesHelpersMock.sol
+++ /dev/null
@@ -1,31 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '../../utils/BytesHelpers.sol';
-
-library BytesHelpersMock {
- function concat1(bytes memory self, address value) external pure returns (bytes memory) {
- return BytesHelpers.concat(self, value);
- }
-
- function concat2(bytes memory self, uint24 value) external pure returns (bytes memory) {
- return BytesHelpers.concat(self, value);
- }
-
- function toUint256(bytes memory self, uint256 start) external pure returns (uint256) {
- return BytesHelpers.toUint256(self, start);
- }
-}
diff --git a/packages/helpers/contracts/test/utils/DenominationsMock.sol b/packages/helpers/contracts/test/utils/DenominationsMock.sol
deleted file mode 100644
index ee07532b..00000000
--- a/packages/helpers/contracts/test/utils/DenominationsMock.sol
+++ /dev/null
@@ -1,25 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '../../utils/Denominations.sol';
-
-// solhint-disable func-name-mixedcase
-
-contract DenominationsMock {
- function NATIVE_TOKEN() external pure returns (address) {
- return Denominations.NATIVE_TOKEN;
- }
-}
diff --git a/packages/helpers/contracts/test/utils/ERC20HelpersMock.sol b/packages/helpers/contracts/test/utils/ERC20HelpersMock.sol
deleted file mode 100644
index 9cf16fdf..00000000
--- a/packages/helpers/contracts/test/utils/ERC20HelpersMock.sol
+++ /dev/null
@@ -1,35 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '../../utils/ERC20Helpers.sol';
-
-contract ERC20HelpersMock {
- receive() external payable {
- // solhint-disable-previous-line no-empty-blocks
- }
-
- function approve(address token, address to, uint256 amount) external {
- ERC20Helpers.approve(token, to, amount);
- }
-
- function transfer(address token, address to, uint256 amount) external {
- ERC20Helpers.transfer(token, to, amount);
- }
-
- function balanceOf(address token, address account) external view returns (uint256) {
- return ERC20Helpers.balanceOf(token, account);
- }
-}
diff --git a/packages/helpers/contracts/test/utils/EnumerableMapAddressToAddressMock.sol b/packages/helpers/contracts/test/utils/EnumerableMapAddressToAddressMock.sol
deleted file mode 100644
index ea0ee0ed..00000000
--- a/packages/helpers/contracts/test/utils/EnumerableMapAddressToAddressMock.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-import '../../utils/EnumerableMap.sol';
-
-// solhint-disable func-name-mixedcase
-
-contract EnumerableMapAddressToAddressMock {
- using EnumerableMap for EnumerableMap.AddressToAddressMap;
-
- event OperationResult(bool result);
-
- EnumerableMap.AddressToAddressMap private _map;
-
- function length() public view returns (uint256) {
- return _map.length();
- }
-
- function contains(address key) public view returns (bool) {
- return _map.contains(key);
- }
-
- function set(address key, address value) public {
- bool result = _map.set(key, value);
- emit OperationResult(result);
- }
-
- function remove(address key) public {
- bool result = _map.remove(key);
- emit OperationResult(result);
- }
-
- function at(uint256 index) public view returns (address key, address value) {
- return _map.at(index);
- }
-
- function get(address key) public view returns (address) {
- return _map.get(key);
- }
-
- function tryGet(address key) public view returns (bool exists, address value) {
- return _map.tryGet(key);
- }
-
- function keys() public view returns (address[] memory) {
- return _map.keys();
- }
-
- function values() public view returns (address[] memory) {
- return _map.values();
- }
-}
diff --git a/packages/helpers/contracts/test/utils/EnumerableMapAddressToUintMock.sol b/packages/helpers/contracts/test/utils/EnumerableMapAddressToUintMock.sol
deleted file mode 100644
index 5951f6be..00000000
--- a/packages/helpers/contracts/test/utils/EnumerableMapAddressToUintMock.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-pragma solidity ^0.8.0;
-
-import '../../utils/EnumerableMap.sol';
-
-// solhint-disable func-name-mixedcase
-
-contract EnumerableMapAddressToUintMock {
- using EnumerableMap for EnumerableMap.AddressToUintMap;
-
- event OperationResult(bool result);
-
- EnumerableMap.AddressToUintMap private _map;
-
- function set(address key, uint256 value) public {
- bool result = _map.set(key, value);
- emit OperationResult(result);
- }
-
- function remove(address key) public {
- bool result = _map.remove(key);
- emit OperationResult(result);
- }
-
- function length() public view returns (uint256) {
- return _map.length();
- }
-
- function contains(address key) public view returns (bool) {
- return _map.contains(key);
- }
-
- function at(uint256 index) public view returns (address key, uint256 value) {
- return _map.at(index);
- }
-
- function get(address key) public view returns (uint256) {
- return _map.get(key);
- }
-
- function tryGet(address key) public view returns (bool exists, uint256 value) {
- return _map.tryGet(key);
- }
-
- function keys() public view returns (address[] memory) {
- return _map.keys();
- }
-
- function values() public view returns (uint256[] memory) {
- return _map.values();
- }
-}
diff --git a/packages/helpers/contracts/utils/Arrays.sol b/packages/helpers/contracts/utils/Arrays.sol
deleted file mode 100644
index 40db8c89..00000000
--- a/packages/helpers/contracts/utils/Arrays.sol
+++ /dev/null
@@ -1,64 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-/**
- * @title Arrays
- * @dev Helper methods to operate arrays
- */
-library Arrays {
- /**
- * @dev Builds an array of addresses based on the given ones
- */
- function from(address a, address b) internal pure returns (address[] memory result) {
- result = new address[](2);
- result[0] = a;
- result[1] = b;
- }
-
- /**
- * @dev Builds an array of addresses based on the given ones
- */
- function from(address a, address[] memory b, address c) internal pure returns (address[] memory result) {
- result = new address[](b.length + 2);
- result[0] = a;
- for (uint256 i = 0; i < b.length; i++) {
- result[i + 1] = b[i];
- }
- result[b.length + 1] = c;
- }
-
- /**
- * @dev Builds an array of uint24s based on the given ones
- */
- function from(uint24 a, uint24[] memory b) internal pure returns (uint24[] memory result) {
- result = new uint24[](b.length + 1);
- result[0] = a;
- for (uint256 i = 0; i < b.length; i++) {
- result[i + 1] = b[i];
- }
- }
-
- /**
- * @dev Builds an array of bytes32 based on the given ones
- */
- function from(bytes32 a, bytes32[] memory b) internal pure returns (bytes32[] memory result) {
- result = new bytes32[](b.length + 1);
- result[0] = a;
- for (uint256 i = 0; i < b.length; i++) {
- result[i + 1] = b[i];
- }
- }
-}
diff --git a/packages/helpers/contracts/utils/BytesHelpers.sol b/packages/helpers/contracts/utils/BytesHelpers.sol
deleted file mode 100644
index 4d6076ec..00000000
--- a/packages/helpers/contracts/utils/BytesHelpers.sol
+++ /dev/null
@@ -1,57 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-/**
- * @title BytesHelpers
- * @dev Provides a list of Bytes helper methods
- */
-library BytesHelpers {
- /**
- * @dev The length is shorter than start plus 32
- */
- error BytesOutOfBounds(uint256 start, uint256 length);
-
- /**
- * @dev Concatenates an address to a bytes array
- */
- function concat(bytes memory self, address value) internal pure returns (bytes memory) {
- return abi.encodePacked(self, value);
- }
-
- /**
- * @dev Concatenates an uint24 to a bytes array
- */
- function concat(bytes memory self, uint24 value) internal pure returns (bytes memory) {
- return abi.encodePacked(self, value);
- }
-
- /**
- * @dev Decodes a bytes array into an uint256
- */
- function toUint256(bytes memory self) internal pure returns (uint256) {
- return toUint256(self, 0);
- }
-
- /**
- * @dev Reads an uint256 from a bytes array starting at a given position
- */
- function toUint256(bytes memory self, uint256 start) internal pure returns (uint256 result) {
- if (self.length < start + 32) revert BytesOutOfBounds(start, self.length);
- assembly {
- result := mload(add(add(self, 0x20), start))
- }
- }
-}
diff --git a/packages/helpers/contracts/utils/Denominations.sol b/packages/helpers/contracts/utils/Denominations.sol
deleted file mode 100644
index 333c8c3e..00000000
--- a/packages/helpers/contracts/utils/Denominations.sol
+++ /dev/null
@@ -1,31 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-/**
- * @title Denominations
- * @dev Provides a list of ground denominations for those tokens that cannot be represented by an ERC20.
- * For now, the only needed is the native token that could be ETH, MATIC, or other depending on the layer being operated.
- */
-library Denominations {
- address internal constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
-
- // Fiat currencies follow https://en.wikipedia.org/wiki/ISO_4217
- address internal constant USD = address(840);
-
- function isNativeToken(address token) internal pure returns (bool) {
- return token == NATIVE_TOKEN;
- }
-}
diff --git a/packages/helpers/contracts/utils/ERC20Helpers.sol b/packages/helpers/contracts/utils/ERC20Helpers.sol
deleted file mode 100644
index 1b1bf56e..00000000
--- a/packages/helpers/contracts/utils/ERC20Helpers.sol
+++ /dev/null
@@ -1,40 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
-import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
-
-import './Denominations.sol';
-
-/**
- * @title ERC20Helpers
- * @dev Provides a list of ERC20 helper methods
- */
-library ERC20Helpers {
- function approve(address token, address to, uint256 amount) internal {
- SafeERC20.forceApprove(IERC20(token), to, amount);
- }
-
- function transfer(address token, address to, uint256 amount) internal {
- if (Denominations.isNativeToken(token)) Address.sendValue(payable(to), amount);
- else SafeERC20.safeTransfer(IERC20(token), to, amount);
- }
-
- function balanceOf(address token, address account) internal view returns (uint256) {
- if (Denominations.isNativeToken(token)) return address(account).balance;
- else return IERC20(token).balanceOf(address(account));
- }
-}
diff --git a/packages/helpers/contracts/utils/EnumerableMap.sol b/packages/helpers/contracts/utils/EnumerableMap.sol
deleted file mode 100644
index a932a23a..00000000
--- a/packages/helpers/contracts/utils/EnumerableMap.sol
+++ /dev/null
@@ -1,244 +0,0 @@
-// SPDX-License-Identifier: MIT
-
-// Based on the EnumerableMap library from OpenZeppelin Contracts
-
-pragma solidity ^0.8.0;
-
-import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
-
-/**
- * @dev Library for managing an enumerable variant of Solidity's
- * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
- * type.
- *
- * Maps have the following properties:
- *
- * - Entries are added, removed, and checked for existence in constant time
- * (O(1)).
- * - Entries are enumerated in O(n). No guarantees are made on the ordering.
- *
- * ```
- * contract Example {
- * // Add the library methods
- * using EnumerableMap for EnumerableMap.AddressToAddressMap;
- *
- * // Declare a set state variable
- * EnumerableMap.AddressToAddressMap private myMap;
- * }
- * ```
- */
-
-library EnumerableMap {
- using EnumerableSet for EnumerableSet.AddressSet;
-
- /**
- * @dev Address to uint map
- * @param _keys Set of map keys
- * @param _values Map of values
- */
- struct AddressToUintMap {
- EnumerableSet.AddressSet _keys;
- mapping (address => uint256) _values;
- }
-
- /**
- * @dev The key doesn't exist in the map
- */
- error EnumerableMapNonExistentKey(address key);
-
- /**
- * @dev Adds a key-value pair to a map, or updates the value for an existing
- * key. O(1).
- *
- * Returns true if the key was added to the map, that is if it was not
- * already present.
- */
- function set(AddressToUintMap storage map, address key, uint256 value) internal returns (bool) {
- map._values[key] = value;
- return map._keys.add(key);
- }
-
- /**
- * @dev Removes a key-value pair from a map. O(1).
- *
- * Returns true if the key was removed from the map, that is if it was present.
- */
- function remove(AddressToUintMap storage map, address key) internal returns (bool) {
- delete map._values[key];
- return map._keys.remove(key);
- }
-
- /**
- * @dev Returns the number of key-value pairs in the map. O(1).
- */
- function length(AddressToUintMap storage map) internal view returns (uint256) {
- return map._keys.length();
- }
-
- /**
- * @dev Returns true if the key is in the map. O(1).
- */
- function contains(AddressToUintMap storage map, address key) internal view returns (bool) {
- return map._keys.contains(key);
- }
-
- /**
- * @dev Return the entire set of keys
- */
- function keys(AddressToUintMap storage map) internal view returns (address[] memory) {
- return map._keys.values();
- }
-
- /**
- * @dev Return the entire set of values
- */
- function values(AddressToUintMap storage map) internal view returns (uint256[] memory items) {
- items = new uint256[](length(map));
- for (uint256 i = 0; i < items.length; i++) {
- address key = map._keys.at(i);
- items[i] = map._values[key];
- }
- }
-
- /**
- * @dev Returns the key-value pair stored at position `index` in the map. O(1).
- *
- * Note that there are no guarantees on the ordering of entries inside the
- * array, and it may change when more entries are added or removed.
- *
- * Requirements:
- *
- * - `index` must be strictly lower than {length}.
- */
- function at(AddressToUintMap storage map, uint256 index) internal view returns (address, uint256) {
- address key = map._keys.at(index);
- return (key, map._values[key]);
- }
-
- /**
- * @dev Returns the value associated with `key`. O(1).
- *
- * Requirements:
- *
- * - `key` must be in the map.
- */
- function get(AddressToUintMap storage map, address key) internal view returns (uint256) {
- uint256 value = map._values[key];
- if (value == 0 && !contains(map, key)) revert EnumerableMapNonExistentKey(key);
- return value;
- }
-
- /**
- * @dev Tries to returns the value associated with `key`. O(1).
- * Does not revert if `key` is not in the map.
- */
- function tryGet(AddressToUintMap storage map, address key) internal view returns (bool, uint256) {
- uint256 value = map._values[key];
- if (value == 0) {
- return (contains(map, key), 0);
- } else {
- return (true, value);
- }
- }
-
- // AddressToAddressMap
-
- struct AddressToAddressMap {
- EnumerableSet.AddressSet _keys;
- mapping (address => address) _values;
- }
-
- /**
- * @dev Adds a key-value pair to a map, or updates the value for an existing key. O(1).
- *
- * Returns true if the key was added to the map, that is if it was not
- * already present.
- */
- function set(AddressToAddressMap storage map, address key, address value) internal returns (bool) {
- map._values[key] = value;
- return map._keys.add(key);
- }
-
- /**
- * @dev Removes a key-value pair from a map. O(1).
- *
- * Returns true if the key was removed from the map, that is if it was present.
- */
- function remove(AddressToAddressMap storage map, address key) internal returns (bool) {
- delete map._values[key];
- return map._keys.remove(key);
- }
-
- /**
- * @dev Returns the number of key-value pairs in the map. O(1).
- */
- function length(AddressToAddressMap storage map) internal view returns (uint256) {
- return map._keys.length();
- }
-
- /**
- * @dev Returns true if the key is in the map. O(1).
- */
- function contains(AddressToAddressMap storage map, address key) internal view returns (bool) {
- return map._keys.contains(key);
- }
-
- /**
- * @dev Return the entire set of keys
- */
- function keys(AddressToAddressMap storage map) internal view returns (address[] memory) {
- return map._keys.values();
- }
-
- /**
- * @dev Return the entire set of values
- */
- function values(AddressToAddressMap storage map) internal view returns (address[] memory items) {
- items = new address[](length(map));
- for (uint256 i = 0; i < items.length; i++) {
- address key = map._keys.at(i);
- items[i] = map._values[key];
- }
- }
-
- /**
- * @dev Returns the key-value pair stored at position `index` in the map. O(1).
- *
- * Note that there are no guarantees on the ordering of entries inside the
- * array, and it may change when more entries are added or removed.
- *
- * Requirements:
- *
- * - `index` must be strictly less than {length}.
- */
- function at(AddressToAddressMap storage map, uint256 index) internal view returns (address, address) {
- address key = map._keys.at(index);
- return (key, map._values[key]);
- }
-
- /**
- * @dev Returns the value associated with `key`. O(1).
- *
- * Requirements:
- *
- * - `key` must be in the map.
- */
- function get(AddressToAddressMap storage map, address key) internal view returns (address) {
- address value = map._values[key];
- if (value == address(0) && !contains(map, key)) revert EnumerableMapNonExistentKey(key);
- return value;
- }
-
- /**
- * @dev Tries to returns the value associated with `key`. O(1).
- * Does not revert if `key` is not in the map.
- */
- function tryGet(AddressToAddressMap storage map, address key) internal view returns (bool, address) {
- address value = map._values[key];
- if (value == address(0)) {
- return (contains(map, key), address(0));
- } else {
- return (true, value);
- }
- }
-}
diff --git a/packages/helpers/contracts/utils/IWrappedNativeToken.sol b/packages/helpers/contracts/utils/IWrappedNativeToken.sol
deleted file mode 100644
index 414a0445..00000000
--- a/packages/helpers/contracts/utils/IWrappedNativeToken.sol
+++ /dev/null
@@ -1,32 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-pragma solidity ^0.8.0;
-
-import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
-
-/**
- * @title IWrappedNativeToken
- */
-interface IWrappedNativeToken is IERC20 {
- /**
- * @dev Wraps msg.value into the wrapped-native token
- */
- function deposit() external payable;
-
- /**
- * @dev Unwraps requested amount to the native token
- */
- function withdraw(uint256 amount) external;
-}
diff --git a/packages/helpers/hardhat.config.ts b/packages/helpers/hardhat.config.ts
deleted file mode 100644
index 6b4bec75..00000000
--- a/packages/helpers/hardhat.config.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import '@nomiclabs/hardhat-ethers'
-import '@nomiclabs/hardhat-waffle'
-
-export default {
- solidity: {
- version: '0.8.17',
- settings: {
- optimizer: {
- enabled: true,
- runs: 10000,
- },
- },
- },
-}
diff --git a/packages/helpers/index.ts b/packages/helpers/index.ts
deleted file mode 100644
index 2d0247aa..00000000
--- a/packages/helpers/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export * from './src/addresses'
-export * from './src/asserts'
-export * from './src/blocks'
-export * from './src/constants'
-export * from './src/contracts'
-export * from './src/mocks'
-export * from './src/numbers'
-export * from './src/signers'
-export * from './src/tests'
-export * from './src/time'
diff --git a/packages/helpers/package.json b/packages/helpers/package.json
deleted file mode 100644
index 56b5a7e9..00000000
--- a/packages/helpers/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "@mimic-fi/v3-helpers",
- "version": "0.1.12",
- "license": "GPL-3.0",
- "main": "dist/index.js",
- "types": "dist/index.d.ts",
- "files": [
- "artifacts/contracts/**/*",
- "!artifacts/contracts/test/*",
- "contracts/**/*",
- "!contracts/test/*",
- "dist"
- ],
- "scripts": {
- "build": "yarn compile && rm -rf dist && tsc",
- "compile": "hardhat compile",
- "lint": "yarn lint:solidity && yarn lint:typescript",
- "lint:solidity": "solhint 'contracts/**/*.sol' --config ../../node_modules/solhint-config-mimic/index.js",
- "lint:typescript": "eslint . --ext .ts",
- "test": "hardhat test",
- "prepare": "yarn build"
- },
- "dependencies": {
- "@nomiclabs/hardhat-ethers": "^2.2.3",
- "@nomiclabs/hardhat-waffle": "2.0.3",
- "@types/chai": "^4.3.5",
- "@types/mocha": "^10.0.1",
- "@types/sinon-chai": "^3.2.3",
- "chai": "^4.3.7",
- "decimal.js": "~10.4.3",
- "ethers": "~5.6.0",
- "hardhat": "^2.14.1",
- "mocha": "^6.2.3"
- },
- "devDependencies": {
- "eslint-config-mimic": "^0.0.2",
- "ethereum-waffle": "^3.4.4",
- "solhint-config-mimic": "^0.0.3",
- "ts-node": "^10.9.1",
- "typescript": "~4.3.4"
- },
- "eslintConfig": {
- "extends": "eslint-config-mimic",
- "ignorePatterns": ["dist"]
- }
-}
diff --git a/packages/helpers/src/addresses/chainlink/arbitrum.ts b/packages/helpers/src/addresses/chainlink/arbitrum.ts
deleted file mode 100644
index 7bc0b751..00000000
--- a/packages/helpers/src/addresses/chainlink/arbitrum.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const DAI_USD = '0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB'
-export const ETH_USD = '0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612'
-export const USDC_USD = '0x50834F3163758fcC1Df9973b6e91f0F0F0434aD3'
-export const USDT_USD = '0x3f3f5dF88dC9F13eac63DF89EC16ef6e7E25DdE7'
diff --git a/packages/helpers/src/addresses/chainlink/avalanche.ts b/packages/helpers/src/addresses/chainlink/avalanche.ts
deleted file mode 100644
index 1b9e6d27..00000000
--- a/packages/helpers/src/addresses/chainlink/avalanche.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const AVAX_USD = '0x0A77230d17318075983913bC2145DB16C7366156'
-export const ETH_USD = '0x976B3D034E162d8bD72D6b9C989d545b839003b0'
-export const DAI_USD = '0x51D7180edA2260cc4F6e4EebB82FEF5c3c2B8300'
-export const USDC_USD = '0xF096872672F44d6EBA71458D74fe67F9a77a23B9'
-export const USDT_USD = '0xEBE676ee90Fe1112671f19b6B7459bC678B67e8a'
diff --git a/packages/helpers/src/addresses/chainlink/base.ts b/packages/helpers/src/addresses/chainlink/base.ts
deleted file mode 100644
index a520b41b..00000000
--- a/packages/helpers/src/addresses/chainlink/base.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_USD = '0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70'
-export const DAI_USD = '0x591e79239a7d679378eC8c847e5038150364C78F'
-export const USDC_USD = '0x7e860098F58bBFC8648a4311b374B1D669a2bc6B'
-export const USDT_USD = '0xf19d560eB8d2ADf07BD6D13ed03e1D11215721F9'
diff --git a/packages/helpers/src/addresses/chainlink/bsc.ts b/packages/helpers/src/addresses/chainlink/bsc.ts
deleted file mode 100644
index e1edab08..00000000
--- a/packages/helpers/src/addresses/chainlink/bsc.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const BNB_USD = '0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE'
-export const ETH_USD = '0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e'
-export const DAI_USD = '0x132d3C0B1D2cEa0BC552588063bdBb210FDeecfA'
-export const USDC_USD = '0x51597f405303C4377E36123cBc172b13269EA163'
-export const USDT_USD = '0xB97Ad0E74fa7d920791E90258A6E2085088b4320'
diff --git a/packages/helpers/src/addresses/chainlink/denominations.ts b/packages/helpers/src/addresses/chainlink/denominations.ts
deleted file mode 100644
index a5c24343..00000000
--- a/packages/helpers/src/addresses/chainlink/denominations.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USD = '0x0000000000000000000000000000000000000348'
diff --git a/packages/helpers/src/addresses/chainlink/fantom.ts b/packages/helpers/src/addresses/chainlink/fantom.ts
deleted file mode 100644
index 64ea4034..00000000
--- a/packages/helpers/src/addresses/chainlink/fantom.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const FTM_USD = '0xf4766552D15AE4d256Ad41B6cf2933482B0680dc'
-export const ETH_USD = '0x11DdD3d147E5b83D01cee7070027092397d63658'
-export const DAI_USD = '0x91d5DEFAFfE2854C7D02F50c80FA1fdc8A721e52'
-export const USDC_USD = '0x2553f4eeb82d5A26427b8d1106C51499CBa5D99c'
-export const USDT_USD = '0xF64b636c5dFe1d3555A847341cDC449f612307d0'
diff --git a/packages/helpers/src/addresses/chainlink/gnosis.ts b/packages/helpers/src/addresses/chainlink/gnosis.ts
deleted file mode 100644
index 56127e3b..00000000
--- a/packages/helpers/src/addresses/chainlink/gnosis.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const DAI_USD = '0x678df3415fc31947dA4324eC63212874be5a82f8'
-export const ETH_USD = '0xa767f745331D267c7751297D982b050c93985627'
-export const USDC_USD = '0x26C31ac71010aF62E6B486D1132E266D6298857D'
-export const USDT_USD = '0x68811D7DF835B1c33e6EEae8E7C141eF48d48cc7'
diff --git a/packages/helpers/src/addresses/chainlink/goerli.ts b/packages/helpers/src/addresses/chainlink/goerli.ts
deleted file mode 100644
index 7a837211..00000000
--- a/packages/helpers/src/addresses/chainlink/goerli.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_USD = '0xD4a33860578De61DBAbDc8BFdb98FD742fA7028e'
diff --git a/packages/helpers/src/addresses/chainlink/index.ts b/packages/helpers/src/addresses/chainlink/index.ts
deleted file mode 100644
index 31fecf39..00000000
--- a/packages/helpers/src/addresses/chainlink/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export * as arbitrum from './arbitrum'
-export * as avalanche from './avalanche'
-export * as bsc from './bsc'
-export * as denominations from './denominations'
-export * as fantom from './fantom'
-export * as gnosis from './gnosis'
-export * as goerli from './goerli'
-export * as mainnet from './mainnet'
-export * as mumbai from './mumbai'
-export * as optimism from './optimism'
-export * as polygon from './polygon'
diff --git a/packages/helpers/src/addresses/chainlink/mainnet.ts b/packages/helpers/src/addresses/chainlink/mainnet.ts
deleted file mode 100644
index 4e8bb3ac..00000000
--- a/packages/helpers/src/addresses/chainlink/mainnet.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USDC_ETH = '0x986b5E1e1755e3C2440e960477f25201B0a8bbD4'
-export const USDT_ETH = '0xEe9F2375b4bdF6387aa8265dD4FB8F16512A1d46'
-export const DAI_ETH = '0x773616E4d11A78F511299002da57A0a94577F1f4'
-export const MANA_ETH = '0x82A44D92D6c329826dc557c5E1Be6ebeC5D5FeB9'
-export const BAL_ETH = '0xC1438AA3823A6Ba0C159CfA8D98dF5A994bA120b'
-export const ETH_USD = '0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419'
diff --git a/packages/helpers/src/addresses/chainlink/mumbai.ts b/packages/helpers/src/addresses/chainlink/mumbai.ts
deleted file mode 100644
index 3fe0fde1..00000000
--- a/packages/helpers/src/addresses/chainlink/mumbai.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const MATIC_USD = '0xd0D5e3DB44DE05E9F294BB0a3bEEaF030DE24Ada'
diff --git a/packages/helpers/src/addresses/chainlink/optimism.ts b/packages/helpers/src/addresses/chainlink/optimism.ts
deleted file mode 100644
index 6c96f185..00000000
--- a/packages/helpers/src/addresses/chainlink/optimism.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const DAI_USD = '0x8dBa75e83DA73cc766A7e5a0ee71F656BAb470d6'
-export const ETH_USD = '0x13e3Ee699D1909E989722E753853AE30b17e08c5'
-export const USDC_USD = '0x16a9FA2FDa030272Ce99B29CF780dFA30361E0f3'
-export const USDT_USD = '0xECef79E109e997bCA29c1c0897ec9d7b03647F5E'
diff --git a/packages/helpers/src/addresses/chainlink/polygon.ts b/packages/helpers/src/addresses/chainlink/polygon.ts
deleted file mode 100644
index ed23acd6..00000000
--- a/packages/helpers/src/addresses/chainlink/polygon.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const DAI_USD = '0x4746DeC9e833A82EC7C2C1356372CcF2cfcD2F3D'
-export const ETH_USD = '0xF9680D99D6C9589e2a93a78A04A279e509205945'
-export const USDC_USD = '0xfE4A8cc5b5B2366C1B58Bea3858e81843581b2F7'
-export const USDT_USD = '0x0A6513e40db6EB1b165753AD52E80663aeA50545'
-export const MATIC_USD = '0xAB594600376Ec9fD91F8e885dADF0CE036862dE0'
diff --git a/packages/helpers/src/addresses/hop/arbitrum.ts b/packages/helpers/src/addresses/hop/arbitrum.ts
deleted file mode 100644
index 009790dd..00000000
--- a/packages/helpers/src/addresses/hop/arbitrum.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_AMM = '0x33ceb27b39d2Bb7D2e61F7564d3Df29344020417'
-export const DAI_AMM = '0xe7F40BF16AB09f4a6906Ac2CAA4094aD2dA48Cc2'
-export const USDC_AMM = '0xe22D2beDb3Eca35E6397e0C6D62857094aA26F52'
-export const USDT_AMM = '0xCB0a4177E0A60247C0ad18Be87f8eDfF6DD30283'
diff --git a/packages/helpers/src/addresses/hop/base.ts b/packages/helpers/src/addresses/hop/base.ts
deleted file mode 100644
index 5d6b15c7..00000000
--- a/packages/helpers/src/addresses/hop/base.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_AMM = '0x10541b07d8Ad2647Dc6cD67abd4c03575dade261'
-export const USDC_AMM = '0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F'
diff --git a/packages/helpers/src/addresses/hop/gnosis.ts b/packages/helpers/src/addresses/hop/gnosis.ts
deleted file mode 100644
index 6babdd95..00000000
--- a/packages/helpers/src/addresses/hop/gnosis.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH_AMM = '0x03D7f750777eC48d39D080b020D83Eb2CB4e3547'
-export const DAI_AMM = '0x6C928f435d1F3329bABb42d69CCF043e3900EcF1'
-export const USDC_AMM = '0x76b22b8C1079A44F1211D867D68b1eda76a635A7'
-export const USDT_AMM = '0x49094a1B3463c4e2E82ca41b8e6A023bdd6E222f'
diff --git a/packages/helpers/src/addresses/hop/goerli.ts b/packages/helpers/src/addresses/hop/goerli.ts
deleted file mode 100644
index 389e6ab2..00000000
--- a/packages/helpers/src/addresses/hop/goerli.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_BRIDGE = '0xC8A4FB931e8D77df8497790381CA7d228E68a41b'
-export const USDC_BRIDGE = '0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F'
diff --git a/packages/helpers/src/addresses/hop/index.ts b/packages/helpers/src/addresses/hop/index.ts
deleted file mode 100644
index c9eca721..00000000
--- a/packages/helpers/src/addresses/hop/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export * as arbitrum from './arbitrum'
-export * as base from './base'
-export * as gnosis from './gnosis'
-export * as goerli from './goerli'
-export * as mainnet from './mainnet'
-export * as mumbai from './mumbai'
-export * as optimism from './optimism'
-export * as polygon from './polygon'
diff --git a/packages/helpers/src/addresses/hop/mainnet.ts b/packages/helpers/src/addresses/hop/mainnet.ts
deleted file mode 100644
index 8b63cf6a..00000000
--- a/packages/helpers/src/addresses/hop/mainnet.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_BRIDGE = '0xb8901acB165ed027E32754E0FFe830802919727f'
-export const DAI_BRIDGE = '0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1'
-export const USDC_BRIDGE = '0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a'
-export const USDT_BRIDGE = '0x3E4a3a4796d16c0Cd582C382691998f7c06420B6'
diff --git a/packages/helpers/src/addresses/hop/mumbai.ts b/packages/helpers/src/addresses/hop/mumbai.ts
deleted file mode 100644
index e3773fc3..00000000
--- a/packages/helpers/src/addresses/hop/mumbai.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USDC_AMM = '0xa81D244A1814468C734E5b4101F7b9c0c577a8fC'
-export const WETH_AMM = '0x0e0E3d2C5c292161999474247956EF542caBF8dd'
diff --git a/packages/helpers/src/addresses/hop/optimism.ts b/packages/helpers/src/addresses/hop/optimism.ts
deleted file mode 100644
index b95a75e7..00000000
--- a/packages/helpers/src/addresses/hop/optimism.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_AMM = '0x86cA30bEF97fB651b8d866D45503684b90cb3312'
-export const DAI_AMM = '0xb3C68a491608952Cb1257FC9909a537a0173b63B'
-export const USDC_AMM = '0x2ad09850b0CA4c7c1B33f5AcD6cBAbCaB5d6e796'
-export const USDT_AMM = '0x7D269D3E0d61A05a0bA976b7DBF8805bF844AF3F'
diff --git a/packages/helpers/src/addresses/hop/polygon.ts b/packages/helpers/src/addresses/hop/polygon.ts
deleted file mode 100644
index 5a4801e5..00000000
--- a/packages/helpers/src/addresses/hop/polygon.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ETH_AMM = '0xc315239cFb05F1E130E7E28E603CEa4C014c57f0'
-export const DAI_AMM = '0x28529fec439cfF6d7D1D5917e956dEE62Cd3BE5c'
-export const USDC_AMM = '0x76b22b8C1079A44F1211D867D68b1eda76a635A7'
-export const USDT_AMM = '0x8741Ba6225A6BF91f9D73531A98A89807857a2B3'
diff --git a/packages/helpers/src/addresses/index.ts b/packages/helpers/src/addresses/index.ts
deleted file mode 100644
index a62c699b..00000000
--- a/packages/helpers/src/addresses/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * as chainlink from './chainlink'
-export * as hop from './hop'
-export * as protocols from './protocols'
-export * as tokens from './tokens'
diff --git a/packages/helpers/src/addresses/protocols/arbitrum.ts b/packages/helpers/src/addresses/protocols/arbitrum.ts
deleted file mode 100644
index b58f7e07..00000000
--- a/packages/helpers/src/addresses/protocols/arbitrum.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const UNISWAP_V3_ROUTER = '0xE592427A0AEce92De3Edee1F18E0157C05861564'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0xe432150cce91c13a887f7D836923d5597adD8E31'
-export const CONNEXT_ENTRYPOINT = '0xEE9deC2712cCE65174B561151701Bf54b99C24C8'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/aurora.ts b/packages/helpers/src/addresses/protocols/aurora.ts
deleted file mode 100644
index 3911e342..00000000
--- a/packages/helpers/src/addresses/protocols/aurora.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
diff --git a/packages/helpers/src/addresses/protocols/avalanche.ts b/packages/helpers/src/addresses/protocols/avalanche.ts
deleted file mode 100644
index d7753fd7..00000000
--- a/packages/helpers/src/addresses/protocols/avalanche.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const SUSHI_SWAP_ROUTER = '0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0x5029C0EFf6C34351a0CEc334542cDb22c7928f78'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/base.ts b/packages/helpers/src/addresses/protocols/base.ts
deleted file mode 100644
index 0177da57..00000000
--- a/packages/helpers/src/addresses/protocols/base.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-export const PARASWAP_V5_AUGUSTUS = '0x59C7C832e96D2568bea6db468C1aAdcbbDa08A52'
-
-export const AXELAR_GATEWAY = '0xe432150cce91c13a887f7D836923d5597adD8E31'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/bsc.ts b/packages/helpers/src/addresses/protocols/bsc.ts
deleted file mode 100644
index 00a5682f..00000000
--- a/packages/helpers/src/addresses/protocols/bsc.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const SUSHI_SWAP_ROUTER = '0xc35dadb65012ec5796536bd9864ed8773abc74c4'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0x304acf330bbE08d1e512eefaa92F6a57871fD895'
-export const CONNEXT_ENTRYPOINT = '0xCd401c10afa37d641d2F594852DA94C700e4F2CE'
diff --git a/packages/helpers/src/addresses/protocols/fantom.ts b/packages/helpers/src/addresses/protocols/fantom.ts
deleted file mode 100644
index cc98b6e5..00000000
--- a/packages/helpers/src/addresses/protocols/fantom.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const SUSHI_SWAP_ROUTER = '0xc35dadb65012ec5796536bd9864ed8773abc74c4'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0x304acf330bbE08d1e512eefaa92F6a57871fD895'
diff --git a/packages/helpers/src/addresses/protocols/gnosis.ts b/packages/helpers/src/addresses/protocols/gnosis.ts
deleted file mode 100644
index e86df542..00000000
--- a/packages/helpers/src/addresses/protocols/gnosis.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const HONEY_SWAP_ROUTER = '0x1c232f01118cb8b424793ae03f870aa7d0ac7f77'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const CONNEXT_ENTRYPOINT = '0x5bB83e95f63217CDa6aE3D181BA580Ef377D2109'
diff --git a/packages/helpers/src/addresses/protocols/index.ts b/packages/helpers/src/addresses/protocols/index.ts
deleted file mode 100644
index 830065d7..00000000
--- a/packages/helpers/src/addresses/protocols/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export * as arbitrum from './arbitrum'
-export * as aurora from './aurora'
-export * as avalanche from './avalanche'
-export * as base from './base'
-export * as bsc from './bsc'
-export * as fantom from './fantom'
-export * as gnosis from './gnosis'
-export * as mainnet from './mainnet'
-export * as optimism from './optimism'
-export * as polygon from './polygon'
-export * as zkevm from './zkevm'
-export * as zksync from './zksync'
diff --git a/packages/helpers/src/addresses/protocols/mainnet.ts b/packages/helpers/src/addresses/protocols/mainnet.ts
deleted file mode 100644
index 219de5f1..00000000
--- a/packages/helpers/src/addresses/protocols/mainnet.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const UNISWAP_V2_ROUTER = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D'
-export const UNISWAP_V3_ROUTER = '0xE592427A0AEce92De3Edee1F18E0157C05861564'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0x4F4495243837681061C4743b74B3eEdf548D56A5'
-export const CONNEXT_ENTRYPOINT = '0x8898B472C54c31894e3B9bb83cEA802a5d0e63C6'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/optimism.ts b/packages/helpers/src/addresses/protocols/optimism.ts
deleted file mode 100644
index 71eb415a..00000000
--- a/packages/helpers/src/addresses/protocols/optimism.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const UNISWAP_V3_ROUTER = '0xE592427A0AEce92De3Edee1F18E0157C05861564'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const CONNEXT_ENTRYPOINT = '0x8f7492DE823025b4CfaAB1D34c58963F2af5DEDA'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/polygon.ts b/packages/helpers/src/addresses/protocols/polygon.ts
deleted file mode 100644
index 24c0afde..00000000
--- a/packages/helpers/src/addresses/protocols/polygon.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const QUICK_SWAP_ROUTER = '0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff'
-export const UNISWAP_V3_ROUTER = '0xE592427A0AEce92De3Edee1F18E0157C05861564'
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xdef171fe48cf0115b1d80b88dc8eab59176fee57'
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
-
-export const AXELAR_GATEWAY = '0x6f015F16De9fC8791b234eF68D486d2bF203FBA8'
-export const CONNEXT_ENTRYPOINT = '0x11984dc4465481512eb5b777E44061C158CF2259'
-export const WORMHOLE_CIRCLE_RELAYER = '0x4cb69FaE7e7Af841e44E1A1c30Af640739378bb2'
diff --git a/packages/helpers/src/addresses/protocols/zkevm.ts b/packages/helpers/src/addresses/protocols/zkevm.ts
deleted file mode 100644
index 64d500e9..00000000
--- a/packages/helpers/src/addresses/protocols/zkevm.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const BALANCER_V2_VAULT = '0xBA12222222228d8Ba445958a75a0704d566BF2C8'
-export const PARASWAP_V5_AUGUSTUS = '0xb83b554730d29ce4cb55bb42206c3e2c03e4a40a'
diff --git a/packages/helpers/src/addresses/protocols/zksync.ts b/packages/helpers/src/addresses/protocols/zksync.ts
deleted file mode 100644
index 3911e342..00000000
--- a/packages/helpers/src/addresses/protocols/zksync.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const ONE_INCH_V5_ROUTER = '0x1111111254EEB25477B68fb85Ed929f73A960582'
diff --git a/packages/helpers/src/addresses/tokens/arbitrum.ts b/packages/helpers/src/addresses/tokens/arbitrum.ts
deleted file mode 100644
index 2431341c..00000000
--- a/packages/helpers/src/addresses/tokens/arbitrum.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'
-export const DAI = '0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1'
-export const USDCe = '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8'
-export const USDC = '0xaf88d065e77c8cc2239327c5edb3a432268e5831'
-export const USDT = '0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9'
diff --git a/packages/helpers/src/addresses/tokens/aurora.ts b/packages/helpers/src/addresses/tokens/aurora.ts
deleted file mode 100644
index 98d3b9ac..00000000
--- a/packages/helpers/src/addresses/tokens/aurora.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB'
-export const USDCe = '0xB12BFcA5A55806AaF64E99521918A4bf0fC40802'
-export const USDT = '0x4988a896b1227218e4A686fdE5EabdcAbd91571f'
-export const DAI = '0xe3520349F477A5F6EB06107066048508498A291b'
diff --git a/packages/helpers/src/addresses/tokens/avalanche.ts b/packages/helpers/src/addresses/tokens/avalanche.ts
deleted file mode 100644
index cacaaf31..00000000
--- a/packages/helpers/src/addresses/tokens/avalanche.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WAVAX = '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7'
-export const WETH = '0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB'
-export const DAI = '0xd586E7F844cEa2F87f50152665BCbc2C279D8d70'
-export const USDC = '0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E'
-export const USDT = '0x9702230A8Ea53601f5cD2dc00fDBc13d4dF4A8c7'
diff --git a/packages/helpers/src/addresses/tokens/base.ts b/packages/helpers/src/addresses/tokens/base.ts
deleted file mode 100644
index 9d674972..00000000
--- a/packages/helpers/src/addresses/tokens/base.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0x4200000000000000000000000000000000000006'
-export const DAI = '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb'
-export const USDC = '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
diff --git a/packages/helpers/src/addresses/tokens/bsc.ts b/packages/helpers/src/addresses/tokens/bsc.ts
deleted file mode 100644
index 344389bf..00000000
--- a/packages/helpers/src/addresses/tokens/bsc.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WBNB = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'
-export const WETH = '0x2170Ed0880ac9A755fd29B2688956BD959F933F8'
-export const DAI = '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3'
-export const USDCe = '0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d'
-export const USDT = '0x55d398326f99059ff775485246999027b3197955'
-export const PSP = '0xcafe001067cdef266afb7eb5a286dcfd277f3de5'
diff --git a/packages/helpers/src/addresses/tokens/fantom.ts b/packages/helpers/src/addresses/tokens/fantom.ts
deleted file mode 100644
index 97f67bba..00000000
--- a/packages/helpers/src/addresses/tokens/fantom.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WFTM = '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83'
-export const WETH = '0x74b23882a30290451A17c44f4F05243b6b58C76d'
-export const DAI = '0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E'
-export const USDCe = '0x28a92dde19d9989f39a49905d7c9c2fac7799bdf'
-export const USDT = '0x049d68029688eabf473097a2fc38ef61633a3c7a'
-export const PSP = '0xcafe001067cdef266afb7eb5a286dcfd277f3de5'
diff --git a/packages/helpers/src/addresses/tokens/gnosis.ts b/packages/helpers/src/addresses/tokens/gnosis.ts
deleted file mode 100644
index cbc293d7..00000000
--- a/packages/helpers/src/addresses/tokens/gnosis.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WXDAI = '0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d'
-export const WETH = '0x6A023CCd1ff6F2045C3309768eAd9E68F978f6e1'
-export const USDC = '0xddafbb505ad214d7b80b1f830fccc89b60fb7a83'
-export const USDT = '0x4ECaBa5870353805a9F068101A40E0f32ed605C6'
diff --git a/packages/helpers/src/addresses/tokens/goerli.ts b/packages/helpers/src/addresses/tokens/goerli.ts
deleted file mode 100644
index b96e84b9..00000000
--- a/packages/helpers/src/addresses/tokens/goerli.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USDC = '0x98339D8C260052B7ad81c28c16C0b98420f2B46a'
-export const WETH = '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6'
diff --git a/packages/helpers/src/addresses/tokens/index.ts b/packages/helpers/src/addresses/tokens/index.ts
deleted file mode 100644
index 58f0ad4c..00000000
--- a/packages/helpers/src/addresses/tokens/index.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-export * as arbitrum from './arbitrum'
-export * as aurora from './aurora'
-export * as avalanche from './avalanche'
-export * as base from './base'
-export * as bsc from './bsc'
-export * as fantom from './fantom'
-export * as gnosis from './gnosis'
-export * as goerli from './goerli'
-export * as mainnet from './mainnet'
-export * as mumbai from './mumbai'
-export * as optimism from './optimism'
-export * as polygon from './polygon'
-export * as zkevm from './zkevm'
-export * as zksync from './zksync'
diff --git a/packages/helpers/src/addresses/tokens/mainnet.ts b/packages/helpers/src/addresses/tokens/mainnet.ts
deleted file mode 100644
index 4503c4e8..00000000
--- a/packages/helpers/src/addresses/tokens/mainnet.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USDC = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
-export const USDT = '0xdAC17F958D2ee523a2206206994597C13D831ec7'
-export const WETH = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
-export const DAI = '0x6B175474E89094C44Da98b954EedeAC495271d0F'
-export const MANA = '0x0F5D2fB29fb7d3CFeE444a200298f468908cC942'
-export const PSP = '0xcafe001067cdef266afb7eb5a286dcfd277f3de5'
-export const BAL = '0xba100000625a3754423978a60c9317c58a424e3D'
-export const AURA_BAL = '0x616e8bfa43f920657b3497dbf40d6b1a02d4608d'
diff --git a/packages/helpers/src/addresses/tokens/mumbai.ts b/packages/helpers/src/addresses/tokens/mumbai.ts
deleted file mode 100644
index 9300b59f..00000000
--- a/packages/helpers/src/addresses/tokens/mumbai.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const USDC = '0x6D4dd09982853F08d9966aC3cA4Eb5885F16f2b2'
-export const WETH = '0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa'
-export const WMATIC = '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889'
diff --git a/packages/helpers/src/addresses/tokens/optimism.ts b/packages/helpers/src/addresses/tokens/optimism.ts
deleted file mode 100644
index d5872e0b..00000000
--- a/packages/helpers/src/addresses/tokens/optimism.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0x4200000000000000000000000000000000000006'
-export const DAI = '0xda10009cbd5d07dd0cecc66161fc93d7c9000da1'
-export const USDC = '0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85'
-export const USDCe = '0x7F5c764cBc14f9669B88837ca1490cCa17c31607'
-export const USDT = '0x94b008aa00579c1307b0ef2c499ad98a8ce58e58'
-export const BAL = '0xfe8b128ba8c78aabc59d4c64cee7ff28e9379921'
diff --git a/packages/helpers/src/addresses/tokens/polygon.ts b/packages/helpers/src/addresses/tokens/polygon.ts
deleted file mode 100644
index 4fb5f167..00000000
--- a/packages/helpers/src/addresses/tokens/polygon.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WMATIC = '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270'
-export const WETH = '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619'
-export const USDC = '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359'
-export const USDCe = '0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174'
-export const USDT = '0xc2132d05d31c914a87c6611c10748aeb04b58e8f'
-export const DAI = '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063'
-export const PSP = '0x42d61d766b85431666b39b89c43011f24451bff6'
diff --git a/packages/helpers/src/addresses/tokens/zkevm.ts b/packages/helpers/src/addresses/tokens/zkevm.ts
deleted file mode 100644
index 05f9c744..00000000
--- a/packages/helpers/src/addresses/tokens/zkevm.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9'
-export const DAI = '0xc5015b9d9161dca7e18e32f6f25c4ad850731fd4'
-export const USDCe = '0x37eAA0eF3549a5Bb7D431be78a3D99BD360d19e5'
-export const USDT = '0x1e4a5963abfd975d8c9021ce480b42188849d41d'
diff --git a/packages/helpers/src/addresses/tokens/zksync.ts b/packages/helpers/src/addresses/tokens/zksync.ts
deleted file mode 100644
index 8f1553af..00000000
--- a/packages/helpers/src/addresses/tokens/zksync.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-/* eslint-disable no-secrets/no-secrets */
-
-export const WETH = '0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91'
-export const USDCe = '0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4'
-export const USDT = '0x493257fD37EDB34451f62EDf8D2a0C418852bA4C'
diff --git a/packages/helpers/src/asserts.ts b/packages/helpers/src/asserts.ts
deleted file mode 100644
index fbb69401..00000000
--- a/packages/helpers/src/asserts.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-import { expect } from 'chai'
-import { BigNumber, Contract, ContractTransaction } from 'ethers'
-import { Interface, LogDescription } from 'ethers/lib/utils'
-
-import { pct } from './numbers'
-
-// Ported from @openzeppelin/test-helpers to use with Ethers. The Test Helpers don't
-// yet have Typescript typings, so we're being lax about them here.
-// See https://github.com/OpenZeppelin/openzeppelin-test-helpers/issues/122
-
-/* eslint-disable @typescript-eslint/no-explicit-any */
-
-export function assertAlmostEqual(actual: BigNumber, expected: BigNumber, error: number): void {
- const abs = pct(expected, error)
- expect(actual).to.be.at.least(expected.sub(abs))
- expect(actual).to.be.at.most(expected.add(abs))
-}
-
-export async function assertEvent(tx: ContractTransaction, eventName: string, eventArgs = {}): Promise {
- const receipt = await tx.wait()
-
- if (receipt.events == undefined) {
- throw new Error('No events found in receipt')
- }
-
- const events = receipt.events.filter((e) => e.event === eventName)
- expect(events.length > 0).to.equal(true, `No '${eventName}' events found`)
-
- const exceptions: Array = []
- const event = events.find(function (e) {
- for (const [k, v] of Object.entries(eventArgs)) {
- try {
- if (e.args == undefined) {
- throw new Error('Event has no arguments')
- }
-
- contains(e.args, k, v)
- } catch (error) {
- exceptions.push(error as string)
- return false
- }
- }
- return true
- })
-
- if (event === undefined) {
- // Each event entry may have failed to match for different reasons,
- // throw the first one
- throw exceptions[0]
- }
-
- return event
-}
-
-export async function assertIndirectEvent(
- tx: ContractTransaction,
- emitter: Interface,
- eventName: string,
- eventArgs = {}
-): Promise {
- const receipt = await tx.wait()
- const decodedEvents = receipt.logs
- .map((log) => {
- try {
- return emitter.parseLog(log)
- } catch {
- return undefined
- }
- })
- .filter((e): e is LogDescription => e !== undefined)
-
- const expectedEvents = decodedEvents.filter((event) => event.name === eventName)
- expect(expectedEvents.length > 0).to.equal(true, `No '${eventName}' events found`)
-
- const exceptions: Array = []
- const event = expectedEvents.find(function (e) {
- for (const [k, v] of Object.entries(eventArgs)) {
- try {
- if (e.args == undefined) {
- throw new Error('Event has no arguments')
- }
-
- contains(e.args, k, v)
- } catch (error) {
- exceptions.push(error as string)
- return false
- }
- }
- return true
- })
-
- if (event === undefined) {
- // Each event entry may have failed to match for different reasons,
- // throw the first one
- throw exceptions[0]
- }
-
- return event
-}
-
-export async function assertNoEvent(tx: ContractTransaction, eventName: string): Promise {
- const receipt = await tx.wait()
- if (receipt.events != undefined) {
- const events = receipt.events.filter((e) => e.event === eventName)
- expect(events.length > 0).to.equal(false, `'${eventName}' event found`)
- }
-}
-
-export async function assertNoIndirectEvent(
- tx: ContractTransaction,
- emitter: Interface,
- eventName: string
-): Promise {
- const receipt = await tx.wait()
- const decodedEvents = receipt.logs
- .map((log) => {
- try {
- return emitter.parseLog(log)
- } catch {
- return undefined
- }
- })
- .filter((e): e is LogDescription => e !== undefined)
-
- const events = decodedEvents.filter((event) => event.name === eventName)
- expect(events.length > 0).to.equal(false, `'${eventName}' event found`)
-}
-
-function contains(args: { [key: string]: any | undefined }, key: string, value: any) {
- expect(key in args).to.equal(true, `Event argument '${key}' not found`)
-
- if (value === null) {
- expect(args[key]).to.equal(null, `expected event argument '${key}' to be null but got ${args[key]}`)
- } else if (BigNumber.isBigNumber(args[key]) || BigNumber.isBigNumber(value)) {
- const actual = BigNumber.isBigNumber(args[key]) ? args[key].toString() : args[key]
- const expected = BigNumber.isBigNumber(value) ? value.toString() : value
-
- expect(args[key]).to.equal(value, `expected event argument '${key}' to have value ${expected} but got ${actual}`)
- } else {
- const expected = typeof args[key] === 'string' && typeof value === 'object' && value.address ? value.address : value
- expect(args[key]).to.be.deep.equal(
- expected,
- `expected event argument '${key}' to have value ${value} but got ${args[key]}`
- )
- }
-}
-
-export type NAry = N | N[]
-
-export type PermissionAssertion = {
- name: string
- roles: string[]
- account: NAry<{ address: string } | string>
-}
-
-export async function assertPermissions(target: Contract, assertions: PermissionAssertion[]): Promise {
- for (const assertion of assertions) {
- const accounts = Array.isArray(assertion.account) ? assertion.account : [assertion.account]
- for (const account of accounts) {
- const address = typeof account === 'string' ? account : account.address
- for (const fn in target.interface.functions) {
- const fnName = target.interface.functions[fn].name
- const role = target.interface.getSighash(fnName)
- const should = assertion.roles.includes(fnName)
- const message = `expected "${assertion.name}" ${address} ${should ? 'to' : 'not to'} have "${fn}" rights`
- expect(await target.isAuthorized(address, role)).to.be.equal(should, message)
- }
- }
- }
-}
diff --git a/packages/helpers/src/blocks.ts b/packages/helpers/src/blocks.ts
deleted file mode 100644
index a25e2a38..00000000
--- a/packages/helpers/src/blocks.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { BigNumber } from 'ethers'
-
-import { bn } from './numbers'
-
-export const incrementBlocks = async (blocks: number): Promise => {
- const { ethers } = await import('hardhat')
- for (let i = 0; i < blocks; i++) await ethers.provider.send('evm_mine', [])
-}
-
-export const currentBlock = async (): Promise<{ number: number; timestamp: number }> => {
- const { network } = await import('hardhat')
- return network.provider.send('eth_getBlockByNumber', ['latest', true])
-}
-
-export const currentBlockNumber = async (): Promise => {
- const { number } = await currentBlock()
- return bn(number)
-}
diff --git a/packages/helpers/src/constants.ts b/packages/helpers/src/constants.ts
deleted file mode 100644
index e9ab4617..00000000
--- a/packages/helpers/src/constants.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { BigNumber } from 'ethers'
-
-import { bn } from './numbers'
-
-export const maxUint = (e: number): BigNumber => bn(2).pow(e).sub(1)
-
-export const MAX_UINT256: BigNumber = maxUint(256)
-
-export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
-export const ONES_ADDRESS = '0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF'
-export const NATIVE_TOKEN_ADDRESS = '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'
-
-export const ZERO_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000'
-export const ONES_BYTES32 = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
diff --git a/packages/helpers/src/contracts.ts b/packages/helpers/src/contracts.ts
deleted file mode 100644
index fa1c3404..00000000
--- a/packages/helpers/src/contracts.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
-import { Contract, ContractFactory } from 'ethers'
-import { getContractAddress } from 'ethers/lib/utils'
-import { Artifacts } from 'hardhat/internal/artifacts'
-import { Artifact, LinkReferences } from 'hardhat/types'
-import path from 'path'
-
-import { getSigner } from './signers'
-
-/* eslint-disable @typescript-eslint/no-explicit-any */
-/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-
-export type Libraries = { [key: string]: string }
-
-export type ArtifactLike = { abi: any; bytecode: string; linkReferences?: LinkReferences }
-
-const MINIMAL_PROXY_BYTECODE = `0x3d602d80600a3d3981f3363d3d373d3d3d363d73_IMP_5af43d82803e903d91602b57fd5bf3`
-
-export async function deploy(
- nameOrArtifact: string | ArtifactLike,
- args: Array = [],
- from?: SignerWithAddress,
- libraries?: Libraries
-): Promise {
- if (!args) args = []
- if (!from) from = await getSigner()
- const factory = await getFactoryContract(nameOrArtifact, libraries)
- const instance = await factory.connect(from).deploy(...args)
- return instance.deployed()
-}
-
-export async function deployProxy(
- nameOrArtifact: string | ArtifactLike,
- args: Array = [],
- initArgs: Array = [],
- initName = 'initialize',
- from?: SignerWithAddress,
- libraries?: Libraries
-): Promise {
- const implementation = await deploy(nameOrArtifact, args, from, libraries)
- const proxyBytecode = MINIMAL_PROXY_BYTECODE.replace('_IMP_', implementation.address.slice(2))
-
- if (!from) from = await getSigner()
- const addressQuery = { from: from.address, nonce: await from.getTransactionCount() }
- await from.sendTransaction({ data: proxyBytecode })
- const instance = await instanceAt(nameOrArtifact, await getContractAddress(addressQuery))
- await instance[initName](...initArgs)
- return instance
-}
-
-export async function getCreationCode(
- nameOrArtifact: string | ArtifactLike,
- args: Array = [],
- libraries?: Libraries
-): Promise {
- if (!args) args = []
- const contractFactory = await getFactoryContract(nameOrArtifact, libraries)
- const transaction = await contractFactory.getDeployTransaction(...args)
- return transaction.data?.toString() || '0x'
-}
-
-async function getFactoryContract(
- nameOrArtifact: string | ArtifactLike,
- libraries: Libraries | undefined
-): Promise {
- const artifact = typeof nameOrArtifact === 'string' ? await getArtifact(nameOrArtifact) : nameOrArtifact
- if (libraries !== undefined) artifact.bytecode = linkBytecode(artifact, libraries)
- return getFactoryContractForBytecode(nameOrArtifact, artifact.bytecode)
-}
-
-async function getFactoryContractForBytecode(
- nameOrArtifact: string | ArtifactLike,
- bytecode: string
-): Promise {
- const artifact = typeof nameOrArtifact === 'string' ? await getArtifact(nameOrArtifact) : nameOrArtifact
- const { ethers } = await import('hardhat')
- return ethers.getContractFactory(artifact.abi, bytecode)
-}
-
-export async function instanceAt(nameOrArtifact: string | any, address: string): Promise {
- const { ethers } = await import('hardhat')
- const artifact = typeof nameOrArtifact === 'string' ? await getArtifact(nameOrArtifact) : nameOrArtifact
- return ethers.getContractAt(artifact.abi, address)
-}
-
-export async function getArtifact(contractName: string): Promise {
- const artifactsPath = !contractName.includes('/')
- ? path.resolve('./artifacts')
- : path.dirname(require.resolve(`${contractName}.json`))
- const artifacts = new Artifacts(artifactsPath)
- return artifacts.readArtifact(contractName.split('/').slice(-1)[0])
-}
-
-export function linkBytecode(artifact: ArtifactLike, libraries: Libraries): string {
- let bytecode = artifact.bytecode.replace('0x', '')
- for (const [, fileReferences] of Object.entries(artifact.linkReferences || {})) {
- for (const [library, fixups] of Object.entries(fileReferences)) {
- const address = libraries[library]
- if (address === undefined) continue
- for (const fixup of fixups) {
- const pre = bytecode.substring(0, fixup.start * 2)
- const post = bytecode.substring((fixup.start + fixup.length) * 2)
- bytecode = pre + address.replace('0x', '') + post
- }
- }
- }
- return `0x${bytecode}`
-}
diff --git a/packages/helpers/src/mocks.ts b/packages/helpers/src/mocks.ts
deleted file mode 100644
index f5366cdd..00000000
--- a/packages/helpers/src/mocks.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Contract } from 'ethers'
-
-import { deploy } from './contracts'
-import { BigNumberish } from './numbers'
-
-/* eslint-disable no-secrets/no-secrets */
-
-export async function deployWrappedNativeTokenMock(): Promise {
- return deploy('@mimic-fi/v3-helpers/artifacts/contracts/mocks/WrappedNativeTokenMock.sol/WrappedNativeTokenMock')
-}
-
-export async function deployTokenMock(symbol: string, decimals = 18): Promise {
- return deploy('@mimic-fi/v3-helpers/artifacts/contracts/mocks/TokenMock.sol/TokenMock', [symbol, decimals])
-}
-
-export async function deployFeedMock(price: BigNumberish, decimals = 18): Promise {
- return deploy('@mimic-fi/v3-helpers/artifacts/contracts/mocks/FeedMock.sol/FeedMock', [price, decimals])
-}
diff --git a/packages/helpers/src/numbers.ts b/packages/helpers/src/numbers.ts
deleted file mode 100644
index d6ea0333..00000000
--- a/packages/helpers/src/numbers.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import { Decimal } from 'decimal.js'
-import { BigNumber } from 'ethers'
-
-const SCALING_FACTOR = 1e18
-
-export type BigNumberish = string | number | BigNumber
-
-export const decimal = (x: BigNumberish | Decimal): Decimal => new Decimal(x.toString())
-
-export const fp = (x: number | string | Decimal): BigNumber => bn(decimal(x).mul(SCALING_FACTOR))
-
-export const toWBTC = (x: number | string | Decimal): BigNumber => fp(x).div(1e10)
-
-export const toUSDC = (x: number | string | Decimal): BigNumber => fp(x).div(1e12)
-
-export const toUSDT = toUSDC
-
-export const pct = (x: BigNumber, p: number): BigNumber => x.mul(fp(p)).div(fp(1))
-
-export const bn = (x: BigNumberish | Decimal): BigNumber => {
- if (BigNumber.isBigNumber(x)) return x
- const stringified = parseScientific(x.toString())
- const integer = stringified.split('.')[0]
- return BigNumber.from(integer)
-}
-
-function parseScientific(num: string): string {
- // If the number is not in scientific notation return it as it is
- if (!/\d+\.?\d*e[+-]*\d+/i.test(num)) return num
-
- // Remove the sign
- const numberSign = Math.sign(Number(num))
- num = Math.abs(Number(num)).toString()
-
- // Parse into coefficient and exponent
- const [coefficient, exponent] = num.toLowerCase().split('e')
- let zeros = Math.abs(Number(exponent))
- const exponentSign = Math.sign(Number(exponent))
- const [integer, decimals] = (coefficient.indexOf('.') != -1 ? coefficient : `${coefficient}.`).split('.')
-
- if (exponentSign === -1) {
- zeros -= integer.length
- num =
- zeros < 0
- ? integer.slice(0, zeros) + '.' + integer.slice(zeros) + decimals
- : '0.' + '0'.repeat(zeros) + integer + decimals
- } else {
- if (decimals) zeros -= decimals.length
- num =
- zeros < 0
- ? integer + decimals.slice(0, zeros) + '.' + decimals.slice(zeros)
- : integer + decimals + '0'.repeat(zeros)
- }
-
- return numberSign < 0 ? '-' + num : num
-}
diff --git a/packages/helpers/src/signers.ts b/packages/helpers/src/signers.ts
deleted file mode 100644
index c5ae6988..00000000
--- a/packages/helpers/src/signers.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
-import { BigNumber } from 'ethers'
-
-import { getForkedNetwork } from './tests'
-
-const WHALES: { [key: string]: string } = {
- mainnet: '0x47ac0fb4f2d84898e4d9e7b4dab3c24507a6d503',
-}
-
-export async function getSigner(indexOrAddress: number | string = 0): Promise {
- if (typeof indexOrAddress === 'string') {
- const { ethers } = await import('hardhat')
- const signer = ethers.provider.getSigner(indexOrAddress)
- return SignerWithAddress.create(signer)
- } else {
- const signers = await getSigners()
- return signers[indexOrAddress]
- }
-}
-
-export async function getSigners(size?: number, offset = 0): Promise {
- const { ethers } = await import('hardhat')
- const signers = await ethers.getSigners()
- return size ? signers.slice(offset, offset + size) : signers
-}
-
-export async function impersonate(address: string, balance?: BigNumber): Promise {
- const { network, ethers } = await import('hardhat')
- await network.provider.request({ method: 'hardhat_impersonateAccount', params: [address] })
-
- if (balance) {
- const rawHexBalance = ethers.utils.hexlify(balance)
- const hexBalance = rawHexBalance.replace('0x0', '0x')
- await network.provider.request({ method: 'hardhat_setBalance', params: [address, hexBalance] })
- }
-
- return getSigner(address)
-}
-
-export async function impersonateWhale(balance?: BigNumber): Promise {
- const hre = await import('hardhat')
- const network = getForkedNetwork(hre)
- const address = WHALES[network]
- if (!address) throw Error(`Could not find whale address for network ${network}`)
- return impersonate(address, balance)
-}
diff --git a/packages/helpers/src/tests.ts b/packages/helpers/src/tests.ts
deleted file mode 100644
index c705a241..00000000
--- a/packages/helpers/src/tests.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { TASK_TEST_GET_TEST_FILES, TASK_TEST_RUN_MOCHA_TESTS } from 'hardhat/builtin-tasks/task-names'
-import { HardhatNetworkConfig, HardhatRuntimeEnvironment, HttpNetworkConfig, RunSuperFunction } from 'hardhat/types'
-
-/* eslint-disable @typescript-eslint/no-explicit-any */
-/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
-
-export async function overrideTestTask(
- args: any,
- hre: HardhatRuntimeEnvironment,
- run: RunSuperFunction
-): Promise {
- const files = await hre.run(TASK_TEST_GET_TEST_FILES, { testFiles: args.testFiles })
- if (hre.network.name === 'hardhat' && args.fork) await runForkTests(args, files, hre, run)
- else await runNormalTests(args, files, hre, run)
-}
-
-async function runNormalTests(
- args: any,
- files: string[],
- hre: HardhatRuntimeEnvironment,
- run: RunSuperFunction
-): Promise {
- console.log('Running normal tests...')
- if (args.fork) throw Error('Cannot run normal tests with a forked network')
- args.testFiles = files.filter((file: string) => file.endsWith('.test.ts'))
- if (args.testFiles.length == 0) return hre.run(TASK_TEST_RUN_MOCHA_TESTS, { testFiles: [] })
-
- await run(args)
-}
-
-async function runForkTests(
- args: any,
- files: string[],
- hre: HardhatRuntimeEnvironment,
- run: RunSuperFunction
-): Promise {
- console.log(`Running fork tests on ${args.fork}...`)
- if (args.fork === 'hardhat') throw Error('Cannot fork local networks')
-
- args.testFiles = files.filter((file: string) => file.endsWith(`.${args.fork}.ts`) || file.endsWith(`.fork.ts`))
- if (args.testFiles.length == 0) return hre.run(TASK_TEST_RUN_MOCHA_TESTS, { testFiles: [] })
-
- const forkingNetworkName = Object.keys(hre.config.networks).find((networkName) => networkName === args.fork)
- if (!forkingNetworkName) throw Error(`Could not find a config for network ${args.fork} to be forked`)
-
- const forkingNetworkConfig = hre.config.networks[forkingNetworkName] as HttpNetworkConfig
- if (!forkingNetworkConfig.url) throw Error(`Could not find a RPC url in network config for ${forkingNetworkName}`)
-
- if (args.chainId) hre.config.networks.hardhat.chainId = args.chainId
-
- await hre.network.provider.request({
- method: 'hardhat_reset',
- params: [{ forking: { jsonRpcUrl: forkingNetworkConfig.url, blockNumber: args.blockNumber } }],
- })
-
- const config = hre.network.config as HardhatNetworkConfig
- config.forking = { enabled: true, blockNumber: args.blockNumber, url: forkingNetworkConfig.url, httpHeaders: {} }
-
- await run(args)
-}
-
-export function getForkedNetwork(hre: HardhatRuntimeEnvironment): string {
- const config = hre.network.config as HardhatNetworkConfig
- if (!config.forking || !config.forking.url) throw Error(`No forks found on network ${hre.network.name}`)
-
- const network = Object.entries(hre.config.networks).find(([, networkConfig]) => {
- const httpNetworkConfig = networkConfig as HttpNetworkConfig
- return httpNetworkConfig.url && httpNetworkConfig.url === config?.forking?.url
- })
-
- if (!network) throw Error(`No network found matching fork from ${config.forking.url}`)
- return network[0]
-}
diff --git a/packages/helpers/src/time.ts b/packages/helpers/src/time.ts
deleted file mode 100644
index 0b794dd2..00000000
--- a/packages/helpers/src/time.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BigNumber } from 'ethers'
-
-import { currentBlock } from './blocks'
-import { BigNumberish, bn } from './numbers'
-
-export const SECOND = 1
-export const MINUTE = SECOND * 60
-export const HOUR = MINUTE * 60
-export const DAY = HOUR * 24
-export const WEEK = DAY * 7
-export const MONTH = DAY * 30
-export const YEAR = MONTH * 12
-
-export const currentTimestamp = async (): Promise => {
- const { timestamp } = await currentBlock()
- return bn(timestamp)
-}
-
-export const advanceTime = async (seconds: BigNumberish): Promise => {
- const { ethers } = await import('hardhat')
- await ethers.provider.send('evm_increaseTime', [parseInt(seconds.toString())])
- await ethers.provider.send('evm_mine', [])
-}
-
-export const setNextBlockTimestamp = async (timestamp: BigNumberish): Promise => {
- const { ethers } = await import('hardhat')
- await ethers.provider.send('evm_setNextBlockTimestamp', [parseInt(timestamp.toString())])
-}
diff --git a/packages/helpers/test/contracts/math/FixedPoint.test.ts b/packages/helpers/test/contracts/math/FixedPoint.test.ts
deleted file mode 100644
index 602bd902..00000000
--- a/packages/helpers/test/contracts/math/FixedPoint.test.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-
-import { deploy } from '../../../src/contracts'
-import { fp } from '../../../src/numbers'
-
-describe('FixedPoint', () => {
- let library: Contract
-
- beforeEach('deploy lib', async () => {
- library = await deploy('FixedPointMock')
- })
-
- describe('mulUp', () => {
- it('computes mul up correctly', async () => {
- expect(await library.mulUp(1, 1)).to.be.equal(1)
- expect(await library.mulUp(fp(2), 0)).to.be.equal(0)
- expect(await library.mulUp(fp(2), fp(2))).to.be.equal(fp(4))
- expect(await library.mulUp(fp(4), fp(2))).to.be.equal(fp(8))
- })
- })
-
- describe('mulDown', () => {
- it('computes mul down correctly', async () => {
- expect(await library.mulDown(1, 1)).to.be.equal(0)
- expect(await library.mulDown(fp(2), 0)).to.be.equal(0)
- expect(await library.mulDown(fp(2), fp(2))).to.be.equal(fp(4))
- expect(await library.mulDown(fp(4), fp(2))).to.be.equal(fp(8))
- })
- })
-
- describe('divUp', () => {
- it('computes div up correctly', async () => {
- expect(await library.divUp(1, 1)).to.be.equal(fp(1))
- expect(await library.divUp(0, fp(2))).to.be.equal(0)
- expect(await library.divUp(fp(2), fp(2))).to.be.equal(fp(1))
- await expect(library.divUp(fp(2), 0)).to.be.revertedWith('FixedPointZeroDivision')
- })
- })
-
- describe('divDown', () => {
- it('computes div down correctly', async () => {
- expect(await library.divDown(1, 1)).to.be.equal(fp(1))
- expect(await library.divDown(0, fp(2))).to.be.equal(0)
- expect(await library.divDown(fp(2), fp(2))).to.be.equal(fp(1))
- await expect(library.divDown(fp(2), 0)).to.be.revertedWith('FixedPointZeroDivision')
- })
- })
-})
diff --git a/packages/helpers/test/contracts/utils/Arrays.test.ts b/packages/helpers/test/contracts/utils/Arrays.test.ts
deleted file mode 100644
index 65c501fa..00000000
--- a/packages/helpers/test/contracts/utils/Arrays.test.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-
-import { deploy } from '../../../'
-
-describe('Arrays', () => {
- let library: Contract
-
- beforeEach('deploy lib', async () => {
- library = await deploy('ArraysMock')
- })
-
- describe('from (addresses)', () => {
- const ADDR_1 = '0x0000000000000000000000000000000000000001'
- const ADDR_2 = '0x0000000000000000000000000000000000000002'
- const ADDR_3 = '0x0000000000000000000000000000000000000003'
- const ADDR_4 = '0x0000000000000000000000000000000000000004'
-
- it('concatenates two addresses correctly', async () => {
- const result = await library.from1(ADDR_1, ADDR_2)
-
- expect(result.length).to.be.equal(2)
- expect(result[0]).to.be.equal(ADDR_1)
- expect(result[1]).to.be.equal(ADDR_2)
- })
-
- it('concatenates two addresses with an array correctly', async () => {
- const result = await library.from2(ADDR_1, [ADDR_2, ADDR_3], ADDR_4)
-
- expect(result.length).to.be.equal(4)
- expect(result[0]).to.be.equal(ADDR_1)
- expect(result[1]).to.be.equal(ADDR_2)
- expect(result[2]).to.be.equal(ADDR_3)
- expect(result[3]).to.be.equal(ADDR_4)
- })
- })
-
- describe('from (integers)', () => {
- it('concatenates correctly', async () => {
- const result = await library.from3(1, [])
-
- expect(result.length).to.be.equal(1)
- expect(result[0]).to.be.equal(1)
- })
-
- it('concatenates correctly', async () => {
- const result = await library.from3(1, [2])
-
- expect(result.length).to.be.equal(2)
- expect(result[0]).to.be.equal(1)
- expect(result[1]).to.be.equal(2)
- })
-
- it('concatenates correctly', async () => {
- const result = await library.from3(1, [2, 3])
-
- expect(result.length).to.be.equal(3)
- expect(result[0]).to.be.equal(1)
- expect(result[1]).to.be.equal(2)
- expect(result[2]).to.be.equal(3)
- })
- })
-
- describe('from (bytes32)', () => {
- const VALUE_1 = '0x0000000000000000000000000000000000000000000000000000000000000001'
- const VALUE_2 = '0x0000000000000000000000000000000000000000000000000000000000000002'
- const VALUE_3 = '0x0000000000000000000000000000000000000000000000000000000000000003'
-
- it('concatenates two addresses correctly', async () => {
- const result = await library.from4(VALUE_1, [VALUE_2, VALUE_3])
-
- expect(result.length).to.be.equal(3)
- expect(result[0]).to.be.equal(VALUE_1)
- expect(result[1]).to.be.equal(VALUE_2)
- expect(result[2]).to.be.equal(VALUE_3)
- })
- })
-})
diff --git a/packages/helpers/test/contracts/utils/BytesHelpers.test.ts b/packages/helpers/test/contracts/utils/BytesHelpers.test.ts
deleted file mode 100644
index 6dbcf6bf..00000000
--- a/packages/helpers/test/contracts/utils/BytesHelpers.test.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-import { hexlify, hexZeroPad } from 'ethers/lib/utils'
-
-import { deploy } from '../../../'
-
-describe('BytesHelpers', () => {
- let library: Contract
-
- beforeEach('deploy lib', async () => {
- library = await deploy('BytesHelpersMock')
- })
-
- describe('toUint256', () => {
- const bytes =
- '0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002'
-
- it('extracts an uint256 correctly', async () => {
- expect(await library.toUint256(bytes, 0)).to.be.equal(1)
- expect(await library.toUint256(bytes, 32)).to.be.equal(2)
- })
-
- it('reverts if out of bounds', async () => {
- await expect(library.toUint256(bytes, 64)).to.be.revertedWith('BytesOutOfBounds')
- await expect(library.toUint256(bytes, 33)).to.be.revertedWith('BytesOutOfBounds')
- })
- })
-
- describe('concat', () => {
- const array = '0xabcdef'
-
- it('concatenates an address with a bytes array', async () => {
- const address = '0xffffffffffffffffffffffffffffffffffffffff'
- const result = await library.concat1(array, address)
-
- expect(result).to.be.equal(array + address.slice(2))
- })
-
- it('concatenates an uint24 with a bytes array', async () => {
- const number = 5
- const result = await library.concat2(array, number)
-
- expect(result).to.be.equal(array + hexZeroPad(hexlify(number), 3).slice(2))
- })
- })
-})
diff --git a/packages/helpers/test/contracts/utils/Denominations.test.ts b/packages/helpers/test/contracts/utils/Denominations.test.ts
deleted file mode 100644
index ad06a61f..00000000
--- a/packages/helpers/test/contracts/utils/Denominations.test.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-
-import { NATIVE_TOKEN_ADDRESS } from '../../../src/constants'
-import { deploy } from '../../../src/contracts'
-
-describe('Denominations', () => {
- let library: Contract
-
- beforeEach('deploy lib', async () => {
- library = await deploy('DenominationsMock')
- })
-
- it('uses the expected native token address', async () => {
- expect(await library.NATIVE_TOKEN()).to.be.equal(NATIVE_TOKEN_ADDRESS)
- })
-})
diff --git a/packages/helpers/test/contracts/utils/ERC20Helpers.test.ts b/packages/helpers/test/contracts/utils/ERC20Helpers.test.ts
deleted file mode 100644
index 3b7d0f59..00000000
--- a/packages/helpers/test/contracts/utils/ERC20Helpers.test.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-import { ethers } from 'hardhat'
-
-import { NATIVE_TOKEN_ADDRESS, ZERO_ADDRESS } from '../../../src/constants'
-import { deploy } from '../../../src/contracts'
-import { deployTokenMock } from '../../../src/mocks'
-import { getSigner } from '../../../src/signers'
-
-describe('ERC20Helpers', () => {
- let library: Contract, someone: string
-
- beforeEach('deploy lib', async () => {
- someone = (await getSigner(1)).address
- library = await deploy('ERC20HelpersMock')
- })
-
- describe('balanceOf', () => {
- context('when the token is the native token', () => {
- const token = NATIVE_TOKEN_ADDRESS
-
- it('returns the account balance correctly', async () => {
- expect(await library.balanceOf(token, ZERO_ADDRESS)).to.be.eq(0)
- expect(await library.balanceOf(token, someone)).to.be.equal(await ethers.provider.getBalance(someone))
- })
- })
-
- context('when the token is an ERC20 token', () => {
- let token: Contract
-
- beforeEach('deploy token', async () => {
- token = await deployTokenMock('TKN')
- await token.mint(someone, 10)
- })
-
- it('returns the account balance correctly', async () => {
- expect(await library.balanceOf(token.address, ZERO_ADDRESS)).to.be.eq(0)
- expect(await library.balanceOf(token.address, someone)).to.be.equal(10)
- })
- })
- })
-
- describe('transfer', () => {
- const amount = 10
-
- context('when the token is the native token', () => {
- const token = NATIVE_TOKEN_ADDRESS
-
- beforeEach('fund library', async () => {
- const signer = await getSigner()
- await signer.sendTransaction({ to: library.address, value: amount })
- })
-
- it('transfers value correctly', async () => {
- const previousLibraryBalance = await library.balanceOf(token, library.address)
- const previousRecipientBalance = await library.balanceOf(token, someone)
-
- await library.transfer(token, someone, amount)
-
- const currentLibraryBalance = await library.balanceOf(token, library.address)
- expect(currentLibraryBalance).to.be.equal(previousLibraryBalance.sub(amount))
-
- const currentRecipientBalance = await library.balanceOf(token, someone)
- expect(currentRecipientBalance).to.be.equal(previousRecipientBalance.add(amount))
- })
- })
-
- context('when the token is an ERC20 token', () => {
- let token: Contract
-
- beforeEach('deploy token', async () => {
- token = await deployTokenMock('TKN')
- })
-
- beforeEach('fund library', async () => {
- await token.mint(library.address, amount)
- })
-
- it('transfers tokens correctly', async () => {
- const previousLibraryBalance = await library.balanceOf(token.address, library.address)
- const previousRecipientBalance = await library.balanceOf(token.address, someone)
-
- await library.transfer(token.address, someone, amount)
-
- const currentLibraryBalance = await library.balanceOf(token.address, library.address)
- expect(currentLibraryBalance).to.be.equal(previousLibraryBalance.sub(amount))
-
- const currentRecipientBalance = await library.balanceOf(token.address, someone)
- expect(currentRecipientBalance).to.be.equal(previousRecipientBalance.add(amount))
- })
- })
- })
-
- describe('approve', () => {
- context('when the token is the native token', () => {
- const token = NATIVE_TOKEN_ADDRESS
-
- it('reverts', async () => {
- await expect(library.approve(token, someone, 10)).to.be.reverted
- })
- })
-
- context('when the token is an ERC20 token', () => {
- let token: Contract
-
- beforeEach('deploy token', async () => {
- token = await deployTokenMock('TKN')
- })
-
- it('updates allowance correctly', async () => {
- await library.approve(token.address, someone, 10)
- expect(await token.allowance(library.address, someone)).to.be.equal(10)
-
- await library.approve(token.address, someone, 20)
- expect(await token.allowance(library.address, someone)).to.be.equal(20)
-
- await library.approve(token.address, someone, 0)
- expect(await token.allowance(library.address, someone)).to.be.equal(0)
- })
- })
- })
-})
diff --git a/packages/helpers/test/contracts/utils/EnumerableMap.test.ts b/packages/helpers/test/contracts/utils/EnumerableMap.test.ts
deleted file mode 100644
index 50b95157..00000000
--- a/packages/helpers/test/contracts/utils/EnumerableMap.test.ts
+++ /dev/null
@@ -1,321 +0,0 @@
-import { expect } from 'chai'
-import { Contract } from 'ethers'
-
-import { assertEvent, deploy, ZERO_ADDRESS } from '../../..'
-
-/* eslint-disable no-secrets/no-secrets */
-
-describe('EnumerableMap', () => {
- let map: Contract
-
- const keyA = '0x8B40ECf815AC8d53aB4AD2a00248DE77296344Db'
- const keyB = '0x638141Eb8905D9A55D81610f45bC2B47120059e7'
- const keyC = '0x7571A57e94F046725612f786Aa9bf44ce6b56894'
-
- describe('AddressToUintMap', () => {
- const valueA = '10'
- const valueB = '20'
- const valueC = '30'
-
- beforeEach('deploy map', async () => {
- map = await deploy('EnumerableMapAddressToUintMock')
- })
-
- async function expectMembersMatch(keys, values) {
- expect(keys.length).to.equal(values.length)
-
- await Promise.all(keys.map(async (key) => expect(await map.contains(key)).to.equal(true)))
-
- expect(await map.length()).to.be.equal(keys.length)
-
- expect(
- (await Promise.all(keys.map((key) => map.get(key)))).map((value) => value.toString())
- ).to.have.same.members(values)
-
- await Promise.all(
- keys.map(async (key, index) => {
- const value = values[index]
- const entry = await map.at(index)
- expect(entry.key).to.be.equal(key)
- expect(entry.value).to.be.equal(value)
- })
- )
-
- expect(await map.keys()).to.have.same.members(keys)
-
- expect((await map.values()).map((value) => value.toString())).to.have.same.members(values)
- }
-
- it('starts empty', async () => {
- expect(await map.contains(keyA)).to.equal(false)
-
- await expectMembersMatch([], [])
- })
-
- describe('set', () => {
- it('adds a key', async () => {
- const tx = await map.set(keyA, valueA)
- await assertEvent(tx, 'OperationResult', { result: true })
-
- await expectMembersMatch([keyA], [valueA])
- })
-
- it('adds several keys', async () => {
- await map.set(keyA, valueA)
- await map.set(keyB, valueB)
-
- await expectMembersMatch([keyA, keyB], [valueA, valueB])
- expect(await map.contains(keyC)).to.equal(false)
- })
-
- it('returns false when adding keys already in the set', async () => {
- await map.set(keyA, valueA)
-
- const tx = await map.set(keyA, valueA)
- await assertEvent(tx, 'OperationResult', { result: false })
-
- await expectMembersMatch([keyA], [valueA])
- })
-
- it('updates values for keys already in the set', async () => {
- await map.set(keyA, valueA)
-
- await map.set(keyA, valueB)
-
- await expectMembersMatch([keyA], [valueB])
- })
- })
-
- describe('remove', () => {
- it('removes added keys', async () => {
- await map.set(keyA, valueA)
-
- const tx = await map.remove(keyA)
- await assertEvent(tx, 'OperationResult', { result: true })
-
- expect(await map.contains(keyA)).to.equal(false)
- await expectMembersMatch([], [])
- })
-
- it('returns false when removing keys not in the set', async () => {
- const tx = await map.remove(keyA)
- await assertEvent(tx, 'OperationResult', { result: false })
-
- expect(await map.contains(keyA)).to.equal(false)
- })
-
- it('adds and removes multiple keys', async () => {
- await map.set(keyA, valueA)
- await map.set(keyC, valueC)
- await expectMembersMatch([keyA, keyC], [valueA, valueC]) // [A, C]
-
- await map.remove(keyA)
- await map.remove(keyB)
- await expectMembersMatch([keyC], [valueC]) // [C]
-
- await map.set(keyB, valueB)
- await expectMembersMatch([keyC, keyB], [valueC, valueB]) // [C, B]
-
- await map.set(keyA, valueA)
- await map.remove(keyC)
- await expectMembersMatch([keyA, keyB], [valueA, valueB]) // [A, B]
-
- await map.set(keyA, valueA)
- await map.set(keyB, valueB)
- await expectMembersMatch([keyA, keyB], [valueA, valueB]) // [A, B]
-
- await map.set(keyC, valueC)
- await map.remove(keyA)
- await expectMembersMatch([keyC, keyB], [valueC, valueB]) // [C, B]
-
- await map.set(keyA, valueA)
- await map.remove(keyB)
- await expectMembersMatch([keyC, keyA], [valueC, valueA]) // [C, A]
-
- expect(await map.contains(keyB)).to.equal(false)
- })
- })
-
- describe('read', () => {
- beforeEach(async () => {
- await map.set(keyA, valueA)
- })
-
- describe('get', () => {
- it('existing value', async () => {
- expect((await map.get(keyA)).toString()).to.be.equal(valueA.toString())
- })
-
- it('missing value', async () => {
- await expect(map.get(keyB)).to.be.revertedWith('EnumerableMapNonExistentKey')
- })
- })
-
- describe('tryGet', () => {
- it('existing value', async () => {
- const { exists, value } = await map.tryGet(keyA)
- expect(exists).to.be.equal(true)
- expect(value).to.be.equal(valueA)
- })
-
- it('missing value', async () => {
- const { exists, value } = await map.tryGet(keyB)
- expect(exists).to.be.equal(false)
- expect(value).to.be.equal(ZERO_ADDRESS)
- })
- })
- })
- })
-
- describe('AddressToAddressMap', () => {
- const valueA = '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
- const valueB = '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
- const valueC = '0xf584F8728B874a6a5c7A8d4d387C9aae9172D621'
-
- beforeEach('deploy map', async () => {
- map = await deploy('EnumerableMapAddressToAddressMock')
- })
-
- async function expectMembersMatch(keys, values) {
- expect(keys.length).to.equal(values.length)
-
- await Promise.all(keys.map(async (key) => expect(await map.contains(key)).to.equal(true)))
-
- expect(await map.length()).to.be.equal(keys.length)
-
- expect(await Promise.all(keys.map((key) => map.get(key)))).to.have.same.members(values)
-
- await Promise.all(
- keys.map(async (key, index) => {
- const value = values[index]
- const entry = await map.at(index)
- expect(entry.key).to.be.equal(key)
- expect(entry.value).to.be.equal(value)
- })
- )
-
- expect(await map.keys()).to.have.same.members(keys)
- expect(await map.values()).to.have.same.members(values)
- }
-
- it('starts empty', async () => {
- expect(await map.contains(keyA)).to.equal(false)
-
- await expectMembersMatch([], [])
- })
-
- describe('set', () => {
- it('adds a key', async () => {
- const tx = await map.set(keyA, valueA)
- await assertEvent(tx, 'OperationResult', { result: true })
-
- await expectMembersMatch([keyA], [valueA])
- })
-
- it('adds several keys', async () => {
- await map.set(keyA, valueA)
- await map.set(keyB, valueB)
-
- await expectMembersMatch([keyA, keyB], [valueA, valueB])
- expect(await map.contains(keyC)).to.equal(false)
- })
-
- it('returns false when adding keys already in the set', async () => {
- await map.set(keyA, valueA)
-
- const tx = await map.set(keyA, valueA)
- await assertEvent(tx, 'OperationResult', { result: false })
-
- await expectMembersMatch([keyA], [valueA])
- })
-
- it('updates values for keys already in the set', async () => {
- await map.set(keyA, valueA)
-
- await map.set(keyA, valueB)
-
- await expectMembersMatch([keyA], [valueB])
- })
- })
-
- describe('remove', () => {
- it('removes added keys', async () => {
- await map.set(keyA, valueA)
-
- const tx = await map.remove(keyA)
- await assertEvent(tx, 'OperationResult', { result: true })
-
- expect(await map.contains(keyA)).to.equal(false)
- await expectMembersMatch([], [])
- })
-
- it('returns false when removing keys not in the set', async () => {
- const tx = await map.remove(keyA)
- await assertEvent(tx, 'OperationResult', { result: false })
-
- expect(await map.contains(keyA)).to.equal(false)
- })
-
- it('adds and removes multiple keys', async () => {
- await map.set(keyA, valueA)
- await map.set(keyC, valueC)
- await expectMembersMatch([keyA, keyC], [valueA, valueC]) // [A, C]
-
- await map.remove(keyA)
- await map.remove(keyB)
- await expectMembersMatch([keyC], [valueC]) // [C]
-
- await map.set(keyB, valueB)
- await expectMembersMatch([keyC, keyB], [valueC, valueB]) // [C, B]
-
- await map.set(keyA, valueA)
- await map.remove(keyC)
- await expectMembersMatch([keyA, keyB], [valueA, valueB]) // [A, B]
-
- await map.set(keyA, valueA)
- await map.set(keyB, valueB)
- await expectMembersMatch([keyA, keyB], [valueA, valueB]) // [A, B]
-
- await map.set(keyC, valueC)
- await map.remove(keyA)
- await expectMembersMatch([keyC, keyB], [valueC, valueB]) // [C, B]
-
- await map.set(keyA, valueA)
- await map.remove(keyB)
- await expectMembersMatch([keyC, keyA], [valueC, valueA]) // [C, A]
-
- expect(await map.contains(keyB)).to.equal(false)
- })
- })
-
- describe('read', () => {
- beforeEach(async () => {
- await map.set(keyA, valueA)
- })
-
- describe('get', () => {
- it('existing value', async () => {
- expect((await map.get(keyA)).toString()).to.be.equal(valueA.toString())
- })
-
- it('missing value', async () => {
- await expect(map.get(keyB)).to.be.revertedWith('EnumerableMapNonExistentKey')
- })
- })
-
- describe('tryGet', () => {
- it('existing value', async () => {
- const { exists, value } = await map.tryGet(keyA)
- expect(exists).to.be.equal(true)
- expect(value).to.be.equal(valueA)
- })
-
- it('missing value', async () => {
- const { exists, value } = await map.tryGet(keyB)
- expect(exists).to.be.equal(false)
- expect(value).to.be.equal(ZERO_ADDRESS)
- })
- })
- })
- })
-})
diff --git a/packages/helpers/tests.ts b/packages/helpers/tests.ts
deleted file mode 100644
index c4dfb7bd..00000000
--- a/packages/helpers/tests.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { TASK_TEST } from 'hardhat/builtin-tasks/task-names'
-import { task, types } from 'hardhat/config'
-
-import { overrideTestTask } from './src/tests'
-
-task(TASK_TEST)
- .addOptionalParam('fork', 'Optional network name to be forked in case of running fork tests.')
- .addOptionalParam('forkIgnoreUnknownTxType', 'Optional flag to ignore unknown tx types.', false, types.boolean)
- .addOptionalParam('chainId', 'Optional chain ID to overwrite hardhat local network ID.', undefined, types.int)
- .addOptionalParam('blockNumber', 'Optional block number to fork in case of running fork tests.', undefined, types.int)
- .setAction(overrideTestTask)
diff --git a/packages/helpers/tsconfig.json b/packages/helpers/tsconfig.json
deleted file mode 100644
index 6aa7a321..00000000
--- a/packages/helpers/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "compilerOptions": {
- "declaration": true,
- "target": "es2019",
- "module": "commonjs",
- "rootDir": ".",
- "outDir": "dist",
- "esModuleInterop": true,
- "strict": true
- },
- "files": [
- "index.ts",
- "tests.ts",
- "hardhat.config.ts"
- ]
-}