web3 /web3.js
Collection of comprehensive TypeScript libraries for Interaction with the Ethereum JSON RPC API and utility functions.
★ 19,898⑂ 5,085👁 5⑃ 2,919● 3,958▤ 201
+2
日增长
-10
周增长
-10
月增长
19,898
stars
5,085
forks
5
watchers
2,919
prs
3,958
issues
201
releases
README
Web3.js
Web3.js libraries are being sunset on March 4th, 2025. For migration guides and more details please refer to Chainsafe blog
[![Dependency Status][downloads-image]][npm-url] !Unit Test Coverage
!Commit Activity
!Contributors
!ES Version
!Node Version
Web3.js is a TypeScript implementation of the Ethereum JSON RPC API and related tooling maintained by ChainSafe Systems.
Installation
You can install the package either using NPM or using Yarn
If you wanna checkout latest bugfix or feature, use npm install web3@dev
Using NPM
bash
npm install web3
Using Yarn
bash
yarn add web3
Getting Started
- :writing_hand: If you have questions submit an issue or join us on Discord
!Discord
Prerequisites
- :gear: NodeJS (LTS/Fermium)
- :toolbox: Yarn/Lerna
Migration Guide
- Migration Guide from Web3.js 1.x to 4.x
Breaking changes are listed in migration guide and its first step for migrating from Web3.js 1.x to 4.x. If there is any question or discussion feel free to ask in Discord, and in case of any bug or new feature request open issue or create a pull request for contributions.
Useful links
- Web3 tree shaking support guide
- React App Example
Architecture Overview
| Package | Version | License | Docs | Description |
| ------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| web3 | | | | :rotating_light: Entire Web3.js offering (includes all packages) |
| web3-core | | | | Core functions for web3.js packages |
| web3-errors | | | | Errors Objects Top issues
#6178timeout is not working with providers18 comments · 2023-06-09#7203Add RPC provider: alchemy11 comments · 2024-08-19#6275`web3.eth.Contract.methods.myMethod()` does not accept to insert any parameters.10 comments · 2023-07-12#4347Web3 Release Process (CI/CD actions in Github)8 comments · 2021-09-23#7180ENS Web3.js Plugin with Caching- Add LRU Caching to Resolver for ENS Performance 7 comments · 2024-07-27#6541Ensure using `es6` for `web3.min.js`5 comments · 2023-10-24#5297Investigate node configuration scenarios for testing regular block intervals5 comments · 2022-07-28#5291Eth Client - 4.x RC Testing Infrastructure5 comments · 2022-07-28
Discussions
#7458Lesson 5: TypeError: "Cannot read properties of undefined (reading 'toHexString')”1 comments · 2025-02-09#7445Why use `cumulativeGasUsed` instead of `gasUsed` for calculations?1 comments · 2025-01-16#7437page not found on GitHub0 comments · 2025-01-09#7415Understanding Contract Method Call Return Types in web3.js 41 comments · 2024-12-04#7414v4.16.00 comments · 2024-12-03#7373v4.15.00 comments · 2024-11-06#7344v4.14.01 comments · 2024-10-21#7267v4.13.00 comments · 2024-09-18
Latest release
v4.16.0 v4.16.0 2024-12-03What's Changed fix: correctly close ws connection in web3-eth-contract integration tests by @krzysu in https://github.com/web3/web3.js/pull/7338 fix: export Web3Account, Wallet and signature related types by @krzysu in https://github.com/web3/web3.js/pull/7374 fix: CI workflow cache issues by @krzysu in https://github.com/web3/web3.js/pull/7384 fix: return type of sendTransaction in docs by @krzysu in https://github.com/web3/web3.js/pull/7386 chore: update CI actions by @krzysu in https://github.com/web3/web3.js/pull/7385 Bump express from 4.19.2 to 4.21.1 in /docs by @dependabot i