Smart contract indexing utility

Send smart contract addresses for decoding and special indexing

Indexing smart contracts

Space and Time's core blockchain indexing service creates tables for all core chain data elements, such as blocks, transactions, and event logs. However, smart contract events save all parameter data to that one "DATA" field every time the event is fired, requiring additional decoding work to access the data in a meaningful way.

To ease access to Event Log values, and to reduce the number of records per table down to only Events users care about, Space and Time has a smart contract indexing tool that will create a schema per smart contract, with one table per event, and one column per event parameter. This advanced decoding simplifies the use of smart contract event data down to a single, simple table.

Smart Contract Index Utility

The Space and Time Studio now contains a utility for entering new smart contracts to the event indexer. To find this utility from anywhere in Studio, click on the "smart contract" button on the top, and select "Get data from chain."

The Studio then provides you with a simple interface: enter the smart contract address and blockchain, and the interface will immediately search for an application binary interface (ABI), containing metadata describing the smart contract. (Note: all verified contracts should have an ABI)

For example, the SushiSwap Master Chef contract request on Ethereum would look like:

Click "Submit," and the utility will pull the ABI and display the now decoded schema, including table name, column name, and data types:

Each column maps to a parameter in the event in the smart contract, or is added in order to join back to other Core tables (such as Transaction_Hash).

Once satisfied, you can click "Send Request for Indexing" which submits your request to the Space and Time indexing service. Realtime indexing will start first (picking up all new records), with a request then sent for full historical back-population.

Note: you will need to be a subscriber of Space and Time for this button to be enabled.