Skip to content

w3hc/w3hc-hardhat-template

Repository files navigation

W3HC Hardhat Template

A comprehensive Solidity contract development environment using Hardhat.

Features

Supported Networks

Network Chain ID Documentation
Optimism Mainnet 10 Documentation
Base Mainnet 8453 Documentation
Arbitrum One 42161 Documentation
Sepolia Testnet 11155111 Documentation
OP Sepolia Testnet 11155420 Documentation
Base Sepolia Testnet 84532 Documentation
Arbitrum Sepolia 421614 Documentation

Contract Verification

Network Explorer URL API URL API Key Variable
Optimism https://optimistic.etherscan.io https://api-optimistic.etherscan.io/api OP_ETHERSCAN_API_KEY
Base https://basescan.org https://api.basescan.org/api BASE_ETHERSCAN_API_KEY
Arbitrum One https://arbiscan.io https://api.arbiscan.io/api ARBITRUM_ETHERSCAN_API_KEY
Sepolia https://sepolia.etherscan.io https://api-sepolia.etherscan.io/api ETHERSCAN_API_KEY
OP Sepolia https://sepolia-optimism.etherscan.io https://api-sepolia-optimistic.etherscan.io/api OP_ETHERSCAN_API_KEY
Base Sepolia https://sepolia.basescan.org https://api-sepolia.basescan.org/api BASE_ETHERSCAN_API_KEY
Arbitrum Sepolia https://sepolia.arbiscan.io https://api-sepolia.arbiscan.io/api ARBITRUM_ETHERSCAN_API_KEY

Manual Contract Verification

npx hardhat verify --network <NETWORK_NAME> <CONTRACT_ADDRESS> "10000000000000000000000"

Where:

  • <NETWORK_NAME>: optimism, base, arbitrum, sepolia, op-sepolia, base-sepolia, arbitrum-sepolia
  • <CONTRACT_ADDRESS>: The address where your contract was deployed

Installation

  1. Install dependencies:
pnpm install
  1. Configure environment:
cp .env.template .env
  1. Update .env with your configuration.

Usage

Testing

Execute the test suite:

pnpm test

Deployment

Deploy to supported networks:

pnpm deploy:<network>

Supported values for <network>: optimism, base, arbitrum, sepolia, op-sepolia, base-sepolia, arbitrum-sepolia

Network Operations

Check wallet ETH balances:

pnpm bal

Mint tokens:

pnpm mint:<network> <amount>

Transfer tokens:

pnpm send:<network> <amount>

Core Dependencies

Support

Feel free to reach out to Julien on Farcaster, Element, Status, Telegram, Twitter, Discord, or LinkedIn.