Skip to content

Adds dappId to combinator contracts #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

acenolaza
Copy link
Collaborator

@acenolaza acenolaza commented Jul 8, 2025

Closes #24

Changes

  • Adds dappId immutable variable to all combinator contracts. These are set by reading the underlying proxy.dappId() (except for NormalizedApi3ReaderProxyV1)
  • Casts underlying proxies to IApi3ReaderProxyV1
  • NormalizedApi3ReaderProxyV1 now requires a dappId to be pass in the constructor
  • Validates that proxies dappId are equal in ProductApi3ReaderProxyV1
  • Replaces @api3/contracts imports with MockApi3ReaderProxyV1 test contract to make testing simpler

Notes

  • The dappId immutable variable is needed because dappId() in IApi3ReaderProxyV1 is not marked as view
  • The cast to IApi3ReaderProxyV1 still feels kind of wrong to me since the underlying proxies might be another combinator proxy which might not even expose a dapiName() function for example. I think it might be more accurate to create a IApi3ReaderProxyWithDappId or similar that inherints from IApi3ReaderProxyand adds a function dappId() external view returns (uint256);

@acenolaza acenolaza changed the title 24 proxy dappid Adds dappId to combinator contracts Jul 8, 2025
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.

Expose or validate dAppID for of the underlying proxies
1 participant