Contract 05445b0a4f2a29a6e0c791f3d9b983e1f464933e90afee365224d8fec5650987

← Back to Index 📥 Download WASM

Meta

rssdkver 20.5.0#9e2c3022b4355b224a7a814e13ba51761eeb14bb
rsver 1.82.0

Instances

  • CCAUJYRE42HQ4P5QV5GEG6SVAIC4FITJS6ZZHCQSOMMVU6F56WZ4X3P2

Interface

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
fn lastprice(env: soroban_sdk::Env, asset: Asset) -> Option

Initialize the contract with the admin and the oracle configurations

Arguments

  • admin - The address of the admin
  • base - The base asset
  • assets - The list of supported assets
  • asset_configs - The list of oracle configurations for each asset

Errors

  • AlreadyInitialized - The contract has already been initialized
  • InvalidAssets - The asset array is invalid
  • InvalidOracleConfig - The oracle config array is invalid
fn initialize(
    env: soroban_sdk::Env,
    usdc: soroban_sdk::Address,
    cpyt: soroban_sdk::Address,
    usdc_oracle: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