Read on-chain Indices
Step 1: Create The Supra Indices Framework.
Step 2: Configure The S-Value Feed Dependency
[dependencies]
core = { git = "https://github.com/Entropy-Foundation/dora-interface", subdir = "supra/testnet/core", rev = "master" }Step 3: Example to access and use the S-Value Crypto Price
3.1 Supported Indices
use aptos_std::table::{Self, Table};
use supra_oracle::supra_oracle_indices;Calculating the latest value of the index
Reading the index value
Method 1 : Without considering the timestamp of the last index update
Method 2 : Fetch the index value that can only sustain/tolerate a specific stateless period
Last updated
