[−]Attribute Macro fabric_contract::contract::Transaction
#[Transaction]
Use this to mark the functions that are considered to be transaction functions
Arguments to this provide the ability to indicate
- that this function is intended to be evaluated or submitted
- which arguments are from the set of transient data (use variable names)
Example
ⓘThis example is not tested
use fabric_contract::contract::*; #[Transaction] pub fn createAsset() { } #[Transaction(submit)] pub fn createAnotherAsset() { } #[Transaction(evaluate)] pub fn readAsset() { } #[Transaction(tranisent = {price, owner} )] pub fn createDetailedAsset(id: String, price: u32, owner: String ) { }