Contract a5fa8df80c7fc3d150270e03d9dec23f323ebe763d68c45e76efd652b44d9e18

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdk_spec_shaking 2
rssdkver 25.3.0#dcbea44513feb7734af6b6c4aced2c4a7a2715d0
rsver 1.89.0
sep 40

Instances

  • CBR2JTRQLDP2I4L6BH2ABGZKQUWQZ2PBXIFDQL2U2F5IKBLFOQOAGBHS

Interface

fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    config: Config,
    feed_mappings: soroban_sdk::Vec,
) -> Result<(), LazerSourceError>

Verify a signed Lazer payload through the configured verifier and store every mapped feed whose own update time is inside the freshness window and strictly advances. Permissionless: authenticity is cryptographic. Returns the number of feeds stored.

fn update_price_feeds(
    env: soroban_sdk::Env,
    payload: soroban_sdk::Bytes,
) -> Result
fn add_feed(
    env: soroban_sdk::Env,
    mapping: FeedMapping,
) -> Result<(), LazerSourceError>

Unmap a feed and drop its stored price.

fn remove_feed(env: soroban_sdk::Env, feed_id: u32) -> Result<(), LazerSourceError>
fn set_freshness(
    env: soroban_sdk::Env,
    freshness: FreshnessConfig,
) -> Result<(), LazerSourceError>
fn set_decimals(env: soroban_sdk::Env, decimals: u32) -> Result<(), LazerSourceError>

Signature matches the OpenZeppelin Upgradeable trait shape.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
    operator: soroban_sdk::Address,
) -> Result<(), LazerSourceError>

Permissionless: renews instance state and every stored price.

fn extend_ttl(env: soroban_sdk::Env)
fn config(env: soroban_sdk::Env) -> Option
fn feed_mappings(env: soroban_sdk::Env) -> soroban_sdk::Vec
fn stored_price(env: soroban_sdk::Env, asset: Asset) -> Option

Returns Some(Address) if ownership is set, or None if ownership has been renounced.

Arguments

  • e - Access to the Soroban environment.
fn get_owner(env: soroban_sdk::Env) -> Option

Initiates a 2-step ownership transfer to a new address.

Requires authorization from the current owner. The new owner must later call accept_ownership() to complete the transfer.

Arguments

  • e - Access to the Soroban environment.
  • new_owner - The proposed new owner.
  • live_until_ledger - Ledger number until which the new owner can accept. A value of 0 cancels any pending transfer.

Errors

  • [OwnableError::OwnerNotSet] - If the owner is not set.
  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If trying to cancel a transfer that doesn't exist.
  • [crate::role_transfer::RoleTransferError::InvalidLiveUntilLedger] - If the specified ledger is in the past.
  • [crate::role_transfer::RoleTransferError::InvalidPendingAccount] - If the specified pending account is not the same as the provided new address.

Notes

  • Authorization for the current owner is required.
fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    live_until_ledger: u32,
)

Accepts a pending ownership transfer.

Arguments

  • e - Access to the Soroban environment.

Errors

  • [crate::role_transfer::RoleTransferError::NoPendingTransfer] - If there is no pending transfer to accept.

Events

  • topics - ["ownership_transfer_completed"]
  • data - [new_owner: Address]
fn accept_ownership(env: soroban_sdk::Env)

Renounces ownership of the contract.

Permanently removes the owner, disabling all functions gated by #[only_owner].

Arguments

  • e - Access to the Soroban environment.

Errors

  • [OwnableError::TransferInProgress] - If there is a pending ownership transfer.
  • [OwnableError::OwnerNotSet] - If the owner is not set.

Notes

  • Authorization for the current owner is required.
fn renounce_ownership(env: soroban_sdk::Env)
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) ▶