Skip to main content

Indexed Events

IndexedEvents is the set of on-chain events the indexer decodes and hands to a storage adapter. Each chain client maps its raw logs onto this shared union, so the rest of the SDK stays chain-agnostic. The types live in @overcast-xyz/core.

Every event is wrapped in the same envelope:

type Indexed<Name, Payload> = {
name: Name;
event: Payload;
checkpoint: Checkpoint; // { domain, height, timestamp (unix ms), checkpoint: TxHash, txIdx }
domain: number; // deployment domain (duplicated from checkpoint.domain)
idx: number; // the event's position within the checkpoint
tx?: TxDetails; // the raw chain transaction, when the client attaches it
};

The snippets below show each Payload. Native token amounts are bigint in the smallest unit, protocol times (startTimestamp, endTimestamp, offer/operation expiry) are number in unix seconds while checkpoint timestamps are unix milliseconds, and every address or id is a 0x-hex Bytes32 string (base58 is Solana display only; EVM display is checksummed 0x).

Event names in this document are the chain-agnostic SDK names — the ones that matter for the cross-chain spec. Both Solana and EVM are implemented, and their on-chain event names occasionally differ on purpose (noted inline where that happens). On EVM: OptionCreated → MarketOptionCreated, CollateralBorrowed → OptionBorrowed, CollateralRepaid → OptionRepaid, DelegateUpdated → AuthorizedKeySet / AuthorizedKeyRemoved, SignedOperationExecuted → OperationConsumed. OperationReplayProtectionKeyCleared is never emitted on EVM (no record to close).

Escrow accounts​

Deposited​

Emitted when funds move into an escrow account.

{
accountHolder: Bytes32; // escrow account owner credited
funder: Bytes32; // account that provided the funds
asset: Bytes32; // token deposited
amount: bigint; // amount deposited
}

Withdrawn​

Emitted when funds move out of an escrow account.

{
accountHolder: Bytes32; // escrow account owner debited
asset: Bytes32; // token withdrawn
amount: bigint; // amount withdrawn
}

Authorized keys and operations​

Keys an account authorizes to sign on its behalf, and the delegated operations they produce (the ed25519 operator flow).

AuthorizedKeySet​

Emitted when an owner registers a signing key.

{
owner: Bytes32; // account that owns the key
authorizedKey: Bytes32; // ed25519 key allowed to authorize operations
permissions: number; // bitmap of allowed actions (bit index = ACTIONS value); decode with parsePermissions
}

AuthorizedKeyRemoved​

Emitted when an owner revokes a signing key.

{
owner: Bytes32; // account that owns the key
authorizedKey: Bytes32; // the revoked key
}

OperationConsumed​

Emitted when a signed delegated operation is executed and its replay-protection record is created. On EVM this decodes from the on-chain SignedOperationExecuted event.

{
owner: Bytes32; // account the operation acts for
authorizedKey: Bytes32; // key that signed the operation
action: number; // the operation kind (ACTIONS discriminant: 0 CreateOffer … 4 Withdraw)
salt: Bytes32; // 32-byte salt, 0x-hex
expiry: number; // operation expiry (unix seconds)
replayProtectionKey: Bytes32; // the on-chain record created to prevent replay (an account on Solana; the nonce itself on EVM — no record exists there)
}

OperationReplayProtectionKeyCleared​

Emitted (Solana only — never on EVM) when an operation's replay-protection record is closed, freeing up space once it's no longer needed for replay protection (e.g. after expiry). On Solana this decodes from the on-chain OperationClosed event — renamed in the SDK because "closed" is a Solana-account concept (rent reclaimed), while the chain-agnostic meaning is that the replay-protection key itself was cleared.

{
replayProtectionKey: Bytes32; // the replay-protection record that was cleared
}

Offers and options​

OfferCreated carries the full, content-addressed domain object (Offer), so its fields use the domain camelCase naming. The same event and shape cover both collateral offers (side: "MAKER") and settlement offers (side: "TAKER").

OfferCreated​

Emitted when a maker or taker posts an offer.

{
id: Bytes32; // the offer's content-address id
creator: Bytes32; // offer creator — the maker (collateral side) or taker (settlement side)
expiry: number; // offer expiry (unix)
salt: Bytes32; // uniqueness salt
side: "TAKER" | "MAKER"; // which side of the option this offer fills
details: OptionDetails; // the option terms
}

