Expand description
Macros for near-contract-tools
Attribute Macros§
- event
- Smart
#[event]
macro
Derive Macros§
- Fungible
Token - Implements NEP-141 and NEP-148 functionality, like
#[derive(Nep141, Nep148)]
. - Migrate
- Migrate a contract’s default struct from one schema to another.
- Nep141
- Adds NEP-141 fungible token core functionality to a contract. Exposes
ft_*
functions to the public blockchain, implements internal controller and receiver functionality (see:near_contract_tools::standard::nep141
). - Nep148
- Adds NEP-148 fungible token metadata functionality to a contract. Metadata is hardcoded into the contract code, and is therefore not stored in storage.
- Nep297
- Use on a struct to emit NEP-297 event strings.
- Owner
- Creates a managed, lazily-loaded
Owner
implementation for the targeted#[near_bindgen]
struct. - Pause
- Makes a contract pausable. Provides an implementation of the
Pause
trait. - Rbac
- Adds role-based access control. No external methods are exposed.
- Simple
Multisig - Create a simple multisig component. Does not expose any functions to the
blockchain. Creates implementations for
ApprovalManager
andAccountApprover
for the target contract struct. - Upgrade
- Create an upgrade component. Does not expose any functions to the blockchain.