feat(dips): align RCA struct with indexing-payments-management-audit contracts#964
Merged
MoonBoi9001 merged 1 commit intorefactor/billion-entities-pricingfrom Mar 2, 2026
Conversation
…contracts The RecurringCollector contract on the `indexing-payments-management-audit` branch removed `bytes16 agreementId` from the RCA struct and replaced it with `uint256 nonce`. Agreement IDs are now derived on-chain via `bytes16(keccak256(abi.encode(payer, dataService, serviceProvider, deadline, nonce)))`. The `deadline` and `endsAt` fields also changed from `uint256` to `uint64`. Updates the sol! struct definition, adds `derive_agreement_id`, simplifies `validate_and_create_rca` by removing fallible U256-to-u64 conversion, and updates all test RCA constructions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
295256c to
e8353d6
Compare
86ec0c6
into
refactor/billion-entities-pricing
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The contracts repo is moving to the
indexing-payments-management-auditbranch (PR #1301) for DIPs testing. That branch made breaking changes to theRecurringCollectionAgreementstruct in the RecurringCollector contract:bytes16 agreementIdwas removed in favour ofuint256 nonce, anddeadline/endsAtchanged fromuint256touint64. Agreement IDs are now derived on-chain viabytes16(keccak256(abi.encode(payer, dataService, serviceProvider, deadline, nonce))).Without this update, indexer-service would reject all agreement proposals because the EIP-712 typehash no longer matches the contract's expected struct layout.
Summary
RecurringCollectionAgreementsol! struct definition to match the new contract: removedbytes16 agreementId, addeduint256 nonce, changeddeadline/endsAttouint64derive_agreement_idfunction that replicates the on-chain agreement ID derivation (bytes16(keccak256(abi.encode(payer, dataService, serviceProvider, deadline, nonce))))validate_and_create_rcaby using direct u64 assignment for deadline/endsAt instead of fallible U256-to-u64 conversionGenerated with Claude Code