xrpl_wasm_stdlib/ctx.rs
1use crate::core::current_tx::traits::TransactionCommonFields;
2
3/// Narrow context trait shared by all Smart Escrow and Smart Contract entry points.
4///
5/// Provides access to the current transaction via an associated type bound to
6/// [`TransactionCommonFields`]. Kept intentionally minimal.
7///
8/// Concrete context types (`EscrowFinishContext`, `ContractCallContext`) implement
9/// this trait and expose their feature-unique host functions as inherent methods.
10pub trait SmartFeatureContext {
11 type Tx: TransactionCommonFields;
12 fn tx(&self) -> &Self::Tx;
13}