Contract Details
Tech Stack
Solidity ^0.8.24 TypeScript OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism
Description
Build your own on-chain data feed: API source to on-chain value with configurable update scheduling, deviation thresholds, and heartbeat intervals. Solidity consumer contract plus TypeScript updater service with gas optimization and multi-source validation.
Features
- ✓ Solidity data feed contract with owner controls
- ✓ Configurable heartbeat interval
- ✓ Deviation threshold triggers
- ✓ TypeScript updater service
- ✓ Multi-source API aggregation
- ✓ Gas price aware update scheduling
- ✓ Historical value storage (configurable depth)
- ✓ Access control for authorized updaters
- ✓ Foundry test suite with fuzz tests
- ✓ Deploy scripts for multiple chains
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Custom Data Feed /// @notice API-to-on-chain data feed with scheduling and deviation triggers. contract CustomDataFeed { 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 }