Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to hardhat #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions buidler.config.ts → hardat.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require("dotenv").config();

import { usePlugin, task, types } from "@nomiclabs/buidler/config";
import { task, types } from "@nomiclabs/buidler/config";

import {Signer, Wallet, utils, constants, Contract, BytesLike} from "ethers";
import { Wallet, utils, constants, Contract, BytesLike} from "ethers";
import {deployContract} from "ethereum-waffle";

import DiamondFactoryArtifact from './artifacts/DiamondFactoryContract.json';
Expand All @@ -24,10 +24,10 @@ import { LendingLogicAaveFactory } from "./typechain/LendingLogicAaveFactory";
import { LendingManagerFactory } from "./typechain/LendingManagerFactory";
import { StakingLogicYGovFactory } from "./typechain/StakingLogicYGovFactory";

usePlugin("@nomiclabs/buidler-ethers");
usePlugin('solidity-coverage');
usePlugin("@nomiclabs/buidler-etherscan");
usePlugin('solidity-coverage');
import "@nomiclabs/buidler-ethers";
import 'solidity-coverage';
import "@nomiclabs/buidler-etherscan";
import 'solidity-coverage';

function getSelectors(contract: Contract) {
const signatures: BytesLike[] = [];
Expand All @@ -39,9 +39,9 @@ function getSelectors(contract: Contract) {
}

const config = {
defaultNetwork: 'buidlerevm',
defaultNetwork: 'hardhat',
networks: {
buidlerevm: {
hardhat: {
gasPrice: 0,
blockGasLimit: 10000000,
},
Expand All @@ -68,10 +68,12 @@ const config = {
},
solc: {
version: '0.7.1',
optimizer: {
// Factory goes above contract size limit
enabled: true,
runs: 200
settings: {
optimizer: {
// Factory goes above contract size limit
enabled: true,
runs: 200
}
}
},
etherscan: { apiKey: process.env.ETHERSCAN_KEY }
Expand Down
20 changes: 10 additions & 10 deletions buidler.compile.config.ts → hardhat.compile.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { usePlugin } from "@nomiclabs/buidler/config";

usePlugin("@nomiclabs/buidler-ethers");
usePlugin('solidity-coverage')
import "@nomiclabs/buidler-ethers";
import 'solidity-coverage';

const config = {
defaultNetwork: 'buidlerevm',
defaultNetwork: 'hardhat',
networks: {
buidlerevm: {
hardhat: {
gasPrice: 0,
blockGasLimit: 100000000,
},
Expand All @@ -22,10 +20,12 @@ const config = {
},
solc: {
version: '0.7.1',
optimizer: {
// PieFactory pushes contract size over limit. Consider reducing factory size
enabled: true,
runs: 200
settings: {
optimizer: {
// PieFactory pushes contract size over limit. Consider reducing factory size
enabled: true,
runs:1000
}
}
},
}
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"clean": "rm -rf ./build && rm -rf ./typechain && rm -rf ./artifacts",
"test": "npx buidler test",
"test:fast": "TS_NODE_TRANSPILE_ONLY=1 npx buidler test",
"compile": "npx buidler compile --config buidler.compile.config.ts",
"compile": "npx hardhat compile --config hardhat.compile.config.ts --show-stack-traces",
"typechain": "typechain --target ethers-v5 --outDir typechain ./artifacts/**/*.json",
"docgen": "solidity-docgen --solc-module solc-0.7 --output-structure readmes",
"coverage": "npx buidler coverage --network coverage --temp artifacts",
Expand Down Expand Up @@ -37,9 +37,11 @@
},
"devDependencies": {
"@codechecks/client": "^0.1.10",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"chai": "^4.2.0",
"dotenv": "^8.2.0",
"eth-gas-reporter": "^0.2.17",
"hardhat": "^2.6.8",
"mocha": "^8.1.3",
"prettier": "^2.1.1",
"prettier-plugin-solidity": "^1.0.0-alpha.57",
Expand Down
20 changes: 0 additions & 20 deletions tsconfig.json

This file was deleted.

Loading