Coin Developer Tool

Let me introduce you a handy chialisp coin developer tool.

You can access this tool via https://pawket.app/

Click the link in the footer to open the developer tool:
image

There are 5 tools waiting for you.

1. Address Translation

It’s very common in lots of sites, it also available here by your side.

image

2. CLVM Translator

You can just blindly paste Chialisp, CLVM or Hex, the tool can handle the rest.
You can also quickly get the translated hex along with its treehash.

image

3. Bundle Analyzer

Just paste your hand-made spend bundle, you can visualize your spend bundle.

And there are more handy tools for you to analyze the whole bundle.

  • Prettify the solution/result.
  • Uncurry the puzzle, and tell which mod the puzzle is.
  • Execute your puzzle this solution, and find out what condition result would be.
  • You can easily find out the calculated announcement id.
  • Hover you mouse on the condition number/name, you would find out detail document and explanation about this condition.

You may have question about how can I get one spend-bundle to analyze if I’m newcomer and not ready to hand-made one?

Let me introduce you two ways as follow:

4. Offer Analyzer

Just paste the offer string, which you could easily get one by create one or get from offerbin.io.

Then, besides the offer summary, you can see the whole bundle. Especially, you have chances to analyze all the coins in the spend-bundle at a glance.

5. Coin Retriever

You are also allowed to find coin by its coin id/name, and the bundle analyzer function is shared.
And you have the shortcut to backtrack to its parent quickly by click the link below.

PS: Unspent coin is not available to inspect due to lack of solution.

Don’t hesitate to let me know if any suggestions. Thanks.

8 Likes

I’m working on a CLVM debugger. Here is the example:

pawket-clvm

For such simple program, It’s easy to find the whole process, but for a larger program. Currently, it’s hard to follow. Here is the example:

pawket-clvm-complex

I’m finding ways to enhance this debugger:

  • Break points.
  • Symbol information between Chialisp and CLVM(may need to rewrite compiler).
  • A better pipeline-friendly stack virtual machine.

Really want to hear other developer’s suggestions, how you debug your programs.

8 Likes

Great work, thanks!

I personally need something that’s as close to stack trace and cldb is really close to it. It returns not just the latest command, but a full run plan.
The other major feature would be breakpoints and displaying current variables. Unfortunately, it’s most useful if it works on ChiaLisp level, not CLVM. This could be done by making it possible to control the flow of cldb. eg stop at specific step, go to next command etc. Something like pdb.

Wow. Top work!
The debugger looks amazing.

Would you like to make it a VS code plugin? And integrating a Chia full node simulator would be perfect!

In case you may not aware, the developer tool has been greatly improved, and assist me a lot.

1. Settlement execute

If you working with offer, you may find the spendbundle of offer is not a valid spend, it refused to execute, here I add a special button Settlement Execute to the rescue.

image

2. Inline calculation

The inline calculation offered easy way to find the important result, which you should care during development.

image

3. Coin navigation

You can quickly navigate through the descendants and ancestors.

image

4. Nested uncurry

As coin are become complex day by day, this should be very useful when you inspect complex coin with inner_puzzle.

5. Mod argument explanation

You can clearly find the uncurried arguments of the mod, don’t go back to the cookbook again.

image

Let me know if you want some feature be integrated into this tool.

1 Like

Sorry for the late reply, really busy these days.

Sorry that maybe I don’t have enough time to improving the simulator, as I’m focus on developing ZKP circuits recently.

1 Like

Now you can try the WIP simulator yourself here: https://pawket.app/#/clvm

3 Likes