OfferCancelled​

Emitted when an offer is cancelled and its deposit refunded.

{
offer: Bytes32; // the cancelled offer's id
creator: Bytes32; // offer creator
depositAsset: Bytes32; // asset returned (the offer's collateral or premium)
refundedAmount: bigint; // amount returned to the creator
}

MarketOptionCreated​

Emitted when a collateral and settlement offer are matched into an option. On EVM this decodes from the on-chain OptionCreated event (which also carries a matcher, dropped in the canonical shape).

{
option: Bytes32; // id of the matched option
collateralOffer: Bytes32; // id of the matched collateral offer
settlementOffer: Bytes32; // id of the matched settlement offer
maker: Bytes32; // collateral side
taker: Bytes32; // settlement side
exerciseClaim: Bytes32; // mint of the claim the taker uses to exercise
redeemClaim: Bytes32; // mint of the claim the maker uses to redeem
premiumToMaker: bigint; // premium paid to the maker on match
details: OptionDetails; // the agreed option terms
}

Option interactions​

OptionExercised​

Emitted when a taker exercises, depositing settlement and receiving collateral.

{
option: Bytes32; // the exercised option's id
taker: Bytes32; // account that exercised
claimsBurned: bigint; // exercise claims burned in this call
settlementAsset: Bytes32; // asset deposited as settlement
settlementDeposited: bigint; // settlement amount deposited
collateralAsset: Bytes32; // collateral asset released
collateralToTaker: bigint; // collateral sent to the taker
totalBurnedClaims: bigint; // cumulative claims burned for the option
}

OptionRedeemed​

Emitted when a maker redeems after expiry, reclaiming collateral and settlement.

{
option: Bytes32; // the redeemed option's id
maker: Bytes32; // account that redeemed
claimsBurned: bigint; // return claims burned in this call
collateralAsset: Bytes32; // collateral asset returned
collateralPayout: bigint; // collateral returned to the maker
settlementAsset: Bytes32; // settlement asset paid out
settlementPayout: bigint; // settlement paid to the maker
totalBurnedClaims: bigint; // cumulative claims burned for the option
}

OptionBorrowed​

Emitted when a taker borrows against the option's collateral.

{
option: Bytes32; // the option borrowed against
taker: Bytes32; // account borrowing
asset: Bytes32; // borrowed asset
amount: bigint; // amount borrowed in this call
outstandingBorrow: bigint; // total outstanding after this borrow
}

OptionRepaid​

Emitted when borrowed collateral is repaid.

{
option: Bytes32; // the option being repaid
repayer: Bytes32; // account repaying — the taker or any third party
asset: Bytes32; // repaid asset
amount: bigint; // amount repaid in this call
outstandingBorrow: bigint; // total outstanding after repayment
}

Protocol lifecycle​

The config on these events is the ProtocolConfig, flattened into the columns below:

ColumnTypeMeaning
authorityBytes32account allowed to update the protocol config
pauseAuthorityBytes32hot wallet allowed to trip the emergency pause
optionCreationHookBytes32 | nullhook run on option creation, or null if unset
pausedActionsnumberbitmask of actions currently paused
pauseAuthorityMasknumberbitmask of actions pauseAuthority is allowed to pause/unpause

ProtocolInitialized​

Emitted once when the protocol is set up. Carries the initial config plus the chain domain id.

{
config: ProtocolConfig; // the initial protocol configuration (see columns above)
domain: number; // the chain domain id
}

ProtocolConfigUpdated​

Emitted when an authority changes the protocol config.

{
updatedBy: Bytes32; // authority that made the change
config: ProtocolConfig; // the new configuration (see columns above)
}

ProtocolPaused​

Emitted when the pause authority pauses one or more instructions.

{
pausedBy: Bytes32; // authority that paused the protocol
pauseMask: number; // the bits newly OR'd into pausedActions by this call
pausedActions: number; // the current value of ProtocolConfig.pausedActions after this call
}

Fees​

FeePaid​

Emitted when a fee is paid through the option-creation hook. On EVM hookProgram === hookConfig === hook (single hook field on-chain).

{
hookProgram: Bytes32; // the hook program that charged the fee
hookConfig: Bytes32; // the hook config account
option: Bytes32; // option the fee relates to
payer: Bytes32; // account that paid the fee — the option taker
asset: Bytes32; // fee asset
amount: bigint; // fee amount
}