Skip to main content

Using Hardhat

Hardhat is a development environment used for smart contract compiling, deploying, testing and debugging.

Get started with Hardhat for general installation and overview.

Config Hardhat for Gnosis

Update the config with Gnosis networks, check the highlighted lines for instructions:

import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";


//Note: keep your mnemonic and private keys securely
//Read more:
//1) You can configure private keys or mnemonic:
//let accounts = ["your private key here"]
let accounts = { mnemonic: "your mnemonic here", }

const config: HardhatUserConfig = {
solidity: "0.8.17",
//2) select the default network "gnosis" or "chiado"
defaultNetwork: "gnosis",
networks: {
hardhat: {
gnosis: {
url: "",
accounts: accounts,
chiado: {
url: "",
gasPrice: 1000000000,
accounts: accounts,
etherscan: {
customChains: [
network: "chiado",
chainId: 10200,
urls: {
apiURL: "",
browserURL: "",
network: "gnosis",
chainId: 100,
urls: {
// 3) Select to what explorer verify the contracts
// Gnosisscan
apiURL: "",
browserURL: "",
// Blockscout
//apiURL: "",
//browserURL: "",
apiKey: {
//4) Insert your Gnosisscan API key
//blockscout explorer verification does not require keys
chiado: "your key",
gnosis: "your key",

export default config;

Compile your contract

npx hardhat compile

Deploy your contract

Gnosis Mainnet
npx hardhat run scripts/deploy.ts --network gnosis
Chiado Testnet
npx hardhat run scripts/deploy.ts --network chiado

View your deployed contract on any of the explorers.

Visit our Tools page for other support.

Verify Contract

npx hardhat verify --network chiado <deployed contract address>

Visit our Contract Verification Page for more documentation on verification tools.

Additional Hardhat Documentation

  • Additional Hardhat deployment documentation is located here.