-
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
We need separate Events standard [NEP] #297
Comments
Is it possible to force users to use the standard by encapsulating this structure into the It seems like this standard gets overlooked (I didnt know about it when I started on NEAR in earlier this year) since it cant be enforced, but there are some major benefits as a result of the standardization. If all contracts followed this standard, more efficient indexing structures would be possible such as a bloom filter to quickly know if a given shard in a block contains an event, without having to search the logs of each shard to ensure inclusion of the given event. The current approach will become increasingly less feasible as the number of shards increase |
@austinabell What do you think about this addition to near-sdk-rs? Should we invite people to create an issue on near-sdk-rs and submit PRs as part of Hacktober Fest? 😄 |
I don't have an opinion. If the events format is standardized enough, that could come into the SDK. Is there an NEP or format in a spec somewhere that someone could use? |
@austinabell Yes, it is actually a small and self-sufficient NEP: https://nomicon.io/Standards/EventsFormat |
@colerob1776 Would you like to champion the implementation for near-sdk-rs? I guess, you can go ahead and submit a PR |
Yep, I can work on it. I have run across some discussions that the future goal is to include support for other serialization formats. Is it safe to only assume JSON for now? |
@coleFD Yes, it is safe to assume only JSON support, just leave room for future extensions. |
or it may be cleaner to privatize the logging functionality from the environment functions and just expose the Event struct with an |
We can move this conversation here: near/near-sdk-rs#934 |
I see it important to have the |
FYI, Arbitrary JSON Events support in near-sdk-rs that was contributed by @coleFD and thoroughly reviewed by @austinabell was merged! near/near-sdk-rs#934 @coleFD Thanks for the contribution! |
We have NEP-141 FT, NEP-171 NFT, NEP-245 MT.
All of them use or will use the same events logic. Let me try to collect this logic into one meta-standard, so that we can reuse it in all these and other NEPs.
The text was updated successfully, but these errors were encountered: