Skip to content

Commit

Permalink
Merge pull request #289 from 1inch/feature/bump-hardhat-ethers
Browse files Browse the repository at this point in the history
[SC-911] Migrate to new hardhat-ethers
  • Loading branch information
ZumZoom authored Dec 20, 2023
2 parents eeb1a00 + 582d4d3 commit a286390
Show file tree
Hide file tree
Showing 22 changed files with 1,770 additions and 1,105 deletions.
3 changes: 0 additions & 3 deletions contracts/mocks/WrappedTokenMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import "@1inch/solidity-utils/contracts/interfaces/IWETH.sol";
contract WrappedTokenMock is ERC20Permit, Ownable, IWETH {
error NotEnoughBalance();

event Deposit(address indexed dst, uint wad);
event Withdrawal(address indexed src, uint wad);

// solhint-disable-next-line no-empty-blocks
constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {}

Expand Down
9 changes: 8 additions & 1 deletion deploy/deploy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const hre = require('hardhat');
const { getChainId } = hre;
const { getChainId, network } = hre;

const wethByNetwork = {
hardhat: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
mainnet: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',
};

module.exports = async ({ getNamedAccounts, deployments }) => {
console.log('running deploy script');
Expand All @@ -10,13 +15,15 @@ module.exports = async ({ getNamedAccounts, deployments }) => {

const limitOrderProtocol = await deploy('LimitOrderProtocol', {
from: deployer,
args: [wethByNetwork[network.name]],
});

console.log('LimitOrderProtocol deployed to:', limitOrderProtocol.address);

if (await getChainId() !== '31337') {
await hre.run('verify:verify', {
address: limitOrderProtocol.address,
constructorArguments: [wethByNetwork[network.name]],
});
}
};
Expand Down
5 changes: 2 additions & 3 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
require('@matterlabs/hardhat-zksync-deploy');
require('@matterlabs/hardhat-zksync-solc');
require('@matterlabs/hardhat-zksync-verify');
require('@nomiclabs/hardhat-ethers');
require('@nomiclabs/hardhat-etherscan');
require('@nomicfoundation/hardhat-verify');
require('@nomicfoundation/hardhat-chai-matchers');
require('solidity-coverage');
require('hardhat-dependency-compiler');
Expand Down Expand Up @@ -45,7 +44,7 @@ module.exports = {
],
},
zksolc: {
version: '1.3.10',
version: '1.3.17',
compilerSource: 'binary',
settings: {},
},
Expand Down
41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@1inch/limit-order-protocol-contract",
"version": "4.0.0-prerelease-15",
"version": "4.0.0-prerelease-16",
"description": "1inch Limit Order Protocol",
"repository": {
"type": "git",
Expand All @@ -16,38 +16,39 @@
"test/helpers"
],
"dependencies": {
"@1inch/solidity-utils": "2.2.27",
"@1inch/solidity-utils": "3.2.0",
"@chainlink/contracts": "0.6.1",
"@openzeppelin/contracts": "4.9.0"
},
"devDependencies": {
"@matterlabs/hardhat-zksync-deploy": "0.6.3",
"@matterlabs/hardhat-zksync-solc": "0.3.17",
"@matterlabs/hardhat-zksync-verify": "0.1.7",
"@metamask/eth-sig-util": "5.1.0",
"@nomicfoundation/hardhat-chai-matchers": "1.0.6",
"@nomicfoundation/hardhat-network-helpers": "1.0.8",
"@nomiclabs/hardhat-ethers": "2.2.3",
"@nomiclabs/hardhat-etherscan": "3.1.7",
"chai": "4.3.7",
"dotenv": "16.1.4",
"eslint": "8.42.0",
"@matterlabs/hardhat-zksync-deploy": "1.0.0",
"@matterlabs/hardhat-zksync-solc": "1.0.0",
"@matterlabs/hardhat-zksync-verify": "0.2.0",
"@metamask/eth-sig-util": "7.0.1",
"@nomicfoundation/hardhat-chai-matchers": "2.0.2",
"@nomicfoundation/hardhat-network-helpers": "1.0.9",
"@nomicfoundation/hardhat-verify": "1.1.1",
"@nomicfoundation/hardhat-ethers": "3.0.5",
"chai": "4.3.10",
"dotenv": "16.3.1",
"eslint": "8.53.0",
"eslint-config-standard": "17.1.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-n": "16.0.0",
"eslint-plugin-import": "2.29.0",
"eslint-plugin-n": "16.3.1",
"eslint-plugin-promise": "6.1.1",
"ethers": "5.7.2",
"hardhat": "2.14.1",
"ethers": "6.8.1",
"hardhat": "2.19.1",
"hardhat-dependency-compiler": "1.1.3",
"hardhat-deploy": "0.11.30",
"hardhat-deploy": "0.11.34",
"hardhat-gas-reporter": "1.0.9",
"hardhat-tracer": "2.3.2",
"hardhat-tracer": "2.7.0",
"rimraf": "5.0.1",
"solc": "0.8.19",
"solhint": "3.4.1",
"solidity-coverage": "0.8.5",
"solidity-docgen": "0.5.17",
"zksync-web3": "0.14.3"
"zksync-web3": "0.16.0",
"zksync2-js": "0.2.2"
},
"scripts": {
"clean": "rimraf artifacts cache coverage contracts/hardhat-dependency-compiler artifacts-zk cache-zk",
Expand Down
Loading

0 comments on commit a286390

Please sign in to comment.