Contract Details
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism
Description
On-chain registry mapping asset pairs to oracle feed addresses. Supports multiple feed types (Chainlink, TWAP, custom), versioning, and governance-controlled updates. Consumers can discover the correct oracle for any asset pair without hardcoding addresses.
Features
- ✓ Asset pair to oracle address mapping
- ✓ Multiple feed type support (Chainlink, TWAP, custom)
- ✓ Feed versioning and migration
- ✓ Governance-controlled updates (Ownable2Step)
- ✓ Batch registration and removal
- ✓ Feed metadata storage (decimals, description)
- ✓ Consumer helper for easy integration
- ✓ Enumeration of registered pairs
- ✓ ReentrancyGuard protection
- ✓ Full Foundry test suite
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Feed Registry /// @notice On-chain registry mapping asset pairs to oracle feed addresses. contract FeedRegistry { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }