@@ -31,8 +31,8 @@ BINARY_TYPE="$1"
31
31
BINARY_PATH=" $( realpath " $2 " ) "
32
32
SELECTED_PRESETS=" $3 "
33
33
34
- function compile_fn { npm run build; }
35
- function test_fn { npm test ; }
34
+ function compile_fn { npx npm run build; }
35
+ function test_fn { npx npm test ; }
36
36
37
37
function gnosis_safe_test
38
38
{
@@ -87,33 +87,44 @@ function gnosis_safe_test
87
87
sed -i " s|it\(('can only be called from Safe itself'\)|it.skip\1|g" test/libraries/Migration.spec.ts
88
88
sed -i " s|it\(('should enforce delegatecall to MultiSend'\)|it.skip\1|g" test/libraries/MultiSend.spec.ts
89
89
90
+ # Force nested abstract-provider dependencies to be at version 5.6.0. Version 5.7.0 of @ethersproject/abstract-provider
91
+ # introduced a new field in FeeData, which causes clashes unless all dependency packages of abstract-provider are pegged
92
+ # to the same version. As we've already had to peg @ethersproject/contracts to 5.6.0 earlier, we are doing so now with
93
+ # @ethersproject/abstract-provider as well.
94
+ jq ' .overrides."@ethersproject/abstract-provider"="5.6.0" |
95
+ .overrides."@ethersproject/[email protected] "
96
+ ."@ethersproject/abstract-provider"="5.6.0"' package.json > package.json.tmp
97
+ mv package.json.tmp package.json
98
+
90
99
neutralize_package_lock
91
100
neutralize_package_json_hooks
92
101
force_hardhat_compiler_binary " $config_file " " $BINARY_TYPE " " $BINARY_PATH "
93
102
force_hardhat_compiler_settings " $config_file " " $( first_word " $SELECTED_PRESETS " ) " " $config_var "
94
- npm install
95
- npm install hardhat-gas-reporter
103
+ # [email protected] + is required for `overrides` support
104
+ npm install npm@> 8.3.0
105
+ npx npm install
106
+ npx npm install hardhat-gas-reporter
96
107
97
108
# Typescript compilation fails with typescript >= 4.7:
98
109
# Error: Debug Failure. False expression: Non-string value passed to `ts.resolveTypeReferenceDirective`
99
- npm install " typescript@<4.7.0"
110
+ npx npm install " typescript@<4.7.0"
100
111
101
112
# With ethers.js 5.6.2 many tests for revert messages fail.
102
113
# TODO: Remove when https://github.com/ethers-io/ethers.js/discussions/2849 is resolved.
103
-
114
+
104
115
105
116
# Note that [email protected] depends on @ethersproject/[email protected] while the dependency on hardhat-deploy
106
117
# pulls @ethersproject/[email protected] (latest). Force 5.6.0 to avoid errors due to having two copies.
107
- npm install @ethersproject/
[email protected]
118
+ npx npm install @ethersproject/
[email protected]
108
119
109
120
# 2.1.1 started causing failures in safe-contracts external tests after a contract address check was introduced
110
121
# in https://github.com/NomicFoundation/hardhat/pull/2916, and so to avoid errors, the package is now pegged.
111
122
# TODO: Remove when https://github.com/safe-global/safe-contracts/issues/436 is resolved.
112
- npm install @nomiclabs/
[email protected]
123
+ npx npm install @nomiclabs/
[email protected]
113
124
114
125
# Hardhat 2.9.5 introduced a bug with handling padded arguments to getStorageAt().
115
126
# TODO: Remove when https://github.com/NomicFoundation/hardhat/issues/2709 is fixed.
116
-
127
+
117
128
118
129
replace_version_pragmas
119
130
[[ $BINARY_TYPE == solcjs ]] && force_solc_modules " ${DIR} /solc/dist"
0 commit comments