Module near_annotations

Source
Expand description

#[near] and #[near_bindgen] documentation module

This is not a real module; here we document the attributes that #[near] and #[near_bindgen] macro use.

near_bindgen and near_sdk share most of the attributes:

  • init
  • payable
  • private
  • deny_unknown_arguments
  • handle_result
  • callback_unwrap
  • event_json
  • contract_metadata
  • serializer
  • result_serializer

Following attributes are only part of the near macro:

  • serializers
  • contract_state

Functionsยง

callback_unwrap
See near_sdk::near #[callback_unwrap]
contract_metadata
See near_sdk::near #[near(contract_metadata(...))]
contract_state
See near_sdk::near #[near(contract_state)]
deny_unknown_arguments
See near_sdk::near #[deny_unknown_arguments]
event_json
See near_sdk::near #[near(event_json(...))]
handle_result
See near_sdk::near #[handle_result]
init
See near_sdk::near #[init]
payable
See near_sdk::near #[payable]
private
See near_sdk::near #[private]
result_serializer
See near_sdk::near #[result_serializer]
serializer
See near_sdk::near #[serializer(...)]
serializers
See near_sdk::near #[near(serializers=[...])]