Skip to content

Instantly share code, notes, and snippets.

@mingderwang
Created January 14, 2021 06:42
Show Gist options
  • Save mingderwang/64046242aabff1e796ecaa4a93792fbd to your computer and use it in GitHub Desktop.
Save mingderwang/64046242aabff1e796ecaa4a93792fbd to your computer and use it in GitHub Desktop.
hardhat.config.js use ganache as default network (example)
/**
* @type import('hardhat/config').HardhatUserConfig
*/
require('@nomiclabs/hardhat-ethers');
require('@openzeppelin/hardhat-upgrades');
module.exports = {
defaultNetwork: "ganache",
networks: {
ganache: {
url: "http://172.17.144.1:7545",
// accounts: [privateKey1, privateKey2, ...]
}
},
solidity: {
version: "0.6.12",
},
};
@paolodina
Copy link

paolodina commented Apr 1, 2021

nice one thanks.

I had to do:

npm install --save-dev ethers
npm install --save-dev @nomiclabs/hardhat-ethers
npm install --save-dev @openzeppelin/hardhat-upgrades

and then

npx hardhat console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment