Smart contracts in the IFA Oracle Price Feed System
src/IIfaPriceFeed.sol
struct PriceFeed { int256 decimal; // Precision (-30 to 30) uint256 lastUpdateTime; // Last update timestamp uint256 price; // Price with decimal scaling uint256 roundId; // Round tracking } enum PairDirection { Forward, Backward }
src/IfaPriceFeed.sol
function setAssetInfo(bytes32 assetId, PriceFeed memory priceFeed) function getAssetInfo(bytes32 assetId) returns (PriceFeed memory, bool) function getPairById(bytes32 asset0, bytes32 asset1) returns (DerivedPair memory)
src/IfaPriceFeedVerifier.sol
function submitPriceFeed(bytes32[] calldata assetIds, PriceFeed[] calldata priceFeeds) function setRelayerNode(address relayerNode)
IfaPriceFeed
IfaPriceFeedVerifier
priceFeed.setVerifier(verifier)