Skip to content

Commit

Permalink
Adding custom deployment script command (#497)
Browse files Browse the repository at this point in the history
While creating custom deployments for the module, the command for the
same was missing from `package.json`, this PR adds the same to all the
modules.

Additional:
- Path update for Certora conf
- Certora Version Update
  • Loading branch information
remedcu authored Oct 4, 2024
1 parent a5aaf8e commit 3e0aa77
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion modules/4337/certora/conf/Safe4337Module.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"verify": "Safe4337Module:certora/specs/Safe4337Module.spec",
"packages": [
"@account-abstraction=../../node_modules/.pnpm/@[email protected]/node_modules/@account-abstraction",
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@6.0.4_/node_modules/@safe-global"
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@5.0.10_/node_modules/@safe-global"
]
}
2 changes: 1 addition & 1 deletion modules/4337/certora/conf/SignatureLengthCheck.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"verify": "Safe4337ModuleHarness:certora/specs/SignatureLengthCheck.spec",
"packages": [
"@account-abstraction=../../node_modules/.pnpm/@[email protected]/node_modules/@account-abstraction",
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@6.0.4_/node_modules/@safe-global"
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@5.0.10_/node_modules/@safe-global"
]
}
2 changes: 1 addition & 1 deletion modules/4337/certora/conf/TransactionExecutionMethods.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"verify": "Safe4337Module:certora/specs/TransactionExecutionMethods.spec",
"packages": [
"@account-abstraction=../../node_modules/.pnpm/@[email protected]/node_modules/@account-abstraction",
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@6.0.4_/node_modules/@safe-global"
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@5.0.10_/node_modules/@safe-global"
]
}
2 changes: 1 addition & 1 deletion modules/4337/certora/conf/ValidationDataLastBitOne.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"verify": "Safe4337Module:certora/specs/ValidationDataLastBitOne.spec",
"packages": [
"@account-abstraction=../../node_modules/.pnpm/@[email protected]/node_modules/@account-abstraction",
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@6.0.4_/node_modules/@safe-global"
"@safe-global=../../node_modules/.pnpm/@[email protected][email protected][email protected]_utf-8-validate@5.0.10_/node_modules/@safe-global"
]
}
2 changes: 1 addition & 1 deletion modules/4337/certora/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
certora-cli==7.10.1
certora-cli==7.14.3
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 3e0aa77

Please sign in to comment.