Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

5.11.0 — Apple pie, no bugs allowed

Compare
Choose a tag to compare
@eggplantzzz eggplantzzz released this 14 Jul 19:09
· 133 commits to develop since this release

Hey again everyone, welcome back! 👯

This week's release contains a special new feature; we have ported our CLI debugger 🙅🏽‍♀️🐛 over to work with Truffle Dashboard! So now you can step through your Solidity code in the browser! After installing the new version of Truffle, run truffle dashboard on the command line. After Truffle Dashboard starts up, just navigate to the URL specified and you can get started! There may be a few preparation steps for you to get up-and-running with your code, so expand the information below for more! We hope you enjoy it and, as always, let us know if you find some bugs so that we can improve it!

--more on getting started with the dashboard debugger-- The first thing you will want to do is connect MetaMask to Dashboard using the button in the lower left. Then switch MetaMask to use the network you are interested in.

To use the debugger to step through code, Truffle Dashboard will first need to have the compilations for the contracts involved. If the sources are verified on Etherscan, then using the debugger is simple: enter your transaction hash in the input field and click Debug. Truffle will automatically fetch them for you and compile them! If you are debugging a transaction and you have the sources locally in a Truffle or HardHat project, you can send them to Truffle Dashboard using one of the following two methods...

For Truffle projects 🍫
If you have a Truffle project with the source files, you should first open Truffle Dashboard by running truffle dashboard in a terminal. Once Truffle Dashboard is running, navigate in a web browser to the URL specified. You should see a page with "Truffle Dashboard" in the top left. In another terminal, navigate to your Truffle project directory and run truffle develop. After the development
console opens up, run migrate --compile-all. After you migration is complete, Truffle Dashboard will have your compilations saved in the browser! You can then enter the transaction hash you are interested in in the Dashboard Debugger and click Debug! The debugger will load up your session and you can then step through your transaction. Neat!

For HardHat projects 👷‍♀️
If you have a HardHat project with the source files, you should open Truffle Dashboard by running truffle dashboard in a terminal. Once Truffle Dashboard is running, navigate in a web browser to the URL specified. You should see a page with "Truffle Dashboard" in the top-left. In another terminal window, navigate to your HardHat project's root directory and install the @truffle/dashboard-hardhat-plugin by running npm install @truffle/dashboard-hardhat-plugin. In your hardhat-config.ts, add import "@truffle/dashboard-hardhat-plugin" to the top of the file. Then run npx hardhat compile to send the compilations to Truffle Dashboard where
they will be saved in the browser! You can then enter the transaction hash you are interested in in the Dashboard Debugger and click Debug! The debugger will load up your session and you can then step through your transaction. Voila!

Note 1: You can verify that the compilation was received by opening the developer console in your browser. Set the logging levels to "all levels" and you should see a "received cli-event message" that looks something like the screenshot below.
Screenshot 2023-07-14 at 2 48 16 PM

Note 2: The debugger is a bit resource-intensive and slow to initialize, and may even lock up your browser for a short time. But get yourself a coffee, and hopefully before you return it will be up and running! 💜

So the debugger for Truffle Dashboard is the meat 🍖 of this week's release. Besides that, we have a handful of maintenance-related PRs; some debugger/decoder-related bug fixes and a bump to the Ganache version utilized by Truffle. We also have to give a shoutout to @BreadQL for making a teeny tiny edit to a README in Truffle. Thanks!

We hope you all enjoy the weekend and we'll see you soon!

How to upgrade

We recommend upgrading to the latest version of Truffle by running:

npm uninstall -g truffle
npm install -g truffle

Changelog

New feature

Enhancements

Bug fixes

  • have debugger skip anything called from a generated source while stepping (#6138 by @haltman-at)
  • ensure CalldataDecodingInspector always passes through inspector options (#6136 by @haltman-at)

Internal improvement

Dependency update