Skip to content

Commit

Permalink
Merge pull request ethereum#14324 from ethereum/zeppelin-via-ir-worka…
Browse files Browse the repository at this point in the history
…round

Workaround open-zeppelin expectRevertCustomError bug
  • Loading branch information
nikola-matic authored Jun 14, 2023
2 parents 53c305e + 28573dc commit e44b8b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/externalTests/zeppelin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ function zeppelin_test
sed -i "s|it(\('does not allow remote callback'\)|it.skip(\1|g" test/security/ReentrancyGuard.test.js
sed -i "s|shouldBehaveLikeAccessControlDefaultAdminRules|\/\/&|" test/access/AccessControlDefaultAdminRules.test.js

# TODO: Remove when hardhat properly handle reverts of custom errors with via-ir enabled
# and/or open-zeppelin fix https://github.com/OpenZeppelin/openzeppelin-contracts/issues/4349
sed -i "s|it(\('cannot nest reinitializers'\)|it.skip(\1|g" test/proxy/utils/Initializable.test.js
sed -i "s|it(\('prevents re-initialization'\)|it.skip(\1|g" test/proxy/utils/Initializable.test.js
sed -i "s|it(\('can lock contract after initialization'\)|it.skip(\1|g" test/proxy/utils/Initializable.test.js

# Here only the testToInt(248) and testToInt(256) cases fail so change the loop range to skip them
sed -i "s|range(8, 256, 8)\(.forEach(bits => testToInt(bits));\)|range(8, 240, 8)\1|" test/utils/math/SafeCast.test.js

Expand Down

0 comments on commit e44b8b9

Please sign in to comment.