fn resolution(env: soroban_sdk::Env) -> u32
fn price(env: soroban_sdk::Env, _asset: Asset, _timestamp: u64) -> Option
fn prices(
env: soroban_sdk::Env,
_asset: Asset,
_records: u32,
) -> Option>
fn base(env: soroban_sdk::Env) -> Asset
fn decimals(env: soroban_sdk::Env) -> u32
fn assets(env: soroban_sdk::Env) -> soroban_sdk::Vec
Return the price of the given asset in the base asset
fn lastprice(env: soroban_sdk::Env, asset: Asset) -> Option
Initialize the contract with the admin and the oracle configurations
admin - The address of the adminusdc - The address of the USDC tokenusdc_oracle - The address of the USDC oracledefault_oracle - The address of the oracle for all non-USDC assetsAlreadyInitialized - The contract has already been initializedfn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
usdc: soroban_sdk::Address,
usdc_oracle: soroban_sdk::Address,
cpct_oracle: soroban_sdk::Address,
)
(Admin only) Block an asset
asset - The asset to blockAssetNotFound - The asset is not foundfn block(env: soroban_sdk::Env, asset: Asset)
(Admin only) Unblock an asset
asset - The asset to unblockAssetNotFound - The asset is not foundfn unblock(env: soroban_sdk::Env, asset: Asset)
(Admin only) Set the admin address
admin - The new admin addressfn set_admin(env: soroban_sdk::Env, admin: soroban_sdk::Address)