[]Attribute Macro fabric_contract::contract_impl

#[contract_impl]

Use this macro to mark the implementation of the your contract structure

Example

This example is not tested
use crate::fabric_contract::contract::*;
struct MyContract {}

#[Contract_Impl]
impl MyContract {

#[Transaction(evaluate)]
pub fn my_query_style_fn() {  }

#[Transaction(submit)]
pub fn my_submit_asset_fn() {  }

// this is NOT callable as transaction function
fn helper() { }
}

This macro's purpose is to implement the 'routing' trait for the contract. This permits the message from the peer to correctly routed to the transaction function required.

This trait relies on the transaction functions also being marked with the #[transaction] macro.

If you wished you could provide the implementations of these macros yourself, but it is recommended to not do this unless you really have to.