Skip to content

Commit

Permalink
Rename deploy, extract and verify scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cristovaoth committed Aug 2, 2024
1 parent 109cb19 commit 0aa6c27
Show file tree
Hide file tree
Showing 5 changed files with 2,570 additions and 2,596 deletions.
5,142 changes: 2,560 additions & 2,582 deletions mastercopies.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"test": "hardhat test",
"coverage": "hardhat coverage",
"deploy": "yarn hardhat deploy",
"mastercopy:extract": "yarn run build && yarn hardhat mastercopy:extract",
"mastercopy:deploy": "yarn hardhat mastercopy:deploy --network",
"mastercopy:verify": "yarn hardhat mastercopy:verify --network",
"extract-mastercopy": "yarn run build && yarn hardhat mastercopy:extract",
"deploy-mastercopy": "yarn hardhat mastercopy:deploy --network",
"verify-mastercopy": "yarn hardhat mastercopy:verify --network",
"prepack": "yarn run clean && yarn run build",
"prepare": "yarn run clean && yarn run build",
"lint": "yarn lint:sol && yarn lint:ts",
Expand Down
4 changes: 2 additions & 2 deletions tasks/mastercopy-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { Signer } from 'ethers'
import { task } from 'hardhat/config'
import { EthereumProvider } from 'hardhat/types'

import { EIP1193Provider, deployMastercopies } from 'zodiac-core'
import { EIP1193Provider, deployMastercopiesFromArtifact } from 'zodiac-core'

task(
'mastercopy:deploy',
'For every version entry on the artifacts file, deploys a mastercopy into the current network'
).setAction(async (_, hre) => {
const [signer] = await hre.ethers.getSigners()
await deployMastercopies({
await deployMastercopiesFromArtifact({
provider: createEIP1193(hre.network.provider, signer),
})
})
Expand Down
4 changes: 2 additions & 2 deletions tasks/mastercopy-extract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { task } from 'hardhat/config'

import { extractMastercopy } from 'zodiac-core'
import { storeMastercopyArtifact } from 'zodiac-core'

import packageJson from '../package.json'

Expand All @@ -17,7 +17,7 @@ task(
sourceName: contractSource,
})

extractMastercopy({
storeMastercopyArtifact({
contractVersion,
contractName,
compilerInput,
Expand Down
10 changes: 3 additions & 7 deletions tasks/mastercopy-verify.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
import { task } from 'hardhat/config'
import { verifyMastercopies } from 'zodiac-core'
import { verifyMastercopiesFromArtifact } from 'zodiac-core'

const { ETHERSCAN_API_KEY } = process.env

task(
'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({
await verifyMastercopiesFromArtifact({
apiUrl: String((await hre.ethers.provider.getNetwork()).chainId),
apiKey: ETHERSCAN_API_KEY,
apiKey: ETHERSCAN_API_KEY as string,
})
})

0 comments on commit 0aa6c27

Please sign in to comment.