dgf-prototype/ethereum/scripts/verify.js

48 lines
1.3 KiB
JavaScript
Raw Normal View History

const { ethers, run } = require('hardhat');
const contractAddresses = require('../contract-addresses.json');
require('dotenv').config();
const network = process.env.HARDHAT_NETWORK;
const work1Price = ethers.parseEther(process.env.WORK1_PRICE || 0.001);
const onboardingPrice = ethers.parseEther(process.env.ONBOARDING_PRICE || '0.001');
async function main() {
// Unless deploying locally, run the verify task
if (network !== 'localhost') {
await run('verify:verify', {
address: contractAddresses[network].DAO,
});
await run('verify:verify', {
address: contractAddresses[network].Work1,
constructorArguments: [
contractAddresses[network].DAO,
work1Price,
],
});
await run('verify:verify', {
address: contractAddresses[network].Onboarding,
constructorArguments: [
contractAddresses[network].DAO,
onboardingPrice,
],
});
2024-03-29 10:59:29 -05:00
await run('verify:verify', {
address: contractAddresses[network].Proposals,
constructorArguments: [
contractAddresses[network].DAO,
],
});
}
}
// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});