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

v5.10.0 — Chocolate fountain

Compare
Choose a tag to compare
@haltman-at haltman-at released this 16 Jun 18:48
· 413 commits to develop since this release

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!

image

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

  • Introduce new @truffle/codec-components react component library (#6076 by @cliffoo)

Enhancements

Bug fixes

Internal improvements