Skip to content

AftermathFinance/rust-sui-grpc-events-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Sui gRPC Events Example

This example demonstrates how to subscribe to a stream of events from the Sui blockchain using gRPC and parse them in Rust. It specifically shows how to handle and parse the OrderFilled event from the DeepBook V3 protocol.

Features

  • Connects to a Sui gRPC endpoint
  • Subscribes to real-time checkpoints
  • Parses incoming events, with a focus on the OrderFilled event from DeepBook V3
  • Shows how to deserialize event data into Rust structs for further processing

Usage

  1. Clone this repository.
  2. Ensure you have Rust installed (cargo and rustc).
  3. Build and run the example:
    cargo run

Event Parsing Example

The code includes a parser for the OrderFilled event from DeepBook V3. When such an event is received, it is deserialized into a strongly-typed Rust struct, making it easy to work with the event data in your application.

Customization

You can extend the event parsing logic to handle other event types by adding new variants and deserialization logic in the parse_event.rs file.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages