
A tool to increase your Smart Contract development productivity.
In order to help developers around the globe develop Smart Contracts the Foundation sponsored the Remix IDE ( ) . For whom might not know yet, Remix is a online IDE for Smart Contracts development using Solidity.
However, a Smart Contract project includes not only the Smart Contract source code itself but testing, versioning and deploying tools and other artifacts. Mostly these artifacts are managed and built using other IDEs as Visual Studio Code, Atom or vim. You can use these IDEs to write your Solidity code but they does not have the same support and tooling to deal with complexities as Remix has.
So, how to use the best of both worlds? That where Remixd ( https:// ) comes in. It is a small javascript service that connects a browser with Remix page opened to local filesystem via websocket. As you write your Solidity code in Remix is automatically saved in your filesystem where your Visual Studio Code is pointing out.
In order to use it you must have node.js and npm installed and working. But important! Your node version must be the LTS (when this article was written it was 10.x). The latest version is not supported.
To install remixd open your favorite terminal and run:
$ npm install remixd -g
Access the directory where your want to your Smart Contracts and runs:
$ remixd --remix-ide -s ./
It will start a websocket service allowing the connection from your browser opened at page ( see – -remix-ide parameter) to your local filesystem at current directory ./ ( see -s parameter ) in port 65520
You should see logs similar to this in your terminal:
Now open your browser and access Remix IDE.
At top left column click at localhost connection button.
A window explaining how it works is shown. Click at ‘Connect’ link to start the connection between your browser and remixd service.
After click on it the localhost set of files is shown at Remix’s left column. If there are files on the directory you choose on remixd service start they are going to be shown now.
Select a file and change it. Later open the directory using your favorite IDE (e.g. Visual Studio Code) and see the changes performed. In Visual Studio Code opens the integrated terminal and try to execute a command as:
$ git add Registro.sol
Voilà! Now your Remix online IDE is integrated with your favorite IDE.
Happy coding 😉
PS.: Thanks Fabio Hildebrand for introducing me to remixd
Published at Tue, 14 May 2019 12:29:18 +0000