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

migration buidler to hardhat #15

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
18 changes: 10 additions & 8 deletions buidler.config.js → hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const { usePlugin } = require('@nomiclabs/buidler/config')
const hooks = require('./scripts/buidler-hooks')
const { usePlugin } = require('hardhat/config')
const hooks = require('./scripts/hardhat-hooks')

usePlugin('@aragon/buidler-aragon')
usePlugin('@nomiclabs/buidler-solhint')
usePlugin('buidler-gas-reporter')
usePlugin('solidity-coverage')
require('@aragon/buidler-aragon')
require('@nomiclabs/hardhat-solhint')
require('hardhat-gas-reporter')
require('solidity-coverage')

const ACCOUNTS = (process.env.ETH_KEYS ? process.env.ETH_KEYS.split(',') : [])
.map(key => key.trim())
Expand Down Expand Up @@ -41,7 +41,7 @@ module.exports = {
// to have Frame running on your machine. Download it from:
// https://frame.sh
frame: {
httpHeaders: { origin: 'buidler' },
httpHeaders: { origin: 'hardhat' },
url: 'http://localhost:1248',
},
// xDAI network configured with Aragon node.
Expand All @@ -54,10 +54,12 @@ module.exports = {
},
solc: {
version: '0.4.24',
optimizer: {
settings: {
optimizer: {
enabled: true,
runs: 10000,
},
}
},
gasReporter: {
enabled: !!process.env.GAS_REPORTER,
Expand Down
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@
"@aragon/buidler-aragon": "^0.2.9",
"@aragon/templates-shared": "^1.0.1",
"@aragon/test-helpers": "^2.0.0",
"@nomiclabs/buidler": "^1.4.3",
"@nomiclabs/buidler-etherscan": "^1.3.3",
"@nomiclabs/buidler-ganache": "^1.3.3",
"@nomiclabs/buidler-solhint": "^1.3.3",
"@nomiclabs/buidler-truffle5": "^1.3.4",
"@nomiclabs/buidler-web3": "^1.3.4",
"@nomiclabs/hardhat-etherscan": "^2.0.0",
"@nomiclabs/hardhat-ganache": "^2.0.0",
"@nomiclabs/hardhat-solhint": "^2.0.0",
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomiclabs/hardhat-web3": "^2.0.0",
"babel-eslint": "^10.0.2",
"buidler-extract": "^1.0.0",
"buidler-gas-reporter": "^0.1.3",
"hardhat-gas-reporter": "^1.0.1",
"cross-env": "^5.2.0",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
Expand All @@ -33,6 +31,7 @@
"eslint-plugin-standard": "^4.0.0",
"ethlint": "^1.2.4",
"fs-extra": "^8.1.0",
"hardhat": "^2.0.2",
"prettier": "^1.18.2",
"solidity-coverage": "^0.7.9",
"solium": "^1.2.5",
Expand All @@ -41,15 +40,15 @@
"scripts": {
"postinstall": "npm run compile && npm run build-app",
"build-app": "cd app && npm install && cd ..",
"compile": "buidler compile --force",
"compile": "hardhat compile --force",
"lint": "solium --dir ./contracts",
"test": "buidler test --network buidlerevm",
"test:gas": "REPORT_GAS=true buidler test --network localhost",
"coverage": "buidler coverage --network coverage",
"abi:extract": "buidler-extract --output abi/ --keys abi",
"start": "buidler start",
"publish:major": "buidler publish major",
"publish:minor": "buidler publish minor",
"publish:patch": "buidler publish patch"
"test": "hardhat test --network hardhatevm",
"test:gas": "REPORT_GAS=true hardhat test --network localhost",
"coverage": "hardhat coverage --network coverage",
"abi:extract": "hardhat-extract --output abi/ --keys abi",
"start": "hardhat start",
"publish:major": "hardhat publish major",
"publish:minor": "hardhat publish minor",
"publish:patch": "hardhat publish patch"
}
}
4 changes: 2 additions & 2 deletions scripts/buidler-hooks.js → scripts/hardhat-hooks.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* These hooks are called by the Aragon Buidler plugin during the start task's lifecycle. Use them to perform custom tasks at certain entry points of the development build process, like deploying a token before a proxy is initialized, etc.
*
* Link them to the main buidler config file (buidler.config.js) in the `aragon.hooks` property.
* Link them to the main hardhat config file (hardhat.config.js) in the `aragon.hooks` property.
*
* All hooks receive two parameters:
* 1) A params object that may contain other objects that pertain to the particular hook.
* 2) A "bre" or BuidlerRuntimeEnvironment object that contains enviroment objects like web3, Truffle artifacts, etc.
* 2) A "hre" or HardhatRuntimeEnvironment object that contains enviroment objects like web3, Truffle artifacts, etc.
*
* Please see AragonConfigHooks, in the plugin's types for further details on these interfaces.
* https://github.com/aragon/buidler-aragon/blob/develop/src/types.ts#L31
Expand Down