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

Releases: trufflesuite/truffle

v4.1.5 – 2 Caramels

30 Mar 01:34
Compare
Choose a tag to compare

Hello again,

Another patch release here with some nice additions.

  • Debugger is getting better and better! @gnidan has added support for contracts that use libraries / inherit other contracts and made general improvements to facilitate cross-contract calls. truffle debug now recompiles your contracts each time you run it (necessary for technical reasons). 🐞

  • solc has been updated to 0.4.21. emit away. This version also contains a wealth of new warnings that will become errors when 0.5.0 comes out. If you run clean with 0.4.21, you'll gracefully climb the step. Check out the release notes here (Thanks so much @axic, @chriseth, everyone who works on solc, and @patidarmanoj10) 🚨

  • Run truffle develop anywhere, even offline. truffle 656 📡

  • A bug preventing truffle publish from gathering local and installed contract dependencies correctly is fixed. truffle 699, truffle 744. (Thanks @vladfr for working on this and @skmgoldin for pressing for a fix).

  • A bug that caused migrations to always run end-to-end unless the migrations artifacts was required by a.sol postfix is gone. (Thanks to @nadavhollander) truffle-migrate 18

  • truffle create no longer overwrites existing files. (Thanks to @dmihal!)

  • Are you familiar with the shell command rm -rf build? Guess what? truffle-compile now compiles inheritance chains correctly. If this isn't working, please notify us immediately.

Check this release out by running the following command in your favorite shell.

npm install -g truffle

v4.1.3 – Mini mint

08 Mar 03:18
Compare
Choose a tag to compare

Hello.

Mini-mint sized patch release here. 🚐

  • truffle develop's network config now requests 127.0.0.1 instead of localhost. It's more reliable.
  • We've added a warning to truffle develop's start-up output: Do not use the candy-themed mnemonic that generates the test accounts on a real blockchain. The private keys generated by the mnemonic are not secret.
  • Work ontruffle-debugger continues apace! This release includes a patch to make contracts that are created by other contracts debuggable.
  • A bug that caused Solidity tests to execute out of sequence when a test file contained more than one contract was fixed.

That's it! If you've been bedeviled by any of these issues, this release is for you. Install it at your favorite command prompt by running:

npm install -g truffle

v4.1.0 – Cricket Crunch (a new debugger!)

27 Feb 19:53
Compare
Choose a tag to compare

🐛🐜🦋🐝🐞🐌🕷️

Hello! What's this? You've found some bugs? Yum. 😄

This release has just what you need: a fully featured debugger for your Solidity contracts! It has everything you'd expect from a modern debugger: Variable inspection, breakpoints, watch expressions -- the whole bit -- making it easier to understand what your code is doing.

Read all about it in our blog post!

What's Included

  • A fancy new debugger that'll make your development life much simpler.
  • Upgraded internals for better debug_traceTransaction support within truffle develop

For usage information please see our blog post.

How to Get It

As usual, to upgrade, please run:

$ npm uninstall -g truffle
$ npm install -g truffle

You may need sudo in the above commands if running Linux.

Thank you!

We thank you all for all your continued support. Please reach out to us on Gitter if you have any questions.

Hint: If you've read this far and are wanting more, our blog has more details. Give it a read!

🐛🐜🦋🐝🐞🐌🕷️

v4.0.7 – Mittens

26 Feb 23:41
Compare
Choose a tag to compare

Hello all! ⛵️

Another patch release here.

Geth 1.8 (Iceberg) was published last week and Truffle needed a small change to accommodate its new error reporting behavior. With 4.0.7, migrations on Geth 1.8 should succeed (if they also succeed on 1.7.3) Please let us know if they don't. Thanks to everyone who helped address this in truffle #721, especially @hickscorp who identified the problem early and led the charge to get it fixed.

There's more:

  • unbox is now a respectful guest in your file system, declining to populate already occupied folders. Your README will not longer be accidentally deleted. truffle #786
  • Solidity files that Truffle creates follow the Solidity Style Guide. You could still see a lint warning about pinning the pragma on Migrations.sol but we've followed the consensus view arrived at in this best-practices thread and kept the caret. truffle 791
  • you can specify whether a test suite runs using contract.skip and contract.only. truffle 385, truffle 359
  • chai expect is available in the testing environment. (Thanks @mcdee). ☕️
  • truffle create will error helpfully if the file name you propose isn't legal. (Thanks to @dmihal).
  • Truffle should find your contract artifact even if you rename the file it's in. truffle 580
  • Includes nice additions to the truffle artifact which now exposes:
    • the contract creation transaction hash (Thanks @kingcocomango).
    • solc's new AST which contains a wealth of additional parsing data. Useful if you're building any kind of tooling around the Truffle artifact. (The old AST is now available under the key: legacyAST).
  • Improvements to the issues template in the form of helpful instructions about how to get relevant version information. (Thanks t@wbt).
  • More stuff under the hood, paving the way forward.

