How to Use Remix

Remix IDE

This tutorial shows how to use Remix IDE. Remix IDE is an online IDE for developers to develop, test and deploy smart contracts.
You can choose different solidity compiler versions on Remix. We recommend to use newer stable versions such as v0.8.7. You can also choose whether to enable Auto compile and other settings.
You can choose different environment on Remix, there are built in VMs as well as providers to connect to external VMs. For our specific purpose, we choose Injected Provider - Metamask in this tutorial. Please make sure your MetaMask wallet is switched to Core TestNet and the account is funded from the faucet. You can find instructions from User Guide for Core TestNet.
You will be asked to connect to MetaMask. Once connected, Remix shows the connected address and the amount of CORE on the address.

Compile and Deploy Smart Contract

We use the 1_Storage.sol contract to show the process.
Switch to the SOLIDITY COMPILER tab on the left, click the blue Compile button. If you enabled Auto compile in the previous step, it is already compiled. Switch to the DEPLOY & RUN TRANSACTIONS tab, click the deploy button. Metamask will pop up for you to sign the deploy transaction on Core TestNet.
Once the contract is successfully deployed, you will receive a message on the console.

Read/Write Smart Contracts

You can then read/write the smart contract from remix directly. Find the newly deployed contract on Deployed Contracts on the left bottom, input 100 and click the store button. Remix invokes MetaMask again to sign the transaction.
After you successfully write the data to the smart contract, you can call the retrieve button to read the new value. You will notice that the value has been successfully updated. Note that MetaMask will not be invoked when you read from a smart contract because that gas is only consumed when you change the state inside a smart contract.

Core Scan

Copy the contract address from Remix and search it on Core Scan. You can find all information of this contract.