Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,14 @@ impl StellarWrapContract {
.unwrap_or(0) as i128
}

/// Return the total number of wraps minted across all users.
pub fn total_supply(e: Env) -> u64 {
e.storage()
.instance()
.get(&DataKey::TotalSupply)
.unwrap_or(0)
}

/// Verify that the SHA-256 hash of `data` matches the `data_hash` stored in a wrap record.
///
/// Useful for off-chain integrity checks: hash the original JSON off-chain, then call this
Expand Down
Loading