Skip to main content
Version: v1.1

Deploy a Smart Contract

You can deploy your smart contracts to any of your EVM chains using popular tools like Remix and Hardhat.

Get a Basic Contract

This guide will deploy the Counter contract you can find in the How to Create a Basic Solidity Contract Guide.

Deploying a Solidity smart contract using Remix is a straightforward process that doesn't require any installation or setup of development environments on your machine. Remix is a powerful, browser-based IDE that allows you to write, compile, and deploy smart contracts.

1. Connect to Metamask

Before you get started, make sure you have connected Metamask to your network of choice.

Networks & Endpoints

You can check the connection details in the Networks & Endpoints section.

2. Access Remix IDE

Open your web browser and navigate to Remix IDE.

3. Create Your Smart Contract

  1. In the File Explorer tab on the left, click the Create New File icon.
  2. Name your file Counter.sol.
  3. Copy the Solidity code for the basic counter smart contract and paste it into the Counter.sol file you just created in Remix.

4. Compile Your Smart Contract

  1. Navigate to the Solidity Compiler tab on the left sidebar.
  2. Select the appropriate compiler version that matches the version specified in your contract (^0.8.6 or similar). You might need to enable "Auto compile" or click the "Compile" button manually.
  3. If there are errors, Remix will display them, and you'll need to correct them before proceeding.

5. Deploy Your Smart Contract

  1. Switch to the "Deploy & Run Transactions" tab on the left sidebar.

  2. In the "Environment" dropdown, select and select Injected Web3 from the Environment dropdown.

    Select Injected Provider from the Environment dropdown

  3. After selecting the environment, make sure the contract Counter is selected in the Contract dropdown.

  4. Click the Deploy button. If you're using an Ethereum network, confirm the transaction in your Web3 wallet.

6. Interact with Your Deployed Contract

Once deployed, the contract instance will appear under the Deployed Contracts section. Here, you can interact with your contract by calling its functions. For the Counter contract, you'll see buttons to call its increment, decrement, and getCount functions directly from Remix.