Firehose on Sui Blockchain
You would need to download the sui-sf-indexer
source code and build it locally.
git clone https://github.com/ticketland-io/sui-sf-indexer
cd sui-sf-indexer
cargo build --release
Make sure the target/release/sui-sf-indexer
binary is moved to a folder that is in the PATH so it can be executed.
Binaries will be available to download soon so you don't have to build from source code.
-
Ensure that
protoc
is installed:brew install protoc
-
Ensure that
protoc-gen-go
andprotoc-gen-go-grpc
are installed and at the correct versiongo install google.golang.org/protobuf/cmd/[email protected] go install google.golang.org/grpc/cmd/[email protected]
-
Generate go file from modified protobuf
./types/pb/generate.sh
- Run Firehose
./devel/mainnet/start.sh -c
And ensure blocks are flowing:
grpcurl -plaintext -import-path ./types/proto -proto sui.proto -import-path ../proto -proto sf/firehose/v2/firehose.proto -d '{"start_block_num": 0}' localhost:18015 sf.firehose.v2.Stream.Blocks