Let us know if you run into any problems! Thanks for checking this out.

In order to upgrade to the latest version of Truffle, run this in your favorite command prompt:

npm uninstall -g truffle
npm install -g truffle

v4.0.6 - Better Errors

31 Jan 23:02
Compare
Choose a tag to compare

Good day! 📆

Next patch release up for grabs! Besides updating Solidity, we've added a bunch of fixes and improvements to error reporting. Hope you enjoy!

Included in this release:

In order to upgrade to the latest version of Truffle, run this in your favorite command prompt:

npm uninstall -g truffle
npm install -g truffle

Thank you very much to all of our contributors who brought issues and Pull Requests to our attention for this release! 🍫

Let us know if you run into any issues!

v4.0.5 - Bug fixes

17 Jan 18:39
Compare
Choose a tag to compare

Hello! 👋

Here's a patch release containing a couple small bug fixes:

  • Fix issue preventing custom synchronization timeout in truffle-contract #594

  • Play nice with third-party Assert.sol libraries (previously, Truffle was not detecting test results for custom assert libraries.) #745

As usual, upgrade to the latest version of Truffle via:

npm uninstall -g truffle
npm install -g truffle

Thanks for watching! 🙈

v4.0.4 - `invalid number of args to a Solidity function` not found

21 Dec 01:53
Compare
Choose a tag to compare

🎉

At least, that's the hope! 🤞

