mud-indexing

Index MUD Store events into PostgreSQL or EF Core databases with typed relational tables.

2.3k|744|Updated Nov 23, 2015
One-click install
npx skills add https://github.com/Nethereum/Nethereum --skill mud-indexing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mud-indexing
Source: https://github.com/Nethereum/Nethereum/tree/main/plugins/nethereum-skills/skills/mud-indexing
Command: npx skills add https://github.com/Nethereum/Nethereum --skill mud-indexing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Rebuilding the off-chain state of a MUD World requires processing every Store event emitted by table mutations, which is tedious to implement manually. This Skill guides you through indexing those events and persisting the reconstructed state into queryable databases.

Core Features & Use Cases

  • Store Event Processing: Use StoreEventsLogProcessingService to replay all MUD table mutations into an in-memory or persistent repository.
  • PostgreSQL Normalisation: Automatically create typed relational tables named {namespace}__{tableName} with proper column types via MudPostgresStoreRecordsNormaliser.
  • Continuous Sync: Run a block-progress-tracked processor that keeps the database synchronized with new on-chain events.
  • Use Case: Build a blockchain explorer backend that mirrors a MUD World's Player and Item tables in PostgreSQL, then query them with NormalisedTableQueryService for analytics dashboards.

Quick Start

Ask the AI to set up MUD Store event indexing for a given World contract address and normalise the resulting state into a PostgreSQL database.

Frequently Asked Questions about mud-indexing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I index MUD Store events with Nethereum?

Create a StoreEventsLogProcessingService with your Web3 instance and World address, then call ProcessAllStoreChangesAsync with a table repository. The service replays every Store event and rebuilds the full current state of the MUD World.

How to store MUD World data in PostgreSQL?

Install Nethereum.Mud.Repositories.Postgres and use MudPostgresStoreRecordsNormaliser with your connection string and World address. Calling UpsertAsync creates typed tables named {namespace}__{tableName} with proper column types.

What is the difference between InMemoryTableRepository and PostgreSQL normalisation?

InMemoryTableRepository suits development and testing with no persistence. PostgreSQL normalisation creates typed relational tables for production analytics and explorer UIs, while MudEFCoreTableRepository offers simple persistence on any EF Core database.

Can I keep a MUD index continuously synced with new blocks?

Yes. Create a processor via storeEventsService.CreateProcessor with a repository, a block progress repository, and a blocks-per-request batch size, then call ExecuteAsync with a cancellation token for continuous synchronization.

How do I process MUD events from a single transaction receipt?

Call the static StoreEventsLogProcessingService.ProcessAllStoreChangesFromLogs method with your repository and the transaction receipt. This updates the repository with only the Store events emitted by that transaction.