Prismtestnet
HomeXDRAPIGitHub

Prism is open-source software built for the Stellar community. View on GitHub

Contract

CAAL5BZAQ3W2G5CZX4HVLWNQIJISQ62ZNXXYCX2LONG4FFLRRYEYONZC

Overview

ExecutableWASM contract
WASM Hashb5512db5ce1f171a35e5b12dd8865ed2ca6efcb3432b11df6d7eaa6566e924bb
WASM Size27,282 bytes
Live Until Ledger#5,943,281
Last Modified Ledger#5,421,931

Functions (10)

migrate(migration_data: MigrationData, operator: Address)
upgrade(new_wasm_hash: BytesN, operator: Address)
decimals() → U32
get_price(symbol: Symbol) → I128
set_price(caller: Address, symbol: Symbol, price: I128)
last_update(symbol: Symbol) → U64
__constructor(config_manager: Address, publisher: Address)
set_publisher(caller: Address, new_publisher: Address)
cancel_upgrade(caller: Address)
propose_upgrade(caller: Address, wasm_hash: BytesN)

Events (6)

UpgradeProposedtopics ["upgprp"] data (vec) [wasm_hash: BytesN, eta: U64]
UpgradeCancelledtopics ["upgcan"] data (vec) [caller: Address]
SetRoottopics ["set_root"] data (map) [root: Bytes]
SetClaimedtopics ["set_claimed"] data (map) [index: Val]
Pausedtopics ["paused"]
Unpausedtopics ["unpaused"]

Types (31)

