re.al docs
  • Introduction
    • Get to Know re.al
    • Relationship to Arbitrum
    • Tokenized RWAs on re.al
  • re.al Chain
    • Arbitrum Orbit Overview
    • Block Explorer
    • Run a Node
    • Governance
    • Security
    • Contracts & Addresses
  • Get Started
    • reETH: Native Token
    • Get Started
    • Asset Bridging
    • Network Guides and Videos
      • How to Bridge to re.al
      • How to Lock $RWA
      • How to Bridge from re.al (to Ethereum and L2s)
  • RWA Token
    • Overview
    • RWA Tokenomics
      • Reporting veRWA APY
    • Managing veRWA
    • stRWA and wstRWA
    • RWA Rewards Program
      • Overview and Goals
      • Program Specifics
      • Referrals
      • Calculating Points
    • Migration
    • Contracts
      • RWA Technical
      • stRWA Technical
  • Build on re.al
    • Start Building
    • Faucet
    • Smart Contracts
      • Write a Contract
      • Deploy Using Hardhat
      • Verify Contracts
  • Services
    • Services
    • Account Abstraction
      • Safe Account Abstraction
    • Automation & Off-chain Data
      • Gelato Web3 Functions
    • Bridges
      • Layer Zero
    • Indexers
      • Goldsky
    • Oracles
      • Redstone on re.al
    • Relay
      • Gelato Relay
    • VRF
      • Gelato VRF
    • Wallet as a Service
      • Privy
      • Web3Auth
Powered by GitBook
On this page
  • Current Price Feeds
  • Code Snippets
  • Querying Prices
  • Updating Price
  1. Services
  2. Oracles

Redstone on re.al

Current Price Feeds

So far we have deployed the GOLD (XAU) and GBP price feeds on Unreal with Chainlink interface adapter.

Price Feed
Contract address

GOLD

coming soon...

GBP

Price Feed
Contract address

GOLD

GBP

Code Snippets

Querying Prices

const getLatestSignedPrice = async () => {
  return await sdk.requestDataPackages({
    dataServiceId: "redstone-primary-prod",
    uniqueSignersCount: 3,
    dataFeeds: ["XAU"],
    urls: ["https://oracle-gateway-1.a.redstone.finance"],
  });
};

const dataPackagesResponse = await getLatestSignedPrice();

const { dataPackage } = dataPackagesResponse["XAU"]![0];

const parsedPrice = parsePrice(dataPackage.dataPoints[0].value);

Updating Price

const wrappedAdapter =
  WrapperBuilder.wrap(priceFeedAdapter).usingDataPackages(dataPackagesResponse);
const { dataPackage } = dataPackagesResponse["ETH"]![0];
await wrappedAdapter.updateDataFeedsValues(dataPackage.timestampMilliseconds);
PreviousOraclesNextRelay

Last updated 10 months ago

0x100c8e61aB3BeA812A42976199Fc3daFbcDD7272
0x1e527C813E4FB23e5708044AE11Bf05B6873c7ba
0xAb0290C2a2be0D2e8b77e8A7A97a0808D31e650D