This release primarily addresses a long-standing problem in Truffle v4 (#596 #698 #706, possibly others), where the following error message was appearing when it shouldn't:

invalid number of arguments to a Solidity function

This latest release includes the fix PR trufflesuite/truffle-artifactor#65, which should address most of the cases where this error was popping up incorrectly.

If you still run into this problem, please let us know!

Also included in this release are two changes to https://github.com/trufflesuite/truffle-compile:

Many thanks to the community for all the contributions, and especially for all the bug reports! 🙇

Bug fixes: v4.0.1

07 Nov 19:10
Compare
Choose a tag to compare

Greetings! 👋

While rummaging through our Halloween candy, we found a few things that didn't belong in there. No, not just those really hard yellow candies that hurt your teeth 🍯, but a few bugs.

So we put out Truffle v4.0.1 to address these issues. Among them:

  • An unknown root cause that made the debugger crash was resolved.
  • We corrected the invalid seed phrase / mnemonic for Truffle Develop. As mentioned before, the in-memory blockchain used in Truffle Develop is deterministic, which means it uses the same accounts / mnemonic every time (unlike the TestRPC). The correct Truffle Develop seed phrase is:
    candy maple cake sugar pudding cream honey rich smooth crumble sweet treat 😃 .

Anyone using 4.0.0 should update to 4.0.1 as soon as possible. Thanks!

Now back to our sugar coma. 🛌

Truffle v4.0.0 - Full Size Snickers 🍫

31 Oct 18:43
Compare
Choose a tag to compare

Happy Halloween all! 👻 🎃 👾

Part of any good Halloween haul, the full size candy bar is the crème de la crème of goodies to open on Halloween night. Far tastier than candy corn, and wayyyyy bigger than anything fun size, the full size bar is every kid's top score. This Halloween, we're giving you our crunchiest release yet: Truffle 4.0 - Full Size Snickers 🍫

This release includes so many big things we've had to change the structure of our release notes. We'll introduce what's new first, then more specific items towards the end.

Update: Truffle v4.0.1 has been released containing a debugger fix and a new deterministic mnemonic for truffle develop

Introducing the Integrated Solidity Debugger 😈

screenshot 52

That's right folks. With Truffle 4.0, you can now debug your Ethereum transactions with full Solidity source code mapping. Debug any transaction. On any chain.*

Debugging an Ethereum transaction is different than debugging a traditional application. On Ethereum, all application state is saved on a world computer and can be introspected at any time. By debugging a transaction, you're really stepping through history rather than executing code in real time.

This gives you a lot of power. Here's a list of everything you can do with the debugger:

  • Debug past transactions like you'd debug a normal application. Step over, step into, step next, it's all there.
  • Debug transactions without code. That's right, you can even inspect transactions that you don't have the code for. You won't see any mapping to Solidity source code, since it's not there, but the debugger will provide you important stack and instruction information to understand what's happening within that transaction.
  • Figure out exactly where your transaction errored (think, throw, revert(), assert(), etc.)
  • Figure out the exact point in which your transaction ran out of gas.
  • Inspect individual instructions and their related stack information.
  • See the address associated with each line of code.

This is a big step for Solidity development. And it's all here, included in Truffle. Check out our new tutorial about how to use the debugger for examples debugging specific contracts.

* Your Ethereum client must support eth_debugTraceTransaction. The latest TestRPC does, as does go-ethereum.

Truffle Develop: Faster Development Cycles 👽

demo-double-develop 1

Most users' first action after installing Truffle is to install the TestRPC. With Truffle 4.0, there's no need: An integrated development blockchain powered by ganache-core now comes standard. And you can get to it with a single command:

$ truffle develop

After firing up truffle develop, not only do you get a development blockchain that comes with zero installation, but you also get a direct line into that blockchain via the console. Type commands like compile and migrate as you would if you were using the console on its own. You can also access your contract abstractions as well, as they're automatically reloaded for you after every command. See our console documentation for more information.

Using truffle develop has some other benefits over running the TestRPC directly:

  • It has a consistent host and port that doesn't conflict with the popular port. It always runs on http://localhost:9545
  • It always has the same network id (4447) so you'll know that's the dev environment when you see that id in your artifacts.
  • It's deterministic, using the same mnemonic and accounts every time: candy maple velvet cake sugar cream honey rich smooth crumble sweet treat candy maple cake sugar pudding cream honey rich smooth crumble sweet treat (please see v4.0.1 release for a correction to this mnemonic). 😃
  • Supports multiple consoles for a single session. See the gif above for an example.

Dry Run: Taking the guesswork out of migrations 🐲

Truffle 4.0 allows you to test your migrations against your production networks before committing real transactions (and real 💲). To do so, just run the following:

$ truffle migrate --dry-run

Under the hood, this feature forks from your chain of choice to create a new sandbox to run your migrations. This sandbox has access to all the code, addresses, accounts and balances as the old chain, with all new transactions occurring within the sandbox. This means you can test upgrading those complex upgradable contracts before actually upgrading them.

Truffle Test: Faster Test Cycles & Better CI 👹

Truffle now comes with a test blockchain environment baked in when you run truffle test. Not only is this great for your development process -- you no need longer need to download an install a separate blockchain -- but it's also great for continuous integration: truffle becomes the only application your CI needs to get your automated test environment up and running.

Caveat: For backwards compatibility, if you have an existing Truffle project with a development or test network specified in your truffle.js file, Truffle will use those networks instead of this new built-in blockchain. To take full advantage of this feature, remove or rename the development and test networks from your truffle.js file. If you're just using the TestRPC for development, consider using the new truffle develop instead!

Solidity Optimizer now Off by Default 🤖

For increased security, we've now made the Solidity optimizer opt-in, meaning it's off by default. This ensures your binaries are created exactly how you want, with your own self-configured optimizer settings. Having user-specified optimizer settings also makes the path to contract verification more clear.

To opt back into the optimizer, check out our documentation for an example.

⚠️ Warning: Changing the optimizer settings (and turning off the optimizer) will affect the binary size and gas costs of your contracts. In some instances, this may cause your contracts to exceed the block gas limit, meaning your contracts can't be deployed without further configuration. If you run into gas issues as a result of this change, we recommend either changing the optimizer settings to something better suited to your contracts, or splitting up your contracts into multiple pieces that can be deployed individually.

Other Improvements, Features and Bug Fixes 💀

  • New solc! Now with v0.4.18. We've also removed our own Solidity parser in favor of using solc's. This means you now get new Solidity features, faster.
  • The Solidity compiler version is now included in the contract artifacts, to help support contract verification truffle-compile #29
  • You now have more Truffle Boxes to choose from (with more to come!)
  • Speaking of boxes, truffle init now creates a bare Truffle project. If you'd like a specific example, try a box instead!
  • Also, we shaved a few seconds off of test runs.

Upgrading to Truffle 4.0 from 3.x

Truffle 4.0 changes the content and structure of contract metadata stored on disk. To get the most out of Truffle 4 right away, perform the following steps:

  1. Install the new version of Truffle

    $ npm install -g truffle
    

    Note: If you run into errors, try uninstalling the old version first. Additionally, if you're on OS X or Linux you may have to use sudo with the above command.

  2. Upgrade truffle-contract to v3.0.0 for any project that uses it (like your frontend) to take advantage of the new artifact format. This should be a drop in replacement.

  3. Run truffle compile --all to auto-upgrade contract artifacts and unlock debugging features.

Note: Because of the changes under the hood, you must recompile all your contracts before you can take advantage of the Truffle debugger.

Big Thanks!

We want to send out a big thank you to all of our users, beta testers and everyone that helps make Truffle possible. If you need help with anything or would just like to chat, come on over to our Gitter channel and drop us a line. Or, if you're feeling spooky, write us a new issue to tell us about any 🐛's you find.

Happy Halloween, and happy coding! 👻

Pre-release: v4.0.0 (beta 2)

09 Oct 22:09
Compare
Choose a tag to compare
Pre-release

Hello! 👋

Another beta release of the upcoming Truffle 4! Big thanks to the community for all of the feedback on the first beta – this release is chock-full of bug fixes and new features brought up by all of you. To download, see below. As always, we'd love to hear from you! If you're upgrading from Truffle 3, please see the upgrade section below.

Note: Beta 1 was released prior to this one, but contained a bug for Windows users that has now been fixed.

What's New in this Beta

  • Lots of improvements and fixes for truffle develop (see below)
  • Improve truffle test compatibility #601
  • Upgrade solc to v0.4.17 (Warning: Expect some additional Solidity warnings ⚠️, see below) #604
  • Start parsing Solidity with solc itself instead of separate parser library #560
  • Support proxy environment variables with truffle unbox (trufflesuite/truffle-box#8)

Truffle Develop Updates

Featuring multiple concurrent truffle develop sessions 🎉 !

  • Run truffle develop in two or more terminals and connect to the same managed RPC: (#571)

    demo-double-develop

  • Access RPC logs with truffle develop --log: (#598)

    demo-double-develop-logs

  • Fix problems with synchronous requests not working (e.g. web3.eth.accounts) #570

  • Fix bug where test inside truffle develop would not run twice in a row #585

solc Upgrade Notes

Solidity v0.4.17 introduces a couple new keywords and deprecates others.

You'll likely encounter the following warnings:

  • The constant keyword has been replaced by view and pure. You'll get warnings for using constant.
  • Functions not marked with public/private/internal/external will throw a warning.

Some of these warnings will come from Truffle / the Truffle Box. Please bear with us as we fix these issues as part of the full Truffle 4 release! 🍰

See Solidity v0.4.17 release notes for more information.


Updating to Truffle 4.0 from 3.x

For most users, updating to Truffle 4.0 from 3.x is seamless: You simply need to install the new version. However, there's one gotcha that might affect some users. Before we get to that, your TL;DR:

  1. Install the new version of Truffle
  2. Upgrade truffle-contract to ^3.0.0 for any project that uses it (like frontends)
  3. Run truffle compile --all to auto-upgrade contract artifacts and unlock debugging features.

Now for the nitty gritty...

In order to support debugging, the artifact format for Truffle contracts has changed (these are all the files that live in ./build/contracts). The new format provides all the information needed to easily debug your contracts. There's one catch: You may have to do some upgrading. The good news is most of the upgrade is done automatically.

(Aside! We formalized and standardized our contract schema so you can write programs that interact with that format, too. Check it out! 🎉)

Let's dive in.

Install the new version of Truffle

First you need to install the new version of Truffle. Remember that this is the beta release, so the process will be slightly different from before.

We'll start by uninstalling the old version of Truffle, if present:

$ npm uninstall -g truffle

Next, install the new version using the beta flag:

$ npm install -g truffle@beta

If you're on Ubuntu or OS X, you may need to use sudo in the above commands.

Update truffle-contract to ^3.0.0

Projects that interact with Truffle-created contracts, like frontends, usually do so by interfacing through the truffle-contract library. If you have a project that uses truffle-contract, you'll need to update that project's package.json to include truffle-contract ^3.0.0 instead of the older version.

This upgrade should be seamless for most users, and you shouldn't have to update your project's code unless you use a contract's .toJSON() function. Since the internal JSON representation has changed, the output that function returns will be different.

If you do not use .toJSON() and you notice the upgrade doesn't go seamlessly, then that's a bug. Please contact us right away so we can fix the (unintended) breaking changes.

Finally, run truffle compile --all

Running truffle compile will cause Truffle to upgrade your contract artifacts to the latest format. This will also unlock the debugging features so you can better inspect your contracts' behavior.

That's it! This process should be pretty smooth, but let us know if it's not.

Thanks

Thanks to members of the community for your support in identifying issues and for your submitted Pull Requests in this release!

Feedback

We know, this release is BIG. With it came some big changes, and we couldn't keep putting out great software without your help. So please: Get on the bat phone (our Truffle Gitter channel) and drop us a line. We'd love to hear your experiences with this new release, how it makes your development life better, and how we can continue to improve.

Thanks as always, and happy coding!

-- The Truffle Team