Add deployment script

This commit is contained in:
Mubaris NK 2021-03-28 21:44:02 +05:30
parent b5d4dc74e6
commit d60471ceff
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561
4 changed files with 22 additions and 4 deletions

View File

@ -0,0 +1,3 @@
ALCHEMY_ID="<>"
ETHERSCAN="<>"
PRIVATE_KEY="<>"

View File

@ -4,6 +4,7 @@ require("@nomiclabs/hardhat-etherscan");
require("dotenv").config(); require("dotenv").config();
const ALCHEMY_ID = process.env.ALCHEMY_ID; const ALCHEMY_ID = process.env.ALCHEMY_ID;
const PRIVATE_KEY = process.env.PRIVATE_KEY;
// You need to export an object to set up your config // You need to export an object to set up your config
// Go to https://hardhat.org/config/ to learn more // Go to https://hardhat.org/config/ to learn more
@ -13,7 +14,15 @@ const ALCHEMY_ID = process.env.ALCHEMY_ID;
*/ */
module.exports = { module.exports = {
defaultNetwork: "hardhat", defaultNetwork: "hardhat",
solidity: "0.7.3", solidity: {
version: "0.7.3",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
},
networks: { networks: {
hardhat: { hardhat: {
forking: { forking: {
@ -22,9 +31,13 @@ module.exports = {
}, },
blockGasLimit: 12000000, blockGasLimit: 12000000,
}, },
kovan: {
url: `https://eth-kovan.alchemyapi.io/v2/${ALCHEMY_ID}`,
accounts: [`0x${PRIVATE_KEY}`],
gas: 12500000,
},
}, },
etherscan: { etherscan: {
apiKey: process.env.ETHERSCAN apiKey: process.env.ETHERSCAN
} }
}; };

3
package-lock.json generated
View File

@ -9,7 +9,8 @@
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@nomiclabs/hardhat-etherscan": "^2.1.1", "@nomiclabs/hardhat-etherscan": "^2.1.1",
"dotenv": "^8.2.0" "dotenv": "^8.2.0",
"rlp": "^2.2.6"
}, },
"devDependencies": { "devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.2", "@nomiclabs/hardhat-ethers": "^2.0.2",

View File

@ -20,6 +20,7 @@
}, },
"dependencies": { "dependencies": {
"@nomiclabs/hardhat-etherscan": "^2.1.1", "@nomiclabs/hardhat-etherscan": "^2.1.1",
"dotenv": "^8.2.0" "dotenv": "^8.2.0",
"rlp": "^2.2.6"
} }
} }