Set price updater status (owner only)
fn set_price_updater(
env: soroban_sdk::Env,
updater: soroban_sdk::Address,
active: bool,
)
Set the price ratio denominator (owner only)
fn set_price_ratio_denominator(env: soroban_sdk::Env, denominator: u128)
Set the Arbitrum compression percentage (owner only)
fn set_arbitrum_compression_percent(env: soroban_sdk::Env, compression_percent: u128)
Set the fee model type for destination EIDs (owner only)
fn set_eid_to_model_type(
env: soroban_sdk::Env,
params: soroban_sdk::Vec,
)
Set prices for multiple destinations (price updater or owner)
fn set_price(
env: soroban_sdk::Env,
price_updater: soroban_sdk::Address,
prices: soroban_sdk::Vec,
)
Set price for Arbitrum with extension (price updater or owner) Corresponds to setPriceForArbitrum in PriceFeed.sol
fn set_price_for_arbitrum(
env: soroban_sdk::Env,
price_updater: soroban_sdk::Address,
update: UpdatePriceExt,
)
Set the native token price in USD (price updater or owner).
Kept as a standalone contract function (not part of the canonical fee_lib_interfaces::ILayerZeroPriceFeed interface).
fn set_native_token_price_usd(
env: soroban_sdk::Env,
price_updater: soroban_sdk::Address,
native_token_price_usd: u128,
)
Check if an address is an active price updater
fn is_price_updater(env: soroban_sdk::Env, updater: soroban_sdk::Address) -> bool
Get the Arbitrum compression percent
fn arbitrum_compression_percent(env: soroban_sdk::Env) -> u128
Get the Arbitrum price extension
fn arbitrum_price_ext(env: soroban_sdk::Env) -> ArbitrumPriceExt
Get the model type for a destination EID
fn eid_to_model_type(env: soroban_sdk::Env, dst_eid: u32) -> ModelType
Estimate fee with detailed breakdown by endpoint ID Corresponds to estimateFeeByEid in PriceFeed.sol
fn estimate_fee_by_eid(
env: soroban_sdk::Env,
fee_lib: soroban_sdk::Address,
dst_eid: u32,
calldata_size: u32,
gas: u128,
) -> FeeEstimate
Get the native token price in USD
fn native_token_price_usd(env: soroban_sdk::Env) -> u128
Get the price for a destination EID.
fn get_price(env: soroban_sdk::Env, dst_eid: u32) -> Option
Get the price ratio denominator.
fn get_price_ratio_denominator(env: soroban_sdk::Env) -> u128
fn __constructor(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
price_updater: soroban_sdk::Address,
)
Upgrades the contract to new WASM bytecode.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Runs migration logic after an upgrade.
fn migrate(env: soroban_sdk::Env, migration_data: soroban_sdk::Bytes)
fn authorizer(env: soroban_sdk::Env) -> Option
Returns the current owner address, or None if no owner is set.
fn owner(env: soroban_sdk::Env) -> Option
Returns the pending owner address for 2-step transfer, or None if no transfer is pending.
fn pending_owner(env: soroban_sdk::Env) -> Option
Transfers ownership immediately to a new address.
Use with caution - if you transfer to a wrong address, ownership is lost forever.
Consider using begin_ownership_transfer instead.
OwnerNotSet if no owner is currently setTransferInProgress if a 2-step transfer is in progressfn transfer_ownership(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)
Begins an ownership transfer to a new address.
The new owner must call accept_ownership() within ttl ledgers
to complete the transfer. The pending transfer will automatically expire after.
new_owner - The proposed new ownerttl - Number of ledgers the new owner has to accept.
Use 0 to cancel a pending transfer (new_owner must match pending).OwnerNotSet if no owner is currently setNoPendingTransfer when cancelling and no pending transfer existsInvalidTtl if ttl exceeds max TTLInvalidPendingOwner when cancelling with wrong new_owner addressfn begin_ownership_transfer(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
ttl: u32,
)
Accepts a pending 2-step ownership transfer.
Must be called by the pending owner before the TTL expires.
NoPendingTransfer if there is no pending transfer (or it expired)fn accept_ownership(env: soroban_sdk::Env)
Permanently renounces ownership.
OwnerNotSet if no owner is currently setTransferInProgress if a 2-step transfer is in progress (cancel it first)fn renounce_ownership(env: soroban_sdk::Env)
Extends the instance TTL.
threshold - The threshold to extend the TTL (if current TTL is below this, extend).extend_to - The TTL to extend to.fn extend_instance_ttl(env: soroban_sdk::Env, threshold: u32, extend_to: u32)
Sets TTL configs for instance and persistent storage.
None values remove the corresponding config (disables auto-extension for that type)threshold <= extend_to <= MAX_TTLinstance - TTL config for instance storagepersistent - TTL config for persistent storageTtlConfigFrozen if configs are frozenInvalidTtlConfig if validation failsfn set_ttl_configs(
env: soroban_sdk::Env,
instance: Option,
persistent: Option,
)
Returns the current TTL configs as (instance_config, persistent_config).
fn ttl_configs(env: soroban_sdk::Env) -> (Option, Option)
Permanently freezes TTL configs, preventing any future modifications.
This is irreversible and provides immutability guarantees to users.
Emits TtlConfigsFrozen event.
TtlConfigAlreadyFrozen if already frozenfn freeze_ttl_configs(env: soroban_sdk::Env)
Returns whether TTL configs are frozen.
fn is_ttl_configs_frozen(env: soroban_sdk::Env) -> bool