Deploy Your First Smart Contract - 2026 Step by Step

Deploy Your First Smart Contract - 2026 Step by Step

DevTools Store

Deploy Your First Smart Contract (2026)

Complete step-by-step: ERC-20 token to Ethereum mainnet.

1. Install Foundry

curl -L https://foundry.paradigm.xyz | bash
foundryup

2. Create Project

forge init my-token && cd my-token

3. Write Token Contract

pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
    constructor(uint256 supply) ERC20("MyToken","MTK") {
        _mint(msg.sender, supply * 10 ** decimals());
    }
}

4. Install Dependencies

forge install OpenZeppelin/openzeppelin-contracts

5. Test

forge test -vvv

6. Deploy Sepolia

forge create --rpc-url https://rpc.sepolia.org 
  MyToken --constructor-args 1000000

7. Deploy Mainnet

forge create --rpc-url https://ethereum-rpc.publicnode.com 
  MyToken --constructor-args 1000000

Always audit before mainnet deployment.


Skip Setup - Ready-Made Templates

15+ audited Solidity templates with deploy scripts, tests, React frontend. $1+.

Get Templates

Report Page