← ClaudeAtlas

ekx-hardhatlisted

Solidity development with Hardhat as used in our older contract repos — hardhat.config.ts network setup, TypeChain typings, ethers-based tests with chai matchers, gas reporting, coverage, Hardhat Ignition deployments and Etherscan verification. Use when a repo has hardhat.config.ts rather than foundry.toml, or when deciding whether to migrate a Hardhat repo to Foundry.
Ekinoxis-evm/claude-skills · ★ 0 · AI & Automation · score 60
Install: claude install-skill Ekinoxis-evm/claude-skills
# Hardhat Used in the two older contract repos, and alongside Foundry elsewhere for scripting and verification. **For new contract repos, prefer Foundry** — see [`../ekx-foundry/SKILL.md`](../ekx-foundry/SKILL.md). Hardhat stays where it already is, and where we need its JS ecosystem (Ignition, TypeChain typings consumed directly by a Next.js frontend). Docs: https://hardhat.org/docs --- ## Config A config trimmed to the shape we use: ```ts import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; const config: HardhatUserConfig = { solidity: { version: "0.8.24", settings: { optimizer: { enabled: true, runs: 200 } }, }, networks: { base: { url: process.env.BASE_MAINNET_RPC_URL || "https://mainnet.base.org", chainId: 8453, accounts: [process.env.DEPLOYER_PRIVATE_KEY!] }, baseSepolia: { url: process.env.BASE_SEPOLIA_RPC_URL || "https://sepolia.base.org", chainId: 84532, accounts: [process.env.DEPLOYER_PRIVATE_KEY!] }, localhost: { url: "http://127.0.0.1:8545", chainId: 1337 }, }, etherscan: { apiKey: { base: process.env.BASESCAN_API_KEY!, baseSepolia: process.env.BASESCAN_API_KEY! } }, gasReporter: { enabled: process.env.REPORT_GAS === "true", currency: "USD" }, }; export default config; ``` Guard the `accounts` array — `[undefined!]` crashes the whole config load, so every command fails even ones that need no key. Prefer `accounts: process.env.DEPLOYER_PRIVATE_KEY ? [process.env.DEPLOYER_PR