Skip to content

Commit b24addc

Browse files
committed
Update README
1 parent a036673 commit b24addc

File tree

1 file changed

+20
-8
lines changed
  • coffee_ws/src/sui_coffee_order_indexer

1 file changed

+20
-8
lines changed

coffee_ws/src/sui_coffee_order_indexer/README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Sui Indexer
1+
# Sui Coffee Order Indexer
22

3-
A ROS2 node for indexing Sui blockchain events.
3+
A ROS2 node for indexing coffee club events from the Sui blockchain and triggering coffee machine operations.
44

55
## Description
66

7-
The Sui Indexer node monitors and indexes events from a specified Sui package. It tracks events related to locks and shared objects, storing them in a local database for further processing.
7+
The Sui Coffee Order Indexer monitors and indexes events from the coffee club smart contract on Sui. It tracks cafe creation and coffee order events, storing them in a local database and automatically triggering coffee machine operations when orders are ready for processing.
88

99
## Database Location
1010

@@ -21,12 +21,19 @@ The Sui Indexer node monitors and indexes events from a specified Sui package. I
2121
To run the indexer, use the following command:
2222

2323
```bash
24-
ros2 launch sui_indexer indexer.launch.py "package_id:='YOUR_PACKAGE_ID'"
24+
ros2 launch sui_coffee_order_indexer indexer.launch.py "package_id:='YOUR_PACKAGE_ID'"
2525
```
2626

2727
For example:
2828
```bash
29-
ros2 launch sui_indexer indexer.launch.py "package_id:='0x052f4da5dddf486da555e6c6aea3818e8d8206931f74f7441be5417cf9eeb070'"
29+
ros2 launch sui_coffee_order_indexer indexer.launch.py "package_id:='0x2ee032ffc863a74a785ac3003fb8b61d639d9095b4431fdc1b12181c0a2a8c13'"
30+
```
31+
32+
With specific network:
33+
```bash
34+
ros2 launch sui_coffee_order_indexer indexer.launch.py \
35+
"package_id:='0x2ee032ffc863a74a785ac3003fb8b61d639d9095b4431fdc1b12181c0a2a8c13'" \
36+
"network:='mainnet'"
3037
```
3138

3239
Note: The package_id must be enclosed in quotes to ensure it's treated as a string.
@@ -43,8 +50,8 @@ The following parameters can be configured when launching the indexer:
4350

4451
Example with multiple parameters:
4552
```bash
46-
ros2 launch sui_indexer indexer.launch.py \
47-
"package_id:='0xfe09cf0b3d77678b99250572624bf74fe3b12af915c5db95f0ed5d755612eb68'" \
53+
ros2 launch sui_coffee_order_indexer indexer.launch.py \
54+
"package_id:='0x2ee032ffc863a74a785ac3003fb8b61d639d9095b4431fdc1b12181c0a2a8c13'" \
4855
"network:='mainnet'" \
4956
"polling_interval_ms:=2000" \
5057
"database_url:='file:/var/lib/sui_indexer/sui_indexer.db'" # Example production path
@@ -53,9 +60,14 @@ ros2 launch sui_indexer indexer.launch.py \
5360
## Topics
5461

5562
The indexer publishes to the following topics:
56-
- `/sui_events`: Published events from the Sui blockchain
63+
- `/sui_events`: Published coffee club events from the Sui blockchain
5764
- `/indexer_status`: Status updates from the indexer
5865

66+
## Services
67+
68+
The indexer calls the following services:
69+
- `/coffee_command`: Commands the coffee machine when orders are ready for processing (requires `coffee_machine_control` package)
70+
5971
## Architecture Notes
6072

6173
**Workspace Integration:** This package follows ROS2 best practices by:

0 commit comments

Comments
 (0)