Skip to main content

Remix

In this tutorial, we'll walk through creating a basic Remix project and deploying a sample contract.

Prerequisites​

Before you begin, ensure you've:

  1. Set up your wallet
  2. Funded your wallet with Linea ETH on either the testnet or mainnet

Explore the Remix workspace​

In order to start using Remix, navigate to their website. Their UI includes a brief "Get Started" section if you want to familiarize yourself with the UI and learn how to create a new workspace.

The default project includes a code sample with a configured smart contract.

Remix configured smart contract code

Compile a Remix contract​

To compile this sample contract, navigate to the "Solidity compiler" icon, and click on "Compile contract".

Remix compile contract

Deploy the contract​

In order to deploy your contract with Remix, you need to configure the environment.

If you deploy using the injected provider, Remix can auto-detect the network you're on and your account information. First, navigate to the "Deploy & run transactions tab."

caution

The public endpoints are rate limited and not meant for production systems. To use Infura, you'll need to get an API key. You can then manually add a network to your MetaMask wallet with the mainnet information found here.

Switch to the Linea Mainnet network in your MetaMask wallet, and select "Injected provider - MetaMask" in your Remix configuration.

Remix deploy contract

Then, click "Deploy" and confirm the transaction.