Integrate the Push Mode
AtlasOracle currently serves only BSC and only in Push mode. In this mode, an on-chain smart contract stores the latest price; authorized operators update it based on external triggers—commonly heartbeat elapsed or price deviation beyond a threshold. This suits applications that prefer reading price from a contract with a purely on-chain integration.
Under Push mode we provide two contract types:
One is SingularAggregator: a single contract call returns one feed’s price. Its advantage is Chainlink compatibility.
The other is Pricehub: one call can return the latest prices for multiple feeds. It favors consistency and gas efficiency.
1. SingularAggregator
The SingularAggregator contract is compatible with Chainlink. Each contract can only accept price from one single feed.
Contract example:
https://drive.google.com/file/d/1hhw27ZyimhibbcQyk24S8buKCKyFWius/view?usp=sharing
Contract interface SDK:
https://drive.google.com/file/d/1R7Cu7mNOpT9-792xvhthV8bbI_VixFzj/view?usp=drive_link
Contract interface reference: View Documentation
2. Pricehub
PriceHub returns prices for multiple feeds. It includes:
- Standard interface (Decoded view)
- Compact interface (Bare-metal view): an efficient access pattern that uses
staticcallto return packed data and minimize cross-contract gas. Integrate the FeedCodec library in your application to decode the rawbytes32values returned.
Contract example:
https://drive.google.com/file/d/128hv4SfK1iwbHlKEgFmxJkEL-iFJGpqu/view?usp=sharing
Contract interface SDK:
https://drive.google.com/file/d/1OOxqEoSRPP6zzFoScpMl4G9NH8OHbVj0/view?usp=sharing
Contract interface reference: View Documentation