sigil-core · receipt
Source declarations, signatures and documentation for receipt.
Source: sigil/node/sigil-core/src/receipt.rs. SHA-256: ae8c23981b44294abbb3a19b8e57d786e2a42547d7b74382b028013b8809ab84.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
receipt::Receipt
A transaction receipt recording execution outcome.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Receipt {
/// Hash of the transaction that produced this receipt.
pub tx_hash: SigilHash,
/// Execution status.
pub status: ReceiptStatus,
/// Gas consumed during execution.
pub gas_used: u64,
/// Block height at which this transaction was included.
pub block_height: u64,
/// Index of this transaction within the block.
pub tx_index: u32,
/// Events emitted during execution.
pub events: Vec<Event>,
/// State changes applied by this transaction.
pub state_changes: Vec<StateChange>,
/// Cumulative gas used in the block up to and including this transaction.
pub cumulative_gas_used: u64
}Source line: 12.
receipt::ReceiptStatus
Execution status of a transaction.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ReceiptStatus {
/// Transaction executed successfully.
Success,
/// Transaction failed (state changes reverted, gas still consumed).
Failed,
/// Transaction reverted explicitly (e.g., from WASM trap or assertion).
Reverted,
}Source line: 34.
receipt::ReceiptStatus::is_success
Returns true if the transaction succeeded.
pub fn is_success(&self) -> bool;Source line: 45.
receipt::Event
An event emitted during transaction execution.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Event {
/// The source of the event (e.g., module DID or system component).
pub source: String,
/// Event topic/type (e.g., "identity.registered", "stake.deposited").
pub topic: String,
/// Indexed fields for efficient filtering.
pub indexed: Vec<EventField>,
/// Non-indexed data payload.
pub data: Vec<u8>
}Source line: 52.
receipt::EventField
An indexed event field for log filtering.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EventField {
/// Field name.
pub name: String,
/// Field value as bytes (application-defined encoding).
pub value: Vec<u8>
}Source line: 65.
receipt::StateChange
A state change applied by a transaction.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StateChange {
/// Which state partition was affected.
pub partition: StatePartition,
/// The key that was modified.
pub key: Vec<u8>,
/// Previous value (None if the key was created).
#[serde(skip_serializing_if = "Option::is_none")]
pub old_value: Option<Vec<u8>>,
/// New value (None if the key was deleted).
#[serde(skip_serializing_if = "Option::is_none")]
pub new_value: Option<Vec<u8>>
}Source line: 74.
receipt::StatePartition
State partitions in the Sigil blockchain.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum StatePartition {
/// Global consensus state (validator set, epoch data).
Consensus,
/// Staking and delegation records.
Stakes,
/// OAS identity documents and lineage data.
Identity,
/// MARS registry entries and anchors.
Mars,
/// Governance proposals and votes.
Governance,
/// Organization zone state.
Organization,
/// Compute provider registry and escrow.
Compute,
/// Agent Contract Zones — contract records, per-contract keyed
/// state, code-blob index, and contract events.
Contracts,
/// Native NFT state — collections, tokens, owner index, DID identity
/// index, and NFT event log.
Nft,
/// On-chain labor marketplace state — jobs, bids, contracts, open offers,
/// claims, per-milestone state, worker assignment index, and audit event log.
Labor,
/// Sigil Mail and Sigil Name System state — mailbox capability records,
/// aliases, receive policies, public keys, delivery commitments, scoped
/// delegations, abuse reports, `.sigil` resolver records, and mail-safe
/// name indexes.
Mail,
/// L1-coordinated training runs, rollout commitments, reward attestations,
/// slashing evidence, and model weight roots.
Crucible,
/// Vigils subscriptions, ingestors, deliveries, and callback queue.
Vigils,
/// Storage pinning marketplace provider records, pin requests, contracts,
/// receipts, challenges, and slashing/reward outcomes.
Storage,
/// Native DEX pools, LP positions, asset balances, and swap events.
Dex,
/// Nova metaverse worlds, parcels, buildings, avatars, and auctions.
Nova,
/// Evidence anchor records (content-addressed digest commitments).
Evidence,
}Source line: 90.