Oracle
Last updated
Last updated
network name:kovan chain id: 42
The Oracle contract connects to two oracle platforms, BandProcotal, ChainLink. GetTokenPrice takes the average price of the three platforms in a 1:2 ratio.
function getBandPrice(string sybmol) public view returns (uint256);
Get bandprotocol price
sybmol
string
ERC20 token name,like ETH
_prices
uint256
price
function getChainLinkPrice(string sybmol) public view returns (uint256)
Get ChainLink Price
sybmol
string
ERC20 token name,like ETH
_prices
uint256
price
function getTokenPrice(string sybmol) external view returns (uint256 _price, uint8 _decimals)
Get two oracle prices at the same time and calculate the final price
sybmol
string
ERC20 token name,like ETH
prices
uint256
price
function getCirculSupplys(string sybmol) external view returns (uint256)
**Get the number of token issues, and the number of issues for contract record, which is not real-time **
sybmol
string
ERC20 token name,like ETH
amount
uint256
amount
function setWeight( uint8 _chainLinkWeight, uint8 _bandWeight, uint8 _uniswapv3Weight) external;
Set oracle weight
_chainLinkWeight
uint8
chainlink weight
_bandWeight
uint8
band protocol weight
_uniswapv3Weight
uint8
uniswapv3 weight