CosmWasm Tracing: Search Tips&Tricks

Mitya
CosmWasm
Published in
3 min readJun 12, 2024

Since CosmWasm Tracing went live, we’ve been engaging with the teams using this tool on Terra, Neutron, and Kujira. We’re pleased to report that it has proven to be useful for debugging, and the Tag search function was the one that triggered most of the questions. We decided to share some search tips to assist developers who are new to CosmWasm Tracing. Please refer to our original article first if you have not heard about the tool before.

Tip 1: Every tag is searchable

Tags are created to help you search for the relevant transactions. Some examples of the tags include:

  • Block height (height)
  • Transaction hash (tx)
  • Sender address (sender)
  • Contract initiating query (sender_contract)
  • Error status (errored)
Some tag examples

Everything you see in the tags can be used to find the relevant transactions by providing key=value expressions in the Tags search field:

Simple search example

Tip 2: Combine search parameters to refine the search

For more complex searches, you can combine different parameters with a space between them, which acts as an AND operator. For example, ‘errored=true sender_contract=NNN’ will filter for operations that contain errors and are initiated by the specified contract.

Search by multiple parameters

Tip 3: Use regular expressions for search input

Tags search allows for using regular expressions, which is often helpful although it also requires one to be aware of the symbols that are used in regex. For instance, here is a ‘sender’ tag in one of the Kujira transactions:

An example of the ‘sender’ tag

Searching for sender=[kujira1a…qv] would not help here because [] is a regex symbol. One can either escape it in the Tags field or use a regex wildcard to search for any sender array containing this particular address:

Using regex wildcard to search in sender array

Happy tracing!

We hope you will trace your smart contracts successfully with these tips. Let us know if you have more questions about CosmWasm Tracing!

--

--