Skip to content

Commit 9e3abfc

Browse files
authored
fix: deploy script validations (#667)
* fix: remove extra validation * fix: use yarn pre-deploy in migrate command
1 parent 7df6669 commit 9e3abfc

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"build": "SKIP_LOAD=true scripts/build",
8383
"clean": "rm -rf build/ cache/ dist/",
8484
"compile": "hardhat compile",
85-
"deploy": "yarn build && scripts/predeploy && hardhat migrate",
85+
"deploy": "yarn build && yarn predeploy && hardhat migrate",
8686
"deploy-localhost": "yarn deploy --force --network localhost --graph-config config/graph.localhost.yml",
8787
"deploy-rinkeby": "yarn deploy --force --network rinkeby --graph-config config/graph.rinkeby.yml",
8888
"deploy-goerli": "yarn deploy --force --network goerli --graph-config config/graph.goerli.yml",

tasks/deployment/accounts.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ import { updateItemValue, writeConfig } from '../../cli/config'
66
task('migrate:accounts', '[localhost] Creates protocol accounts and saves them in graph config')
77
.addParam('graphConfig', cliOpts.graphConfig.description, cliOpts.graphConfig.default)
88
.setAction(async (taskArgs, hre) => {
9-
if (hre.network.name !== 'localhost') {
10-
throw new Error('This task can only be run on localhost network')
11-
}
12-
139
const { graphConfig, getDeployer } = hre.graph({
1410
graphConfig: taskArgs.graphConfig,
1511
})

tasks/deployment/ownership.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ task(
99
.addParam('addressBook', cliOpts.addressBook.description, cliOpts.addressBook.default)
1010
.addParam('graphConfig', cliOpts.graphConfig.description, cliOpts.graphConfig.default)
1111
.setAction(async (taskArgs, hre) => {
12-
if (hre.network.name !== 'localhost') {
13-
throw new Error('This task can only be run on localhost network')
14-
}
15-
1612
const { contracts, getNamedAccounts } = hre.graph({
1713
addressBook: taskArgs.addressBook,
1814
graphConfig: taskArgs.graphConfig,

0 commit comments

Comments
 (0)