Contracts Overview
Three main contracts compose the IFA Oracle Price Feed System.Contract Architecture
Contracts
1. IIfaPriceFeed (Interface)
- Purpose: Standard interface and data structures
- Location:
src/IIfaPriceFeed.sol
2. IfaPriceFeed (Main Contract)
- Purpose: Price storage and exchange rate calculations
- Location:
src/IfaPriceFeed.sol
- 30-decimal precision price storage
- Real-time exchange rate calculations
- Batch operations support
- Access control for updates
3. IfaPriceFeedVerifier (Validation Contract)
- Purpose: Price data validation and routing
- Location:
src/IfaPriceFeedVerifier.sol
- Relayer permission management
- Price data validation
- Secure routing to main contract
Contract Interaction Flow
Deployment Order
- Deploy
IfaPriceFeed - Deploy
IfaPriceFeedVerifierwith relayer address - Connect verifier to price feed:
priceFeed.setVerifier(verifier)
Access Control
- Owner: Full administrative control
- Verifier Contract: Can update prices in main contract
- Relayer Node: Can submit data through verifier
- Public: Read-only access to price data