Remix Release v0.31.0 — a Forking Good Time

Rob Stupay
Remix Project
Published in
5 min readMar 1, 2023

When you come to a fork in the road, take it.
- Yogi Berra

The Big News

  • Chain Forking! Fork a chain and play with it on the Remix VM. Works for Ethereum Mainnet, testnets, or the chain of your choice, all at the block number of your choice.
  • New Proxy Contract Upgrade checks
  • Download files and folders with a right-click
  • Zooming on UML diagrams
  • New version of Remixd v0.6.12 — DOWNLOAD IT NOW!
    npm install -g @remix-project/remixd

Forking

You can now fork chains so that you can play with them on the Remix VM. This is a great technique if you want to develop a contract that interacts with deployed contracts on Mainnet. By forking Mainnet to the Remix VM local chain, you can experiment more effectively in a local environment with test ETH.

To fork, go to the Environment select box of the Deploy & Run module.

You’ll see the four fork choices. When you select Mainnet, Sepolia, or Goerli fork, the chosen chain will load into Remix. It may take some time to load, depending on your connection speed. Once loaded, you’ll see ten accounts loaded with 100ETH each.

Careful though. If you refresh the browser, you’ll lose the forked chain.

Custom fork — Remix VM

When you choose the Custom fork a modal will pop up.

You can get the Node URL from chainlist.org. If the chain does not load, you may need to choose a different RPC server. You will also need to choose an EVM version appropriate to the block number. So if you choose a very old block number, the EVM with the Merge “flavor” won’t work because this version of the EVM came out later.

New Checks for Proxy Contract Upgrades

Updates to Handling Proxy Contracts

Remix has a UI for dealing with upgradeable contracts using the UUPS design pattern. For more info about using Proxy contracts on Remix see our docs.

As of this release, Remix saves a list of the previously deployed proxy contracts.

As you can see above, Remix displays previously deployed contracts that use this pattern. On rollover, the tooltip will show the date of the deployment. This information is deployed in the .deploys folder in the File Explorer.

Remix saves the storage layout and compiler solc inputs of all UUPS deployments.

New Checks

Now that the previously deployed upgradeable contracts are being saved, Remix can make some tests to ensure that you are upgrading the right contract.

Remix checks the .deploys folder, and if it finds the contract, a comparison is made with the upgrade. If there is an incompatibility, a warning modal containing a list of the issues will pop up before the new contract deploys:

If the previous contract is not in the .deploys folder, Remix cannot make the comparison, so this warning will pop up:

This warning simply means that Remix cannot make the comparison because the previous contract is not in the .deploys folder. It might be a perfectly good upgrade. Indeed, everyone who has made upgradeable contract deployments before this release will get this warning.

Lastly, we have a simple check that makes sure a contract’s address is valid. If it isn’t, you’ll get this warning:

More Updates to the Environments Select Box

The Environments select box has been updated and the code has been refactored.

File Explorer Updates

Backup a File or Folder by Right-clicking on it

Now when you right-click on the name of a file or a folder (but not the icon) you’ll get this popup menu:

Selecting Backup will download the file or folder to your computer.

An Update to Generate UML in the FE Right-click Menu

In this release, you can now zoom in, move around the diagram, and zoom out. Click the reset button to restore the original zoom level.

More updates are coming, so watch this space!

Warning When Updating a File Outside of Remix

As I hope you all know, Remixd connects a folder on your computer to Remix and that you can connect to it by going to -connect to localhost- in the Workspaces select box in the File Explorer. And, if you didn’t know that, now you do. To find out more, see the docs.

But before I get to the new update, please download the latest version of Remixd v0.6.12: npm install -g @remix-project/remixd

Now when Remixd is running (so a folder on your hard drive is connected with Remix) and when you update a file in this shared folder from a tool outside of Remix, a warning will pop up:

Sol Compiler

The default Solidity Compiler is now v0.8.18.

In the Compiler’s Advanced Configurations section, we have also added the Paris EVM.

Fixes

Flattener is updated. Calculation of gas execution costs has also been fixed. And, in the FUNCTIONHASHES section of the Compilation Details modal, the function hashes are now displayed.

Thanks You Wondrous Users

Please report any problems you find in Remix. Also, as always, please send 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 are migrating our community channels off Gitter and on to Discord. Although we still follow the discussions on Gitter (now through Matrix), we encourage you to move over to our Discord server. Or send us an email at remix@ethereum.org!

--

--