For the complete documentation index, see llms.txt. This page is also available as Markdown.

Deploy Smart Contract On Ethereum

This guide covers adding the network to a browser wallet, then deploying a simple contract using Foundry and Hardhat — pick whichever you prefer.

Ethereum is the reference EVM chain, so smart contracts written in Solidity or Vyper deploy without modification using standard tooling: Foundry, Hardhat, or Remix.

Prerequisites

Before deploying, you'll need:

  • A wallet with ETH on the target network for gas. See Add Network to Your Wallet below.

  • A GetBlock access token — sign up at Dashboard and create an Ethereum endpoint in the dashboard. Every code sample below uses <ACCESS-TOKEN> as the placeholder.

  • Node.js 20 or newer installed (for Hardhat).

  • A funded deployer address. For testnets, use the faucet page

Network Details

Property
Ethereum Mainnet
Sepolia Testnet
Hoodi Testnet

Chain ID

1 (0x1)

11155111 (0xaa36a7)

560048 (0x88bb0)

RPC URL

https://go.getblock.io/<ACCESS-TOKEN>/

https://go.getblock.io/<ACCESS-TOKEN>/

https://go.getblock.io/<ACCESS-TOKEN>/

Currency Symbol

ETH

ETH

ETH

Ethereum Mainnet and Sepolia are pre-configured in MetaMask by default. Use the button below only if you want to route MetaMask through GetBlock's RPC endpoint instead of the default provider. Hoodi is not pre-configured and must be added manually or via the button below.

Add Network to Your Wallet

If the automatic button isn't available or the request is rejected, add the network manually:

  1. Open MetaMask (or your EVM wallet of choice).

  2. Click the network dropdown at the top of the wallet.

  3. Click Add networkAdd a network manually.

  4. Enter the network details from the Network Details table above.

  5. Save and switch to the newly added network.

How to Deploy a Smart Contract

Foundry is a fast, minimal Solidity toolchain. It's the recommended path if you want deterministic, script-based deployments without any Node.js dependencies.

1

Install Foundry

If Foundry is already installed, skip this step:

2

Create a project

3

Create a contract

Create src/HelloEthereum.sol with the following content:

4

Deploy

Set environment variables, then deploy:

The command prints the deployed contract address on success.

5

Verify on Etherscan

Etherscan uses a unified V2 API across all Ethereum networks. Get an API key from etherscan.io/apis, then:

For Sepolia use --chain-id 11155111; for Hoodi use --chain-id 560048. After verification, view your contract at https://etherscan.io/address/<contract_address> (or the corresponding testnet explorer).

Hardhat is a JavaScript/TypeScript-based smart contract framework. It's the recommended path if your project already uses Node.js tooling and you want tight integration with test suites, plugins, and TypeScript typings.

1

Create a project

Initialize your environment and Hardhat project:

Select Create a JavaScript project (or TypeScript if preferred) when prompted.

2

Configure Ethereum networks

Update hardhat.config.js with the network settings and Etherscan API for verification:

Set your environment variables before proceeding:

3

Create a contract

Create contracts/HelloEthereum.sol:

4

Compile and Deploy

Create scripts/deploy.js:

Compile and deploy:

5

Verify on Etherscan

After verification, view your contract at the corresponding block explorer:

  • Mainnet: https://etherscan.io/address/<contract_address>

  • Sepolia: https://sepolia.etherscan.io/address/<contract_address>

  • Hoodi: https://hoodi.etherscan.io/address/<contract_address>

Last updated

Was this helpful?