Quickstart
Read WTI crude on Lumora. Feed id WTI-USD → assetId = keccak256("WTI-USD").
Price is an 18-decimal integer: value = amount / 10^18.
RPC
https://rpc.bohr.life · explorer scan.bohr.life · token BOT · chain 968 · API base botchain-commodity-oracle.vercel.appREST
curl https://botchain-commodity-oracle.vercel.app/api/prices?q=wti
curl https://botchain-commodity-oracle.vercel.app/api/prices/WTI-USD
curl "https://botchain-commodity-oracle.vercel.app/api/prices/WTI-USD/history?window=7200"Hosted REST currently reads the live app oracle. On-chain snippets below follow the Testnet / Mainnet switch.
On-chain
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 botTestnetDecode
value = Number(amount) / 10 ** 18 // e.g. 78.94 USDWallet
| Setting | Value |
|---|---|
| Network Name | BOT Testnet |
| Chain ID | 968 |
| RPC | https://rpc.bohr.life |
| Token | BOT |
| Explorer | https://scan.bohr.life |
| Hardhat | botTestnet |