develop-web-mainnet.xoracle.io Open in urlscan Pro
188.114.97.3  Public Scan

URL: https://develop-web-mainnet.xoracle.io/
Submission: On May 29 via api from US — Scanned from NL

Form analysis 0 forms found in the DOM

Text Content

 * Message
 * Pricefeed
 * Docs




DISCOVER A SECURE AND
LIGHTWEIGHT SOLUTION.

Build DeFi apps with seamless cross-chain communication and
rapid fast price feed.

Get Stared

0.0+
Messages
0.0+
Request Prices
0
Networks


EXPLORE CRYPTO LIKE BITCOIN,
ETHEREUM, AND DOGECOIN

Simply and securely buy, sell, and manage hundreds of cryptocurrencies.

BTC
$
67,883.400
-0.77
%
ETH
$
3,805.846
-0.97
%
BNB
$
598.764
-0.44
%
USDT
$
1.000
0.08
%
USDC
$
1.001
0.08
%
SOL
$
169.042
0.11
%


SIMPLE TO ACCESS
ACCURATE PRICES RAPIDLY.

Easily request prices by interact with xOracle's price feed contracts instantly
using 'requestPrices'

ArchitectureCode
1// 1. send request prices to xOracle contract 2function requestPrices()
external { 3 // allowance req fee 4 IERC20(weth).approve(xOracle,
type(uint256).max); 5 6 bytes memory payload = ""; // no payload 7 uint256
expired = 0; // no expiration 8 uint256 maxGasPrice = 10e9; // 10 gwei 9 uint256
callbackMaxGasLimit = 5000000; // 5M 10 11
IXOracle(xOracle).requestPrices(payload, expired, maxGasPrice,
callbackMaxGasLimit); 12} 13 14// 2. callback from xOracle fulfill prices
15function xOracleCall(uint256 _reqId, bool _priceUpdate, bytes memory _payload)
external onlyXOracle { 16 // get all latest prices 17 (, uint256 btcPrice, , ) =
IXOracle(xOracle).getLastPrice(0); // BTC 18 (, uint256 ethPrice, , ) =
IXOracle(xOracle).getLastPrice(1); // ETH 19 (, uint256 bnbPrice, , ) =
IXOracle(xOracle).getLastPrice(2); // BNB 20 (, uint256 usdtPrice, , ) =
IXOracle(xOracle).getLastPrice(3); // USDT 21 ... 22}
source_chain.soldestination_chain.sol
1// # source chain 2// send message to endpoint contract address on the
destination chain 3function send(address _token, uint256 _amount, uint64
_dstChainId, uint256 _dstTokenIndex, address _receiver) external payable { 4 //
get fee 5 uint256 fee = IXOracleMessage(xOracleMessage).getFee(_dstChainId); 6
require(msg.value >= fee, "insufficient fee"); 7 8 ... 9 10 // send message 11
bytes memory payload = abi.encode(uid, srcTokenIndex, _dstTokenIndex, _amount,
chainId, _dstChainId, msg.sender, _receiver); 12
IXOracleMessage(xOracleMessage).sendMessage{ value: msg.value }(payload,
endpointAddress, _dstChainId); 13}


SEND MESSAGE ACROSS CHAINS.

Effortlessly teransmit messages across chains with seamless integration.

Experience the fluidity of cross-chain communication facilitated by xOracle.

ArchitectureCode


EXPLORE DEFI APPS USING XORACLE

Visit the powerful DeFi applications empowered by the trusted data provided by
xOracle.

TFX Market

Decentralized Perpetual Exchange, Trade BTC, ETH, BNB and other top
cryptocurrencies with up to 50x leverage directly from your wallet

TFX Market

Decentralized Perpetual Exchange, Trade BTC, ETH, BNB and other top
cryptocurrencies with up to 50x leverage directly from your wallet

TFX Market

Decentralized Perpetual Exchange, Trade BTC, ETH, BNB and other top
cryptocurrencies with up to 50x leverage directly from your wallet

TFX Market

Decentralized Perpetual Exchange, Trade BTC, ETH, BNB and other top
cryptocurrencies with up to 50x leverage directly from your wallet

Powered by Crown Labs
©2024 xOracle Explorer