Contract 5700be217a7b5d91324bdc529fd1e8047c275647c9c576aaa5a2ca46f64fd04a

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.95.0
source_repo redstone-finance/redstone-public-contracts

Instances

  • CBMGLKUQZVSAIL5CPDDAWSUY7MAKXISHMOZEVLMBUWBMFGHRJSR4WYRF

Interface

fn base(env: soroban_sdk::Env) -> Asset
fn price(env: soroban_sdk::Env, asset: Asset, timestamp: u64) -> Option
fn assets(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn prices(
    env: soroban_sdk::Env,
    asset: Asset,
    records: u32,
) -> Option>
fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn add_feed(
    env: soroban_sdk::Env,
    feed_mapping: FeedMapping,
) -> Result<(), soroban_sdk::Error>

Returns the maximum decimal precision across all registered feeds.

Deviation from SEP-40: The standard requires decimals to be immutable after deployment. This implementation does not uphold that guarantee: the value increases when a feed with higher precision is added and may decrease when the feed that currently defines the maximum is removed. The value is stable within a single transaction — it can only change through owner-gated admin calls (add_feed, remove_feed, update_feed). Integrators must not cache this value across administrative operations.

fn decimals(env: soroban_sdk::Env) -> u32
fn lastprice(env: soroban_sdk::Env, asset: Asset) -> Option
fn resolution(env: soroban_sdk::Env) -> u32
fn remove_feed(
    env: soroban_sdk::Env,
    feed: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>
fn update_feed(
    env: soroban_sdk::Env,
    feed_mapping: FeedMapping,
) -> Result<(), soroban_sdk::Error>
fn change_owner(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    base_asset: Asset,
    feed_mappings: soroban_sdk::Vec,
    resolution: u32,
) -> Result<(), soroban_sdk::Error>

Deviation from SEP-40: The standard states that resolution should never change after deployment. This implementation intentionally allows the owner to update it to accommodate evolving data-source update frequencies. The value is stable within a single transaction — it can only change through this owner-gated admin call. Integrators must not cache this value across administrative operations.

fn set_resolution(
    env: soroban_sdk::Env,
    new_resolution: u32,
) -> Result<(), soroban_sdk::Error>
fn accept_ownership(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>
fn extend_entries_ttl(env: soroban_sdk::Env)
fn cancel_ownership_transfer(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