Events
Every event the shader program emits, the instruction that emits it, and each field.
The program emits events with emit_cpi!: each one is an inner instruction of the program whose data is the 8-byte tag e445a52e51cb9a1d, the event's 8-byte discriminator (the first 8 bytes of sha256("event:<Name>")), and its fields in Borsh. Read receipts decodes one.
#Receipt
One per settlement line: the record of a charge. Emitted by settle.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Wallet charged. |
agent_key | pubkey | AgentKey that spent, or the default key when none did. |
job_id | [u8; 16] | Job identifier. |
kind | u8 | 0 rental, 1 generation. |
units | u64 | Seconds or job units. |
requested | u64 | Credits the line asked for, base units. |
charged | u64 | Credits debited, base units. Lower than requested only when the balance ran out. |
usdc_part | u64 | Part of charged taken from USDC-backed credits. |
shdr_part | u64 | Part of charged taken from SHDR-backed credits. |
shdr_atoms | u64 | SHDR atoms moved to the burn queue for shdr_part. |
line_index | u16 | Position of the line in its settle instruction, from 0. |
settle_nonce | u64 | The credit account's nonce for this settlement. |
timestamp | i64 | Unix time of the settlement. |
meter_key | Option<pubkey> | The meter key that sealed the line, or the default key for an unmetered or generation line. |
minute | Option<u32> | The sealed minute the line charged. |
digest | Option<[u8; 32]> | That minute's digest. |
signed_count | Option<u32> | Signed seconds in the minute, as sealed. |
#AgentKeyCreated
An agent key was created. Emitted by create_agent_key.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Owner. |
agent_key | pubkey | Key address. |
key_id | [u8; 32] | Token identifier. |
label | string | Label. |
per_request_cap | u64 | Per-request cap. |
per_day_cap | u64 | Per-day cap. |
day_index | i64 | UTC day the first window counts. |
timestamp | i64 | Unix time. |
#AgentKeyRevokedEvent
An agent key was revoked. Emitted by revoke_agent_key.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Owner. |
agent_key | pubkey | Key address. |
key_id | [u8; 32] | Token identifier. |
timestamp | i64 | Unix time. |
#AgentKeyUpdated
An agent key's caps changed. Emitted by update_agent_key.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Owner. |
agent_key | pubkey | Key address. |
key_id | [u8; 32] | Token identifier. |
per_request_cap | u64 | New per-request cap. |
per_day_cap | u64 | New per-day cap. |
timestamp | i64 | Unix time. |
#Claimed
NVDAx was claimed. Emitted by claim.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Staker. |
amount | u64 | NVDAx atoms sent. |
total_claimed | u64 | This stake's total claimed after. |
pending | u64 | Pending after, normally 0. |
timestamp | i64 | Unix time. |
#ConfigInitialized
initialize ran. Emitted by initialize.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
settler | pubkey | Settler. |
price_signer | pubkey | Price signer. |
launch_wallet | pubkey | Launch wallet. |
usdc_mint | pubkey | USDC mint. |
nvdax_mint | pubkey | NVDAx mint. |
fee_share_bps | u16 | Fee share rate. |
timestamp | i64 | Unix time. |
#ConfigUpdated
update_config ran; the fields hold the values after it. Emitted by update_config.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
settler | pubkey | Settler. |
price_signer | pubkey | Price signer. |
launch_wallet | pubkey | Launch wallet. |
fee_share_bps | u16 | Fee share rate. |
timestamp | i64 | Unix time. |
#EarnFunded
NVDAx was added to the Earn pool. Emitted by fund_earn.
| Field | Type | Meaning |
|---|---|---|
funder | pubkey | Signer. |
requested | u64 | NVDAx atoms sent. |
received | u64 | NVDAx atoms that arrived. |
total_funded | u64 | Total funded so far. |
total_staked | u64 | SHDR staked at the time. |
acc_reward_per_share | u128 | Accumulator after. |
undistributed | u64 | Undistributed NVDAx after. |
timestamp | i64 | Unix time. |
#ExcessRewardsWithdrawn
The admin recovered excess reward-vault NVDAx. Emitted by withdraw_excess_rewards.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
destination | pubkey | Receiving account. |
amount | u64 | NVDAx atoms. |
available_before | u64 | Recoverable before. |
timestamp | i64 | Unix time. |
#ExcessShdrWithdrawn
The admin recovered excess escrow SHDR. Emitted by withdraw_excess_shdr.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
destination | pubkey | Receiving account. |
amount | u64 | SHDR atoms. |
available_before | u64 | Recoverable before. |
timestamp | i64 | Unix time. |
#ExcessStakeWithdrawn
The admin recovered excess stake-vault SHDR. Emitted by withdraw_excess_stake.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
destination | pubkey | Receiving account. |
amount | u64 | SHDR atoms. |
available_before | u64 | Recoverable before. |
timestamp | i64 | Unix time. |
#FeeSwept
The fee share was paid to the launch wallet. Emitted by sweep_fee_share.
| Field | Type | Meaning |
|---|---|---|
cranker | pubkey | Signer. |
launch_wallet | pubkey | Recipient. |
used_usdc | u64 | USDC-backed credits used since the last sweep. |
amount | u64 | USDC atoms paid. |
total_fee_share_swept | u64 | Total paid so far. |
timestamp | i64 | Unix time. |
#RevenueWithdrawn
The admin withdrew USDC revenue. Emitted by withdraw_revenue.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
destination | pubkey | Receiving account. |
amount | u64 | USDC atoms. |
available_before | u64 | Withdrawable before. |
timestamp | i64 | Unix time. |
#ShdrBurned
Queued SHDR was burned. Emitted by burn_used.
| Field | Type | Meaning |
|---|---|---|
cranker | pubkey | Signer. |
amount | u64 | SHDR atoms burned. |
total_shdr_burned | u64 | Total burned so far. |
timestamp | i64 | Unix time. |
#ShdrDeposited
A SHDR deposit landed. Emitted by deposit_shdr.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Depositor. |
requested_shdr | u64 | SHDR atoms sent. |
received_shdr | u64 | SHDR atoms that arrived in escrow. |
credited | u64 | Credits booked, base units. |
shdr_credits | u64 | SHDR-backed balance after. |
shdr_escrowed | u64 | Escrowed SHDR after. |
lifetime_deposited | u64 | Lifetime deposits after. |
expires_at | i64 | Quote expiry. |
timestamp | i64 | Unix time. |
#ShdrMintSet
set_shdr_mint ran. Emitted by set_shdr_mint.
| Field | Type | Meaning |
|---|---|---|
admin | pubkey | Admin. |
shdr_mint | pubkey | SHDR mint. |
earn_pool | pubkey | EarnPool address. |
timestamp | i64 | Unix time. |
#Staked
SHDR was staked. Emitted by stake.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Staker. |
requested | u64 | SHDR atoms sent. |
received | u64 | SHDR atoms that arrived. |
stake_amount | u64 | Stake after. |
total_staked | u64 | Pool total after. |
pending | u64 | Pending NVDAx after accrual. |
timestamp | i64 | Unix time. |
#Unstaked
SHDR was withdrawn from Earn. Emitted by unstake.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Staker. |
amount | u64 | SHDR atoms withdrawn. |
stake_amount | u64 | Stake after. |
total_staked | u64 | Pool total after. |
pending | u64 | Pending NVDAx after accrual. |
timestamp | i64 | Unix time. |
#UsdcDeposited
A USDC deposit landed. Emitted by deposit_usdc.
| Field | Type | Meaning |
|---|---|---|
wallet | pubkey | Depositor. |
requested | u64 | USDC atoms sent. |
credited | u64 | Credits booked, base units: what arrived in the treasury. |
usdc_credits | u64 | USDC-backed balance after. |
lifetime_deposited | u64 | Lifetime deposits after. |
timestamp | i64 | Unix time. |
#X402RevenueRecorded
x402 revenue was added to the fee-share count. Emitted by record_x402_revenue.
| Field | Type | Meaning |
|---|---|---|
amount | u64 | USDC atoms recorded. |
reference | [u8; 32] | Id of the payment recorded. |
used_usdc_unswept | u64 | The fee-share count after. |
timestamp | i64 | Unix time. |