Commit 441bb2c0 authored by clabby's avatar clabby

Update semver assertion in `check-l2.ts`

parent efc98d26
...@@ -183,7 +183,7 @@ abstract contract CrossDomainMessenger is ...@@ -183,7 +183,7 @@ abstract contract CrossDomainMessenger is
bytes32 _hashMsgHash; bytes32 _hashMsgHash;
assembly { assembly {
// Re-hash the `_msgHash` with the `0xcafebabe` salt to reduce the possibility // Re-hash the `_msgHash` with the `0xcafebabe` salt to reduce the possibility
// of collisions. // of collisions with existing storage slots.
mstore(0x00, _msgHash) mstore(0x00, _msgHash)
mstore(0x20, 0xcafebabe) mstore(0x20, 0xcafebabe)
_hashMsgHash := keccak256(0x00, 0x40) _hashMsgHash := keccak256(0x00, 0x40)
...@@ -197,11 +197,10 @@ abstract contract CrossDomainMessenger is ...@@ -197,11 +197,10 @@ abstract contract CrossDomainMessenger is
mstore(0x00, 0x08c379a0) mstore(0x00, 0x08c379a0)
// Store pointer to the string in scratch space // Store pointer to the string in scratch space
mstore(0x20, 0x20) mstore(0x20, 0x20)
// Zero-out the free memory pointer (prevents corruption of the length word) // Add the length of the "ReentrancyGuard: reentrant call" string (31 bytes)
mstore(0x40, 0x00) mstore(0x40, 0x1f)
// 31 length + "ReentrancyGuard: reentrant call" // Store "ReentrancyGuard: reentrant call" in the zero slot (plus a 0 byte for padding)
// Note that we do not need to zero-out the memory at 0x60, as it is the zero slot. mstore(0x60, 0x5265656e7472616e637947756172643a207265656e7472616e742063616c6c00)
mstore(0x5f, 0x1f5265656e7472616e637947756172643a207265656e7472616e742063616c6c)
// Revert with 'Error("ReentrancyGuard: reentrant call")' // Revert with 'Error("ReentrancyGuard: reentrant call")'
revert(0x1c, 0x64) revert(0x1c, 0x64)
} }
......
...@@ -242,7 +242,7 @@ const check = { ...@@ -242,7 +242,7 @@ const check = {
signer signer
) )
await assertSemver(L2CrossDomainMessenger, 'L2CrossDomainMessenger') await assertSemver(L2CrossDomainMessenger, 'L2CrossDomainMessenger', '1.1.0')
const xDomainMessageSenderSlot = await signer.provider.getStorageAt( const xDomainMessageSenderSlot = await signer.provider.getStorageAt(
predeploys.L2CrossDomainMessenger, predeploys.L2CrossDomainMessenger,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment