Index Contract
Last updated
Last updated
UpdateIndex(uint256 _indexNo, bool _isOpen)
The index status is on or off.
AddIndex(uint256 _indexNo, bool _isOpen,uint256 _initIndexPrice)
add new index.
SetOracleTimeClock(address _newOracleAddr, uint256 oracleUpdateAt)
Execute the new orcale,and it can be enabled after 7 days.
ExecuteOracleTimeClock(address new_oracle)
Switch to the new oracle.
function batchIndexPrice(uint256[] calldata _indexNoArr) external view returns (uint256[] memory _prices)
batch get index price
_indexNoArr
uint256[]
indexNo array
_prices
uint256[]
price array
function getIndexPrice(uint256 _indexNo) public view returns (uint256 _indexPrice)
Get index price
_price
uint256
price
function indexLength() external view returns (uint256)
Get index array length
length
uint256
index length
function isIndexOpen(uint256 _indexNo) external view returns (bool)
isset index is open
indexNo
uint256
indexNo
isOpen
bool
index is open
function getIndex(uint256 _indexNo) external view returns ( address[] memory tokens, uint8[] memory weights, uint256[] memory circleSupply, uint256 k, bool isOpen )
get Index tokens and weight,circleSupply
indexNo
uint256
indexNo
tokens
address[]
index tokens
weights
uint256[]
weight of tokens
circleSupply
uint256[]
circly supply of tokens
isOpen
bool
index open status