Overview
Hedera exposes an EVM-compatible execution layer reachable via the JSON-RPC Relay (public Hashio endpoints per environment). Developers reuse standard Ethereum tooling (Hardhat, ethers.js) with caveats documented under Understanding Hedera's EVM Differences.
When to use this skill
- Wiring MetaMask / Hardware wallets using ECDSA accounts mapped to Hedera aliases.
- Estimating gas differences vs Ethereum baseline deployments.
Prerequisites
- EVM private key funded with HBAR on target network (converted to ECDSA account — follow portal docs).
- Node.js + repo
npm installfor Hardhat toolchain.
Workflow
Configure relay endpoint — set
JSON_RPC_URL(testnet defaults in references/hardhat-config.md).Compile — from repo root:
npx hardhat compile --config plugins/hedera-skills/skills/hedera-smart-contract-evm/hardhat.config.cjsDeploy — run
scripts/deploy.cjsper header comment in file.Interact — use ethers
Contractfacade against deployed address.Verify — follow Verifying Smart Contracts — typically Sourcify-style flows via Hashscan integrations (verify UI specifics periodically).
Large bytecode — review HIP-1086 Jumbo Transaction guidance for deploying contracts whose bytecode exceeds legacy limits (references/hip-1086-jumbo-tx.md).
Examples
Example 1
“Deploy an ERC-20 clone to Hedera testnet.”
Reuse OpenZeppelin contracts; confirm decimals expectations (HTS vs ERC-20 bridging nuances).
Example 2
“Gas seems higher than Ethereum L2.”
Compare fixed relay conversion & intrinsic Hedera fees — profile with eth_estimateGas.
Example 3
“Deployment fails size limit.”
Evaluate HIP-1086 patterns or split contracts via libraries.
Troubleshooting
| Symptom | Tip |
|---|---|
| Wrong chain id | Align chainId with docs for chosen network |
INSUFFICIENT_GAS |
Increase gas limit / payer balance |
References
- Local: references/hardhat-config.md, references/gas-comparison.md, references/hip-1086-jumbo-tx.md
- Docs: Deploy with Hardhat, JSON-RPC Relay