Skip to Content

👨🏻‍🎓 Register for live classes

Remix

Remix

Remix is an online web tool. It is an IDE (Integrated Development Environment) used to write, compile, deploy and debug Solidity code. Can be connected with Metamask and used to deploy smart contracts to both the RSK Testnet and Mainnet.

Go to remix.ethereum.org

remix.ethereum.org

In home / welcome page, select environment Solidity

Remix environment Solidity

Terminal

On the right below side of Remix is located a terminal including some libraries.

You can send commands and transactions over there. This part also presents the result of transactions / calls to smart contract functions.

This section is very important to follow results!

remix terminal

Compilador Solidity

In the 3rd button at left side click on Solidity compiler.

remix solidity compiler

It is useful to enable auto-compile in order to compile smart contracts automaticallywhile editing in Remix.

auto-compile

JavascriptVM

On the left side, click Deploy and run transactions, it is the fourth button.

deploy and run transactions

Remix has the envirnment JavaScriptVM, a Blockchain simulator running in browser memory.

JavaScriptVM

Accounts

This Blockchain simulator has several addresses / accounts funded with fictitious Ethers that we can choose to publish a smart contract or interact with it.

Here is an example of the account list:

account

In some versions of Remix, the list of accounts is changed every time you start Remix or refresh the page.

Web3 Providers

Web3 Injected

Web3 Injected is a web3 provider injected by a browser plugin such as MetaMask or Nifty .

Connect Remix to RSK Testnet

First of all, be sure that you selected the RSK network selected the web wallet, Nifty or Metamask...

Then, in Remix, on the left side, locate the fourth button: Deploy and run transactions.

Deploy and run transactions

In Environment, choose Injected Web3.

Injected Web3

Injected Web3 connects Remix with the active account on the web wallet.

At Metamask

If you are using Metamask, a popup window will open to authorize the connection.

First, select the account and click the Next button. You probably only have one, and in the other window, click the Connect button.

Metamask select accounts

Metamask connect

Remix conected

In Remix, in Deploy and run transactions, look at the Custom Network.

Injected Web3 - ChainID 31

ChainID 31 was defined at RSK Testnet custom network in Nifty / Metamask.

Final considerations

Done! Now it is possible to publish any smart contract on RSK network.

In the next lesson you will create your first smart contract :)