portfolio

Sui Events Indexer

Check out the open-source repo here: https://github.com/buidly/sui-events-indexer NPM: https://www.npmjs.com/package/sui-events-indexer Full technical overview: https://www.buidly.com/blog/sui-events-indexer
Blockchain Infrastructure
Tools
node.js
nest.js
react.js

What is sui-events-indexer?

sui-events-indexer is a command-line tool that helps developers create a complete system for tracking and storing events from Sui Move smart contracts.

Think of it as your personal event-watching assistant that:

  • Reads your Sui Move smart contract
  • Creates TypeScript types for each of your Move events
  • Sets up a database to store these events
  • Generates an Express.js API to query the stored data

Instead of manually coding boilerplate for event indexing, you can run a single CLI command to generate a fully functional Express.js module tailored to your contract’s needs.

Why a SUI Events Indexing Service?

We built this service to simplify how developers handle events emitted by Sui Move smart contracts. Rather than juggling indexing scripts, database schemas, or TypeScript mappings, everything is generated for you in one go.

General Flow

  1. Take a Sui package ID
  2. Fetch event definitions from the source code
  3. Maps events into TypeScript DTOs
  4. Generate an Express.js module (complete with indexing logic, database storage, and an API)
  5. Deliver a ready-to-use setup that requires minimal configuration

When you provide a Sui contract address, the tool grabs every relevant event from the chain, creates matching TypeScript DTOs, and sets up an Express.js module to manage event indexing and database storage. It also generates the event processing logic and Prisma schema, so you won’t have to maintain repetitive boilerplate by hand.

By automating these steps, you can skip the hassle of writing custom services, updating database models, or manually converting Move structs into TypeScript. Instead, you just run the CLI and start building your application on top of a reliable, preconfigured foundation.

Impact

  • Real-Time Updates
  • No custom migrations or one-off scripts.
  • Automatic Move-to-TypeScript conversions
  • The indexed data stayed consistent.

The adoption of sui-events-indexer demonstrates how quickly and effectively a DeFi project on Sui can integrate real-time event tracking. Instead of building a custom system to parse, store, and query on-chain data, they leveraged a turnkey solution that scales with their protocol

The result? Faster feature rollouts, fewer headaches.

This wasn’t just a thought experiment either: we’ve seen it work in production. Teams like Cetus have used the tool to track complex DeFi event flows in real time, with zero boilerplate and full type safety.

No more decoding events by hand. No more mismatched schemas. Just a tool that reads your Move code and gives you everything you need to track and store events — ready to use, extend, and ship.

Check out the open-source repo here: https://github.com/buidly/sui-events-indexer
NPM: https://www.npmjs.com/package/sui-events-indexe
Check the full breakdown here: https://www.buidly.com/blog/sui-events-indexer

It’s open-source, free to use, and developer-friendly by design.