Skip to content

Commit

Permalink
Adding custom deployment script command
Browse files Browse the repository at this point in the history
  • Loading branch information
remedcu committed Oct 4, 2024
1 parent a5aaf8e commit a450f97
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions modules/4337/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"benchmark": "pnpm run test test/gas/*.ts",
"deploy-all": "hardhat deploy-contracts --network",
"deploy": "hardhat deploy --network",
"deploy-custom": "rm -rf deployments/custom && npm run deploy custom",
"lint": "pnpm run lint:sol && npm run lint:ts",
"lint:sol": "solhint 'contracts/**/*.sol'",
"lint:ts": "eslint ./src && eslint ./test",
Expand Down
1 change: 1 addition & 0 deletions modules/allowances/.env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
MNEMONIC=
INFURA_KEY=
ETHERSCAN_API_KEY=
CUSTOM_NODE_URL=
12 changes: 11 additions & 1 deletion modules/allowances/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getSingletonFactoryInfo } from '@safe-global/safe-singleton-factory'

dotenv.config()

const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY } = process.env
const { INFURA_KEY, MNEMONIC, ETHERSCAN_API_KEY, CUSTOM_NODE_URL } = process.env

const sharedNetworkConfig: HttpNetworkUserConfig = {
accounts: {
Expand All @@ -18,6 +18,15 @@ const sharedNetworkConfig: HttpNetworkUserConfig = {
},
}

const customNetwork = CUSTOM_NODE_URL
? {
custom: {
...sharedNetworkConfig,
url: CUSTOM_NODE_URL,
},
}
: {}

const config: HardhatUserConfig = {
paths: {
artifacts: 'build/artifacts',
Expand Down Expand Up @@ -77,6 +86,7 @@ const config: HardhatUserConfig = {
...sharedNetworkConfig,
url: `https://api.avax.network/ext/bc/C/rpc`,
},
...customNetwork,
},
deterministicDeployment,
namedAccounts: {
Expand Down
1 change: 1 addition & 0 deletions modules/allowances/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"test": "hardhat test",
"coverage": "hardhat coverage",
"deploy": "hardhat deploy-verify --network",
"deploy-custom": "rm -rf deployments/custom && npm run deploy custom",
"prepare": "pnpm run clean && npm run build",
"lint": "pnpm run lint:sol && npm run lint:ts",
"lint:sol": "solhint 'contracts/**/*.sol'",
Expand Down
1 change: 1 addition & 0 deletions modules/passkey/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"codesize": "hardhat codesize",
"deploy-all": "hardhat deploy-contracts --network",
"deploy": "hardhat deploy --network",
"deploy-custom": "rm -rf deployments/custom && npm run deploy custom",
"fmt": "prettier --write .",
"fmt:check": "prettier --check .",
"lint": "pnpm run lint:sol && pnpm run lint:ts",
Expand Down
1 change: 1 addition & 0 deletions modules/recovery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"build:sol": "rimraf build typechain-types && hardhat compile",
"build:ts": "rimraf dist && tsc",
"deploy-all": "hardhat deploy-contracts --network",
"deploy-custom": "rm -rf deployments/custom && npm run deploy custom",
"lint": "pnpm run lint:ts",
"lint:ts": "eslint ./src",
"lint:fix": "eslint ./src --fix",
Expand Down

0 comments on commit a450f97

Please sign in to comment.