This repository was archived by the owner on Mar 5, 2025. It is now read-only.
v4.0.0-alpha.0 #5380
jdevcs
announced in
Announcements
v4.0.0-alpha.0
#5380
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note: Yarn is resolving to some old deprecated package versions for
4.0.0-alpha.0instead of latest alpha versions. A patch bump is posted so yarn users should use4.0.1-alpha.0for testing.Summary
Web3.js 4.0.0-alpha.0 is a complete overhaul. This alpha version is written in TypeScript and has many exciting features. Features such as:
Check out our 4.x API documentation (https://docs.web3js.org/) for the full details. The release contains mostly 1.x parity functionality with some documented breaking changes. Most of the packages in this release have been unit tested and only selected packages are E2E tested (web3, web3-eth, web3-contracts, web3-eth-personal, web3-providers-http and web3-providers-ws).
Checkout our 1.x to 4.x migration guide (https://docs.web3js.org/docs/guides/web3_migration_guide) for testing the 4.0.0-alpha.0 release and share your feedback with us.
Added
web3-errors
web3-errorsnew package is created, it has Web3 Error codes and classesweb3-types
web3-typesnew package is created, it provides the common data structures and interfaces for web3 modulesweb3-validator
web3-validatornew package is created, it has JSON-Schema compatible validator functionality for Web3Removed
web3-bzz
web3-shh
web3-core-helpers
errorsare moved toweb3-errorspackage and formatters are moved inweb3-corepackageweb3-core-method
web3-core-methodfunctionality is moved toweb3-ethpackageweb3-core-promieevent
web3-corepackageweb3-core-requestmanager
web3-corepackageweb3-core-subscription
web3-corepackageChanged
web3
extendis deprecatedweb3-core
outputBigNumberFormatterinweb3-core-helperrenamed tooutputBigIntFormatterunderweb3-corethis.defaultBlockcontext frominputDefaultBlockNumberFormatterinweb3-core-helperand converted to additional parameterthis.defaultBlockcontext frominputTransactionFormatterinweb3-core-helperand converted to additional parameterweb3-utils
soliditySha3soliditySha3RawencodePackednow includes type validation and requires type specification, instead of guessing the value typesoliditySha3,soliditySha3RawandencodePackeddid not support BN; But, now supportsBigIntflattenTypesandjsonInterfaceMethodToStringmoved to theweb3-eth-abipackageisAddressnow includes an optional parametercheckChecksumtype booleanisBooleannow accept1, and0as valid values to test. Ref:web3-validatorweb3-eth-accounts
createfunction does not take in the optional parameterentropyWallet.createfunction doesn't acceptentropyparamweb3-validator
isBooleannow accept1, and0as valid values to test.web3-eth-contract
signTransactionwill not fill any default values, and it will only sign and return result. For filling default values, useweb3-ethpackagerecoverfunction's last param is booleanhashed, it is used to indicate if data provided is already hashed or not. By default, this function will assume data is not hashed.Walletno longer supports address/number indexing. Have to usewallet.getinstead.Wallet.createfunction doesn't acceptentropyparamcontract.method.send()will resolve to transaction receipt instead oftransactionHash. User can usereceipt.transactionHashinstead.web3-net
web3-eth-iban
isDirect,isValid,isIndirectare now also included as static methods.web3-eth-ens
setMultihashis not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver (https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol)setContentis not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver (https://github.com/ensdomains/resolvers/blob/master/contracts/PublicResolver.sol)getContentis not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver.getMultihashis not supported in web3-eth-ens 4.x as it's deprecated in ENS public resolver.web3-eth-abi
internalTypewas renamed tobaseTypein all abi typesweb3-eth
givenProviderdefault value is undefineddefaultHardforkdefault value is 'london'defaultAccountdefault value is undefineddefaultNetworkIddefault value is undefinedtransactionSendTimeout, throw an Error.web3-eth-subscribe
clearSubscriptionsInstead of returningtrue,clearSubscriptionsnow returns array of subscription's idsweb3-eth-personal
givenProviderdefault value is undefinedcurrentProviderdefault value is undefinedThis discussion was created from the release v4.0.0-alpha.0.
Beta Was this translation helpful? Give feedback.
All reactions