Skip to content

Commit

Permalink
Update chai matchers (#4899)
Browse files Browse the repository at this point in the history
Co-authored-by: ernestognw <ernestognw@gmail.com>
  • Loading branch information
RenanSouza2 and ernestognw authored Feb 19, 2024
1 parent 3def8f9 commit 141c947
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions contracts/utils/Panic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ library Panic {
function panic(uint256 code) internal pure {
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, shl(0xe0, 0x4e487b71))
mstore(0x04, code)
revert(0x00, 0x24)
mstore(0x00, 0x4e487b71)
mstore(0x20, code)
revert(0x1c, 0x24)
}
}
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@changesets/cli": "^2.26.0",
"@changesets/pre": "^2.0.0",
"@changesets/read": "^0.6.0",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.3",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-network-helpers": "^1.0.3",
"@openzeppelin/docs-utils": "^0.1.5",
Expand Down
2 changes: 1 addition & 1 deletion test/utils/Panic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Panic', function () {
for (const [name, code] of Object.entries({
GENERIC: 0x0,
ASSERT: PANIC_CODES.ASSERTION_ERROR,
UNDER_OVERFLOW: PANIC_CODES.ARITHMETIC_UNDER_OR_OVERFLOW,
UNDER_OVERFLOW: PANIC_CODES.ARITHMETIC_OVERFLOW,
DIVISION_BY_ZERO: PANIC_CODES.DIVISION_BY_ZERO,
ENUM_CONVERSION_ERROR: PANIC_CODES.ENUM_CONVERSION_OUT_OF_BOUNDS,
STORAGE_ENCODING_ERROR: PANIC_CODES.INCORRECTLY_ENCODED_STORAGE_BYTE_ARRAY,
Expand Down

0 comments on commit 141c947

Please sign in to comment.