# Hedera Dapp Scaffold

> Scaffold Hedera dApps — Vite/React layout, MetaMask via Hashio JSON-RPC (EVM), HashConnect for native Hedera wallets, Mirror Node REST queries, transaction receipt confirmation patterns, Hedera-specific error handling. Use when user mentions HashConnect, MetaMask Hedera testnet, build dApp Hedera, frontend mirror node, wallet connect Hedera, PRECHECK_FAILED, INVALID_PAYER_SIGNATURE.

- Skill: `evaluris-solutions/hedera-dapp-scaffold` (Agent Skill, multi-file: 7 files)
- Install (CLI): `npx skillmds@latest add evaluris-solutions/hedera-dapp-scaffold`
- Raw SKILL.md: https://api.skillmd.com/api/skills/evaluris-solutions/hedera-dapp-scaffold/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: Evaluris-Solutions (https://skillmd.com/u/evaluris-solutions)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/evaluris-solutions/hedera-dapp-scaffold

---


## Overview

Modern Hedera dApps often combine **EVM wallets** (MetaMask + relay) for Solidity users and **native wallets** (HashPack / HashConnect) for HTS-native flows. Mirror Node REST supplies cheap historical reads.

## When to use this skill

- Choosing **MetaMask vs HashConnect** per persona ([references/wallet-decision-guide.md](references/wallet-decision-guide.md)).
- Implementing **polling** for transaction receipts / records.

## Prerequisites

- Node.js 18+, pnpm or npm.
- Testnet accounts + funded balances.

## Workflow

1. **Bootstrap frontend** — run [scripts/scaffold.sh](scripts/scaffold.sh) (wraps `npm create vite`).

2. **Config relay URL** — inject `import.meta.env.VITE_JSON_RPC_URL`.

3. **Native signing** — integrate HashConnect v3 per vendor docs; stub in [scripts/wallet-context.tsx](scripts/wallet-context.tsx).

4. **Mirror reads** — axios/fetch wrappers from [scripts/mirror-client.ts](scripts/mirror-client.ts).

5. **Submit transactions** — native SDK via bundled worker OR relay-dependent ethers flows — pick one architecture per app layer.

6. **Errors** — map Hedera response codes per [references/error-handling.md](references/error-handling.md).

## Examples

**Example 1**

> “Need MetaMask-only MVP.”

Use JSON-RPC + ethers; convert HTS interactions via precompile contracts or backend relay.

**Example 2**

> “Need HashPack desktop users.”

Use HashConnect + `@hashgraph/sdk` signing from dApp connector.

**Example 3**

> “Show NFT gallery from wallet.”

Mirror `/api/v1/accounts/{id}/nfts` with pagination tokens.

## Troubleshooting

| Code | Meaning |
| --- | --- |
| `PRECHECK_FAILED` | Generic — inspect nested status |
| `INVALID_PAYER_SIGNATURE` | Wallet/network mismatch |

## References

- Local: [references/project-structure.md](references/project-structure.md), [references/wallet-decision-guide.md](references/wallet-decision-guide.md), [references/error-handling.md](references/error-handling.md)