OracleError errorAlreadyInitialized = 1, NotInitialized = 2, Unauthorized = 3, NoPriceSet = 4, NoPendingUpgrade = 5, UpgradeTimelockNotElapsed = 6, UpgradeHashMismatch = 7
StorageKey unionInitialized | ConfigManager | Publisher | Price(Symbol) | LastUpdate(Symbol) | Version
Market struct{ config: MarketConfig, current_payer_rate: I128, current_payer_side: PayerSide, last_funding_checkpoint: U64, long: MarketSide, lp_backed_index_long: I128, lp_backed_index_short: I128, lp_payer_remainder: I128, pending_remainder: I128, receiver_backed_index_long: I128, receiver_backed_index_short: I128, receiver_index_long: I128, receiver_index_remainder: I128, receiver_index_short: I128, receiver_payer_remainder: I128, short: MarketSide, skew_ema: I128 }
LpConfig struct{ lp_request_delay: U64, max_withdraw_utilization_bps: U32, min_deposit_nav_factor_bps: U32 }
Position struct{ base_exposure: I128, borrow_debt: I128, execution_budget: I128, funding_paid_to_lps_debt: I128, funding_paid_to_receivers_debt: I128, funding_received_debt: I128, id: U64, is_long: Bool, last_increased_time: U64, market: Symbol, owner: Address, risk_units: I128, size: I128, stop_loss: I128, stored_collateral: I128, take_profit: I128 }
LpRequest struct{ amount: I128, execute_after: U64, id: U64, kind: LpRequestKind, owner: Address, request_time: U64, status: LpRequestStatus }
PayerSide unionNone | Long | Short
RiskState unionNormal | Warning | Adl | HardCap
EntryOrder struct{ acceptable_price: I128, collateral: I128, execution_budget: I128, expires_at: U64, id: U64, is_long: Bool, market: Symbol, owner: Address, size: I128, stop_loss: I128, take_profit: I128, trigger_above: Bool, trigger_price: I128 }
MarketSide struct{ base_exposure: I128, risk_state: RiskState, risk_units: I128, size_open_interest: I128, stored_collateral_total: I128 }
RoundPrice struct{ price: I128, symbol: Symbol }
OracleRound struct{ id: U64, previous_id: U64, previous_timestamp: U64, prices: Vec<RoundPrice>, timestamp: U64 }
GlobalConfig struct{ base_borrow_rate_bps_day: I128, borrow_exponent_bps: U32, funding_half_life_seconds: U64, hard_cap_factor_limit_bps: U32, lp_revenue_share_bps: U32, max_active_markets: U32, max_adl_reward: I128, max_insolvent_touch_reward: I128, max_variable_borrow_bps_day: I128, min_borrow_index_delta: I128, min_collateral: I128, min_position_lifetime: U64, referral_fee_share_bps: U32, risk_capacity_limit_bps: U32, risk_keeper_revenue_share_bps: U32 }
MarketConfig struct{ adl_pnl_factor_bps: U32, adl_reward_bps: U32, close_fee_high_bps: U32, close_fee_low_bps: U32, hard_cap_pnl_factor_bps: U32, initial_margin_bps: U32, instant_weight_bps: U32, liquidation_reward_bps: U32, maintenance_margin_bps: U32, market_risk_factor_bps: U32, max_funding_rate_bps_day: I128, max_long_base_exposure: I128, max_long_size_open_interest: I128, max_short_base_exposure: I128, max_short_size_open_interest: I128, recovery_pnl_factor_bps: U32, warning_pnl_factor_bps: U32 }
OracleConfig struct{ cache_duration: U64, max_deviation_bps: I128, min_required_sources: U32, staleness_threshold: U64 }
LpRequestKind unionDeposit | Withdrawal
MigrationData struct{ version: U32 }
PendingUpgrade struct{ eta: U64, wasm_hash: BytesN }
LpRequestStatus unionPending | Settled | Failed | Expired
EntryOrderParams struct{ acceptable_price: I128, collateral: I128, execution_budget: I128, expires_at: U64, is_long: Bool, size: I128, stop_loss: I128, take_profit: I128, trigger_price: I128 }
SettlementResult struct{ amount: I128, status: SettlementStatus }
SettlementStatus unionSettled | Failed
AccountingSnapshot struct{ cash_lp_equity: I128, cash_shortfall: I128, free_lp_capital: I128, lp_blocked_side_count: U32, non_lp_claims: I128, open_position_count: U64, physical_cash: I128, required_risk_backing: I128, total_risk_units: I128, vault_nav: I128 }
UpgradeableError errorMigrationNotAllowed = 1100
MerkleDistributorError errorRootNotSet = 1300, IndexAlreadyClaimed = 1301, InvalidProof = 1302
MerkleDistributorStorageKey unionRoot | Claimed(U32)
Rounding unionFloor | Ceil | Truncate
SorobanFixedPointError errorOverflow = 1500, DivisionByZero = 1501
CryptoError errorMerkleProofOutOfBounds = 1400, MerkleIndexOutOfBounds = 1401, HasherEmptyState = 1402
PausableError errorEnforcedPause = 1000, ExpectedPause = 1001
PausableStorageKey unionPaused

Invoke (simulate)

Simulates the call against current ledger state — read-only, nothing is signed or submitted, no funds at risk.

Storage

KeyValue
["ConfigManager"]CAEWJU3PO6ERL3IAPCRA26GT7YABS6Y5LEHQCWWQTU3FN4YPFSSODOMC
["Initialized"]true
["LastUpdate","BTCUSD"]1793133295
["LastUpdate","ETHUSD"]1793133285
["LastUpdate","XLMUSD"]1793133290
["Price","BTCUSD"]806693500000
["Price","ETHUSD"]23436350000
["Price","XLMUSD"]1698500
["Publisher"]GAEQ5IUNQTW36XMQF6MR2VWKPG3JOF6IKEGAD2JQ6OUNKTUVBAIE5AO3

Look up a specific persistent/temporary storage entry by key. Soroban RPC has no way to list all storage keys for a contract — you need to already know the key you're after.

Recent Invocationsauto-updating

No recent invocations found. This contract may not emit events (invocation history is derived from them), or its recent activity may be outside the RPC node's retention window.

Eventsauto-updating

No events emitted by this contract in the last ~24h (the RPC node's retention window).