Skip to content

[DOC] Explain contract Events High-level API #2967

@frol

Description

@frol

Documentation Type

New Documentation

What needs documentation?

I have only found the following test case that demonstrates how to use the high-level API to construct and emit events from the contract:

https://github.com/near/near-sdk-rs/blob/0784abea717be9fa10c71228f9de3db97f472494/near-sdk/tests/event_tests.rs#L37

From a quick glance, DeepWiki response looks sane: https://deepwiki.com/search/how-to-emit-a-custom-event_a6390c20-9ca2-4ac7-b83d-14ed71a7b79f?mode=fast

Actually, I found that we do have the reference documentation: https://docs.rs/near-sdk/latest/near_sdk/attr.near.html#nearevent_json-annotates-enums

Acceptance Criteria

  • The high-level Events API should be covered in the docs with a simple example of a custom event and also references to the existing FT and NFT events, and maybe a reference to the indexer tutorial that parses the events
  • It should be discoverable through the search by terms "events", "contract events", "emit event" and similar

Resources & References

No response

Priority

🟢 P3 : Nice to Have

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Status

    NEW❗

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions