removes unnecessary network config
This commit is contained in:
parent
6e542d8ebe
commit
3717738895
|
@ -1,34 +1,27 @@
|
|||
require("@nomiclabs/hardhat-waffle");
|
||||
require('@nomiclabs/hardhat-waffle')
|
||||
require('dotenv').config()
|
||||
|
||||
module.exports = {
|
||||
defaultNetwork: "localhost",
|
||||
defaultNetwork: 'localhost',
|
||||
networks: {
|
||||
hardhat: {
|
||||
},
|
||||
localhost: {
|
||||
url: "http://127.0.0.1:8545"
|
||||
url: 'http://127.0.0.1:8545',
|
||||
},
|
||||
rinkeby: {
|
||||
url: process.env.ENDPOINT_URL,
|
||||
// chainId: 4,
|
||||
accounts: [process.env.DEPLOYER_KEY]
|
||||
}
|
||||
},
|
||||
solidity: {
|
||||
version: '0.8.11',
|
||||
settings: {
|
||||
optimizer: {
|
||||
enabled: true,
|
||||
runs: 200
|
||||
}
|
||||
}
|
||||
runs: 200,
|
||||
},
|
||||
},
|
||||
},
|
||||
paths: {
|
||||
sources: "./src/contracts",
|
||||
artifacts: "./src/abis"
|
||||
sources: './src/contracts',
|
||||
artifacts: './src/abis',
|
||||
},
|
||||
mocha: {
|
||||
timeout: 40000
|
||||
}
|
||||
}
|
||||
timeout: 40000,
|
||||
},
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
const { ethers } = require('hardhat')
|
||||
const fs = require('fs')
|
||||
|
||||
async function main() {
|
||||
const contract_name = ''
|
||||
const Contract = await ethers.getContractFactory(contract_name)
|
||||
const contract = await Contract.deploy()
|
||||
|
||||
await contract.deployed()
|
||||
|
||||
const address = JSON.stringify({ address: contract.address }, null, 4)
|
||||
fs.writeFile('./src/abis/contractAddress.json', address, 'utf8', (err) => {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
return
|
||||
}
|
||||
console.log('Deployed contract address', contract.address)
|
||||
})
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(error)
|
||||
process.exitCode = 1
|
||||
})
|
Loading…
Reference in New Issue