Crate pchain_sdk_macros

Source

Attribute Macrosยง

call
call macro applies to impl methods for contract method call.
contract
contract defines basic struct as a programming model of a contract. Fields are data representation of contract storage.
contract_field
The macro contract_field can generate impl so that nested struct can be supported in contract struct.
contract_methods
contract_methods defines impl for the contract struct. Methods declared in the impl are callable by Transaction Command Call if their visibility is pub.
use_contract
use_contract provides smart contract developers a way to make cross contract calls by using public functions from other smart contracts in the form of traits.