.
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/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"
- ]
-}
diff --git a/packages/price-oracle/contracts/PriceOracle.sol b/packages/price-oracle/contracts/PriceOracle.sol
index 42784841..332142a9 100644
--- a/packages/price-oracle/contracts/PriceOracle.sol
+++ b/packages/price-oracle/contracts/PriceOracle.sol
@@ -22,9 +22,9 @@ import '@openzeppelin/contracts/utils/math/SafeCast.sol';
import '@openzeppelin/contracts/utils/structs/EnumerableSet.sol';
import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
import './interfaces/IPriceOracle.sol';
diff --git a/packages/helpers/contracts/mocks/FeedMock.sol b/packages/price-oracle/contracts/test/FeedMock.sol
similarity index 100%
rename from packages/helpers/contracts/mocks/FeedMock.sol
rename to packages/price-oracle/contracts/test/FeedMock.sol
diff --git a/packages/price-oracle/hardhat.config.ts b/packages/price-oracle/hardhat.config.ts
index 9edb506d..9d8d755c 100644
--- a/packages/price-oracle/hardhat.config.ts
+++ b/packages/price-oracle/hardhat.config.ts
@@ -1,6 +1,6 @@
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
-import '@mimic-fi/v3-helpers/dist/tests'
+import '@mimic-fi/helpers/dist/tests'
import 'hardhat-local-networks-config-plugin'
import { homedir } from 'os'
diff --git a/packages/price-oracle/package.json b/packages/price-oracle/package.json
index e19b8352..f87734b3 100644
--- a/packages/price-oracle/package.json
+++ b/packages/price-oracle/package.json
@@ -21,7 +21,7 @@
},
"dependencies": {
"@chainlink/contracts": "^0.2.1",
- "@mimic-fi/v3-helpers": "0.1.0",
+ "@mimic-fi/helpers": "1.0.0",
"@openzeppelin/contracts": "4.9.3"
},
"devDependencies": {
diff --git a/packages/price-oracle/test/PriceOracle.mainnet.ts b/packages/price-oracle/test/PriceOracle.mainnet.ts
index 13462524..ef1ebddb 100644
--- a/packages/price-oracle/test/PriceOracle.mainnet.ts
+++ b/packages/price-oracle/test/PriceOracle.mainnet.ts
@@ -1,4 +1,4 @@
-import { assertAlmostEqual, deployProxy, fp, getSigner } from '@mimic-fi/v3-helpers'
+import { assertAlmostEqual, deployProxy, fp, getSigner } from '@mimic-fi/helpers'
import { BigNumber, Contract } from 'ethers'
/* eslint-disable no-secrets/no-secrets */
diff --git a/packages/price-oracle/test/PriceOracle.polygon.ts b/packages/price-oracle/test/PriceOracle.polygon.ts
index 92d8d504..dc39d5be 100644
--- a/packages/price-oracle/test/PriceOracle.polygon.ts
+++ b/packages/price-oracle/test/PriceOracle.polygon.ts
@@ -1,4 +1,4 @@
-import { assertAlmostEqual, deployProxy, fp, getSigner } from '@mimic-fi/v3-helpers'
+import { assertAlmostEqual, deployProxy, fp, getSigner } from '@mimic-fi/helpers'
import { BigNumber, Contract } from 'ethers'
/* eslint-disable no-secrets/no-secrets */
diff --git a/packages/price-oracle/test/PriceOracle.test.ts b/packages/price-oracle/test/PriceOracle.test.ts
index 52105270..ace8a206 100644
--- a/packages/price-oracle/test/PriceOracle.test.ts
+++ b/packages/price-oracle/test/PriceOracle.test.ts
@@ -5,14 +5,14 @@ import {
bn,
currentTimestamp,
DAY,
- deployFeedMock,
+ deploy,
deployProxy,
deployTokenMock,
fp,
getSigner,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { BigNumber, Contract, ethers } from 'ethers'
@@ -223,7 +223,7 @@ describe('PriceOracle', () => {
})
beforeEach('set feed', async () => {
- const feed = await deployFeedMock(reportedPrice, feedDecimals)
+ const feed = await deploy('FeedMock', [reportedPrice, feedDecimals])
await priceOracle.setFeed(base.address, quote.address, feed.address)
})
@@ -506,7 +506,7 @@ describe('PriceOracle', () => {
})
beforeEach('set inverse feed', async () => {
- const feed = await deployFeedMock(reportedInversePrice, feedDecimals)
+ const feed = await deploy('FeedMock', [reportedInversePrice, feedDecimals])
await priceOracle.setFeed(quote.address, base.address, feed.address)
})
@@ -808,10 +808,10 @@ describe('PriceOracle', () => {
})
beforeEach('set feed', async () => {
- const baseFeed = await deployFeedMock(reportedBasePrice, baseFeedDecimals)
+ const baseFeed = await deploy('FeedMock', [reportedBasePrice, baseFeedDecimals])
await priceOracle.setFeed(base.address, PIVOT, baseFeed.address)
- const quoteFeed = await deployFeedMock(reportedQuotePrice, quoteFeedDecimals)
+ const quoteFeed = await deploy('FeedMock', [reportedQuotePrice, quoteFeedDecimals])
await priceOracle.setFeed(quote.address, PIVOT, quoteFeed.address)
})
@@ -1564,7 +1564,7 @@ describe('PriceOracle', () => {
beforeEach('deploy base and quote', async () => {
base = await deployTokenMock('BASE', 18)
quote = await deployTokenMock('QUOTE', 18)
- feed = await deployFeedMock(SMART_VAULT_ORACLE_PRICE, 18)
+ feed = await deploy('FeedMock', [SMART_VAULT_ORACLE_PRICE, 18])
})
const setUpSmartVaultOracleFeed = () => {
diff --git a/packages/registry/package.json b/packages/registry/package.json
index 43f8dc89..d3ad0d75 100644
--- a/packages/registry/package.json
+++ b/packages/registry/package.json
@@ -18,7 +18,7 @@
"prepare": "yarn build"
},
"dependencies": {
- "@mimic-fi/v3-helpers": "0.1.0",
+ "@mimic-fi/helpers": "1.0.0",
"@openzeppelin/contracts": "4.9.3",
"solmate": "^6.7.0"
},
diff --git a/packages/registry/test/Registry.test.ts b/packages/registry/test/Registry.test.ts
index f1d7b4aa..0bdac0d7 100644
--- a/packages/registry/test/Registry.test.ts
+++ b/packages/registry/test/Registry.test.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deploy, getCreationCode, getSigners } from '@mimic-fi/v3-helpers'
+import { assertEvent, deploy, getCreationCode, getSigners } from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/relayer/certora/conf/relayer.conf b/packages/relayer/certora/conf/relayer.conf
index ad22e8bf..c5e6ece2 100644
--- a/packages/relayer/certora/conf/relayer.conf
+++ b/packages/relayer/certora/conf/relayer.conf
@@ -16,7 +16,7 @@
"optimistic_loop": true,
"packages": [
"@mimic-fi/v3-authorizer=../../node_modules/@mimic-fi/v3-authorizer",
- "@mimic-fi/v3-helpers=../../node_modules/@mimic-fi/v3-helpers",
+ "@mimic-fi/helpers=../../node_modules/@mimic-fi/helpers",
"@mimic-fi/v3-smart-vault=../../node_modules/@mimic-fi/v3-smart-vault",
"@mimic-fi/v3-tasks=../../node_modules/@mimic-fi/v3-tasks",
"@openzeppelin=../../node_modules/@openzeppelin"
diff --git a/packages/relayer/certora/helpers/Helpers.sol b/packages/relayer/certora/helpers/Helpers.sol
index 32f29d7d..e665de69 100644
--- a/packages/relayer/certora/helpers/Helpers.sol
+++ b/packages/relayer/certora/helpers/Helpers.sol
@@ -2,8 +2,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
import '@mimic-fi/v3-smart-vault/contracts/interfaces/ISmartVault.sol';
import '@mimic-fi/v3-tasks/contracts/interfaces/ITask.sol';
diff --git a/packages/relayer/package.json b/packages/relayer/package.json
index c25e6576..01ff1c82 100644
--- a/packages/relayer/package.json
+++ b/packages/relayer/package.json
@@ -20,7 +20,7 @@
"prove:ci": "yarn prove --solc solc8.17"
},
"dependencies": {
- "@mimic-fi/v3-helpers": "0.1.0",
+ "@mimic-fi/helpers": "1.0.0",
"@mimic-fi/v3-tasks": "0.1.0",
"@mimic-fi/v3-smart-vault": "0.1.0",
"@openzeppelin/contracts": "4.9.3"
diff --git a/packages/relayer/test/Relayer.test.ts b/packages/relayer/test/Relayer.test.ts
index 61e9f14b..61e237f7 100644
--- a/packages/relayer/test/Relayer.test.ts
+++ b/packages/relayer/test/Relayer.test.ts
@@ -11,7 +11,7 @@ import {
NATIVE_TOKEN_ADDRESS,
pct,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { deployEnvironment } from '@mimic-fi/v3-tasks'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from 'chai'
@@ -940,9 +940,8 @@ describe('Relayer', () => {
context('when the relayer does not have enough balance', async () => {
it('reverts', async () => {
- await expect(relayer.rescueFunds(token.address, recipient.address, amount)).to.be.revertedWith(
- 'ERC20: transfer amount exceeds balance'
- )
+ // TODO: Hardhat does not decode smart vault error properly
+ await expect(relayer.rescueFunds(token.address, recipient.address, amount)).to.be.reverted
})
})
})
diff --git a/packages/smart-vault/certora/conf/smart-vault.conf b/packages/smart-vault/certora/conf/smart-vault.conf
index fb0e0f2c..2dc014be 100644
--- a/packages/smart-vault/certora/conf/smart-vault.conf
+++ b/packages/smart-vault/certora/conf/smart-vault.conf
@@ -1,9 +1,9 @@
{
"files": [
"contracts/SmartVault.sol",
+ "../../node_modules/@mimic-fi/helpers/contracts/mocks/WrappedNativeTokenMock.sol",
"../../packages/authorizer/contracts/Authorizer.sol",
"../../packages/fee-controller/contracts/FeeController.sol",
- "../../packages/helpers/contracts/mocks/WrappedNativeTokenMock.sol",
"../../packages/registry/contracts/Registry.sol",
"certora/helpers/Helpers.sol"
],
@@ -24,9 +24,9 @@
],
"optimistic_loop": true,
"packages": [
+ "@mimic-fi/helpers=../../node_modules/@mimic-fi/helpers",
"@mimic-fi/v3-authorizer=../../node_modules/@mimic-fi/v3-authorizer",
"@mimic-fi/v3-fee-controller=../../node_modules/@mimic-fi/v3-fee-controller",
- "@mimic-fi/v3-helpers=../../node_modules/@mimic-fi/v3-helpers",
"@mimic-fi/v3-price-oracle=../../node_modules/@mimic-fi/v3-price-oracle",
"@mimic-fi/v3-registry=../../node_modules/@mimic-fi/v3-registry",
"@openzeppelin=../../node_modules/@openzeppelin",
diff --git a/packages/smart-vault/certora/helpers/Helpers.sol b/packages/smart-vault/certora/helpers/Helpers.sol
index 99e7ec66..a212bda1 100644
--- a/packages/smart-vault/certora/helpers/Helpers.sol
+++ b/packages/smart-vault/certora/helpers/Helpers.sol
@@ -2,9 +2,9 @@
pragma solidity ^0.8.0;
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
import '@mimic-fi/v3-authorizer/contracts/interfaces/IAuthorizer.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
contract Helpers {
function NATIVE_TOKEN() external pure returns (address) {
diff --git a/packages/smart-vault/contracts/SmartVault.sol b/packages/smart-vault/contracts/SmartVault.sol
index 9d2dc790..2fe90702 100644
--- a/packages/smart-vault/contracts/SmartVault.sol
+++ b/packages/smart-vault/contracts/SmartVault.sol
@@ -19,12 +19,12 @@ import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
+import '@mimic-fi/helpers/contracts/utils/IWrappedNativeToken.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
import '@mimic-fi/v3-authorizer/contracts/interfaces/IAuthorizer.sol';
import '@mimic-fi/v3-fee-controller/contracts/interfaces/IFeeController.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/IWrappedNativeToken.sol';
import '@mimic-fi/v3-price-oracle/contracts/interfaces/IPriceOracle.sol';
import '@mimic-fi/v3-registry/contracts/interfaces/IRegistry.sol';
diff --git a/packages/smart-vault/package.json b/packages/smart-vault/package.json
index 49585a09..0df35997 100644
--- a/packages/smart-vault/package.json
+++ b/packages/smart-vault/package.json
@@ -20,9 +20,9 @@
"prove:ci": "yarn prove --solc solc8.17"
},
"dependencies": {
+ "@mimic-fi/helpers": "1.0.0",
"@mimic-fi/v3-authorizer": "0.1.0",
"@mimic-fi/v3-fee-controller": "0.1.0",
- "@mimic-fi/v3-helpers": "0.1.0",
"@mimic-fi/v3-price-oracle": "0.1.0",
"@mimic-fi/v3-registry": "0.1.0",
"@openzeppelin/contracts": "4.9.3",
diff --git a/packages/tasks/contracts/base/BaseTask.sol b/packages/tasks/contracts/base/BaseTask.sol
index fcf18507..ec77535b 100644
--- a/packages/tasks/contracts/base/BaseTask.sol
+++ b/packages/tasks/contracts/base/BaseTask.sol
@@ -14,9 +14,9 @@
pragma solidity ^0.8.0;
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
import '@mimic-fi/v3-price-oracle/contracts/interfaces/IPriceOracle.sol';
import '@mimic-fi/v3-smart-vault/contracts/interfaces/ISmartVault.sol';
diff --git a/packages/tasks/contracts/base/GasLimitedTask.sol b/packages/tasks/contracts/base/GasLimitedTask.sol
index 281b487e..279997ec 100644
--- a/packages/tasks/contracts/base/GasLimitedTask.sol
+++ b/packages/tasks/contracts/base/GasLimitedTask.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.17;
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-smart-vault/contracts/interfaces/ISmartVault.sol';
import '../interfaces/base/IGasLimitedTask.sol';
diff --git a/packages/tasks/contracts/base/PausableTask.sol b/packages/tasks/contracts/base/PausableTask.sol
index 539ce981..87460c07 100644
--- a/packages/tasks/contracts/base/PausableTask.sol
+++ b/packages/tasks/contracts/base/PausableTask.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.17;
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
import '../interfaces/base/IPausableTask.sol';
diff --git a/packages/tasks/contracts/base/TokenThresholdTask.sol b/packages/tasks/contracts/base/TokenThresholdTask.sol
index 83d3087e..8108108d 100644
--- a/packages/tasks/contracts/base/TokenThresholdTask.sol
+++ b/packages/tasks/contracts/base/TokenThresholdTask.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.3;
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
import '../interfaces/base/ITokenThresholdTask.sol';
diff --git a/packages/tasks/contracts/base/VolumeLimitedTask.sol b/packages/tasks/contracts/base/VolumeLimitedTask.sol
index 8d8525ac..be92c438 100644
--- a/packages/tasks/contracts/base/VolumeLimitedTask.sol
+++ b/packages/tasks/contracts/base/VolumeLimitedTask.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.17;
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-authorizer/contracts/Authorized.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
import '../interfaces/base/IVolumeLimitedTask.sol';
diff --git a/packages/tasks/contracts/bridge/AxelarBridger.sol b/packages/tasks/contracts/bridge/AxelarBridger.sol
index 53605344..4152cabf 100644
--- a/packages/tasks/contracts/bridge/AxelarBridger.sol
+++ b/packages/tasks/contracts/bridge/AxelarBridger.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/axelar/IAxelarConnector.sol';
import './BaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/bridge/BaseBridgeTask.sol b/packages/tasks/contracts/bridge/BaseBridgeTask.sol
index aec873e2..aece6394 100644
--- a/packages/tasks/contracts/bridge/BaseBridgeTask.sol
+++ b/packages/tasks/contracts/bridge/BaseBridgeTask.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '../Task.sol';
import '../interfaces/bridge/IBaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/bridge/ConnextBridger.sol b/packages/tasks/contracts/bridge/ConnextBridger.sol
index 1e1794b0..e1f81e62 100644
--- a/packages/tasks/contracts/bridge/ConnextBridger.sol
+++ b/packages/tasks/contracts/bridge/ConnextBridger.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/connext/IConnextConnector.sol';
import './BaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/bridge/HopBridger.sol b/packages/tasks/contracts/bridge/HopBridger.sol
index a242d9e3..a187b0a1 100644
--- a/packages/tasks/contracts/bridge/HopBridger.sol
+++ b/packages/tasks/contracts/bridge/HopBridger.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/hop/IHopBridgeConnector.sol';
import './BaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/bridge/SymbiosisBridger.sol b/packages/tasks/contracts/bridge/SymbiosisBridger.sol
index 5b6bc36b..cdbcb42a 100644
--- a/packages/tasks/contracts/bridge/SymbiosisBridger.sol
+++ b/packages/tasks/contracts/bridge/SymbiosisBridger.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/symbiosis/ISymbiosisConnector.sol';
import './BaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/bridge/WormholeBridger.sol b/packages/tasks/contracts/bridge/WormholeBridger.sol
index 13eb1643..53786d22 100644
--- a/packages/tasks/contracts/bridge/WormholeBridger.sol
+++ b/packages/tasks/contracts/bridge/WormholeBridger.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/wormhole/IWormholeConnector.sol';
import './BaseBridgeTask.sol';
diff --git a/packages/tasks/contracts/liquidity/balancer/BalancerV2PoolExiter.sol b/packages/tasks/contracts/liquidity/balancer/BalancerV2PoolExiter.sol
index fc44dd9a..0a88ac49 100644
--- a/packages/tasks/contracts/liquidity/balancer/BalancerV2PoolExiter.sol
+++ b/packages/tasks/contracts/liquidity/balancer/BalancerV2PoolExiter.sol
@@ -16,7 +16,7 @@ pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2Vault.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2PoolConnector.sol';
diff --git a/packages/tasks/contracts/liquidity/convex/ConvexExiter.sol b/packages/tasks/contracts/liquidity/convex/ConvexExiter.sol
index 752ed547..aae39ee5 100644
--- a/packages/tasks/contracts/liquidity/convex/ConvexExiter.sol
+++ b/packages/tasks/contracts/liquidity/convex/ConvexExiter.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/convex/IConvexConnector.sol';
import './BaseConvexTask.sol';
diff --git a/packages/tasks/contracts/liquidity/convex/ConvexJoiner.sol b/packages/tasks/contracts/liquidity/convex/ConvexJoiner.sol
index fe32718d..4397e9af 100644
--- a/packages/tasks/contracts/liquidity/convex/ConvexJoiner.sol
+++ b/packages/tasks/contracts/liquidity/convex/ConvexJoiner.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/convex/IConvexConnector.sol';
import './BaseConvexTask.sol';
diff --git a/packages/tasks/contracts/liquidity/curve/BaseCurveTask.sol b/packages/tasks/contracts/liquidity/curve/BaseCurveTask.sol
index d8fed6f3..fe9f5fc7 100644
--- a/packages/tasks/contracts/liquidity/curve/BaseCurveTask.sol
+++ b/packages/tasks/contracts/liquidity/curve/BaseCurveTask.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '../../Task.sol';
import '../../interfaces/liquidity/curve/IBaseCurveTask.sol';
diff --git a/packages/tasks/contracts/liquidity/curve/Curve2CrvExiter.sol b/packages/tasks/contracts/liquidity/curve/Curve2CrvExiter.sol
index f9a6605d..6e217079 100644
--- a/packages/tasks/contracts/liquidity/curve/Curve2CrvExiter.sol
+++ b/packages/tasks/contracts/liquidity/curve/Curve2CrvExiter.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/curve/ICurve2CrvConnector.sol';
import './BaseCurveTask.sol';
diff --git a/packages/tasks/contracts/liquidity/curve/Curve2CrvJoiner.sol b/packages/tasks/contracts/liquidity/curve/Curve2CrvJoiner.sol
index 36389e45..f9175521 100644
--- a/packages/tasks/contracts/liquidity/curve/Curve2CrvJoiner.sol
+++ b/packages/tasks/contracts/liquidity/curve/Curve2CrvJoiner.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/curve/ICurve2CrvConnector.sol';
import './BaseCurveTask.sol';
diff --git a/packages/tasks/contracts/primitives/Collector.sol b/packages/tasks/contracts/primitives/Collector.sol
index 632583f6..5bc33097 100644
--- a/packages/tasks/contracts/primitives/Collector.sol
+++ b/packages/tasks/contracts/primitives/Collector.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
import '../Task.sol';
import '../interfaces/primitives/ICollector.sol';
diff --git a/packages/tasks/contracts/primitives/Depositor.sol b/packages/tasks/contracts/primitives/Depositor.sol
index f9f97148..0678d2bd 100644
--- a/packages/tasks/contracts/primitives/Depositor.sol
+++ b/packages/tasks/contracts/primitives/Depositor.sol
@@ -16,8 +16,8 @@ pragma solidity ^0.8.0;
import '@openzeppelin/contracts/utils/Address.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
import '../Task.sol';
import '../interfaces/primitives/IDepositor.sol';
diff --git a/packages/tasks/contracts/primitives/HandleOver.sol b/packages/tasks/contracts/primitives/HandleOver.sol
index 951fde3b..33d867e7 100644
--- a/packages/tasks/contracts/primitives/HandleOver.sol
+++ b/packages/tasks/contracts/primitives/HandleOver.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/ERC20Helpers.sol';
+import '@mimic-fi/helpers/contracts/utils/ERC20Helpers.sol';
import '../Task.sol';
import '../interfaces/primitives/IHandleOver.sol';
diff --git a/packages/tasks/contracts/primitives/Wrapper.sol b/packages/tasks/contracts/primitives/Wrapper.sol
index bc6e69f6..bdce0996 100644
--- a/packages/tasks/contracts/primitives/Wrapper.sol
+++ b/packages/tasks/contracts/primitives/Wrapper.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
import '../Task.sol';
import '../interfaces/primitives/IWrapper.sol';
diff --git a/packages/tasks/contracts/relayer/BaseRelayerFundTask.sol b/packages/tasks/contracts/relayer/BaseRelayerFundTask.sol
index 56eabc3c..ed208278 100644
--- a/packages/tasks/contracts/relayer/BaseRelayerFundTask.sol
+++ b/packages/tasks/contracts/relayer/BaseRelayerFundTask.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-relayer/contracts/interfaces/IRelayer.sol';
import '../Task.sol';
diff --git a/packages/tasks/contracts/relayer/RelayerDepositor.sol b/packages/tasks/contracts/relayer/RelayerDepositor.sol
index 62826dbd..6e7dbafb 100644
--- a/packages/tasks/contracts/relayer/RelayerDepositor.sol
+++ b/packages/tasks/contracts/relayer/RelayerDepositor.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
import '@mimic-fi/v3-relayer/contracts/interfaces/IRelayer.sol';
import '../Task.sol';
diff --git a/packages/tasks/contracts/swap/BalancerV2BoostedSwapper.sol b/packages/tasks/contracts/swap/BalancerV2BoostedSwapper.sol
index cdbcb42e..ca80806e 100644
--- a/packages/tasks/contracts/swap/BalancerV2BoostedSwapper.sol
+++ b/packages/tasks/contracts/swap/BalancerV2BoostedSwapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2Vault.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2SwapConnector.sol';
diff --git a/packages/tasks/contracts/swap/BalancerV2BptSwapper.sol b/packages/tasks/contracts/swap/BalancerV2BptSwapper.sol
index 0f3d9855..15b3b516 100644
--- a/packages/tasks/contracts/swap/BalancerV2BptSwapper.sol
+++ b/packages/tasks/contracts/swap/BalancerV2BptSwapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2SwapConnector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/BalancerV2LinearSwapper.sol b/packages/tasks/contracts/swap/BalancerV2LinearSwapper.sol
index 991004a8..303eda00 100644
--- a/packages/tasks/contracts/swap/BalancerV2LinearSwapper.sol
+++ b/packages/tasks/contracts/swap/BalancerV2LinearSwapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2SwapConnector.sol';
import './BalancerV2BptSwapper.sol';
diff --git a/packages/tasks/contracts/swap/BalancerV2Swapper.sol b/packages/tasks/contracts/swap/BalancerV2Swapper.sol
index 38f0850c..d2080a18 100644
--- a/packages/tasks/contracts/swap/BalancerV2Swapper.sol
+++ b/packages/tasks/contracts/swap/BalancerV2Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/balancer/IBalancerV2SwapConnector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/BaseSwapTask.sol b/packages/tasks/contracts/swap/BaseSwapTask.sol
index e52e5f7d..3016a49a 100644
--- a/packages/tasks/contracts/swap/BaseSwapTask.sol
+++ b/packages/tasks/contracts/swap/BaseSwapTask.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/Denominations.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/Denominations.sol';
import '../Task.sol';
import '../interfaces/swap/IBaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/BebopSwapper.sol b/packages/tasks/contracts/swap/BebopSwapper.sol
index 0e5f8ae9..7d7b1f1c 100644
--- a/packages/tasks/contracts/swap/BebopSwapper.sol
+++ b/packages/tasks/contracts/swap/BebopSwapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/bebop/IBebopConnector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/HopL2Swapper.sol b/packages/tasks/contracts/swap/HopL2Swapper.sol
index 4b50eaad..4cb36baf 100644
--- a/packages/tasks/contracts/swap/HopL2Swapper.sol
+++ b/packages/tasks/contracts/swap/HopL2Swapper.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/hop/IHopL2Amm.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/hop/IHopSwapConnector.sol';
diff --git a/packages/tasks/contracts/swap/KyberSwapV2Swapper.sol b/packages/tasks/contracts/swap/KyberSwapV2Swapper.sol
index a99a58aa..d03d54a3 100644
--- a/packages/tasks/contracts/swap/KyberSwapV2Swapper.sol
+++ b/packages/tasks/contracts/swap/KyberSwapV2Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/kyberswap/IKyberSwapV2Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/OdosV2Swapper.sol b/packages/tasks/contracts/swap/OdosV2Swapper.sol
index 45bcba4e..922f2e24 100644
--- a/packages/tasks/contracts/swap/OdosV2Swapper.sol
+++ b/packages/tasks/contracts/swap/OdosV2Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/odos/IOdosV2Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/OneInchV5Swapper.sol b/packages/tasks/contracts/swap/OneInchV5Swapper.sol
index 756c1e78..b62c2645 100644
--- a/packages/tasks/contracts/swap/OneInchV5Swapper.sol
+++ b/packages/tasks/contracts/swap/OneInchV5Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/1inch/IOneInchV5Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/ParaswapV5Swapper.sol b/packages/tasks/contracts/swap/ParaswapV5Swapper.sol
index 4f389c7b..633f5171 100644
--- a/packages/tasks/contracts/swap/ParaswapV5Swapper.sol
+++ b/packages/tasks/contracts/swap/ParaswapV5Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/paraswap/IParaswapV5Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/UniswapV2Swapper.sol b/packages/tasks/contracts/swap/UniswapV2Swapper.sol
index 75203d36..1cefb5e3 100644
--- a/packages/tasks/contracts/swap/UniswapV2Swapper.sol
+++ b/packages/tasks/contracts/swap/UniswapV2Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/uniswap/IUniswapV2Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/swap/UniswapV3Swapper.sol b/packages/tasks/contracts/swap/UniswapV3Swapper.sol
index b232a6c5..df8f5173 100644
--- a/packages/tasks/contracts/swap/UniswapV3Swapper.sol
+++ b/packages/tasks/contracts/swap/UniswapV3Swapper.sol
@@ -14,8 +14,8 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/math/FixedPoint.sol';
-import '@mimic-fi/v3-helpers/contracts/utils/BytesHelpers.sol';
+import '@mimic-fi/helpers/contracts/math/FixedPoint.sol';
+import '@mimic-fi/helpers/contracts/utils/BytesHelpers.sol';
import '@mimic-fi/v3-connectors/contracts/interfaces/uniswap/IUniswapV3Connector.sol';
import './BaseSwapTask.sol';
diff --git a/packages/tasks/contracts/test/liquidity/ConvexConnectorMock.sol b/packages/tasks/contracts/test/liquidity/ConvexConnectorMock.sol
index 375661bf..88d6ece9 100644
--- a/packages/tasks/contracts/test/liquidity/ConvexConnectorMock.sol
+++ b/packages/tasks/contracts/test/liquidity/ConvexConnectorMock.sol
@@ -14,7 +14,7 @@
pragma solidity ^0.8.0;
-import '@mimic-fi/v3-helpers/contracts/mocks/TokenMock.sol';
+import '@mimic-fi/helpers/contracts/mocks/TokenMock.sol';
contract ConvexConnectorMock {
IERC20 public immutable rewardToken;
diff --git a/packages/tasks/contracts/test/mocks/FeedMock.sol b/packages/tasks/contracts/test/mocks/FeedMock.sol
new file mode 100644
index 00000000..827d1bd4
--- /dev/null
+++ b/packages/tasks/contracts/test/mocks/FeedMock.sol
@@ -0,0 +1,17 @@
+// 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/tasks/hardhat.config.ts b/packages/tasks/hardhat.config.ts
index 9a009c6c..26d1b039 100644
--- a/packages/tasks/hardhat.config.ts
+++ b/packages/tasks/hardhat.config.ts
@@ -1,6 +1,6 @@
import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
-import '@mimic-fi/v3-helpers/dist/tests'
+import '@mimic-fi/helpers/dist/tests'
import 'hardhat-local-networks-config-plugin'
import 'hardhat-gas-reporter'
diff --git a/packages/tasks/package.json b/packages/tasks/package.json
index b51a7030..54b8df9e 100644
--- a/packages/tasks/package.json
+++ b/packages/tasks/package.json
@@ -22,9 +22,9 @@
"prepare": "yarn build"
},
"dependencies": {
+ "@mimic-fi/helpers": "1.0.0",
"@mimic-fi/v3-authorizer": "0.1.1",
"@mimic-fi/v3-connectors": "0.2.4",
- "@mimic-fi/v3-helpers": "0.1.9",
"@mimic-fi/v3-price-oracle": "0.1.0",
"@mimic-fi/v3-smart-vault": "0.1.0",
"@openzeppelin/contracts": "4.9.3",
diff --git a/packages/tasks/src/setup.ts b/packages/tasks/src/setup.ts
index c76955f3..e68814de 100644
--- a/packages/tasks/src/setup.ts
+++ b/packages/tasks/src/setup.ts
@@ -7,7 +7,7 @@ import {
getSigner,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/BaseTask.test.ts b/packages/tasks/test/base/BaseTask.test.ts
index f53d9d41..de8de35f 100644
--- a/packages/tasks/test/base/BaseTask.test.ts
+++ b/packages/tasks/test/base/BaseTask.test.ts
@@ -9,7 +9,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ONES_BYTES32,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/GasLimitedTask.test.ts b/packages/tasks/test/base/GasLimitedTask.test.ts
index 3d038940..0ec31949 100644
--- a/packages/tasks/test/base/GasLimitedTask.test.ts
+++ b/packages/tasks/test/base/GasLimitedTask.test.ts
@@ -7,7 +7,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/PausableTask.test.ts b/packages/tasks/test/base/PausableTask.test.ts
index 815bd540..9af9f55b 100644
--- a/packages/tasks/test/base/PausableTask.test.ts
+++ b/packages/tasks/test/base/PausableTask.test.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployProxy, fp, getSigners, NATIVE_TOKEN_ADDRESS, ZERO_BYTES32 } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployProxy, fp, getSigners, NATIVE_TOKEN_ADDRESS, ZERO_BYTES32 } from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/TimeLockedTask.test.ts b/packages/tasks/test/base/TimeLockedTask.test.ts
index c3f28530..ddda81c4 100644
--- a/packages/tasks/test/base/TimeLockedTask.test.ts
+++ b/packages/tasks/test/base/TimeLockedTask.test.ts
@@ -9,7 +9,7 @@ import {
HOUR,
MINUTE,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/TokenIndexedTask.test.ts b/packages/tasks/test/base/TokenIndexedTask.test.ts
index 358f7aed..50b54319 100644
--- a/packages/tasks/test/base/TokenIndexedTask.test.ts
+++ b/packages/tasks/test/base/TokenIndexedTask.test.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployProxy, getSigners, ZERO_ADDRESS, ZERO_BYTES32 } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployProxy, getSigners, ZERO_ADDRESS, ZERO_BYTES32 } from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/base/TokenThresholdTask.test.ts b/packages/tasks/test/base/TokenThresholdTask.test.ts
index 65b94a8c..b1c3d4b4 100644
--- a/packages/tasks/test/base/TokenThresholdTask.test.ts
+++ b/packages/tasks/test/base/TokenThresholdTask.test.ts
@@ -1,14 +1,14 @@
import {
assertEvent,
BigNumberish,
- deployFeedMock,
+ deploy,
deployProxy,
deployTokenMock,
fp,
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -271,7 +271,7 @@ describe('TokenThresholdTask', () => {
context('when there is a custom threshold set', () => {
beforeEach('mock price feed', async () => {
- const feed = await deployFeedMock(fp(1600), 18)
+ const feed = await deploy('FeedMock', [fp(1600), 18])
const setFeedRole = await priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(WETH, USDT, feed.address)
@@ -306,7 +306,7 @@ describe('TokenThresholdTask', () => {
context('when there is a default threshold set', () => {
beforeEach('mock price feed', async () => {
- const feed = await deployFeedMock(fp(1600), 18)
+ const feed = await deploy('FeedMock', [fp(1600), 18])
const setFeedRole = await priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(WETH, USDC, feed.address)
@@ -342,7 +342,7 @@ describe('TokenThresholdTask', () => {
context('when there is a custom threshold set', () => {
beforeEach('mock price feed', async () => {
- const feed = await deployFeedMock(fp(1650), 18)
+ const feed = await deploy('FeedMock', [fp(1650), 18])
const setFeedRole = await priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(WETH, USDT, feed.address)
diff --git a/packages/tasks/test/base/VolumeLimitedTask.test.ts b/packages/tasks/test/base/VolumeLimitedTask.test.ts
index ce9d8d6c..018ebeaf 100644
--- a/packages/tasks/test/base/VolumeLimitedTask.test.ts
+++ b/packages/tasks/test/base/VolumeLimitedTask.test.ts
@@ -3,7 +3,7 @@ import {
assertEvent,
BigNumberish,
currentTimestamp,
- deployFeedMock,
+ deploy,
deployProxy,
deployTokenMock,
fp,
@@ -12,7 +12,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -210,7 +210,7 @@ describe('VolumeLimitedTask', () => {
beforeEach('deploy new token', async () => {
newToken = await deployTokenMock('TKN')
- const feed = await deployFeedMock(fp(rate), 18)
+ const feed = await deploy('FeedMock', [fp(rate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(token.address, newToken.address, feed.address)
@@ -252,7 +252,7 @@ describe('VolumeLimitedTask', () => {
beforeEach('deploy new token', async () => {
newToken = await deployTokenMock('TKN')
- const feed = await deployFeedMock(fp(rate), 18)
+ const feed = await deploy('FeedMock', [fp(rate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(token.address, newToken.address, feed.address)
@@ -478,7 +478,7 @@ describe('VolumeLimitedTask', () => {
beforeEach('deploy new token', async () => {
newLimitToken = await deployTokenMock('TKN')
- const feed = await deployFeedMock(fp(rate), 18)
+ const feed = await deploy('FeedMock', [fp(rate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(limitToken.address, newLimitToken.address, feed.address)
@@ -510,7 +510,7 @@ describe('VolumeLimitedTask', () => {
context('when there was some volume accrued', () => {
beforeEach('accrue volume', async () => {
- const feed = await deployFeedMock(fp(1), 18)
+ const feed = await deploy('FeedMock', [fp(1), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(token.address, limitToken.address, feed.address)
@@ -525,7 +525,7 @@ describe('VolumeLimitedTask', () => {
beforeEach('deploy new token', async () => {
newLimitToken = await deployTokenMock('TKN')
- const feed = await deployFeedMock(fp(rate), 18)
+ const feed = await deploy('FeedMock', [fp(rate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(limitToken.address, newLimitToken.address, feed.address)
@@ -685,7 +685,7 @@ describe('VolumeLimitedTask', () => {
beforeEach('deploy new token', async () => {
limitToken = await deployTokenMock('TKN')
- const feed = await deployFeedMock(fp(limitRate), 18)
+ const feed = await deploy('FeedMock', [fp(limitRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(token.address, limitToken.address, feed.address)
diff --git a/packages/tasks/test/bridge/AxelarBridger.test.ts b/packages/tasks/test/bridge/AxelarBridger.test.ts
index 1e8a2f02..be32403c 100644
--- a/packages/tasks/test/bridge/AxelarBridger.test.ts
+++ b/packages/tasks/test/bridge/AxelarBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/bridge/BaseBridgeTask.behavior.ts b/packages/tasks/test/bridge/BaseBridgeTask.behavior.ts
index b5458c2b..aa98d5ed 100644
--- a/packages/tasks/test/bridge/BaseBridgeTask.behavior.ts
+++ b/packages/tasks/test/bridge/BaseBridgeTask.behavior.ts
@@ -6,7 +6,7 @@ import {
ONES_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
diff --git a/packages/tasks/test/bridge/ConnextBridger.test.ts b/packages/tasks/test/bridge/ConnextBridger.test.ts
index d0a9cdec..3ea61b67 100644
--- a/packages/tasks/test/bridge/ConnextBridger.test.ts
+++ b/packages/tasks/test/bridge/ConnextBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/bridge/HopBridger.test.ts b/packages/tasks/test/bridge/HopBridger.test.ts
index 63ce5aaf..95a204f3 100644
--- a/packages/tasks/test/bridge/HopBridger.test.ts
+++ b/packages/tasks/test/bridge/HopBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -13,7 +12,8 @@ import {
MAX_UINT256,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/bridge/SocketBridger.test.ts b/packages/tasks/test/bridge/SocketBridger.test.ts
index 6ef736b8..a6e37168 100644
--- a/packages/tasks/test/bridge/SocketBridger.test.ts
+++ b/packages/tasks/test/bridge/SocketBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/bridge/SymbiosisBridger.test.ts b/packages/tasks/test/bridge/SymbiosisBridger.test.ts
index 325f0086..a398ef6b 100644
--- a/packages/tasks/test/bridge/SymbiosisBridger.test.ts
+++ b/packages/tasks/test/bridge/SymbiosisBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -12,7 +11,8 @@ import {
ONES_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/bridge/WormholeBridger.test.ts b/packages/tasks/test/bridge/WormholeBridger.test.ts
index f2948af2..56063d6d 100644
--- a/packages/tasks/test/bridge/WormholeBridger.test.ts
+++ b/packages/tasks/test/bridge/WormholeBridger.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/balancer/BalancerV2PoolExiter.mainnet.ts b/packages/tasks/test/liquidity/balancer/BalancerV2PoolExiter.mainnet.ts
index 078324e6..ae33826c 100644
--- a/packages/tasks/test/liquidity/balancer/BalancerV2PoolExiter.mainnet.ts
+++ b/packages/tasks/test/liquidity/balancer/BalancerV2PoolExiter.mainnet.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
instanceAt,
ONES_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ethers } from 'ethers'
diff --git a/packages/tasks/test/liquidity/convex/BaseConvexTask.behavior.ts b/packages/tasks/test/liquidity/convex/BaseConvexTask.behavior.ts
index 22269002..f6b88f6a 100644
--- a/packages/tasks/test/liquidity/convex/BaseConvexTask.behavior.ts
+++ b/packages/tasks/test/liquidity/convex/BaseConvexTask.behavior.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployTokenMock, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployTokenMock, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
diff --git a/packages/tasks/test/liquidity/convex/ConvexClaimer.test.ts b/packages/tasks/test/liquidity/convex/ConvexClaimer.test.ts
index 189584bb..03c12d16 100644
--- a/packages/tasks/test/liquidity/convex/ConvexClaimer.test.ts
+++ b/packages/tasks/test/liquidity/convex/ConvexClaimer.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -9,7 +8,8 @@ import {
getSigners,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/convex/ConvexExiter.test.ts b/packages/tasks/test/liquidity/convex/ConvexExiter.test.ts
index 2c5a9706..6a440241 100644
--- a/packages/tasks/test/liquidity/convex/ConvexExiter.test.ts
+++ b/packages/tasks/test/liquidity/convex/ConvexExiter.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -10,7 +9,8 @@ import {
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/convex/ConvexJoiner.test.ts b/packages/tasks/test/liquidity/convex/ConvexJoiner.test.ts
index 019d8872..541badbd 100644
--- a/packages/tasks/test/liquidity/convex/ConvexJoiner.test.ts
+++ b/packages/tasks/test/liquidity/convex/ConvexJoiner.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -10,7 +9,8 @@ import {
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/curve/BaseCurveTask.behavior.ts b/packages/tasks/test/liquidity/curve/BaseCurveTask.behavior.ts
index e54ff5f6..b4ab40c7 100644
--- a/packages/tasks/test/liquidity/curve/BaseCurveTask.behavior.ts
+++ b/packages/tasks/test/liquidity/curve/BaseCurveTask.behavior.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
diff --git a/packages/tasks/test/liquidity/curve/Curve2CrvExiter.test.ts b/packages/tasks/test/liquidity/curve/Curve2CrvExiter.test.ts
index a94c095a..6aa96a57 100644
--- a/packages/tasks/test/liquidity/curve/Curve2CrvExiter.test.ts
+++ b/packages/tasks/test/liquidity/curve/Curve2CrvExiter.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -10,7 +9,8 @@ import {
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/curve/Curve2CrvJoiner.test.ts b/packages/tasks/test/liquidity/curve/Curve2CrvJoiner.test.ts
index 2d96d92f..9fa553ea 100644
--- a/packages/tasks/test/liquidity/curve/Curve2CrvJoiner.test.ts
+++ b/packages/tasks/test/liquidity/curve/Curve2CrvJoiner.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -10,7 +9,8 @@ import {
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/erc4626/BaseERC4626Task.behavior.ts b/packages/tasks/test/liquidity/erc4626/BaseERC4626Task.behavior.ts
index c0c77e74..682751d2 100644
--- a/packages/tasks/test/liquidity/erc4626/BaseERC4626Task.behavior.ts
+++ b/packages/tasks/test/liquidity/erc4626/BaseERC4626Task.behavior.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployTokenMock, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployTokenMock, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
diff --git a/packages/tasks/test/liquidity/erc4626/ERC4626Exiter.test.ts b/packages/tasks/test/liquidity/erc4626/ERC4626Exiter.test.ts
index d4b202fc..4a689071 100644
--- a/packages/tasks/test/liquidity/erc4626/ERC4626Exiter.test.ts
+++ b/packages/tasks/test/liquidity/erc4626/ERC4626Exiter.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ONES_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/liquidity/erc4626/ERC4626Joiner.test.ts b/packages/tasks/test/liquidity/erc4626/ERC4626Joiner.test.ts
index 1e34e0ed..ea05e08c 100644
--- a/packages/tasks/test/liquidity/erc4626/ERC4626Joiner.test.ts
+++ b/packages/tasks/test/liquidity/erc4626/ERC4626Joiner.test.ts
@@ -1,4 +1,3 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
@@ -11,7 +10,8 @@ import {
getSigners,
ONES_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/Collector.test.ts b/packages/tasks/test/primitives/Collector.test.ts
index b85a5a91..c0a5577b 100644
--- a/packages/tasks/test/primitives/Collector.test.ts
+++ b/packages/tasks/test/primitives/Collector.test.ts
@@ -10,7 +10,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/Depositor.test.ts b/packages/tasks/test/primitives/Depositor.test.ts
index 5322587f..0a9387b3 100644
--- a/packages/tasks/test/primitives/Depositor.test.ts
+++ b/packages/tasks/test/primitives/Depositor.test.ts
@@ -11,7 +11,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/HandleOver.test.ts b/packages/tasks/test/primitives/HandleOver.test.ts
index 1ec85e54..672ee261 100644
--- a/packages/tasks/test/primitives/HandleOver.test.ts
+++ b/packages/tasks/test/primitives/HandleOver.test.ts
@@ -6,7 +6,7 @@ import {
fp,
getSigners,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { BigNumber, Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/Unwrapper.test.ts b/packages/tasks/test/primitives/Unwrapper.test.ts
index 02d5b8cf..c6cc5a6e 100644
--- a/packages/tasks/test/primitives/Unwrapper.test.ts
+++ b/packages/tasks/test/primitives/Unwrapper.test.ts
@@ -8,7 +8,7 @@ import {
getSigners,
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/Withdrawer.test.ts b/packages/tasks/test/primitives/Withdrawer.test.ts
index cb3e1e30..b2f39e7e 100644
--- a/packages/tasks/test/primitives/Withdrawer.test.ts
+++ b/packages/tasks/test/primitives/Withdrawer.test.ts
@@ -10,7 +10,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/primitives/Wrapper.test.ts b/packages/tasks/test/primitives/Wrapper.test.ts
index 17fb178b..3e5be8dc 100644
--- a/packages/tasks/test/primitives/Wrapper.test.ts
+++ b/packages/tasks/test/primitives/Wrapper.test.ts
@@ -8,7 +8,7 @@ import {
getSigners,
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/relayer/BaseRelayerFundTask.behavior.ts b/packages/tasks/test/relayer/BaseRelayerFundTask.behavior.ts
index 1e03c2eb..20143e8b 100644
--- a/packages/tasks/test/relayer/BaseRelayerFundTask.behavior.ts
+++ b/packages/tasks/test/relayer/BaseRelayerFundTask.behavior.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployFeedMock, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { assertEvent, deploy, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
@@ -71,7 +71,7 @@ export function itBehavesLikeBaseRelayerFundTask(executionType: string): void {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(thresholdNativeRate), 18)
+ const feed = await deploy('FeedMock', [fp(thresholdNativeRate), 18])
const setFeedRole = this.priceOracle.interface.getSighash('setFeed')
await this.authorizer
.connect(this.owner)
@@ -133,7 +133,7 @@ export function itBehavesLikeBaseRelayerFundTask(executionType: string): void {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(fundingThresholdRate), 18)
+ const feed = await deploy('FeedMock', [fp(fundingThresholdRate), 18])
const setFeedRole = this.priceOracle.interface.getSighash('setFeed')
await this.authorizer
.connect(this.owner)
diff --git a/packages/tasks/test/relayer/CollectorRelayerFunder.test.ts b/packages/tasks/test/relayer/CollectorRelayerFunder.test.ts
index 1bc9f5af..84b1c13f 100644
--- a/packages/tasks/test/relayer/CollectorRelayerFunder.test.ts
+++ b/packages/tasks/test/relayer/CollectorRelayerFunder.test.ts
@@ -2,14 +2,13 @@ import {
assertEvent,
assertIndirectEvent,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -96,7 +95,7 @@ describe('CollectorRelayerFunder', () => {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(tokenRate))
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(mimic.wrappedNativeToken.address, token.address, feed.address)
diff --git a/packages/tasks/test/relayer/OneInchV5RelayerFunder.test.ts b/packages/tasks/test/relayer/OneInchV5RelayerFunder.test.ts
index b76bad0b..440e5b78 100644
--- a/packages/tasks/test/relayer/OneInchV5RelayerFunder.test.ts
+++ b/packages/tasks/test/relayer/OneInchV5RelayerFunder.test.ts
@@ -1,15 +1,14 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -116,7 +115,7 @@ describe('OneInchV5RelayerFunder', () => {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1).div(rateTokenInNative))
+ const feed = await deploy('FeedMock', [fp(1).div(rateTokenInNative), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, mimic.wrappedNativeToken.address, feed.address)
@@ -148,7 +147,7 @@ describe('OneInchV5RelayerFunder', () => {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1).div(rateTokenOutNative))
+ const feed = await deploy('FeedMock', [fp(1).div(rateTokenOutNative), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenOut.address, mimic.wrappedNativeToken.address, feed.address)
@@ -355,7 +354,7 @@ describe('OneInchV5RelayerFunder', () => {
context('when there is no token out set', () => {
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1))
+ const feed = await deploy('FeedMock', [fp(1), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle
diff --git a/packages/tasks/test/relayer/ParaswapV5RelayerFunder.test.ts b/packages/tasks/test/relayer/ParaswapV5RelayerFunder.test.ts
index e4a99d87..17520067 100644
--- a/packages/tasks/test/relayer/ParaswapV5RelayerFunder.test.ts
+++ b/packages/tasks/test/relayer/ParaswapV5RelayerFunder.test.ts
@@ -1,15 +1,14 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -116,7 +115,7 @@ describe('ParaswapV5RelayerFunder', () => {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1).div(rateTokenInNative))
+ const feed = await deploy('FeedMock', [fp(1).div(rateTokenInNative), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, mimic.wrappedNativeToken.address, feed.address)
@@ -148,7 +147,7 @@ describe('ParaswapV5RelayerFunder', () => {
})
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1).div(rateTokenOutNative))
+ const feed = await deploy('FeedMock', [fp(1).div(rateTokenOutNative), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenOut.address, mimic.wrappedNativeToken.address, feed.address)
@@ -355,7 +354,7 @@ describe('ParaswapV5RelayerFunder', () => {
context('when there is no token out set', () => {
beforeEach('set price feed', async function () {
- const feed = await deployFeedMock(fp(1))
+ const feed = await deploy('FeedMock', [fp(1), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle
diff --git a/packages/tasks/test/relayer/RelayerDepositor.test.ts b/packages/tasks/test/relayer/RelayerDepositor.test.ts
index 9a473862..2a18be4c 100644
--- a/packages/tasks/test/relayer/RelayerDepositor.test.ts
+++ b/packages/tasks/test/relayer/RelayerDepositor.test.ts
@@ -10,7 +10,7 @@ import {
NATIVE_TOKEN_ADDRESS,
ZERO_ADDRESS,
ZERO_BYTES32,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/relayer/UnwrapperRelayerFunder.test.ts b/packages/tasks/test/relayer/UnwrapperRelayerFunder.test.ts
index e915b429..d7c281db 100644
--- a/packages/tasks/test/relayer/UnwrapperRelayerFunder.test.ts
+++ b/packages/tasks/test/relayer/UnwrapperRelayerFunder.test.ts
@@ -2,13 +2,12 @@ import {
assertEvent,
assertIndirectEvent,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -197,7 +196,7 @@ describe('UnwrapperRelayerFunder', () => {
})
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(1), 18)
+ const feed = await deploy('FeedMock', [fp(1), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(mimic.wrappedNativeToken.address, token.address, feed.address)
diff --git a/packages/tasks/test/swap/BalancerV2BoostedSwapper.mainnet.ts b/packages/tasks/test/swap/BalancerV2BoostedSwapper.mainnet.ts
index cb6c91dd..dd34cb9e 100644
--- a/packages/tasks/test/swap/BalancerV2BoostedSwapper.mainnet.ts
+++ b/packages/tasks/test/swap/BalancerV2BoostedSwapper.mainnet.ts
@@ -1,14 +1,5 @@
+import { deploy, deployProxy, fp, getSigners, impersonate, instanceAt, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { OP } from '@mimic-fi/v3-authorizer'
-import {
- deploy,
- deployFeedMock,
- deployProxy,
- fp,
- getSigners,
- impersonate,
- instanceAt,
- ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -122,7 +113,7 @@ describe('BalancerV2BoostedSwapper', function () {
const rate = fp(1)
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(rate, 18)
+ const feed = await deploy('FeedMock', [rate, 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(pool.address, underlyingToken.address, feed.address)
diff --git a/packages/tasks/test/swap/BalancerV2BptSwapper.test.ts b/packages/tasks/test/swap/BalancerV2BptSwapper.test.ts
index ae02a16e..b32c3747 100644
--- a/packages/tasks/test/swap/BalancerV2BptSwapper.test.ts
+++ b/packages/tasks/test/swap/BalancerV2BptSwapper.test.ts
@@ -1,4 +1,4 @@
-import { deploy, deployProxy, getSigners, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { deploy, deployProxy, getSigners, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/swap/BalancerV2LinearSwapper.mainnet.ts b/packages/tasks/test/swap/BalancerV2LinearSwapper.mainnet.ts
index f897f879..27f61abf 100644
--- a/packages/tasks/test/swap/BalancerV2LinearSwapper.mainnet.ts
+++ b/packages/tasks/test/swap/BalancerV2LinearSwapper.mainnet.ts
@@ -1,14 +1,5 @@
+import { deploy, deployProxy, fp, getSigners, impersonate, instanceAt, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { OP } from '@mimic-fi/v3-authorizer'
-import {
- deploy,
- deployFeedMock,
- deployProxy,
- fp,
- getSigners,
- impersonate,
- instanceAt,
- ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -113,7 +104,7 @@ describe('BalancerV2LinearSwapper', function () {
const rate = fp(1)
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(rate, 18)
+ const feed = await deploy('FeedMock', [rate, 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(pool.address, mainToken.address, feed.address)
diff --git a/packages/tasks/test/swap/BalancerV2Swapper.test.ts b/packages/tasks/test/swap/BalancerV2Swapper.test.ts
index 638e1793..2301785a 100644
--- a/packages/tasks/test/swap/BalancerV2Swapper.test.ts
+++ b/packages/tasks/test/swap/BalancerV2Swapper.test.ts
@@ -8,7 +8,7 @@ import {
ONES_ADDRESS,
ONES_BYTES32,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
diff --git a/packages/tasks/test/swap/BaseSwapTask.behavior.ts b/packages/tasks/test/swap/BaseSwapTask.behavior.ts
index 62428a85..3a48d308 100644
--- a/packages/tasks/test/swap/BaseSwapTask.behavior.ts
+++ b/packages/tasks/test/swap/BaseSwapTask.behavior.ts
@@ -1,4 +1,4 @@
-import { assertEvent, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/v3-helpers'
+import { assertEvent, deployTokenMock, fp, ZERO_ADDRESS } from '@mimic-fi/helpers'
import { expect } from 'chai'
import { Contract } from 'ethers'
import { ethers } from 'hardhat'
diff --git a/packages/tasks/test/swap/BebopSwapper.test.ts b/packages/tasks/test/swap/BebopSwapper.test.ts
index b498f40d..66dfd327 100644
--- a/packages/tasks/test/swap/BebopSwapper.test.ts
+++ b/packages/tasks/test/swap/BebopSwapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -292,7 +291,7 @@ describe('BebopSwapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/HopL2Swapper.test.ts b/packages/tasks/test/swap/HopL2Swapper.test.ts
index a3f3aa92..a7de7fd9 100644
--- a/packages/tasks/test/swap/HopL2Swapper.test.ts
+++ b/packages/tasks/test/swap/HopL2Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertEvent,
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract } from 'ethers'
@@ -200,7 +199,7 @@ describe('HopL2Swapper', () => {
})
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(1), 18)
+ const feed = await deploy('FeedMock', [fp(1), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/KyberSwapV2Swapper.test.ts b/packages/tasks/test/swap/KyberSwapV2Swapper.test.ts
index eae4bfba..39f7777d 100644
--- a/packages/tasks/test/swap/KyberSwapV2Swapper.test.ts
+++ b/packages/tasks/test/swap/KyberSwapV2Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -293,7 +292,7 @@ describe('KyberSwapV2Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/OdosV2Swapper.test.ts b/packages/tasks/test/swap/OdosV2Swapper.test.ts
index 7a673410..470b2157 100644
--- a/packages/tasks/test/swap/OdosV2Swapper.test.ts
+++ b/packages/tasks/test/swap/OdosV2Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -293,7 +292,7 @@ describe('OdosV2Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/OneInchV5Swapper.test.ts b/packages/tasks/test/swap/OneInchV5Swapper.test.ts
index 6f5f4d45..56f11548 100644
--- a/packages/tasks/test/swap/OneInchV5Swapper.test.ts
+++ b/packages/tasks/test/swap/OneInchV5Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -292,7 +291,7 @@ describe('OneInchV5Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/ParaswapV5Swapper.test.ts b/packages/tasks/test/swap/ParaswapV5Swapper.test.ts
index 0190b688..d1578827 100644
--- a/packages/tasks/test/swap/ParaswapV5Swapper.test.ts
+++ b/packages/tasks/test/swap/ParaswapV5Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -293,7 +292,7 @@ describe('ParaswapV5Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/UniswapV2Swapper.test.ts b/packages/tasks/test/swap/UniswapV2Swapper.test.ts
index ba38d76e..ac2700e8 100644
--- a/packages/tasks/test/swap/UniswapV2Swapper.test.ts
+++ b/packages/tasks/test/swap/UniswapV2Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -300,7 +299,7 @@ describe('UniswapV2Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/packages/tasks/test/swap/UniswapV3Swapper.test.ts b/packages/tasks/test/swap/UniswapV3Swapper.test.ts
index 81fb1f6b..dd09604f 100644
--- a/packages/tasks/test/swap/UniswapV3Swapper.test.ts
+++ b/packages/tasks/test/swap/UniswapV3Swapper.test.ts
@@ -1,17 +1,16 @@
-import { OP } from '@mimic-fi/v3-authorizer'
import {
assertIndirectEvent,
assertNoEvent,
BigNumberish,
deploy,
- deployFeedMock,
deployProxy,
deployTokenMock,
fp,
getSigners,
MAX_UINT256,
ZERO_ADDRESS,
-} from '@mimic-fi/v3-helpers'
+} from '@mimic-fi/helpers'
+import { OP } from '@mimic-fi/v3-authorizer'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/dist/src/signer-with-address'
import { expect } from 'chai'
import { Contract, ContractTransaction } from 'ethers'
@@ -317,7 +316,7 @@ describe('UniswapV3Swapper', () => {
context('when no off-chain oracle is given', () => {
context('when an on-chain oracle is given', () => {
beforeEach('set price feed', async () => {
- const feed = await deployFeedMock(fp(tokenRate), 18)
+ const feed = await deploy('FeedMock', [fp(tokenRate), 18])
const setFeedRole = priceOracle.interface.getSighash('setFeed')
await authorizer.connect(owner).authorize(owner.address, priceOracle.address, setFeedRole, [])
await priceOracle.connect(owner).setFeed(tokenIn.address, tokenOut.address, feed.address)
diff --git a/yarn.lock b/yarn.lock
index 7ffc6012..aeaa5097 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -937,6 +937,18 @@
"@mimic-fi/v3-helpers" "0.1.0"
"@openzeppelin/contracts" "4.9.3"
+"@mimic-fi/helpers@1.0.0":
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/@mimic-fi/helpers/-/helpers-1.0.0.tgz#6d28cb20e20d3a9f72d7014b80dfd5a3627918a9"
+ integrity sha512-t7+MAmXHlsXr13x6L32tjLE0yseh5c8emB3QgP5hnmhwOXy6tKkLPV89UGSATPm9lN61lsZC+HrQKbTXcsb7SA==
+ dependencies:
+ "@nomiclabs/hardhat-ethers" "^2.2.3"
+ "@nomiclabs/hardhat-waffle" "2.0.3"
+ "@openzeppelin/contracts" "5.0.2"
+ decimal.js "~10.4.3"
+ ethers "~5.6.0"
+ hardhat "^2.14.1"
+
"@mimic-fi/v3-authorizer@0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@mimic-fi/v3-authorizer/-/v3-authorizer-0.1.0.tgz#10fa3b9c5ac7c3ab95d6c77764376a6707703d09"
@@ -969,22 +981,6 @@
hardhat "^2.14.1"
mocha "^6.2.3"
-"@mimic-fi/v3-helpers@0.1.9":
- version "0.1.9"
- resolved "https://registry.yarnpkg.com/@mimic-fi/v3-helpers/-/v3-helpers-0.1.9.tgz#9de0de2e60c77580b0662780e952f05424a1bdb0"
- integrity sha512-xJoVAlpQs+iVaL0fh/FZy2iOHRrLNtuE+8yHSCEmPJyokLTe5KbpuxnlyZV0pcZmYyquAWplnKU467QNqk5Z4A==
- 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"
-
"@mimic-fi/v3-tasks@0.1.0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@mimic-fi/v3-tasks/-/v3-tasks-0.1.0.tgz#ecd3dd570ec4423758f24e3c34e96d6a452473a9"
@@ -1261,6 +1257,11 @@
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.9.3.tgz#00d7a8cf35a475b160b3f0293a6403c511099364"
integrity sha512-He3LieZ1pP2TNt5JbkPA4PNT9WC3gOTOlDcFGJW4Le4QKqwmiNJCRt44APfxMxvq7OugU/cqYuPcSBzOw38DAg==
+"@openzeppelin/contracts@5.0.2":
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.2.tgz#b1d03075e49290d06570b2fd42154d76c2a5d210"
+ integrity sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA==
+
"@quant-finance/solidity-datetime@2.2.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@quant-finance/solidity-datetime/-/solidity-datetime-2.2.0.tgz#50f2d00a571d8cc2d962257b40b70fc44450dcaa"