Skip to content

Events & Errors ​

This reference follows the event structs and #[contracterror] enums in the current v0.2 Vault source. Event topic fields below are exactly the fields marked #[topic]; payload fields are the other declared struct fields. The table does not invent a raw XDR serialization. Use the generated contract spec and a Stellar SDK when encoding or decoding ledger events.

Events ​

watcher_registry ​

Event structTopic fieldsData fields
WatcherRegisteredwatcher: AddressNone
WatcherRemovedwatcher: AddressNone
CheckSubmittedsla_id: u64, watcher: Addressround_id: u64, endpoint_hash: BytesN<32>, status: CheckStatus

sla_vault ​

Event structTopic fieldsData fields
SlaCreatedsla_id: u64, provider: Addresstoken: Address, endpoint_hash: BytesN<32>, bond_amount: i128, uptime_target_bps: u32, quorum_threshold: u32, penalty_per_breach: i128, beneficiary: Address
BondToppedUpsla_id: u64amount: i128
SettlementPaidsla_id: u64, round_id: u64payout: i128, beneficiary: Address
SlaCancelledsla_id: u64None
BondWithdrawnsla_id: u64amount: i128

CheckSubmitted.endpoint_hash identifies the endpoint commitment used for the tally. SlaCreated.endpoint_hash records the SLA's commitment. Neither event proves that an HTTP observation was honest.

Contract Errors ​

Soroban contract error values below match the explicit #[repr(u32)] values in the current contract source. Transaction authorization failures raised by the host may appear separately from these contract errors.

watcher_registry ​

CodeVariantMeaning
1NotAuthorizedCaller does not match the configured administrator.
2AlreadyInitializedinitialize was called after initialization.
3NotAWatcherThe submitting address is not registered.
4DuplicateCheckThe watcher already submitted for (sla_id, round_id), regardless of endpoint hash.
5ContractPausedCheck submission is paused.
6InvalidRoundThe round is neither the current round nor the immediately previous round.

sla_vault ​

CodeVariantMeaning
1NotAuthorizedCaller does not match the provider or administrator required by the operation.
2AlreadyInitializedinitialize was called after initialization.
3SlaNotActiveOperation requires a different SLA lifecycle state.
4AlreadySettled(sla_id, round_id) has already settled.
5QuorumNotMetEndpoint-bound votes_down is below the configured threshold.
6BondExhaustedNo positive bond balance remains to pay a settlement.
7InvalidAmountA bond, penalty, top-up, or withdrawal amount violates its positive-value or bond-bound checks.
8ContractPausedNew SLA creation is paused.
9SlaNotFoundThe requested SLA does not exist in persistent storage.
10InvalidUptimeTargetuptime_target_bps is outside 1..=10_000.
11InvalidQuorumThreshold is zero, exceeds the registered watcher count, or the registry has no watchers.