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. 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.
Prerequisites
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.

Fund Your Hedera Testnet Account
Navigate to the Hedera Faucet to get testnet HBAR tokens necessary for deploying a smart contract.
Deploy a Smart Contract Using Remix
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.

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 aboutsolc
compiler version, compiler input and output. This file is generated similar to the files generated through Hardhat compilation. You can also try Hardhat compilation from Remix.

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.

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.

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.

View Contract Details on HashScan Network Explorer
Copy the contract address from the Deployed Contracts window.

Navigate to the HashScan network explorer and use the contract address to search for your contract to view the details.

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.
Additional Resources
Last updated
Was this helpful?