Skip to content

Commit 29dfdcc

Browse files
fix: [TRST-M-1] correct TYPEHASH string for RCAU
Fixes TRST-M-1 audit finding: Wrong TYPEHASH string is used for agreement updates, limiting functionality. * Fixed EIP712_RCAU_TYPEHASH to use correct uint64 types for deadline and endsAt fields (was incorrectly using uint256) * This prevents signature verification failures for RecurringCollectionAgreementUpdate
1 parent 8048c4c commit 29dfdcc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/horizon/contracts/payments/collectors/RecurringCollector.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ contract RecurringCollector is EIP712, GraphDirectory, Authorizable, IRecurringC
3535
/// @notice The EIP712 typehash for the RecurringCollectionAgreementUpdate struct
3636
bytes32 public constant EIP712_RCAU_TYPEHASH =
3737
keccak256(
38-
"RecurringCollectionAgreementUpdate(bytes16 agreementId,uint256 deadline,uint256 endsAt,uint256 maxInitialTokens,uint256 maxOngoingTokensPerSecond,uint32 minSecondsPerCollection,uint32 maxSecondsPerCollection,bytes metadata)"
38+
"RecurringCollectionAgreementUpdate(bytes16 agreementId,uint64 deadline,uint64 endsAt,uint256 maxInitialTokens,uint256 maxOngoingTokensPerSecond,uint32 minSecondsPerCollection,uint32 maxSecondsPerCollection,bytes metadata)"
3939
);
4040

4141
/// @notice Tracks agreements

0 commit comments

Comments
 (0)