Skip to content

Conversation

acenolaza
Copy link
Collaborator

Closes #39

Implementation details

  • Removes the concept of dappId from adapter contracts
  • Switches back the underlying proxies to be IApi3ReaderProxy compliant
  • Kept a check in product adapter deployment script that fails when both underlying proxies are IApi3ReaderProxyV1 compliant and dappIds don't match

Now we should be able to deploy a ProductApi3ReaderProxyV1 composing wstETH exchange rate with ETH/USD feed since dappId will no longer be checked onchain nor during deployment but in cases where both proxies have dappIds then the deploy script will make sure they are equal.

Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

revert("Mock: Not implemented");
}

function dappId() external pure override returns (uint256) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhh, it's strange to see it implemented like this 🤔 Why not omit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't omit it because it is required by the IApi3ReaderProxyV1 interface but think of it as a safety measure where reverting immediately flags any unexpected use of the function during testing, which prevents bugs that might otherwise go unnoticed if we instead return some dummy value


let dappId2;
if (!isLocalNetwork) {
let dappId1, dappId2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use the !isLocalNetwork above?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to check for dappId equality locally (NETWORK=hardhat) because the script uses mock proxies for testing

@acenolaza acenolaza force-pushed the 39-removes-dappid-from-adapters branch from 4bb16bb to 6ea628c Compare September 29, 2025 21:42
Copy link
Contributor

@Siegrift Siegrift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@acenolaza acenolaza force-pushed the 39-removes-dappid-from-adapters branch from 6ea628c to 154359b Compare October 1, 2025 12:17
@acenolaza acenolaza merged commit f8bbf23 into main Oct 1, 2025
2 checks passed
@acenolaza acenolaza deleted the 39-removes-dappid-from-adapters branch October 1, 2025 12:18
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.

Unable to create a combinator with native exchange rate adapter

2 participants