Presenting smart tools for smart contracts and blockchains.

Hannu
CosmWasm
Published in
2 min readJan 26, 2023
Photo by Keiteu Ko on Unsplash

Contract developers and users work with a blockchain as it is a black box. All interactions between different contracts or native modules are not visible for them. Error messages are redacted, which makes it a hard time to debug the inner-workings of the network.

We are working hard on making it easier for the CosmWasm community to profile their networks and smart contracts, so we started building two very useful and very cool tools. This short article is an attempt at gauge community interest and possibly even suggestions or ideas on how to make these tools even more useful than they already are.

They still need to be polished for release, but we will start demoing their capabilities to networks in the very near future while polishing the rough edges and making them all so shiny.

First out, we have the CW-Indexer that polls real-time blockchain/contract data seeded from an application dump. The data is updated by consuming event streams of trace-store (cosmos-SDK). It does data transformation for most common contract store models, which already gives a high accuracy and access to the data in a structured way: sql but API endpoints also possible

Provides SQL DB for queries and analytics as well as an API for common queries.

Secondly, Analytics for blockchain data is hard, data analytics for smart contracts is harder as they can have a unique schema -> we help with a tool to get access to the data

we have the Tracing node, which traces everything that goes on inside a CosmWasm chain; for example, it tracks the storage changes, logs, and events created by any message execution.

In addition, you get highly detailed trace and performance metrics for your network, for example, by making contract interaction (messages and queries) visible, including payload, result, store, and events.

You can search by block, tx hash, or contract address.

Integration points for the tracing node are:

· Ante handler

· Begin/end blocker

· Contract messenger

· Contract query plugin

· IBC callbacks

Collected data:

· Store read/writes

· Events

· Logs

· Message, query payloads

· Execution results and times

--

--