add verification

This commit is contained in:
Drygin 2022-02-24 14:29:33 +03:00
parent f61eeb8678
commit 4b446b7c35
2 changed files with 17 additions and 6 deletions

View File

@ -17,8 +17,8 @@ $ yarn test
## Deploying
Deploy to Kovan:
Deploy Aggregator:
```bash
$ yarn deploy:kovan
```shell
yarn hardhat run scripts/deploy.js --network mainnet
```

View File

@ -1,5 +1,4 @@
const { ethers } = require('hardhat')
const config = require('../config')
async function main() {
const [deployer] = await ethers.getSigners()
@ -11,7 +10,19 @@ async function main() {
const AggregatorFactory = await ethers.getContractFactory('Aggregator')
const aggregator = await AggregatorFactory.deploy()
console.log('Aggregator address:', aggregator.address)
console.log(' address:', aggregator.address)
console.log('Delay before verification...')
await new Promise((r) => setTimeout(r, 60000))
try {
await hre.run('verify:verify', {
address: aggregator.address,
constructorArguments: [],
})
} catch (err) {
console.log(`Verification of aggregator failed:`, err.message)
}
}
main()
@ -19,4 +30,4 @@ main()
.catch((error) => {
console.error(error)
process.exit(1)
})
})