mirror of
https://github.com/placeholder-soft/web.git
synced 2026-06-15 17:38:21 +08:00
1.6 KiB
1.6 KiB
title, slug, description, keywords
| title | slug | description | keywords | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Hardhat | /tools/hardhat | Documentation for configuring Hardhat for smart contract development on Base, including setup instructions for mainnet, testnet, and local development environments. |
|
Hardhat
Hardhat is an Ethereum development environment for flexible, extensible, and fast smart contract development.
You can use Hardhat to edit, compile, debug, and deploy your smart contracts to Base.
Using Hardhat with Base
To configure Hardhat to deploy smart contracts to Base, update your project’s hardhat.config.ts file by adding Base as a network:
networks: {
// for mainnet
"base-mainnet": {
url: 'https://mainnet.base.org',
accounts: [process.env.PRIVATE_KEY as string],
gasPrice: 1000000000,
},
// for Sepolia testnet
"base-sepolia": {
url: "https://sepolia.base.org",
accounts: [process.env.PRIVATE_KEY as string]
gasPrice: 1000000000,
},
// for local dev environment
"base-local": {
url: "http://localhost:8545",
accounts: [process.env.PRIVATE_KEY as string],
gasPrice: 1000000000,
},
},
defaultNetwork: "base-local",
:::info
For a complete guide on using Hardhat to deploy contracts on Base, see Deploying a Smart Contract.
:::