-
Notifications
You must be signed in to change notification settings - Fork 471
Using contract tools package to create FT #2853
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| - NEP-141 (fungible token), extension NEP-148. | ||
| - NEP-145 (storage management), and integrations for the fungible token and non-fungible token standards. | ||
| - NEP-171 (non-fungible token), extensions NEP-177, NEP-178, NEP-181. | ||
| - NEP-297 (events). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add links to the NEPs for better cross-reference.
| - NEP-141 (fungible token), extension NEP-148. | |
| - NEP-145 (storage management), and integrations for the fungible token and non-fungible token standards. | |
| - NEP-171 (non-fungible token), extensions NEP-177, NEP-178, NEP-181. | |
| - NEP-297 (events). | |
| - [NEP-141](https://github.com/near/NEPs/blob/master/neps/nep-0141.md) (fungible token), extension NEP-148. | |
| - NEP-145 (storage management), and integrations for the fungible token and non-fungible token standards. | |
| - NEP-171 (non-fungible token), extensions NEP-177, NEP-178, NEP-181. | |
| - NEP-297 (events). |
|
|
||
| The difference of this example from the [FT contract](https://github.com/near-examples/FT) based on `near_contract_standards` package is the approach of using deriving macros to implement NEP standards and common patterns. | ||
|
|
||
| When we use deriving macros, we can bring `near_contract_standards` implementations into our contract without writing boilerplate code for the each method. That allows us to focus on the unique logic of our contract like minting/burning logic, access control, other custom features. So, this collection of common tools and patterns (mostly in the form of derive macros) is as a sort of OpenZeppelin for NEAR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| When we use deriving macros, we can bring `near_contract_standards` implementations into our contract without writing boilerplate code for the each method. That allows us to focus on the unique logic of our contract like minting/burning logic, access control, other custom features. So, this collection of common tools and patterns (mostly in the form of derive macros) is as a sort of OpenZeppelin for NEAR. | |
| When we use deriving macros, we can bring `near_contract_standards` implementations into our contract without writing boilerplate code for each method. That allows us to focus on the unique logic of our contract like minting/burning logic, access control, other custom features. So, this collection of common tools and patterns (mostly in the form of derive macros) is as a sort of OpenZeppelin for NEAR. |
| - `storage_unregister` | ||
| - `storage_withdraw` | ||
|
|
||
| To bring basic owner methods to our contract, we derived also `Owner` macro which adds the following methods: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| To bring basic owner methods to our contract, we derived also `Owner` macro which adds the following methods: | |
| To bring basic owner methods to our contract, we also derived the `Owner` macro which adds the following methods: |
No description provided.