Scaffold 0G Project

Create 0G dApp projects with TypeScript, dotenv, and standardized SDK versions.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Vocaid/vocaid-hub --skill scaffold-0g-project
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Scaffold 0G Project
Source: https://github.com/Vocaid/vocaid-hub/tree/main/agents/.agents/shield/skills/chain/scaffold-project
Command: npx skills add https://github.com/Vocaid/vocaid-hub --skill scaffold-0g-project

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates manual project wiring by assembling the correct 0G SDK versions, TypeScript configuration, .env templates, and boilerplate so developers avoid inconsistent scaffolds and exposed credentials.

Core Features & Use Cases

  • SDK-correct scaffolding: Installs ethers v6, @0glabs/0g-ts-sdk, @0glabs/0g-serving-broker, and other tooling based on the chosen stack.
  • Environment hygiene: Creates dotenv-managed .env placeholders, ignores sensitive files, and recommends dotenv/config for runtime loading.
  • Project templates: Provides storage, compute, and Hardhat TypeScript boilerplates with tsconfig, package scripts, and Git init instructions so teams can launch 0G dApps, storage clients, or compute brokers.
  • Use Case: When onboarding a new 0G project, run this Skill to instantly generate the directory, dependencies, TypeScript setup, .env, .gitignore, and sample source files that match the selected architecture.

Quick Start

Scaffold a new 0G dApp project with ethers v6, the 0G SDKs, TypeScript, and env placeholders in one step.

Frequently Asked Questions about Scaffold 0G Project

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a 0G dApp project with TypeScript and Hardhat?

To scaffold a 0G dApp project, this tool generates a standardized directory with TypeScript configuration, Hardhat boilerplate using evmVersion cancun, and correctly versioned dependencies like ethers v6 and @0glabs/0g-ts-sdk.

What environment variables do I need for a 0G SDK project?

For a 0G SDK project, you need dotenv-managed environment variables defined in generated .env placeholders. The scaffold creates these files, adds them to .gitignore to protect credentials, and recommends dotenv/config for runtime loading.

Does the 0G TypeScript SDK work with ethers v6?

Yes, the 0G TypeScript SDK works with ethers v6. The scaffolding process explicitly installs ethers v6 alongside @0glabs/0g-ts-sdk and @0glabs/0g-serving-broker to ensure compatible, predictable builds for your storage or compute clients.

How do I set up Hardhat for 0G Chain smart contracts?

To set up Hardhat for 0G Chain smart contracts, this tool creates a TypeScript boilerplate configured with evmVersion cancun. It includes ts-node-compatible scripts, package configurations, and Git initialization instructions for immediate development.

Why does my 0G project build fail due to inconsistent SDK versions?

Your 0G project build fails due to inconsistent SDK versions when dependencies are manually wired. This scaffold prevents misconfiguration by assembling standardized versions of @0glabs/0g-ts-sdk, Hardhat toolchains, and TypeScript setups automatically.

Can I generate boilerplate for 0G storage and compute brokers?

Yes, you can generate boilerplate for 0G storage and compute brokers. The scaffolder provides specific project templates for storage clients and compute brokers, equipping them with tsconfig, package scripts, and sample source files.