forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RFC][move] Implement user-defined events emitted by FastX modules
Simple approach to events based on the discussion in Slack. Feedback welcome/desired! - Introduce the `Event` module, which has an `event` function allowing an end-user to emit any struct with the `copy` and `drop` abilities as an event. The ability restrictions prevent a user from accidentally or intentionally destroying an asset. - Add an example in the Hero code to demonstrate how events can be used: emit an event every time a Boar is slain with the ID of the hero + dead boar, and the address of the user that owns the Hero. An external system could process these events to (e.g.) create a boar-slaying leaderboard. Maybe we can show that in the Hero demo. - Change the adapter to distinguish between user-defined events and system events. User-defined events get written to a new field in the authority temporary store. - Clients will see an ordered log of the events emitted by a particular tx in `TransactionEffects`. - The authority durably stores the events inside `signed_effects: Map<TransactionDigest,TransactionEffects}`.
- Loading branch information
1 parent
8d5c75e
commit c26969d
Showing
18 changed files
with
257 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.