Remix Project
Published in

Remix Project

Remix v0.22.0 & v0.22.1 Released

“Always start out with a larger pot than what you think you need.”
Julia Child

The Big News

  • Our pot just got bigger! With Release v0.22.0, Remix stores files with IndexedDB, vastly increasing browser storage capacity. Bigger Is More and More Bigger is Better.
  • You can now run Mocha unit tests on Solidity files!
  • Debugging a transaction from a verified contract will now search both Sourcify and Etherscan to get the source code.

File Storage

In this release, we are implementing IndexedDB, which greatly expands the storage space. This change involves some behind the scenes work to move your files to IndexedDB.

When you load Remix v0.22.0 (or greater) for the first time, Remix autocopies your workspaces and files from their old home in localstorage to their new home in IndexedDB. But, before this new version of Remix loads, you will be asked if you want to download your workspaces.

Its always nice to have a backup!

When Remix starts to load this first time, it could take longer than usual, but probably less than 30 seconds. Once loaded, if the migration to IndexedDB has been successful, your workspaces and files will be in the File Explorer.

If you do have problems, you should go to the Restore Backup link on the home tab to upload the zip file that you had just downloaded.

Note: in the move to IndexedDB, Remix has merely copied your files over. The original files ( and workspaces) are still in localstorage and will stay there until you clear that storage.

Here’s the tool to upload your backups. It is not new in this release.

If you happen to open the .zip file that was downloaded, the relevant files are in a folder called .workspaces. On a Mac this folder is hidden — because it starts with a dot (.). To make it visible Mac users should press:

Command + Shift + . 

Although Remix storage is now a lot bigger, it is still ONLY stored in your browser and NOT on a server

Coding in Remix IDE Online is different from writing in a Google doc. Yes, both are written in a browser but a Google doc saves your work to Google’s servers, and Remix — out of the box — only saves your code to your browser’s storage. So tread carefully, browser storage is not permanent!
(To save file to you computer’s hard drive, use Remixd or Remix Desktop — see below)

If you clear the IndexedDB storage or if your browser crashes hard, you’ll lose your work. For more info about saving your work see our article Securing your Files in Remix & How to Clone and Push to a Git Repo

Want to save files on your computer? Use Remixd or Remix Desktop

With some configuration and the terminal script, Remixd running, you can save your work directly to your computer’s hard drive. For more info, go the Remixd docs. You can also use our Desktop app — Remix Desktop.

Or save you work on Github with the DGIT plugin.

DGIT

The DGIT plugin has not changed much in this release, but you will see just how HUGE the storage capacity is of IndexedDB.

And now with this release, when cloning a huge repo with DGIT, you won’t crash the browser due to a lack of storage space. For more info, see our article on the DGIT plugin.

Settings

The settings panel has a new button to restore default settings:

Not surprisingly, this button will restore the “out of the box” settings in Remix. It will also erase files in localstorage. It won’t erase files that are stored in IndexedDB.

From release v0.22.0 onward, the files you see in the File Explorer are from IndexedDB, so, if you see your files there, you can click this button and you won’t be erasing your work.

If you don’t see your files in the File Explorer after opening this version of Remix — so you are having trouble migrating your work to IndexedDB, do not click this button until you have downloaded a backup.

If, before this release, you had a lot of files in the File Explorer and now with this release, you see your files in the File Explorer — but Remix is acting strangely, you probably should click this button. When Remix migrated your files to indexedDB, it did not erase them, it copied them. So they are sitting there in localstorage, unused and taking up space. So clicking this button will free up the localstorage.

Of course, if you have any doubts, make sure you have either downloaded the backup of your workspaces or have pushed your work to an external repo.

JS Unit Testing with Mocha

You can now use the Chai assertion library with the Mocha unit testing framework in Remix. See the Remix docs for more instructions as well as info about JS unit testing.

Try it out! Create a .js testing file in the File Explorer. Just for organizing your workspace, put it in the scripts folder. Write your tests like these:

And then run the tests by right clicking on the .js file in the File Explorer to get the context menu and then selecting Run.

Looking to test with functions from Hardhat’s plugin hardhat-ethers? Groove on this:

Remix now supports methods of hardhat-ethers plugin of Hardhat framework. For a list of the specific functions from this plugin that Remix supports, please check here.

Solidity Compiler & Hardhat integration

By default, in the Settings panel, the generate contract metadata is selected. When it is selected, Remix will generate the contract’s metadata and will put these .json files in the artifacts folder. With this release, Remix will also generate a build_info folder that stores the same information that would have been generated if the file was compiled with Hardhat.

Debugging Transactions of Verified Contracts

You can debug a transaction of a verified contract in Remix. In this release, we search both Sourcify and Etherscan for the sourcecode.

If located, Remix will fetch the file and store it in the File Explorer.

When you go through the debugger, Remix will open the code in the Editor with source highlighting.

But remember, before Remix will fetch the file, you have to select the right Environment in the Deploy & Run plugin, and you have to select the right network in Metamask. And if Remix is fetching the file from Etherscan, you need to put in your Etherscan API key in the Settings panel.

Import solidity standard json files via a URL param

You can now use the URL parameter: url to import a file and open it in the Editor.

https://remix.ethereum.org/#url=https://raw.githubusercontent.com/ryestew/nasalNFT/master/contracts/nasalNFT.sol

Thanks to kvhnuke for this PR!

A Shoutout to our BetaTesters!

Special thanks also goes out to our volunteer group of official beta testers for this release. They raised relevant GitHub issues, and their diligence made the release process go much more smoothly to the ultimate benefit of the entire Remix community. They will be rewarded with the official “Remix Beta Tester” role for v0.22.0.

If you are interested in becoming a beta tester, or in participating in our ongoing UX research program, please fill out this form, and we will be in touch.

Remix at Devconnect in Amsterdam

On Friday April 22, Remix will be hosting an event at Devconnect, Game Day Remix. All experience levels are welcome. Attendees will be able to Ask Remix Anything, and play the Remix virtual obstacle course through smart contract development. You’ll learn some Remix tricks on the way to helping our UX research, and earn a Remix Devconnector badge, with additional rewards when everyone finishes the 2-hour journey. Your ticket also includes entry to Devconnect Happy Hour right afterward. Free to participate, but attendance is capped at 40. To reserve your spot, track the Devconnect schedule for updates and ticketing.

Thank You Glorious Users

Please report any problems you find in Remix. Also please send us your suggestions about any changes you’d like to see in Remix, or any functionality you think would be useful to add.

For future releases, we are looking for more Beta Testers. If you are interested in helping this effort please fill out this questionnaire.

We strive to make the Remix IDE more convenient and easy to use. You can reach us on Twitter, Gitter, or via email (remix@ethereum.org) or Discord.
TIA!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store