Skip to content

Commit

Permalink
Minor adjustments on tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Jul 29, 2024
1 parent c175ca3 commit b938247
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { HttpNetworkUserConfig } from 'hardhat/types'
dotenv.config()

import './tasks/deploy'
import './tasks/mastercopy-deploy'
import './tasks/mastercopy-extract'
import './tasks/mastercopy-deploy'
import './tasks/mastercopy-verify'

const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY } = process.env
Expand Down Expand Up @@ -87,6 +87,10 @@ export default {
...sharedNetworkConfig,
url: 'https://rpc-mainnet.maticvigil.com',
},
sepolia: {
...sharedNetworkConfig,
url: `https://sepolia.infura.io/v3/${INFURA_KEY}`,
},
},
etherscan: {
apiKey: ETHERSCAN_API_KEY,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "hardhat test",
"coverage": "hardhat coverage",
"deploy": "yarn hardhat deploy",
"mastercopy:extract": "yarn hardhat mastercopy:extract --network",
"mastercopy:extract": "yarn hardhat mastercopy:extract",
"mastercopy:deploy": "yarn hardhat mastercopy:deploy --network",
"mastercopy:verify": "yarn hardhat mastercopy:verify --network",
"prepack": "yarn run clean && yarn run build",
Expand Down
2 changes: 1 addition & 1 deletion tasks/mastercopy-extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ task(
)
.addParam(
'mastercopyVersion',
'The version used to insert into the Artifacts object',
'The extracted artifact version',
undefined,
types.string,
true
Expand Down
4 changes: 2 additions & 2 deletions tasks/mastercopy-verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { verifyMastercopies } from 'zodiac-core'
const { ETHERSCAN_API_KEY } = process.env

task(
'mastercopies:verify',
'mastercopy:verify',
'Verifies all mastercopies from the artifacts file, in the block explorer corresponding to the current network'
).setAction(async (_, hre) => {
if (!ETHERSCAN_API_KEY) {
throw new Error('Missing ENV ETHERSCAN_API_KEY')
}

await verifyMastercopies({
apiUrl: String(hre.network.config.chainId),
apiUrl: String((await hre.ethers.provider.getNetwork()).chainId),
apiKey: ETHERSCAN_API_KEY,
})
})

0 comments on commit b938247

Please sign in to comment.