Skip to content
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

Merged
merged 4 commits into from
Jan 10, 2022
Merged

feat(standards): add Events Format NEP #298

merged 4 commits into from
Jan 10, 2022

Conversation

telezhnaya
Copy link
Contributor

Closes #297

In the separate branches, I will rewrite NFT NEP-171 a bit and add events section to FT NEP-141 standard.

@telezhnaya telezhnaya self-assigned this Dec 15, 2021
@render
Copy link

render bot commented Dec 15, 2021

@zcstarr
Copy link
Contributor

zcstarr commented Dec 15, 2021

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!

specs/Standards/EventsFormat.md Outdated Show resolved Hide resolved
}
}
```

Copy link
Collaborator

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"

Copy link
Contributor Author

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>
@telezhnaya telezhnaya merged commit b385aae into master Jan 10, 2022
zcstarr pushed a commit to shipsgold/NEPs that referenced this pull request Jan 19, 2022
* feat(standards): add Events Format NEP

Co-authored-by: Vlad Frolov <frolvlad@gmail.com>
@frol frol mentioned this pull request Apr 5, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We need separate Events standard [NEP]
3 participants