5.11.0 — Apple pie, no bugs allowed
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.
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
- add debugger to Truffle Dashboard (#6058 by @eggplantzzz)
Enhancements
- add support for multicall3 to decoder interpretations (#6137 by @haltman-at)
- update sourcify networks for sourcify 2.4.0 (#6141 by @haltman-at)
- update README.md (#6133 by @BreadQL)
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
- replace google analytics with mixpanel (#6132 by @eggplantzzz)
Dependency update
- update Ganache to 7.9.0 (#6134 by @haltman-at)