add V1 and V2 interfaces for deployers and oracles#287
Conversation
V1 interfaces preserve the original I_ naming convention matching deployed on-chain ABIs. V2 interfaces use the new camelCase i names. Consumers interacting with existing deployments use V1; new deployments use V2. Contracts: OffchainAssetReceiptVaultBeaconSetDeployer, ERC20PriceOracleReceiptVaultCloneDeployer, PythOracle, FtsoV2LTSFeedOracle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 30 minutes and 57 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (12)
WalkthroughThis pull request introduces eight new Solidity interface files that standardize the ABIs for vault deployers and oracle contracts. The interfaces are organized in V1 and V2 pairs, where V1 uses uppercase function naming conventions (e.g., Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/interface/IOffchainAssetReceiptVaultBeaconSetDeployerV1.sol`:
- Around line 6-8: The interface is importing OffchainAssetReceiptVaultConfigV2
transitively from OffchainAssetReceiptVaultBeaconSetDeployer.sol; change the
import to pull OffchainAssetReceiptVaultConfigV2 directly from the vault module
where it is defined (OffchainAssetReceiptVault.sol) so the interface imports
only OffchainAssetReceiptVault and OffchainAssetReceiptVaultConfigV2 from the
concrete vault file; update the import statement referencing
OffchainAssetReceiptVaultConfigV2 accordingly in
IOffchainAssetReceiptVaultBeaconSetDeployerV1.
In `@src/interface/IOffchainAssetReceiptVaultBeaconSetDeployerV2.sol`:
- Around line 6-8: Replace the transitive import of
OffchainAssetReceiptVaultConfigV2 from
OffchainAssetReceiptVaultBeaconSetDeployer.sol with a direct import from the
vault module where the type is defined (OffchainAssetReceiptVault.sol); update
the import statement in IOffchainAssetReceiptVaultBeaconSetDeployerV2 to
reference OffchainAssetReceiptVault.sol so OffchainAssetReceiptVaultConfigV2 is
imported directly and removes the unnecessary coupling through
OffchainAssetReceiptVaultBeaconSetDeployer.sol.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: e2afab0e-09dd-43bf-85f3-8fc27336a9a6
📒 Files selected for processing (8)
src/interface/IERC20PriceOracleReceiptVaultCloneDeployerV1.solsrc/interface/IERC20PriceOracleReceiptVaultCloneDeployerV2.solsrc/interface/IFtsoV2LTSFeedOracleV1.solsrc/interface/IFtsoV2LTSFeedOracleV2.solsrc/interface/IOffchainAssetReceiptVaultBeaconSetDeployerV1.solsrc/interface/IOffchainAssetReceiptVaultBeaconSetDeployerV2.solsrc/interface/IPythOracleV1.solsrc/interface/IPythOracleV2.sol
Cast through the V2 interface when accessing public immutable getters so the tests validate the interface matches the concrete contract. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
V1 interfaces intentionally use I_ names to match deployed on-chain ABIs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both deployers now implement IERC165 and report support for their V2 interface ID. Also fix circular import in interfaces by importing config structs from vault source instead of deployer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Test that both deployers report support for their V2 interface ID and IERC165, and reject unknown interface IDs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
I_getter names matching deployed on-chain ABIsigetter names for new deploymentsDownstream consumers (st0x.deploy) need V1 interfaces for fork tests against existing deployments and V2 for new code.
🤖 Generated with Claude Code
Summary by CodeRabbit