← 返回
未分类 中文

Web3 Docs

Up-to-date documentation and code patterns for Solidity, Foundry, Hardhat, Viem, Wagmi, ethers.js, and OpenZeppelin. Use when writing smart contracts, debugg...
涵盖 Solidity、Foundry、Hardhat、Viem、Wagmi、ethers.js 和 OpenZeppelin 的最新文档与代码模式。适用于智能合约编写、调试...
old-greggyboy
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 654
下载
💾 1
安装
1
版本
#latest

概述

Web3 Docs

Current patterns and references for EVM development. Covers the full stack: contracts → testing → deployment → frontend integration.

Stack Coverage

LayerToolReference
------------------------
ContractsSolidity 0.8.xreferences/solidity.md
FrameworkFoundry (forge/cast/anvil)references/foundry.md
Framework (alt)Hardhatreferences/hardhat.md
StandardsOpenZeppelin 5.xreferences/openzeppelin.md
StandardsERC-4626 (tokenized vaults)references/erc4626.md
Frontend (low-level)Viem 2.xreferences/viem.md
Frontend (React)Wagmi 2.xreferences/wagmi.md
Frontend (legacy)ethers.js 6.xreferences/ethers.md

Quick Lookup

Starting a new Foundry project: See references/foundry.md → Project Setup

Starting a Hardhat project: See references/hardhat.md → Installation

Writing an ERC-20: See references/openzeppelin.md → ERC-20

Building a yield vault (ERC-4626): See references/erc4626.md → OpenZeppelin Implementation

First depositor attack on vaults: See references/erc4626.md → First Depositor Attack

Connecting a wallet in React: See references/wagmi.md → Quick Start

Reading contract state with Viem: See references/viem.md → Read Contracts

Common Solidity errors: See references/solidity.md → Error Reference

Deploying to Optimism/Base with Hardhat: See references/hardhat.md → hardhat.config.ts

Fetch Latest Docs

scripts/fetch-docs.js pulls live docs from official sources when the reference files may be stale.

node scripts/fetch-docs.js solidity      # Solidity docs
node scripts/fetch-docs.js foundry       # Foundry book
node scripts/fetch-docs.js viem          # Viem docs
node scripts/fetch-docs.js wagmi         # Wagmi docs
node scripts/fetch-docs.js openzeppelin  # OZ docs
node scripts/fetch-docs.js hardhat       # Hardhat docs
node scripts/fetch-docs.js erc4626       # ERC-4626 (OZ vault docs)

Gas Optimization Quick Rules

  1. Use calldata instead of memory for read-only function params
  2. Pack storage variables: multiple uint128 in one slot beats two separate uint256
  3. unchecked blocks for arithmetic that can't overflow (saves ~30 gas/op)
  4. immutable > constant > storage for values set once
  5. Events are cheaper than storage for historical data
  6. Batch operations: one tx touching N items beats N txs

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-30 17:11 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Durable Workflow

old-greggyboy
构建能够应对真实故障的AI智能体工作流的模式与流程,适用于多步骤自动化、流水线或智能体的搭建场景。
★ 0 📥 625

Abi Toolchain

old-greggyboy
智能合约项目的ABI生命周期管理。适用于前端与合约变更不同步、或需配置ABI生成等场景。
★ 0 📥 454

Defi Scout

old-greggyboy
链上DeFi情报,供AI代理使用。用于查询钱包余额、代币价格、DEX报价、收益机会、协议TVL、Gas价格等。
★ 0 📥 400