Contract ae867e16a904304027b47f65fcea1e347f709cc672a67585ce3e8a498cc2ee82

← Back to Index 📥 Download WASM

Meta

rssdkver 20.3.2#1d7f9bd8030f69070634bfb07394339824ceb399
rsver 1.76.0

Instances

  • CCNPLLAHDRCYOY2RGUGBYAEWXEPCSQSZZGYYCQWHEC2KBYBWLVKJAU4D

Interface

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    base: Asset,
    decimals: u32,
    resolution: u32,
)
fn bump_instance(env: soroban_sdk::Env, ledgers_to_live: u32)
fn write_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
fn read_admin(env: soroban_sdk::Env) -> Option
fn write_resolution(env: soroban_sdk::Env, resolution: u32)
fn sources(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn price_by_source(
    env: soroban_sdk::Env,
    source: u32,
    asset: Asset,
    timestamp: u64,
) -> Option
fn prices_by_source(
    env: soroban_sdk::Env,
    source: u32,
    asset: Asset,
    records: u32,
) -> Option>
fn lastprice_by_source(
    env: soroban_sdk::Env,
    source: u32,
    asset: Asset,
) -> Option

Returns a list of InternalAsset structs that contain the asset and its u32 representation.

fn get_internal_assets(env: soroban_sdk::Env) -> soroban_sdk::Vec

A utility function for getting the u32 representation of an asset that is registered in the storage.

fn get_asset_as_u32(env: soroban_sdk::Env, asset: Asset) -> Option

Removes assets from the contract. This only removes assets from the ASSETS storage key. It doesn't remove price entries from the temporary storage.

fn remove_assets(env: soroban_sdk::Env, assets: soroban_sdk::Vec)

Removes SOURCES from the contract. This only removes SOURCES from the SOURCES storage key. It doesn't remove price entries from the temporary storage.

fn remove_sources(env: soroban_sdk::Env, sources: soroban_sdk::Vec)

Adds prices to the contract. Sources and assets get automatically registered in the storage. Which is handy but not always necessary because once assets and sources are registered, they don't need to be registered again. For a more lightweight version of this function, see add_prices_light.

fn add_prices(env: soroban_sdk::Env, prices: soroban_sdk::Vec)

A more lightweight version of add_prices that does not update the ASSETS and SOURCES storage keys. This is useful for adding prices for existing assets and sources without spending unnecessary fees.

fn add_prices_light(env: soroban_sdk::Env, prices: soroban_sdk::Vec)
fn update_contract(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)
fn base(env: soroban_sdk::Env) -> Asset
fn assets(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn decimals(env: soroban_sdk::Env) -> u32
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 lastprice(env: soroban_sdk::Env, asset: Asset) -> Option

Imports

WebAssembly Text (WAT) ▶