Skip to content

feat(dips): align RCA struct with indexing-payments-management-audit contracts#964

Merged
MoonBoi9001 merged 1 commit intorefactor/billion-entities-pricingfrom
fix/rca-struct-update-audit-branch
Mar 2, 2026
Merged

feat(dips): align RCA struct with indexing-payments-management-audit contracts#964
MoonBoi9001 merged 1 commit intorefactor/billion-entities-pricingfrom
fix/rca-struct-update-audit-branch

Conversation

@MoonBoi9001
Copy link
Member

Motivation

The contracts repo is moving to the indexing-payments-management-audit branch (PR #1301) for DIPs testing. That branch made breaking changes to the RecurringCollectionAgreement struct in the RecurringCollector contract: bytes16 agreementId was removed in favour of uint256 nonce, and deadline/endsAt changed from uint256 to uint64. Agreement IDs are now derived on-chain via bytes16(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

  • Updated the RecurringCollectionAgreement sol! struct definition to match the new contract: removed bytes16 agreementId, added uint256 nonce, changed deadline/endsAt to uint64
  • Added derive_agreement_id function that replicates the on-chain agreement ID derivation (bytes16(keccak256(abi.encode(payer, dataService, serviceProvider, deadline, nonce))))
  • Simplified validate_and_create_rca by using direct u64 assignment for deadline/endsAt instead of fallible U256-to-u64 conversion
  • Updated all test RCA constructions to use the new struct layout

Generated with Claude Code

…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>
@MoonBoi9001 MoonBoi9001 force-pushed the fix/rca-struct-update-audit-branch branch from 295256c to e8353d6 Compare March 2, 2026 23:27
@MoonBoi9001 MoonBoi9001 merged commit 86ec0c6 into refactor/billion-entities-pricing Mar 2, 2026
7 checks passed
@MoonBoi9001 MoonBoi9001 deleted the fix/rca-struct-update-audit-branch branch March 2, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant