Skip to content

Commit ff36adb

Browse files
authored
Update comments in SignatureVerifierMuxer to reflect correct byte ranges for encodeData and payload lengths (#873)
This pull request includes modifying the `SignatureVerifierMuxer` contract to correct the byte offsets for encoding and payload data. Changes to byte offsets: * [`contracts/handler/extensible/SignatureVerifierMuxer.sol`](diffhunk://#diff-62f21ce8850527f34ef2acdacd96d4a2a1150e3e2a7e16457e82236bbd4259d2L124-R127): Updated the byte offset ranges for `encodeData length`, `encodeData`, and `payload length` to correct values.
1 parent 2fd69b0 commit ff36adb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

contracts/handler/extensible/SignatureVerifierMuxer.sol

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ abstract contract SignatureVerifierMuxer is ExtensibleBase, ERC1271, ISignatureV
118118
if (sigSelector == SAFE_SIGNATURE_MAGIC_VALUE && signature.length >= 68) {
119119
// Signature is for an `ISafeSignatureVerifier` - decode the signature.
120120
// Layout of the `signature`:
121-
// 0x00 - 0x04: selector
122-
// 0x04 - 0x36: domainSeparator
123-
// 0x36 - 0x68: typeHash
124-
// 0x68 - 0x6C: encodeData length
125-
// 0x6C - 0x6C + encodeData length: encodeData
126-
// 0x6C + encodeData length - 0x6C + encodeData length + 0x20: payload length
127-
// 0x6C + encodeData length + 0x20 - end: payload
121+
// 0x00 to 0x04: selector
122+
// 0x04 to 0x36: domainSeparator
123+
// 0x36 to 0x68: typeHash
124+
// 0x68 to 0x88: encodeData length
125+
// 0x88 to 0x88 + encodeData length: encodeData
126+
// 0x88 + encodeData length to 0x88 + encodeData length + 0x20: payload length
127+
// 0x88 + encodeData length + 0x20 to end: payload
128128
//
129129
// Get the domainSeparator from the signature.
130130
(bytes32 domainSeparator, bytes32 typeHash) = abi.decode(signature[4:68], (bytes32, bytes32));

0 commit comments

Comments
 (0)