> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hedera.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deploy a Smart Contract with Remix

> A step-by-step tutorial on how to create and deploy a smart contract on the Hedera network using Remix IDE.

## Introduction to Remix IDE

Remix IDE is an open-source tool for developing smart contracts in Solidity. It was originally built for the Ethereum network and supports deploying to EVM-compatible networks like Hedera. Remix includes built-in tools for compiling, debugging, and deploying contracts directly from the browser.

In this tutorial, you’ll use Remix IDE to write and deploy a simple smart contract to the Hedera testnet.

<Tip>
  **Developing or running CI?** [Solo](https://solo.hiero.org/docs/) runs a full Hedera network locally, no testnet rate limits, faucet, or resets, and works with the same EVM tooling. See the [Solo quickstart](https://solo.hiero.org/docs/simple-solo-setup/quickstart/) and [Using Solo with EVM tools](https://solo.hiero.org/docs/using-solo/using-solo-with-evm-tools/).
</Tip>

***

## Prerequisites <a href="#prerequisites" id="prerequisites" />

* Web browser with access to [Remix IDE](https://remix.ethereum.org/)
* [Download](https://metamask.io/download/) the MetaMask wallet browser extension

***

## Add Hedera Testnet to MetaMask

Smart contracts deployed on Hedera are compatible with EVM wallets like MetaMask. To interact with the network, you must first add Hedera’s JSON-RPC endpoint as a custom network in your wallet. Click on the button below for a one-click configuration.

<Card title="ADD HEDERA TESTNET" href="https://chainlist.org/chain/296/" icon="plus-large" horizontal />

{" "}

<Frame>
  <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-1.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=925967e213c7a8a7c46efb036a202637" width="740" height="992" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-1.png" />
</Frame>

<Accordion title="Alternatively, manually add Hedera's JSON-RPC endpoint ↓ ">
  1. Open MetaMask and click the network selection dropdown at the top of the extension.

  2. Click **Add Network**, then **Add Network Manually**

  3. Enter the following network details:
     * **Network Name**: Hedera Testnet
     * **New RPC URL**: `https://testnet.hashio.io/api`
     * **Chain ID**: `296`
     * **Currency Symbol**: `HBAR`
     * **Block Explorer URL**: `https://hashscan.io/testnet`

  4. Tap the **Save** button to save the Hedera Testnet
</Accordion>

***

## Fund Your Hedera Testnet Account

Navigate to the [Hedera Faucet](https://portal.hedera.com/faucet) to get testnet HBAR tokens necessary for deploying a smart contract.

***

## Deploy a Smart Contract Using Remix

<Steps>
  <Step title="Open Remix and Create Contract">
    Open your web browser and navigate to Remix IDE. Click on the file icon in the **File Explorer** tab to create a new file and name it `HelloHedera.sol` .

    <div align="left">
      <Frame>
        <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-2.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=779374418180d7ded483b3736b56df35" width="926" height="868" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-2.png" />
      </Frame>
    </div>
  </Step>

  <Step title="Add Contract Code">
    Copy and paste this sample contract to the new file you created:

    ```solidity HelloHedera.sol theme={null}
    //SPDX-License-Identifier: MIT

    pragma solidity ^0.8.22;

    contract SampleContract {
        string public myString = "Hello Hedera";

        function updateString(string memory _newString) public {
            myString = _newString;
        }
    }
    ```
  </Step>

  <Step title="Compile the Contract">
    Navigate to the **Solidity Compiler** tab in the left sidebar and check that your compiler version is within the versions specified in the `pragma solidity` statement. Then, compile your `HelloHedera.sol` contract.

    <Frame>
      <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-3.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=18c497d15023ba2412c1bbcd1f2598b8" width="2270" height="1486" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-3.png" />
    </Frame>

    When a compilation for a Solidity file succeeds, Remix creates three JSON files for each compiled contract. **Files can be seen in the `File Explorers plugin` as:**

    * *`artifacts/<contractName>.json`: contains the link to the libraries, the bytecode, the deployed bytecode, the gas estimation, the method identifiers, and the ABI. It is used for linking a library address to the file.*
    * *`artifacts/<contractName_metadata>.json`: contains the metadata from the output of Solidity compilation.*
    * *`artifacts/build-info/<dynamic_hash>.json`: contains info about `solc` compiler version, compiler input and output. This file is generated similar to the files generated through Hardhat compilation. You can also try* [*Hardhat compilation*](https://remix-ide.readthedocs.io/en/latest/hardhat.html#enable-hardhat-compilation) *from Remix.*

    <Frame>
      <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-4.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=a44f11ded31ab2f889c62001ec5ed03e" width="1062" height="300" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-4.png" />
    </Frame>

    <Info>
      *Please note that to generate these artifact files, the **Generate contract metadata** box in the **General settings** section of the **Settings** module needs to be checked. By default, it is checked.*
    </Info>
  </Step>

  <Step title="Deploy to Hedera testnet">
    * Go to the **Deploy & Run Transactions** tab and
    * Select **Injected Provider - MetaMask** as the environment

    If you're not signed into your MetaMask account, a window will pop up prompting you to log in. Sign in and make sure you're connected to the **Hedera Testnet** and verify that the network is configured correctly to **Custom (296) network**.

    <Frame>
      <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-5.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=253b097b4251845def51f69dfd995954" width="1676" height="1262" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-5.png" />
    </Frame>

    Once you click **Deploy** in the **Deploy & Run Transactions** tab, hit **Confirm** in the MetaMask notification window to approve and pay for the contract deployment transaction.

    <Frame>
      <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-6.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=4f6c58b3382569034689d763a7332791" width="2282" height="1422" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-6.png" />
    </Frame>
  </Step>

  <Step title="Interact with the Smart Contract on Hedera">
    Once the transaction is successful, you can interact with the smart contract through Remix. Select the dropdown on the newly deployed contract at the bottom of the left panel to view the contract's functions under **Deployed Contracts**. Write a new message to the `updateString` function using the input and confirm the write transaction in the MetaMask window to pay.

    <div align="left">
      <Frame>
        <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-7.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=68f164dafae26ac6613e5a0fd0700a56" width="808" height="850" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-7.png" />
      </Frame>
    </div>
  </Step>

  <Step title="View Contract Details on HashScan Network Explorer">
    Copy the contract address from the Deployed Contracts window.

    <div align="left">
      <Frame>
        <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-8.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=53edf65cf6bffece9c7c9517138ceda4" width="1034" height="346" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-8.png" />
      </Frame>
    </div>

    Navigate to the [HashScan](https://hashscan.io/) network explorer and use the contract address to search for your contract to view the details.

    <div align="left">
      <Frame>
        <img src="https://mintcdn.com/hedera-0c6e0218/h9jV0CleNbqsy3H_/images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-9.png?fit=max&auto=format&n=h9jV0CleNbqsy3H_&q=85&s=be7e1959454a5054d127d4e7be1a143f" width="3136" height="2222" data-path="images/getting-started-evm-developers/deploy-a-smart-contract-using-remix/deploy-a-smart-contract-using-remix-9.png" />
      </Frame>
    </div>
  </Step>
</Steps>

**Congratulations 🎉 Your smart contract is live on Hedera testnet!**

You've successfully:

* Configured MetaMask for Hedera testnet
* Created and funded a testnet account
* Deployed a smart contract using Remix
* Interacted with it on the Hedera testnet

***

## Next Step: Verify Your Smart Contract

If you're up for it, you can verify your deployed contract using the Smart Contract Verifier tool on HashScan network explorer.

<Card title="How To Verify A Smart Contract On Hashscan" href="/evm/tutorials/intermediate/verify-hashscan" />

***

## Additional Resources

* [**Remix IDE Documentation**](https://remix-ide.readthedocs.io/en/latest/)
* [**Hedera Contract Builder**](https://portal.hedera.com/contract-builder)
* [**Smart Contracts Documentation**](/learn/core-concepts/services/smart-contracts)

<Columns cols={2}>
  <Card title="Writer: Krystal, Senior DX Engineer" arrow>
    [GitHub](https://github.com/theekrystallee) |
    [X](https://x.com/theekrystallee)
  </Card>
</Columns>
