Skip to content

Commit 141c947

Browse files
Update chai matchers (#4899)
Co-authored-by: ernestognw <[email protected]>
1 parent 3def8f9 commit 141c947

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

contracts/utils/Panic.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ library Panic {
4747
function panic(uint256 code) internal pure {
4848
/// @solidity memory-safe-assembly
4949
assembly {
50-
mstore(0x00, shl(0xe0, 0x4e487b71))
51-
mstore(0x04, code)
52-
revert(0x00, 0x24)
50+
mstore(0x00, 0x4e487b71)
51+
mstore(0x20, code)
52+
revert(0x1c, 0x24)
5353
}
5454
}
5555
}

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@changesets/cli": "^2.26.0",
5454
"@changesets/pre": "^2.0.0",
5555
"@changesets/read": "^0.6.0",
56-
"@nomicfoundation/hardhat-chai-matchers": "^2.0.3",
56+
"@nomicfoundation/hardhat-chai-matchers": "^2.0.6",
5757
"@nomicfoundation/hardhat-ethers": "^3.0.4",
5858
"@nomicfoundation/hardhat-network-helpers": "^1.0.3",
5959
"@openzeppelin/docs-utils": "^0.1.5",

test/utils/Panic.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('Panic', function () {
1515
for (const [name, code] of Object.entries({
1616
GENERIC: 0x0,
1717
ASSERT: PANIC_CODES.ASSERTION_ERROR,
18-
UNDER_OVERFLOW: PANIC_CODES.ARITHMETIC_UNDER_OR_OVERFLOW,
18+
UNDER_OVERFLOW: PANIC_CODES.ARITHMETIC_OVERFLOW,
1919
DIVISION_BY_ZERO: PANIC_CODES.DIVISION_BY_ZERO,
2020
ENUM_CONVERSION_ERROR: PANIC_CODES.ENUM_CONVERSION_OUT_OF_BOUNDS,
2121
STORAGE_ENCODING_ERROR: PANIC_CODES.INCORRECTLY_ENCODED_STORAGE_BYTE_ARRAY,

0 commit comments

Comments
 (0)