Remix IDE now has a plugin for WalletConnect

Rob Stupay
Remix Project
Published in
4 min readMay 20, 2021

WalletConnect is a protocol for connecting DApps to mobile wallets with QR codes.With the WalletConnect plugin, you can connect Remix IDE to a wallet on your phone.

Why is this exciting?

  • Remix-Desktop users can now deploy & make transactions on public networks!
  • DApp devs can now mimic how users pay for transactions on mobile devices!

Connecting your mobile wallet and Remix happens in Deploy & Run

By default, in Deploy & Run’s Environment section, there are three choices: the JSVM — for in browser test chain, Injected Web3 — typically to access the MetaMask browser plugin, or Web3 Provider to access either a local node or a specific node.

Since Remix IDE release 0.10.5, plugins can add additional environments. And that is what the WalletConnect plugin does.

Remix Desktop users can now deploy a contract to a public testnet

Because Remix Desktop is not a browser based app, it cannot access browser plugins — like MetaMask. And without Metamask, deploying to a public testnet or to the mainnet has been a bit of a challenge.

But now, with the WalletConnect plugin, deploying to public chains is possible. To use this plugin, you’ll need:

  • a WalletConnect compatible wallet that has access to the public test nets
NOTE: While there are many WalletConnect compatible wallets, there are not that many that can connect to a testnet. One such wallet is the MetaMask mobile wallet — which I’m using for this article.

Setup

  • Load the MetaMask mobile wallet or another suitable wallet onto your phone.
  • Get some test ether on that wallet on the network of your choice.
  • Go to the wallet and make sure the testnet (or mainnet) you want to use is the active one.
NOTE: It is advisable to choose the network before connecting with WalletConnect because switching networks can be problematic.

Then

  • Go to the Plugin Manager and activate the WalletConnect plugin.
  • The WalletConnect is a main panel plugin — so it will appear in a tab in Remix’s editor.
  • Click the Connect to a wallet button

You’ll be presented with a list of compatible wallets.

  • Select WalletConnect.
  • Then you will get at QR code screen:
  • Scan with the wallet.
  • Your wallet will ask you to approve the connection
  • Then, on the Remix side, you’ll see the WalletConnect plugin now shows the wallet’s address:

We have an account and a network, so let’s deploy a contract.

Deploy with the WalletConnect environment selected…. Well actually, I got a bit ahead of myself…you can’t deploy anything until you select a file in the File Explorer and then compile it.

Then in the Deploy & Run module, choose the Wallet Connect in the Environment section.

The network you are connected to will be shown in a “badge” below the Environment. Your wallet’s address will be shown in the Account section.

Now hit the Deploy button. In this example, I’m using the default file 2_Owner. In the the terminal I see:

creation of Owner pending...

I go over to my phone which has gone to sleep and wake it up and then go to the wallet and I see:

I confirm it. Then on the Remix side I see the transaction has gone through!

A Few Details & Coming Attractions

We have deployed our own bridge to WalletConnect — so it should be a pretty fast and stable connection. Nevertheless, if you want to change networks, you should disconnect from WalletConnect, then change the network on your phone and finally reconnect.

Remix in VSCode

Remix has a VSCode extension — so you can run Remix inside of VSCode. The current version does not include the Deploy and Run plugin.
For more info on our VSCode extension, please check our post about it.

But soon, we will be hooking up WalletConnect and Deploy & Run — so that you can make transactions on public chains with Remix inside of VSCode.

When its ready, we’ll be making announcements on twitter and on our gitter channel as well as writing a post here in our medium publication.

Thank You Esteemed Users

If you have any difficulties, you can reach us on Twitter & Gitter.

--

--