Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

add hardhat + typescript to v1.2.0 #6

Open
wants to merge 1 commit into
base: v1.2.0
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
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FORK_RPC=
DEV_PRIVATE_KEY=
57 changes: 57 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import "dotenv/config";
import { HardhatUserConfig } from "hardhat/config";
import "@nomiclabs/hardhat-waffle";
import "@nomiclabs/hardhat-ethers";
import "@openzeppelin/hardhat-upgrades";
import "./tasks/accounts";
import { parseEther } from "@ethersproject/units";

// You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more

/**
* @type import('hardhat/config').HardhatUserConfig
*/
const compilerSettings = {
metadata: {
// Not including the metadata hash
// https://github.com/paulrberg/solidity-template/issues/31
bytecodeHash: "none",
},
// You should disable the optimizer when debugging
// https://hardhat.org/hardhat-network/#solidity-optimizer-support
optimizer: {
enabled: true,
runs: 800,
},
};
const config: HardhatUserConfig = {
solidity: {
compilers: [
{
version: "0.6.12",
settings: compilerSettings,
},
{
version: "0.7.0",
settings: compilerSettings,
},
],
},

networks: {
hardhat: {
forking: {
url: process.env.FORK_RPC!,
},
accounts: [
{
privateKey: process.env.DEV_PRIVATE_KEY!,
balance: parseEther("1000").toString(),
},
],
},
},
};

export default config;
Loading