On-chain
Prefer CommodityConsumer for staleness-checked reads. Use PriceFeed when a protocol expects AggregatorV3.
| Contract | Address |
|---|---|
| CommodityOracle | 0x90Dfd581393104EAe03Fd349b4867A7E8F51313bverified |
| CommodityConsumer | 0x5E6658ac6cBC9b0109C28BED00bC4Af0F0A3f1CDverified |
| Oracle signer | 0xdAF0182De86F904918Db8d07c7340A1EfcDF8244 |
Consumer maxStaleness: 900s. Oracle update signatures must be < 15 minutes old.
BOT Testnet · chain 968 · RPC https://rpc.bohr.life · explorer scan.bohr.life
Snippets (selected network)
Consumer
CommodityConsumer c = CommodityConsumer(0x5E6658ac6cBC9b0109C28BED00bC4Af0F0A3f1CD);
(uint256 id, uint256 price, uint256 ts) = c.getPrice(keccak256("WTI-USD"));Oracle
CommodityOracle o = CommodityOracle(0x90Dfd581393104EAe03Fd349b4867A7E8F51313b);
(uint256 id, uint256 price, uint256 ts) = o.getLatestPrice(keccak256("WTI-USD"));CLI
npx hardhat run scripts/priceCli.ts --network botTestnetHelpers: getWtiPrice(), getNaturalGasPrice(), getBrentPrice(), getGoldPrice(), getSilverPrice().
maxStaleness is 900s on testnet and 3600s on mainnet. REST may still show a price inside a 2h window while getPrice reverts.
PriceFeed (AggregatorV3)
export ORACLE_ADDRESS=0x90Dfd581393104EAe03Fd349b4867A7E8F51313b
export FEED_TICKER=NG
npx hardhat run scripts/deployPriceFeed.ts --network botTestnet
(, int256 answer, , uint256 updatedAt, ) = aggregator.latestRoundData();
Full addresses and ABIs: Contracts.