AgentSkillsCN

ethers

Ethers.js v6——涵盖 Provider/Signer/Contract、单位换算、ABI、合约调用与事件监听、签名机制,以及从 v5 到 v6 的迁移方案。

SKILL.md
--- frontmatter
name: ethers
description: Ethers.js v6 — Provider/Signer/Contract, units, ABI, contract calls and events, signing, v5→v6 migration.
metadata:
  author: hairy
  version: "2026.2.9"
  source: Generated from https://github.com/ethers-io/ethers.js (docs.wrm), scripts at https://github.com/antfu/skills

Skill based on ethers.js v6.16.0, generated at 2026-02-09. Official docs: https://docs.ethers.org/v6/

Ethers.js is a complete, compact library for interacting with Ethereum: dapps, wallets, and scripts. This skill covers Provider/Signer/Contract separation, units and formatting, ABI, contract calls and events, message signing, and v5→v6 migration.

Core References

TopicDescriptionReference
Provider, Signer, ContractRead/write separation, BrowserProvider, JsonRpcProvider, connectingcore-provider-signer
Units and FormattingparseEther, parseUnits, formatEther, formatUnitscore-units-format
ABIHuman-readable ABI, Fragment, encoding, event topics/datacore-abi

Features

Contract and Signing

TopicDescriptionReference
ContractCreation, view/pure, state-changing, staticCall, events, queryFilterfeatures-contract
SigningsignMessage, verifyMessage, Signature, EIP-191, EIP-712features-signing

Advanced

TopicDescriptionReference
Migrating v5→v6BigInt, Provider/Contract/Signature, utils renamesadvanced-migrating-v6