Crate near_sdk_contract_tools_macros

Source
Expand description

Macros for near-sdk-contract-tools.

Attribute Macros§

event
Smart #[event] macro.

Derive Macros§

Escrow
Creates a managed, lazily-loaded Escrow implementation for the targeted #[near(contract_state)] struct.
FungibleToken
Implements NEP-141, NEP-145, and NEP-148 functionality, like #[derive(Nep141, Nep145, Nep148)]. This is the recommended way to implement a fungible token, as it also ensures that all of the standards integrate with each other correctly.
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.
Nep145
Adds NEP-145 fungible token core functionality to a contract. Exposes storage_* functions to the public blockchain, implements internal controller functionality.
Nep148
Adds NEP-148 fungible token metadata functionality to a contract. Metadata must be initialized during contract creation using Nep148Controller::set_metadata.
Nep171
Adds NEP-171 non-fungible token core functionality to a contract. Exposes nft_* functions to the public blockchain, implements internal controller and receiver functionality.
Nep177
Adds NEP-177 non-fungible token metadata functionality to a contract.
Nep178
Adds NEP-178 non-fungible token approvals functionality to a contract.
Nep181
Adds NEP-181 non-fungible token enumeration functionality to a contract.
Nep297
Use on a struct to emit NEP-297 event strings.
NonFungibleToken
Implements all NFT functionality at once, like #[derive(Nep171, Nep177, Nep178, Nep181)].
Owner
Creates a managed, lazily-loaded Owner implementation for the targeted #[near(contract_state)] struct.
Pause
Makes a contract pausable. Provides an implementation of the Pause trait.
Rbac
Adds role-based access control. No external methods are exposed.
SimpleMultisig
Create a simple multisig component. Does not expose any functions to the blockchain. Creates implementations for ApprovalManager and AccountApprover for the target contract struct.
Upgrade
Create an upgrade component. Does not expose any functions to the blockchain.