fn base(env: soroban_sdk::Env) -> Asset
Returns a list of registered assets as [Asset::Stellar] variants
fn assets(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn decimals(env: soroban_sdk::Env) -> u32
Adds an asset to the aggregation list
ticker - symbol of the asset that is addedtoken_address - token contract's address on the Stellar ledger of the asset that is being
addedmax_dev_bps - max allowed deviation in basis points between 2 consecutive price retrievalsmax_dev_consecutive_diff_secs - max time difference in seconds between 2 consecutive price retrievals that will account for deviationfn add_asset(
env: soroban_sdk::Env,
ticker: soroban_sdk::Symbol,
token_address: soroban_sdk::Address,
max_dev_bps: u32,
max_dev_consecutive_diff_secs: u64,
) -> Result<(), AOCError>
fn lastprice(env: soroban_sdk::Env, asset: Asset) -> Option
Returns the list of all aggregated oracles configurations
fn get_oracles(env: soroban_sdk::Env) -> soroban_sdk::Vec
Constructs the oracle contract
admin - contract's administratorbase_asset - asset that will be the result of the base() endpoint calldecimals - number of decimals in the aggregated pricemax_age - max allowed age(in seconds) of oracle's price that's being aggregatedoracles - list of information about oracles that are being aggregatedfn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
base_asset: Asset,
decimals: u32,
max_age: u64,
oracles: soroban_sdk::Vec,
)
Proposes a new oracle's admin
fn propose_new_admin(
env: soroban_sdk::Env,
proposed_admin: soroban_sdk::Address,
) -> Result<(), AOCError>
fn accept_proposed_admin(env: soroban_sdk::Env) -> Result<(), AOCError>