Files
logos-execution-zone/lez/programs/token/src/lib.rs
T
Marvin Jones e43611c7cc feat(lee): wire programs to diff-native execution (incremental update PR2)
Programs now report AccountDiff/AccountDiffOutput instead of full
post-states; balance changes are applied via apply_balance_diff's
checked arithmetic at the protocol level rather than checked in-guest,
and data changes are materialized through a new update_from_diff
guest entrypoint (trusted execution for public transactions, proven
via a recursive receipt for the privacy-preserving circuit). All 15
production programs and test/example guest programs are converted;
attack-surface guest programs that are now structurally impossible
(nonce/program_owner mutation) or redundant (manual balance-sufficiency
bypass) are moved to a dormant/ directory rather than deleted outright.
2026-08-22 01:15:25 -04:00

24 lines
638 B
Rust

//! The Token Program implementation.
use std::convert::Infallible;
use lee_core::account::{Account, Data};
pub use token_core as core;
pub mod burn;
pub mod initialize;
pub mod mint;
pub mod new_definition;
pub mod print_nft;
pub mod transfer;
mod tests;
/// Every data write in this program replaces the account's data wholesale with an
/// already-fully-computed encoding (`TokenDefinition`/`TokenHolding`/`TokenMetadata`), so
/// `diff_data` already *is* the new data verbatim — materializing it is a passthrough.
pub fn update_from_diff(_pre_state: Account, diff_data: Data) -> Result<Data, Infallible> {
Ok(diff_data)
}