Skip to content

Commit 27e5afa

Browse files
cameelchriseth
authored andcommitted
Patch external tests for the override data alignment issue until our patches are accepted upstream
1 parent dfa0bcf commit 27e5afa

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

test/externalTests/bleeps.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ function bleeps_test
8686
npm install npm-run-all
8787
npm install
8888

89+
# TODO: Bleeps depends on OpenZeppelin 4.3.2, which is affected by
90+
# https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3293.
91+
# Forcing OZ >= 4.6.0 fixes this but it also causes a lot of unrelated compilation errors.
92+
# Remove this when Bleeps gets updated to support newer OpenZeppelin.
93+
perl -i -0pe \
94+
"s/(function hashProposal\(\n address\[\] )calldata( targets,\n uint256\[\] )calldata( values,\n bytes\[\] )calldata( calldatas,)/\1memory\2memory\3memory\4/g" \
95+
node_modules/@openzeppelin/contracts/governance/IGovernor.sol
96+
8997
replace_version_pragmas
9098

9199
for preset in $SELECTED_PRESETS; do

test/externalTests/brink.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ function brink_test
6262
setup_solc "$DIR" "$BINARY_TYPE" "$BINARY_PATH"
6363
download_project "$repo" "$ref_type" "$ref" "$DIR"
6464

65+
# TODO: Remove this when Brink merges https://github.com/brinktrade/brink-core/pull/52
66+
sed -i "s|\(function isValidSignature(bytes \)calldata\( _data, bytes \)calldata\( _signature)\)|\1memory\2memory\3|g" contracts/Test/MockEIP1271Validator.sol
67+
6568
neutralize_package_lock
6669
neutralize_package_json_hooks
6770
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

test/externalTests/gnosis.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ function gnosis_safe_test
7979
sed -i 's|\(describe\)\(("Upgrade from Safe 1.1.1"\)|\1.skip\2|g' test/migration/UpgradeFromSafe111.spec.ts
8080
sed -i 's|\(describe\)\(("Upgrade from Safe 1.2.0"\)|\1.skip\2|g' test/migration/UpgradeFromSafe120.spec.ts
8181

82+
# TODO: Remove this when Gnosis merges https://github.com/gnosis/safe-contracts/pull/394
83+
sed -i "s|\(function isValidSignature(bytes \)calldata\( _data, bytes \)calldata\( _signature)\)|\1memory\2memory\3|g" contracts/handler/CompatibilityFallbackHandler.sol
84+
8285
neutralize_package_lock
8386
neutralize_package_json_hooks
8487
force_hardhat_compiler_binary "$config_file" "$BINARY_TYPE" "$BINARY_PATH"

0 commit comments

Comments
 (0)