Assets 2

Savory rice snacks re-themed as desserts, oh my I am making myself hungry...

ahem... Hot off the press, a new Truffle v5 beta! 🗞

Our second beta includes a downright staggering collection of changes. Enormous gratitude to everyone who has contributed to this release and sincere appreciation from all of us. This publisher is honored to present a release with some amazing community-discovered and community-solved updates: bug fixes, clever convenient improvements, and some long-desired features.

Beyond this community effort (without which this release would not exist), this release also represents the outstanding efforts of the newest members of Truffle's engineering team. As this team and this project grows, we are excited to continue doing everything we can to make this development tool the best it can be for all of you.

Thank you. We hope to get to meet you at TruffleCon in Portland, OR, USA next weekend.

Check out what's included! Some feature highlights are first, with the full list below.

How to upgrade

npm uninstall -g truffle
npm install -g truffle@beta

Feature highlights


This beta includes the built-in help system for Truffle. Just run truffle help <command> to see a description and the available options for that command.

For instance:

$ truffle help migrate
  Usage:        truffle migrate [--reset] [-f <number>] [--network <name>] [--compile-all] [--verbose-rpc] [--interactive]
  Description:  Run migrations to deploy contracts
                    Run all migrations from the beginning, instead of running from the last completed migration.
                -f <number>
                    Run contracts from a specific migration. The number refers to the prefix of the migration file.
                --network <name>
                    Specify the network to use, saving artifacts specific to that network. Network name must exist
                    in the configuration.
                    Compile all contracts instead of intelligently choosing which contracts need to be compiled.
                    Log communication between Truffle and the Ethereum client.
                    Prompt to confirm that the user wants to proceed after the dry run.

Unique truffle develop mnemonics

We're getting rid of candy maple cake sugar ... when you start up truffle develop. Instead, thanks to our new user-level configuration infrastructure, when you run truffle develop for the first time, Truffle will generate a random mnemonic that will persist for you and you alone.

We encourage you to exercise caution when working with mnemonics and private keys, and recommend that everyone do their own research when it comes to protecting their crypto security.

Better debugger breakpoints!

It's been a long-standing issue with Truffle's debugger that you can't set breakpoints ahead of time. Well, now that's fixed! The b command in the debugger now allows you to set breakpoints for any line in any of your source files, or even set a breakpoint for some number of lines in the future. You can now also remove breakpoints more easily with B.

Here are some examples:


11:   event Generated(uint n);
13:   function generateMagicSquare(uint n)

debug(develop:0x91c817a1...)> b SquareLib:5
Breakpoint added at line 5 in SquareLib.sol.

debug(develop:0x91c817a1...)> b +10
Breakpoint added at line 23.

debug(develop:0x91c817a1...)> B +10
Breakpoint removed at line 23.

Improved truffle init / truffle unbox

It's pretty annoying that you can't init or unbox into a directory that already has contents, isn't it? Not anymore!

This release includes two improvements to these commands:

  • There's now a prompt instead, asking explicit permission for whether or not to overwrite each file.
  • We've also added a --force option that will just overwrite files automatically, getting out of your way quickly so you can just get to writing code.

Either way, we hope this removes a lot of the frustration for our users who, say, prefer doing git init first, before doing truffle init.

Full changelog

ℹ️ Here are the changes since v5.0.0-beta.0. Please refer to the previous beta release notes for more information about what's coming in Truffle v5.

New Features

Bug Fixes / Improvements

  • #1207 Check contracts' compatibility with Solidity interfaces, preventing some "Network state unknown" exceptions (@eduardonunesp)
  • #1208 Throw exceptions correctly in non-async migrations (@cgewecke)
  • #1209 Fix truffle publish for Web3.js 1.0 (@cgewecke)
  • #1219 Fix outdated Solidity syntax in truffle create contract output (@matt9ucci)
  • #1223 Prevent overriding read-only property config.from (@Mischi)
  • #1245 Fix error when migrating to mining Geth client (@kdelwat)
  • #1248 Improve error when trying to use a contract without bytecode (@cgewecke)
  • #1251 Add warning message about truffle-hdwallet-provider compatibility (@cgewecke)
  • #1259 Fix incorrect variable name url in truffle-compile (@thekevinbrown)
  • #1263 Fix truffle-solidity-loader to improve support for multiple imports (@sogoiii)
  • #1278 Fix deprecated usage of Buffer (@noelyoo)
  • #1299 Show spinner when downloading a specified version of solcjs (@eggplantzzz)
  • #1304 Fix unhandled exception formatting logic at the root CLI (@benjamincburns)

Dependency Updates


Please let us know if you find any issues with this release, or feel free to reach out to contribute to the discussion around Truffle's development. We'd love to hear from you in our Truffle Development Gitter channel as well as in our channel for Community Support.