v5.10.0 — Chocolate fountain
Hello everyone, we've got a new Truffle for you!
The biggest addition this week is the new package @truffle/codec-components
! If you're making use of the @truffle/decoder
or @truffle/debugger
🕵 libraries, you may have found yourself saying, this output format is quite nice, but how do I display it on a webpage? 🕸️ Well, @truffle/codec-components
gives you a convenient way of doing so! Behold!
Look at that those collapsible arrays! This library is still pretty internal for now, but you can look forward to its use in Truffle features to come. And we are working on documentation and interfaces to make it more generally available in the future!
Speaking of @truffle/decoder
, we've upgraded it so that it can make use of 4byte.directory 📖 to decode transactions it otherwise can't make sense of. In order to use this, you'll need to pass { projectInfo: <...>, selectorDirectory: { enabled: true } }
when starting it up. (You can also set it to use a website other than 4byte.directory, so long as you have one that follows the same protocol. 🕴️)
If you do this, then when you get back a message decoding or unknown decoding, it may have attached a selectorBasedDecodings
interpretation; this will be an array of decodings based on what can be found on 4byte.directory. Note such decodings will be pretty bare-bones 🩻, but they'll be there!
But we've got other enhancements this week as well! Thanks to @farcaller, you can now override the copy of chai ☕ used for assert
and expect
in truffle test
🧪 by putting a different package in your config. Just write
module.exports = {
//rest of truffle-config.js
chai: {
package: require("my-preferred-chai")
}
}
and you should be good to go!
Also this week, the truffle dashboard
command now allows a --no-auto-open
option to prevent it from automatically opening a browser window 🪟; we've fixed some bugs 🐛 that prevented some people from compiling, decoding, or debugging their contracts; and we've updated what chains you can use truffle debug -x
or truffle call -x
with. ⛓️
We hope that's enough for you for one release! But if it isn't, well, come back next week!
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
- Allow Truffle Dashboard to run without launching a browser window automatically (#6096 by @cliffoo)
- Allow decoder to use 4byte.directory to decode (#6057 by @haltman-at)
- Allow to override chai from the config (#5974 by @farcaller)
- Add chains for Sourcify 2.2.3 (#6089 by @haltman-at)
- Add means for Dashboard to fetch and compile external contracts (#6075 by @eggplantzzz)
- Add ResultInspector option to use objects for mappings (#6074 by @eggplantzzz)
Bug fixes
- Add missing codec component for new error type (#6097 by @haltman-at)
- Put try/catch guard around ENS forward resolution in decoder/debugger (#6083 by @haltman-at)
- Correct resolver import in legacy workflow compile (#6078 by @eggplantzzz)
Internal improvements
- Increase timeout on some more tests, remove needless imports (#6092 by @haltman-at)
- Further increase timeouts on hardhat related tests (#6091 by @haltman-at)
- Replace bootstrap with install in scripts/workflows (#6090 by @haltman-at)
- Reject SolidityAST contracts verified on Etherscan (#6082 by @haltman-at)