Attribute Macros

  • call macro applies to impl methods for contract method call.
  • contract defines basic struct as a programming model of a contract. Fields are data representation of contract storage.
  • The macro contract_field can generate impl so that nested struct can be supported in contract struct.
  • 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 provides smart contract developers a way to make cross contract calls by using public functions from other smart contracts in the form of traits.