Skip to main content
Fade emits Anchor events through a self-CPI (emit_cpi!), not through program logs. Each event is an inner instruction to the Fade program whose data is:
Logs can be truncated; inner instructions cannot. Every event carries a version field (currently 1) as its first field.

Decoding

The generated client exports, for each event, a *_EVENT_DISCRIMINATOR and a decoder (for example WAGER_SETTLED_EVENT_DISCRIMINATOR and getWagerSettledEventDecoder()).
To follow a wager after it closed (its account is gone), list its signatures with getSignaturesForAddress(wager) and decode WagerSettled or WagerExpired from them.

Wager events

The paytable itself is not in WagerOpened: it is in the open_wager instruction data (decode it with getOpenWagerInstructionDataDecoder()) and in the wager account while it is open.

Liquidity events

EpochStruck is the pool’s price history: each one fixes the price of an epoch from total_assets and total_shares.

Governance events

All amounts are in base units: USDC has 6 decimals, shares 9.