From 8e9ef75b912e35fd60147683e7832f7dc7e9cc48 Mon Sep 17 00:00:00 2001 From: MathisGD <74971347+MathisGD@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:26:57 +0200 Subject: [PATCH 1/2] Remove duplicate root cancellation check in isRatified Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com> --- src/ratifiers/EcrecoverRatifier.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ratifiers/EcrecoverRatifier.sol b/src/ratifiers/EcrecoverRatifier.sol index 3f77ac46..26974ef4 100644 --- a/src/ratifiers/EcrecoverRatifier.sol +++ b/src/ratifiers/EcrecoverRatifier.sol @@ -32,10 +32,10 @@ contract EcrecoverRatifier is IEcrecoverRatifier { } function isRatified(Offer memory offer, bytes memory ratifierData) external view returns (bytes32) { + require(!isRootCanceled[offer.maker][root], RootCanceled()); (Signature memory sig, bytes32 root, uint256 leafIndex, bytes32[] memory proof) = abi.decode(ratifierData, (Signature, bytes32, uint256, bytes32[])); require(HashLib.isLeaf(root, HashLib.hashOffer(offer), leafIndex, proof), InvalidProof()); - require(!isRootCanceled[offer.maker][root], RootCanceled()); bytes32 structHash = keccak256(abi.encode(HashLib.offerTreeTypeHash(proof.length), root)); bytes32 domainSeparator = keccak256(abi.encode(EIP712_DOMAIN_TYPEHASH, block.chainid, address(this))); bytes32 digest = keccak256(bytes.concat("\x19\x01", domainSeparator, structHash)); From 1a442ab93fccf8a169f45b0d8718fd9134dffe80 Mon Sep 17 00:00:00 2001 From: MathisGD <74971347+MathisGD@users.noreply.github.com> Date: Tue, 23 Jun 2026 12:28:59 +0200 Subject: [PATCH 2/2] Update EcrecoverRatifier.sol Signed-off-by: MathisGD <74971347+MathisGD@users.noreply.github.com> --- src/ratifiers/EcrecoverRatifier.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ratifiers/EcrecoverRatifier.sol b/src/ratifiers/EcrecoverRatifier.sol index 26974ef4..695de1c2 100644 --- a/src/ratifiers/EcrecoverRatifier.sol +++ b/src/ratifiers/EcrecoverRatifier.sol @@ -32,9 +32,9 @@ contract EcrecoverRatifier is IEcrecoverRatifier { } function isRatified(Offer memory offer, bytes memory ratifierData) external view returns (bytes32) { - require(!isRootCanceled[offer.maker][root], RootCanceled()); (Signature memory sig, bytes32 root, uint256 leafIndex, bytes32[] memory proof) = abi.decode(ratifierData, (Signature, bytes32, uint256, bytes32[])); + require(!isRootCanceled[offer.maker][root], RootCanceled()); require(HashLib.isLeaf(root, HashLib.hashOffer(offer), leafIndex, proof), InvalidProof()); bytes32 structHash = keccak256(abi.encode(HashLib.offerTreeTypeHash(proof.length), root)); bytes32 domainSeparator = keccak256(abi.encode(EIP712_DOMAIN_TYPEHASH, block.chainid, address(this)));