-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(standards): add Events Format NEP #298
Conversation
Your Render PR Server URL is https://nomicon-pr-298.onrender.com. Follow its progress at https://dashboard.render.com/static/srv-c6t0tgnh8vl74idv7khg. |
I think this looks great, I'll pull this in to the events within the mt as well. I'm excited to just reference this! |
} | ||
} | ||
``` | ||
|
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.
How about we have a section with a simple log!
usage, where we basically just show that you can emit an event even with a plain string?
Just an illustration of what I mean:
use near_sdk::log;
// ...
log!(
r#"EVENT_JSON:{"standard": "nep171", "version": "1.0.0", "event": "nft_mint", "data": [{"owner_id": "{}", "token_ids": ["{}"]}]}"#,
owner_id,
token_id
);
The drawback here is that this might lead to the code that is prone to "injection"
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 feel we also need to expand our examples. Tried to do that by myself, gave up, created the issue 😅
near/near-sdk-rs#685
If we do that in one day, I surely want to include the link to this example here
Co-authored-by: Vlad Frolov <frolvlad@gmail.com>
* feat(standards): add Events Format NEP Co-authored-by: Vlad Frolov <frolvlad@gmail.com>
Closes #297
In the separate branches, I will rewrite NFT NEP-171 a bit and add events section to FT NEP-141 standard.