Michelson rocks, but you Better Call Dev

Major update of Tezos smart contract meta-explorer by Baking Bad

Mister Walker
Jun 28 · 5 min read

The idea behind

Our mission is to increase blockchain data availability through a nice user interface and high-level data abstractions. Better Call Dev is a tool both for smart contract developers and users. Our goal is to present the interaction with the smart contract as a set of input parameters and side effects so that one can understand what is happening inside by looking at those values.

Operations tab

The first thing you see after you query an address is a list of operations for the smart contract requested. Operations are sorted by time in descending order. Inside each operation, there is the main transaction and there can be several internal ones, also sorted by time but in ascending order.

Operation header

Operation header contains basic information, such as timestamp, block height, the operation hash, fees, gas and storage limits. In the right corner of the header, the contract state at the end of the operation is shown: resulting storage size and resulting balance.

Transaction information

Each transaction block begins with the transaction type and extended status (applied, failed, skipped, or backtracked). Then come the source/destination accounts, and transaction amount. Addresses matching the requested one are colored in pink, or linked with the corresponding BCD page otherwise.

Call parameters

Transaction parameters and storage changes are hidden by default and shown for the latest transaction only. Press show button to expand the view.

Storage diffs

A few more tricks applied to the contract storage: for each transaction, BCD compares the current state with the previous one and produces a simple JSON diff. Additions, replacements, and removals are colored green, yellow and red respectively. In case of replacement, both the previous and new values are shown. Unchanged parts of the diff are collapsed by default in order to ease the perception.

Script tab

A contract in Michelson consists of three sections: a description of the types of input parameters and storage, and the code itself. BCD shows decoded versions of type schemes, and extended source code on this tab.

  1. Code coloring (instructions, types, expandable types, values, annotations);
  2. $ELSE pseudo-annotation;
  3. Inline type descriptions (Click on the underlined type names to expand).

State tab

You can find current contract balance, storage size, and last modification timestamp on the state tab, as well as the storage data plus latest Big Map entries (loaded on the operations tab).

What’s next

Try Better Call Dev, click on the Pick Random Contract link and explore smart contacts we chose for demonstration.

  • Better entity recognition;
  • Support sandboxnet environment used by developers, integrate with Granary; This mode will also allow operating completely offline.
  • Performance tuning: BCD caches RPC requests, but networking is still a bottleneck. We consider using other data sources and optimizing request count;
  • Improve code viewer: add collapse/expand feature, line numbers, macros folding, and more.

Coinmonks

Coinmonks is a technology-focused publication embracing decentralize technologies. We are Non-profit and education is our core value. Learn, Build and thrive. Our other project— https://coinmonks.com, https://cryptofi.co, https://coincodecap.com

Mister Walker

Written by

@TezosBakingBad co-founder, Service which helps calculate rewards from Tezos Delegation and match theirs with received payouts. https://baking-bad.org

Coinmonks

Coinmonks

Coinmonks is a technology-focused publication embracing decentralize technologies. We are Non-profit and education is our core value. Learn, Build and thrive. Our other project— https://coinmonks.com, https://cryptofi.co, https://coincodecap.com