All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Released with 1.0.0-beta.37 code base.
websocketdependency fixed (#2971, #2976)requestOptionsadded toWebsocketProvider(#2979)- Node >= v8.0.0 support (#2938)
- localStorage support detection added (#3031)
- getNetworkType method extended with Görli testnet (#3095)
- supportsSubscriptions method added to providers (#3116)
- Add
eth.getChainIdmethod (#3113) - Minified file added to web3 package (#3131)
- The transaction confirmation workflow can now be configured (#3130)
- Additional parameters for accounts.signTransaction added (docs) (#3141)
- Emit
connectedevent on subscription creation (#3028) - TypeScript type definitions added for all modules (#3132)
- Bloom filters added to web3.utils (#3137)
- Fix allow
0as a validfromBlockortoBlockfilter param (#1100) - Fix randomHex returning inconsistent string lengths (#1490)
- Fix make isBN minification safe (#1777)
- Fix incorrect references to BigNumber in utils.fromWei and utils.toWei error messages (#2468)
- Fix error incorrectly thrown when receipt.status is
null(#2183) - Fix incorrectly populating chainId param with
net_versionwhen signing txs (#2378) - regeneratorRuntime error fixed (#3058)
- Fix accessing event.name where event is undefined (#3014)
- fixed Web3Utils toHex() for Buffer input (#3021)
- Fix bubbling up tx signing errors (#2063, #3105)
- HttpProvider: CORS issue with Firefox and Safari (#2978)
- Ensure the immutability of the
txobject passed to functionsignTransaction(#2190) - Gas check fixed (#2381)
- Signing issues #1998, #2033, and #1074 fixed (#3125)
- Fix hexToNumber and hexToNumberString prefix validation (#3086)
- The receipt will now returned on a EVM error (this got removed on beta.18) (#3129)
- Fixes transaction confirmations with the HttpProvider (#3140)
- Fix perfect gas usage causes tx to error (#3175)
- Fix regenerator runtime error in web3.min.js (#3155)
- Fix TS types for eth.subscribe syncing, newBlockHeaders, pendingTransactions (#3159)
- Improve web3-eth-abi decodeParameters error message (#3134)
- Fix npm installation error for scrypt-shim and websocket (#3210)
eth_requestAccountsasrequestAccountsadded to web3-eth package (#3219)sha3RawandsoliditySha3Rawadded to web3-utils package (#3226)eth_getProofasgetProofadded to web3-eth package (#3220)BNandBigNumberobjects are now supported by theabi.encodeParameter(s)method (#3238)getPendingTransactionsadded to web3-eth package (#3239)- Revert instruction handling added which can get activated with the
handleRevertmodule property (#3248) - The
receiptdoes now exist as property on the error object for transaction related errors (#3259) internalTypeadded toAbiInputTS interface inweb3-utils(#3279)- Agent option added to the
HttpProvideroptions (#2980)
eth-libdependency updated (0.2.7 => ^0.2.8) (#3242)
- Fix crash when decoding events with identical signatures, differently indexed args (#3272)
- Fix user supplied callback not fired in eth.accounts.signTransaction (#3283)
- Fix minified bundle (#3256)
defaultBlockproperty handling fixed (#3247)clearSubscriptionsdoes no longer throw an error if no running subscriptions do exist (#3246)- callback type definition for
Accounts.signTransactionfixed (#3280) - fix: export bloom functions on the index.js
- Prefer receipt status to code availability on contract deployment (#3298)
- Görli testnet ENS registry added to the known registries (#3338)
- ENS registry addresses updated (#3353, https://medium.com/the-ethereum-name-service/ens-registry-migration-bug-fix-new-features-64379193a5a)
- Add revert reason support to sendSignedTransaction (#3345)
- ENS module extended with the possibility to add a custom registry (#3301)
- Missing ENS Registry methods and Resolver.supportsInterface method added (#3325)
- Add optional gas type to AbiItem typescript definitions (for ABIs generated by Vyper) (#3437)
- Add görli testnet ENS registry to the known registries (#3252)
- Add auto-reconnect option for Websockets (#3092, #1085, #1391, #1558, #1852, #1646)
- Ensure '0x' prefix is existing for Accounts.sign and Accounts.privateKeyToAccount (#3041)
- Repository cleanup (#3443)
- Removed old
docs/_buildfolder - Removed old bower and meteor artifacts
- Moved logo assets to own folder
- Moved github assets to own folder
- Remove @types/node from (non-dev) dependency tree (#3965, #3227)
- Removed old
- Please note: Geth v1.9.12 contains a breaking change for
eth_callthat will not default to your first account anymore iffromis not set. If a sender is not explicitly defined, theeth_callwill be executed fromaddress(0). (#3467)- This was done to avoid the same input behaving differently in different environments. You should never do
eth_callwithout explicitly setting a sender. - This means that if you're calling
viewmethods that refer to amsg.senderwithout explicitly setting afromaddress in your request options, you may see unexpected behavior. - In
web3.js, thefromaddress can be specified on a per-call basis or by setting thedefaultAccountproperty.
- This was done to avoid the same input behaving differently in different environments. You should never do
- Add missing subscription.on('connected') TS type definition (#3319)
- Add missing bignumber.js dependency for TS types (#3386)
- Upgrade swarm-js to 0.1.40 to remove npm vulnerability warning (#3399)
- Upgrade devDeps to resolve security warnings (#3464)
- dtslint 0.4.2 => 3.4.1
- definitelytyped-header-parser 1.0.1 => 3.9.0
- Race-condition when subscribing to historical logs as first client request (#3389)
- Fix crash when using Web-Workers by removing any-promise dependency (#3377 #2211 #1774)
- MaxListenersExceededWarning event emitter warning mitigated (#1648)
- Introduce review and release guidelines. (#3460)
- Add EIP-1193 compatible provider to
AbstractProviderinterface. (#3499) - Add TypeScript definitions for contract
methodsandcall. (#3454) - Update AbstractProvider and contract.methods TS definitions (#3521)
- Add support for ENS contenthash methods. (#3392, #2782)
- Change CI provider from Travis to GitHub Actions. (#3468)
- Update
web3-eth-abiABICoder dependency. (#3490) - Update AbiCoder param formatting (#3522)
- Improve code clarity of HttpProvider keepAlive option setting. (#3463)
- Updated type definitions for Web3 HTTP Provider. (#3482)
- Fix indentation of web3-eth documentation. (#3478)
- Fix intermittent CI build issues with
dtslint. (#3479) - Fix WSS credentials Base64 encoding (for browser) (#3508)
- Fire provider "error" and/or "end" events when Websocket provider disconnects. (#3485)
- Remove web3-eth revert error return types to squash TS compilation errors. (#3496)
- Backfill event subscriptions when WS connection dropped across multiple blocks. (#3491)
- Stop swallowing errors when WS connection has died after exhausting reconnection attempts. (#3492)
- Fix setContenthash docs formatting (#3511)
- Add
sendingandsentevents for tx submissions (#3438) - Add
latestBlockHasharg toconfirmationevent handler payload (#3438) - Make socket providers' max listeners threshold configurable (#3469)
- Documentation about testing & ci resources for Web3.js development (#3528)
- More detailed documentation about how to use
method.encodeABI(#3549) - Integration tests for
transactionPollingTimeout(#3513)
- Websocket package from @web3-js/websocket@1.0.29 to websocket@1.0.31 (#3371)
- Upgrade
@web3-js/scrypt-shim@0.1.0toscrypt-js@3.0.1 - sendSignedTransaction revert handling synthesizes tx without network call (#3457)
- Make docs grammar more idiomatic, normalize punctuation (#3543)
- Size property de-referencing crash when calling web3.eth.clearSubscriptions (#3527)
- Abi param encoding for tuple arrays (#3538)
account.hashMessagewith non-ASCII characters (#3523)- Subscription support check in method confirmations loop (#3432)
- TS bindings for
handleRevertadded (#3452) - Docs: spelling of pre-defined block number (#3539)
- Docs: missing defaultBlock param option in
method.calldescription (#3558)
- Add support for EIP-1193 provider
requestmethod (#3625)
- Upgrade minified bundle build process (from gulp to webpack) (#3618)
- CI improvements: add dependency caching, netlify browser test preview (#3598, #3602)
- Remove references to
genesisblock in 1.x documentation (#3594) - Disallow setting
toBlockwhen subscribing to contract events (#3207)
- Extend
_txInputFormatterwith hex prefix check (#3317) - Extract revert reason string for geth >= 1.9.15 (#3520)
- Fix Incorrect param encoding of BN object in arrayed inputs (#3592)
- Remove mis-encoded whitespace characters from web3-utils files (#3601)
- Fix incompatibilities with webpack Buffer polyfill for wallet.encrypt/decrypt (#3580)
- Fix misformatted
fromBlockvalue when re-subscribing to events over WS (#3596) - Support
Functiontype log parameter decoding (#2826) - Add undefined callback check to websocket provider response queue (#3574)
- Fix WS clientConfig type (#3563)
- Fix Provider.request response (#3647)
- Add unit tests for isHex and isHexStrict (#3622)
- Support for typescript files (.ts) to be written alongside regular .js files (#3652)
- Add compareBlock function that allows for complex block comparisons (#3682)
- Improve RequestManager send method (#3649)
npm run buildnow uses TSC to compile (.js allowed) and the build folder is now located underlib(#3652)- Modernized web3-core to use newer es syntax (#3652)
- Bumped
web3-providers-ipcoboeversion to 2.1.5 (#3661) - Bump lodash from 4.17.15 to 4.17.19 (#3641)
- Bump websocket version which removes node-gyp from web3.js (#3685)
- Fix parsing of non-
eth_subscriptionprovider events (#3660) - Fix parsedUrl problem of websocket provider (#3666)
- Fix return value for
clearSubscriptions(#3689)
- Add
web3-eth2-corepackage (#3743) (renamed toweb3-eth2-base) - Add
web3-eth2-beaconchainpackage (#3743) (renamed toweb3-eth2-beacon) - Add
stripHexPrefixmethod toweb3-utilspackage (#3776)
- bump utils 0.10.0^ -> 0.12.0 (#3733)
- Removed post-install script in
packages/web3. Added documentation to root README (#3717)
- Fix possible unhandled promise rejection when sending a transaction (#3708)
- Fixed decoding bytes and string parameters for logs emitted with solc 0.4.x (#3724, #3738)
- Grammar changes to inputAddressFormatter error message
- Fixed vulnerable dependencies
- Fix EIP-1193 provider subscriptions (#3864)
- Update
distto latest release (1.3.2) (#3875)
- Fixed mutation of inputs to encoding and decoding functions (#3748)
- Fix default value for
fromBlockoption forlogssubscriptions (defaults tolatest) (#3883) - ethjs-signer test (#3876)
- Rename
web3-eth2-basetoweb3-eth2-coreandweb3-eth2-beacontoweb3-eth2-beaconchain(#3833) - Bump
ts-nodefrom version^8.10.2to^9.0.0(#3856) - Ran
npm audit fixwhich fixed 4 vulnerabilities (#3856) - Correct
web3-eth2-beaconchaintype declarations (#3859) and (#3865) - Move interfaces
IBaseAPISchemaandIBaseAPIMethodSchematoindex.d.tsforweb3-eth2-core(#3878) - Update dependencies for
web3-eth2-core(#3878)
- Remove
notImplementedflag from ETH2 Beacon Chain package methods schema (#3861) - Removes
IETH2BeaconChaininterface in favor of exporting a class type:ETH2BeaconChain(#3878) - Remove
index.d.tsfiles in favor oftypes.tsforweb3-eth2-coreandweb3-eth2-beaconchain(#3878) schema.tsfromweb3-eth2-core(#3878)dtslintnpm command fromweb3-eth2-coreandweb3-eth2-beaconchainasindex.d.tsfiles were removed (#3878)
- Add
ETH2Coreclass export toindex.d.tsforweb3-eth2-core(#3878) - Deprecation of bzz warning (#3872)
- Deprecation of shh warning (#3888)
- GitHub action for running tests for
web3-eth2-coreandweb3-eth2-beaconchainpackages (#3892) - Added description to documentation on how to connect using a remote node provider (#3884)
- Added Security risk warning to docs for
web3.utils.soliditySha3(#3908) .nvmrcfile using Node.js versionv.14.15.1(#3817)- Add commitment to semantic versioning since version
1.3.0and onwards (#3961)
- Unified babel compiler for
web3-eth2-coreandweb3-eth2-beaconchain(#3892) - Renamed the
tscscript in all packages tocompile; updates the correspondinglerna runusage in the mainpackage.json(#3894) - moved deprecation warnings to postinstall scripts (#3917)
- Upgrade
@chainsafe/geth-dev-assistantfrom0.1.5to0.1.9(#3950) - Replaced hardcoded infura link with GitHub Secret for some tests (#3943)
- Bump
ellipticfrom6.5.3to6.5.4forweb3-eth-accounts(#3941) - Bump
ellipticfrom6.5.3to6.5.4forweb3-bzz(#3940) - Bump
ellipticfrom6.5.3to6.5.4forweb3-core-requestmanager(#3945) - Rewrite
web3-eth-ibanin ES6 (#3955)
- Bump
underscorepackage from1.9.1to1.12.1(#4051) - Bump
@ensdomains/enspackage from^0.4.5to^0.6.0(#4059) - Bump
etherspackage from^5.0.18to^5.1.4(#4059)
- Accidental commit (yarn-error.log) (#4062)
- Berlin Transaction Support (#4083)
- When signing a transaction, common object now defaults to berlin instead of petersburg
- Changed Geth Docker verision from
stableto1.10.3ine2e.geth.instamine.shandscripts/e2e.geth.automine.sh(#4154)
- Removing the underscore package
- London transaction support (#4155)
- RPC support
eth_feehistorycall (#4191) - Add
toNumbermethod toweb3.utils(#4191)
- Grammar fix (#4088) and updated Swarm (#4151)and Whisper doc links (#4170)
- Removed deprecation notice for HttpProvider (#4008)
- Nonce added to send options in documentation and types (#4052)
- Updated Solidity example to modern syntax (#4147)
- Changing web3 connection example from lets to const (#3967)
- Updated the documentation for the transaction object to include EIP-2718 and EIP-1559 options (#4188)
maxPriorityFeePerGasandmaxFeePerGasnow included in_txInputFormatter(#4217)- If
maxPriorityFeePerGasofmaxFeePerGaspresent_txInputFormatterdeletestx.gasPrice(fixes #4211) (#4217) - Add block tag support (e.g.
latest,pending,earliest) togetFeeHistory(#4224) - Support for EIP-1559 to
web3.eth.sendTransaction(#4220)
- Remove transaction
typedefaulting foreth.sendTransaction,eth.sendRawTransaction(#4241) type: 0x0was being added to legacy transaction when usingeth.signTransaction(#4241)
- Unable to send legacy transaction if network supported EIP-1559 (#4277)
- Fixed bug in sending transaction with providers not support "newBlockHeaders" event (#3891)
- ethers from 5.1.4 to 5.4.4 (#4231)
- karma from 5.2.3 to 6.3.4 (#4231)
- lerna from 3.22.1 to 4.0.0 (#4231)
- Dropped build tests in CI for Node v8 and v10, and added support for Node v14 (#4231)
- Change default value for
maxPriorityFeePerGasfrom1 Gweito2.5 Gwei(#4284) - Fixed bug in signTransaction (#4295)
- Partially replace usage of eth-lib with ethereumjs-util (#4390)
- Support for
eth_createAccessListas both an rpc call (web3.eth.createAccessList) and property of contract method wrappers (contractInstance.methods.getValue().createAccessList) (#4332)
- Not considering
tx.chainIdiftx.common.customChain.chainIdis provided forweb3.eth.accounts.signTransactionfunction (#4293) - Added missing PromiEvent handler types (#4194)
- Updated README to include webpack 5 angular support instructions (#4174)
- Updated the documentation for the
Web3.utils, removed context for_(underscore lib) (#4403) - Emit subscription id with connect event when creating a subscription (#4300)
- Introduced new configuration "blockHeaderTimeout" for waiting of block headers for transaction receipt (#3891)
- Format
block.baseFeePerGasto number (#4330) - Correct
web3-eth-personal.sendTransactionexample in documentation (#4409) - Updated README to include webpack 5 angular support instructions (#4174)
- Fix 1.6.1 build size issue with removing static asset files (#4506)
- Correct
web3.rstexample in documentation (#4511) - Correct
BlockHeadertyping (receiptRoot->receiptsRoot) (#4452)
maxPriorityFeePerGasandmaxFeePerGasadded toTransactionandTransactionConfiginterfaces (#4232) (#4585)
- Fix readthedoc's build for web3js documentation (#4425)
- Fix response sorting for batch requests (#4250)
- Changed getFeeHistory first parameter type from
numbertohexaccording to the spec (#4529)
transactionPollingIntervaladded to web3, contract and method constructor options. defaults to 1 second. (#4584)- Add example import for package level types (#4611)
- Fix a typo in the documentation for
methods.myMethod.send(#4599) - Use globalThis to locate global object if possible (#4613)
- Fix typos in web3-utils.rst (#4662)
- Added effectiveGasPrice to TransactionReceipt (#4692)
- Correction in documentation for
web3.eth.accounts.signTransaction(#4576) - Updated README to include webpack 5 create-react-app support instructions (#4173)
- Update the documentation for
methods.myMethod.estimateGas(#4702) - Fix typos in REVIEW.md and TESTING.md (#4691)
- Fix encoding for "0x" string values (#4512)
- Muted E2E gnosis dex tests in CI until fix for issue #4436 is applied (#4701)
- Removed deprecated Morden testnet code (#4339)
- Ran
npm audit fixto address vulnerabilities and update libraries (#4719) (#4728)
- Remove deprecated
closeevent listener (#4825) (#4839)
npm audit fixto update libraries (#4860)
- Fix jsonrpc payload and response types (#4743) (#4761)
- Allowed more flexibility in typing the overly constrained
provider.disconnectfunction (#4833)
- Fixed build issues of 1.7.2
- Fix dead link in web3-eth.rst (#4916)
- Fix web3-core-method throws on
f.call = this.callwhen intrinsic is frozen (#4918) (#4938) - Fix static tuple encoding (#4673) (#4884)
- Fix bug in handleRevert logic for eth_sendRawTransaction (#4902)
- Fix resolve type of getBlock function (#4911)
- Web3-utils BN fix (#5132)
- Replace deprecated String.prototype.substr() (#4855)
- Exporting AbiCoder as coder (#4937)
- GitHub build workflow updated min build for node.js 12 and tests for 12, 14 and 16 (#5014)
- Updated libraries using BN and the BN library (#5072)
- Exposing
web3.eth.Contract.setProvider()as per public documentation (#4822) (#5001) - Improve npm script commands for development purposes (#4848)
npm audit fixto address vulnerabilities and update libraries (#5014)
- Replace xhr2-cookies deps to cross-fetch for web3-providers-http (#5085)
- Documentation details about
maxFeePerGasandmaxPriorityFeePerGas(#5121) - Added
createAccessListtypes in web3.eth (#5146)
- Improving
AbstractProviderinterface (#5150) - Fix typos in web3-eth-accounts.rst & TESTING.md (#5047)
- Fix remove wallet using an index when an account address and address lowercase are equal (#5049)
- Improve README.md & Fix typos (#4848)
- Add optional hex formatting parameter for getTransactionReceipt (#5153)
- Fix transactionRoot -> transactionsRoot in BlockHeader (#5083)
- Fix Promise in Accounts.signTransaction() throwing errors that cannot be caught (#4724)
- Fixed unit tests & removed dead code for web3-providers-http (#5228)
- Updated
gotlib version and fixed other libs using npm audit fix (#5178) (#5254)
Note: Yarn is resolving to some old deprecated package versions for 4.0.0-alpha.0 instead of latest alpha versions. A patch bump is posted so yarn users should use 4.0.1-alpha.0 for testing.
web3-errorsnew package is created, it has Web3 Error codes and classes
web3-typesnew package is created, it provides the common data structures and interfaces for web3 modules
web3-validatornew package is created, it has JSON-Schema compatible validator functionality for Web3
- This Package is deprecated
- This Package is deprecated
- This Package is removed,
errorsare moved toweb3-errorspackage and formatters are moved inweb3-corepackage
- This Package is removed, and
web3-core-methodfunctionality is moved toweb3-ethpackage
- This Package is removed, and core promi events functionality is moved to
web3-corepackage
- This Package is removed, batch requests and request manager functionality is moved to
web3-corepackage
- This Package is removed, and core subscription functionality is moved to
web3-corepackage
- Passing callbacks to functions is no longer supported, except for event listeners.
- Method
extendis deprecated
- The function
outputBigNumberFormatterinweb3-core-helperrenamed tooutputBigIntFormatterunderweb3-core - Removed
this.defaultBlockcontext frominputDefaultBlockNumberFormatterinweb3-core-helperand converted to additional parameter - Removed
this.defaultBlockcontext frominputTransactionFormatterinweb3-core-helperand converted to additional parameter
- The following functions
soliditySha3soliditySha3RawencodePackednow includes type validation and requires type specification, instead of guessing the value type - The functions
soliditySha3,soliditySha3RawandencodePackeddid not support BN; But, now supportsBigInt - The functions
flattenTypesandjsonInterfaceMethodToStringmoved to theweb3-eth-abipackage - The function
isAddressnow includes an optional parametercheckChecksumtype boolean isBooleannow accept1, and0as valid values to test. Ref:web3-validator
createfunction does not take in the optional parameterentropyWallet.createfunction doesn't acceptentropyparam
isBooleannow accept1, and0as valid values to test.
- Event logs do not support types for indexed properties, but named properties are supported.
- Types for overloaded ABI functions are not yet supported.
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.- The
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.
- Package will not support web3.bzz.net and web3.shh.net
- IBAN constructor now has validation checks for indirect/direct iban.
isDirect,isValid,isIndirectare now also included as static methods.
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.
internalTypewas renamed tobaseTypein all abi types
givenProviderdefault value is undefineddefaultHardforkdefault value is 'london'defaultAccountdefault value is undefineddefaultNetworkIddefault value is undefined- When sending a transaction, if Ethereum Node does not respond within
transactionSendTimeout, throw an Error.
clearSubscriptionsInstead of returningtrue,clearSubscriptionsnow returns array of subscription's ids
givenProviderdefault value is undefinedcurrentProviderdefault value is undefined
- Dependency tree cannot be resolved by Yarn due to old deprecated packages picked by yarn - fixed (#5382)
- If the response error was
execution reverted, raiseContractExecutionErrorand pass the response error to it in order to be set asinnerError(this innerError will be decoded at web3-eth-contract if its ABI was provided according to EIP-838). (#5434) - Added a new configuration variable
enableExperimentalFeatures. (#5481) registerPluginmethod toWeb3Context(#5393)Web3PluginBaseexported abstract class (#5393)Web3EthPluginBaseexported abstract class (#5393)
- Add optional
innerErrorproperty to the abstract classWeb3Error. ThisinnerErrorcould beError,Error[]orundefined. (#5435) (#5434) - The class
Web3ContractErroris moved to this package fromweb3-eth-contract. (#5434) - Added the error code
ERR_TX_SIGNINGand used it insideTransactionSigningError(#5462) - Added the error code
ERR_TX_GAS_MISMATCHand used it insideTransactionGasMismatchError(#5462) - Added
SignatureErrortoweb3-errors/src/errors/signature_errors.ts(moved fromweb3-eth/src/errors.ts) (#5462) - Added the errors' classes to
web3-errors/src/errors/transaction_errors.tsfromweb3-eth/src/errors.ts(#5462) - Added
TransactionBlockTimeoutErrorclass and its error codeERR_TX_BLOCK_TIMEOUT(#5294) ExistingPluginNamespaceErrorclass and it's error codeERR_EXISTING_PLUGIN_NAMESPACE(#5393)
web3-rpc-methodsdependency (#5441)- Added chain and hardfork validation for transaction and transaction.common object in
validateTransactionForSigning
- If an error happens when decoding a value, preserve that exception at
innerErrorinside the error classAbiError. (#5435) - Add basic functionality that is used, by
web3-eth-contract, when decoding error data according to EIP-838. (#5434)
- Decoding error data, using Error ABI if available, according to EIP-838. (#5434)
- The class
Web3ContractErroris moved from this package toweb3-error. (#5434)
- Example plugin for wrapping contract methods to provide custom functionality (#5393)
- Example plugin for custom RPC methods using the
requestManager(#5393)
- Added and exported three reusable utility functions:
pollTillDefined,rejectIfTimeoutandrejectIfConditionAtIntervalwhich are useful when dealing with promises that involves polling, rejecting after timeout or rejecting if a condition was met when calling repeatably at every time intervals.
web3-rpc-methodsdependency (#5441)
web3-rpc-methodsdependency (#5441)
- Show error message and return dummy promise if socket is not writable (#5294)
- web3-rpc-methods package added
Web3EthExecutionAPIexport (#5441)Web3NetAPIexport (#5441)EthPersonalAPIexport (#5441)
- Default value for
APIgeneric forWeb3ContextObjectfromanytounknown(#5393) - Default value for
APIgeneric forWeb3ContextInitOptionsfromanytounknown(#5393) - Added validation when
defaultHardforkanddefaultCommon.hardforkare different in web3config - Added validation when
defaultChainanddefaultCommon.basechainare different in web3config - Added a new configuration variable
enableExperimentalFeatures. (#5481)
- Moved
SignerErrorfromweb3-errors/src/errors/signature_errors.tstoweb3-errors/src/errors/transaction_errors.ts, and renamed it toTransactionSigningError(#5462) - Corrected the error code for
JSONRPC_ERR_UNAUTHORIZEDto be4100(#5462)
Web3EthExecutionAPIis now imported viaweb3-typesinstead ofweb3_eth_execution_api.ts(#5441)- Replace the imported methods from
rpc_methods.tswithethRpcMethodsimports fromweb3-rpc-methods(#5441) Web3NetAPIis now imported fromweb3-typesinstead ofweb3-net(#5441)- Moved
rpc_methodstests toweb3-rpc-methods(#5441) - Implemented the logic for
transactionBlockTimeout(#5294) - Use subscription at
rejectIfBlockTimeoutwhen the provider supports subscription. Implement this as an experimental feature (ifuseSubscriptionWhenCheckingBlockTimeoutatenableExperimentalFeaturesistrue). (#5481) - At some test cases, optimized some codes. (#5481)
signTransactionandprivateKeyToAccountwill throwTransactionSigningErrorinstead ofSignerErrornow (#5462)
Web3NetAPIis now imported fromweb3-typesinstead ofweb3-net(#5441)
- Import
EthPersonalAPIfromweb3-typesinstead of local import (#5441) - Replace the imported methods from
rcp_methods.tswithpersonalRpcMethodsimports fromweb3-rpc-methods(#5441) - Replace use of
EthPersonalAPIManagerwithWeb3RequestManager<EthPersonalAPI>(#5441)
Web3NetAPIis now imported fromweb3-typesinstead ofweb3_net_api.ts(#5441)- Replace the imported methods from
rpc_methods.tswithnetRpcMethodsimports fromweb3-rpc-methods(#5441)
Web3APISpec,Web3APIMethod, andWeb3APIParamsnow supportsunknownAPIs (#5393)
- Corrected the error code for
JSONRPC_ERR_UNAUTHORIZEDto be4100(#5462)
- Fix
getBlockreturning empty transactions object onhydratedtrue (#5556) - setimmediate package to polyfill setImmediate for browsers (#5450)
- According to the latest change in
web3-eth-abi, the decoded values of the large numbers, returned from function calls or events, are now available asBigInt. (#5435)
- Return
BigIntinstead ofstringwhen decoding function parameters for large numbers, such asuint256. (#5435)
Web3APISpec,Web3APIMethod, andWeb3APIParamsnow supportsunknownAPIs (#5393)
- Moved the errors' classes from
web3-eth/src/errors.tstoweb3-errors/src/errors/transaction_errors.ts(#5462)
- Exported type
EthPersonalAPIManager,EthPersonalAPIis not exported viaweb3-types(#5441)
rpcMethodsexport, these methods are now exported viaweb3-rpc-methodsasnetRpcMethods(#5441)Web3NetAPIexport, now exported viaweb3-typesasWeb3NetAPI(#5441)
- Removed direct function
toJSON()inWeb3ValidatorErrorclass as its available via base class (#5435)
- Decoding error data, using Error ABI if available, if error was returned from a smart contract function call (#5662).
- These types were moved from
web3-eth-accountstoweb3-typespackage: Cipher, CipherOptions, ScryptParams, PBKDF2SHA256Params, KeyStore (#5581 )
- Export a new function
uuidV4that generates a random v4 Uuid (#5373). - Enable passing a starting number, to increment based on it, for the Json Rpc Request
id(#5652). - Export a new function
isPromisethat checks if an object is a promise (#5652).
SpecialOutputtype was added as a generic type into the call function to support reassigning output types (#5631)- Overloaded functions types (
ContractOverloadedMethodInputs,ContractOverloadedMethodOutputs) was added (#5631)
- Emit past contract events based on
fromBlockwhen passed tocontract.events.someEventName(#5201) - Use different types for
ContractOptions->jsonInterfacesetter and getter (#5474) - An issue within the
Contractconstructor whereproviderwasn't being set when provided within theoptionsOrContextOrReturnFormatargument (#5669)
- Make the
requestmethod ofEIP1193Providerclass, compatible with EIP 1193 (#5591)
- Use Uuid for the response id, to fix the issue "Responses get mixed up due to conflicting payload IDs" (#5373).
- Fix
isHexreturningfalsefor-123, fixisHexStrictreturningtruefor-0x, and fixisHexreturningtruefor empty strings `` (#5373).
- Fix
ContractMethodOutputParameterstype to support output object types by index and string key. Also, it returns void if ABI doesn't have outputs and returns exactly one type if the output array has only one element. (#5631)
- These types were moved from
web3-eth-accountstoweb3-typespackage: Cipher, CipherOptions, ScryptParams, PBKDF2SHA256Params, KeyStore (#5581 )
- Fix issue when importing
web3-validatorpackage within browser environments (webpack minified filename changed fromindex.min.jstoweb3-validator.min.js) (#5710) - Fix build error '"type"' does not satisfy the constraint (#5712)
- Parameters decoding error for nested components (#5714)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
mainandfilesentries inpackage.jsonchanged tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
tsccompiled files moved tolib/directory fromdist/(#5739)
- Refactor to use common SocketProvider class (#5683)
- Refactor to use common SocketProvider class (#5683)
- Add SocketProvider class and Eip1193Provider abstract class (#5683)
- These types were added: ProviderRpcError, EthSubscription, ProviderMessage, ProviderConnectInfo (#5683)
buildentry frompackage.json(#5755)
buildentry frompackage.json(#5755)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- web3.js dependencies (#5757)
- Enable transaction with local wallet index in the
tofield (#5731)
- Add
TransactionWithFromLocalWalletIndex,TransactionWithToLocalWalletIndexandTransactionWithFromAndToLocalWalletIndextypes (#5731)
registeredSubscriptionswas added by default in web3 constructor (#5792)- Add named exports for all objects which are the default-exported-object in their packages (#5771)
- Export all packages' objects organized by namespaces (#5771)
- Add Additional flat exports for all types and constants from
web3-types,web3-errorsandweb3. (#5771) - Fix few issues with
new Web3().eth.contract(#5824)
- Added rpc exception codes following eip-1474 as an experimental feature (if
useRpcCallSpecificationatenableExperimentalFeaturesistrue) (#5525) - Added support of
safeandfinalizedblock tags (#5823)
- Added error class
InvalidMethodParamsErrorand error codeERR_INVALID_METHOD_PARAMS = 207(#5824) requestproperty toResponseError(#5854)dataproperty toTransactionRevertInstructionError(#5854)TransactionRevertWithCustomErrorwas added to handle custom solidity errors (#5854)
- Added
createAccessListfunctionality ( #5780 ) - Added support of
safeandfinalizedblock tags (#5823) contractAbioption toSendTransactionOptionsandSendSignedTransactionOptionsto added the ability to parse custom solidity errors (#5854)
decodeErrorDatafromweb3-eth-contractis now exported from this package and was renamed todecodeContractErrorData(#5844)
- Added functionality of
createAccessListfor contracts ( #5780 ) - An instance of
ContractwillsubscribeToContextEventsupon instantiation ifsyncWithContextis set totrueand the constructor is passed an instance ofWeb3Context(#5833) - Added support of
safeandfinalizedblock tags (#5823)
- Added named export for
HttpProvider(#5771)
- Added named export for
IpcProvider(#5771) - Pass
_socketOptionsfromIpcProviderconstructor to the underlyingSocket(#5891) - The getter of
SocketConnectioninIpcProvider(inherited fromSocketProvider) returnsnet.Socket(#5891)
- Added named export for
WebSocketProvider(#5771) - The getter of
SocketConnectioninWebSocketProvider(inherited fromSocketProvider) returns isomorphicWebSocket(#5891)
- Added
createAccessListfunctionality ( #5780 ) - Added support of
safeandfinalizedblock tags (#5823)
- Added types from
web3-eth-abiandTypedArrayfrom (#5771) - Added
TypedArrayfromweb3-utilsandweb3-validator(it was defined twice) (#5771) - Added
safeandfinalizedblock tags inBlockTagsandBlockTagtypes (#5823)
- Added support of
safeandfinalizedblock tags (#5823)
- Added support of
safeandfinalizedblock tags inisBlockTagmethod (#5823)
require('web3')will now return all web3 exported-objects organized in namespaces . (#5771)
- The abstract class
Web3Erroris renamed toBaseWeb3Error(#5771) - Renamed TransactionRevertError to TransactionRevertInstructionError to remain consistent with 1.x
- Using
MaxAttemptsReachedOnReconnectingErrorwith the same message for 1.x but also adding themaxAttempts(#5894)
- Update imports statements for objects that was moved between web3 packages (#5771)
sendTransactionandsendSignedTransactionnow errors with (anderrorevent emits) the following possible errors:TransactionRevertedWithoutReasonError,TransactionRevertInstructionError,TransactionRevertWithCustomError,InvalidResponseError, orContractExecutionError(#5854)
- Updated dependencies (#5912)
- Update imports statements for objects that was moved between web3 packages (#5771)
- Updated dependencies (#5912)
- Updated dependencies (#5912)
- Updated dependencies (#5912)
- Updated dependencies (#5912)
compareBlockNumbersfunction now only supports comparison of both blocktags params ( exceptearliestvs number) or both block number params (#5842)SocketProviderabstract class now resolves JSON RPC response errors instead of rejecting them (#5844)- Exposes the getter of
SocketConnectioninSocketProvider(#5891)
- Private static
_contracts:Contract[]and staticsetProviderfunction was removed (#5792)
getRevertReasonis no longer exported (#5844)
- Moved all types and interfaces to
web3-types(#5771)
decodeErrorDatais no longer exported (method was moved toweb3-eth-abiand renameddecodeContractErrorData) (#5844)
- Moved
TypedArraytoweb3-types(was also duplicated atweb3-validator) (#5771) - Removed support of
genesistag incompareBlockNumbersfunction (#5823)
- Moved
TypedArraytoweb3-types(was also duplicated atweb3-utils) (#5771)
- Fix contract defaults (#5756)
- Fixed getPastEventsError (#5819)
- No need for polyfilling nodejs
netandfsmodules (#5978) - Removed IPC provider dependency, IPC path is no longer viable provider. If you wanna use IPC, please install
web3-providers-ipcand instantiate provider yourself (#5978)
- If a transaction object with a
dataproperty is passed totxInputOptionsFormatter, it will now be replaced withinput(#5915) - The types
TransactionTypeParserandTransactionBuilderare now utilizing the typeTransactionfor the transaction object. (#5993) - No need for polyfilling nodejs
netandfsmodules (#5978) - Removed IPC provider dependency, IPC path is no longer viable provider. If you wanna use IPC, please install
web3-providers-ipcand instantiate provider yourself (#5978)
gasLimitis no longer accepted as a parameter forMissingGasErrorand `TransactionGasMismatchError, and is also no longer included in error message (#5915)
signTransactionwill now returngasinstead ofgasLimitfor returned transaction object regardless of what property name the provider uses (#5915)formatTransactionwill now replacedatatransaction property withinput(#5915)isTransactionCallwill now check ifvalue.inputisHexStrictif provided (#5915)- The functions
defaultTransactionBuilderandtransactionBuilderare now utilizing the typeTransactionfor the transaction object. (#5993)
- Moved @ethereumjs/tx, @ethereumjs/common code to our source code (#5963)
- The method
signTransactionreturned byprivateKeyToAccountis now accepting the typeTransactionfor its argument. (#5993)
getSendTxParamswill now returninputinstead ofdatain returned transaction parameters object (#5915)Contractconstructor will now thrown newContractTransactionDataAndInputErrorif bothdataandinputare passed inContractInitOptionsforContractconstructor (#5915)- The types
ContractInitOptions,NonPayableCallOptionsandPayableCallOptionsare moved toweb3-types. (#5993)
dataproperty inTransactionOutputwas renamed toinput(#5915)- The method
signTransactioninsideWeb3BaseWalletAccountis now utilizing the typeTransactionfor its argument. (#5993) - The types
FMT_NUMBER,NumberTypes,FMT_BYTES,ByteTypes,DataFormat,DEFAULT_RETURN_FORMAT,ETH_DATA_FORMATandFormatTypemoved fromweb3-utils. (#5993) - The types
ContractInitOptions,NonPayableCallOptionsandPayableCallOptionsare moved fromweb3-eth-contract. (#5993)
- The types
FMT_NUMBER,NumberTypes,FMT_BYTES,ByteTypes,DataFormat,DEFAULT_RETURN_FORMAT,ETH_DATA_FORMATandFormatTypemoved toweb3-types. (#5993)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
inputis now an acceptable property forContractInitOptionsin place ofdata(either can be used, butinputis used withing theContractclass) (#5915)- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added functions
isHexString,isHexPrefixed,validateNoLeadingZeroes(#5963)
getConfigmethod fromWeb3Configclass,configis now public and accessible usingWeb3Config.config(#5950)
- Removed dependencies @ethereumjs/tx, @ethereumjs/common (#5963)
- Removed
formatDecodedObjectfunction (#5934)
datawas removed as a property ofContractOptionstype (#5915)
- Removed dependencies @ethereumjs/tx, @ethereumjs/common (#5963)
- Bug fix of
checkNetworkin ENS (#5988)
InvalidPropertiesForTransactionTypeErrorwith error code429(#6102)
- Added support for
getPastEventsmethod to filterallEventsand specific event (#6010) - Added
maxPriorityFeePerGasandmaxFeePerGasinContractOptionstype and updated function using it in utils (#6118) - Added method's type autodetection by ABI param (#6137)
- Added
filtersparam to theFiltertype (#6010) - Added types
JsonRpcSubscriptionResultOld,Web3ProviderMessageEventCallback. Added.on('data')type support for old providers (#6082) - Export for
HardforksOrderedenum (#6102) - Export for
Web3ValidationErrorObjecttype (#6102)
- Optional
hexstrictparameter added to numberToHex (#6004)
- Fixed
ignoreGasPricingbug with wallet in context (#6071)
- Fixed ESM import bugs reported in (#6032) and (#6034)
- ESM projects will not need to run --experimental-specifier-resolution=node (#6127)
- Replaced Buffer for Uint8Array (#6004)
- Nested Smart Contract error data is extracted at
Eip838ExecutionErrorconstructor and the nested error is set atinnerError(#6045)
formatTransactionno longer throws aTransactionDataAndInputErrorif it's passed a transaction object with bothdataandinputproperties set (as long as they are the same value) (#6064)- Refactored documentation for
rpc_method_wrappersto point to the previously duplicated documentation found under theWeb3Ethclass documentation (#6054) - Replaced Buffer for Uint8Array (#6004)
- Refactored
defaultTransactionTypeParserto return correct EIP-2718 types, prior implementation was prioritizingtransaction.hardforkand ignoring the use oftransaction.gasLimit.defaultTransactionTypeParserwill now throwInvalidPropertiesForTransactionTypeErrors for properties are used that are incompatible withtransaction.type(#6102) prepareTransactionForSigninganddefaultTransactionBuildernow accepts optionalfillGasPriceflag and by default will not fill gas(#6071)
- Nested Smart Contract error data hex string is decoded when the error contains the data as object (when the data hex string is inside data.originalError.data or data.data) (#6045)
- Replaced
BufferforUint8Array(#6004) - The methods
recover,encrypt,privateKeyToAddressdoes not support typeBufferbut supports typeUint8Array(#6004) - The method
parseAndValidatePrivateKeyreturns a typeUint8Arrayinstead of typeBuffer(#6004)
- Replaced Buffer for Uint8Array (#6004)
- Removed chainId, to, data & input properties from NonPayableCallOptions
- Replaced Buffer for Uint8Array (#6004)
- types
FMT_BYTES.BUFFER,BytesandFormatTypeand encryption option types forsaltandivhas replaced support forBufferforUint8Array(#6004) - Added
internalTypeproperty to theAbiParametertype.
- Replaced Buffer for Uint8Array (#6004)
- The methods
hexToBytes,randomBytesdoes not return typeBufferbut typeUint8Array(#6004) - The methods
sha3andkeccak256Wrapperdoes not accept typeBufferbut typeUint8Array(#6004) - The method
bytesToBufferhas been removed for the usage ofbytesToUint8Array(#6004)
- Replaced Buffer for Uint8Array (#6004)
- Removed non read-only methods (#6084)
Web3ValidationErrorObjecttype is now exported fromweb3-typespackage (#6102)
Release Notes:
Web3.js 4.0.1 is written in TypeScript and has many exciting features such as: Easy extensibility ( with web3 Plugins feature ) In compliance with ETH EL Specification Dynamic Contract Typing Native typescript ESM CJS native builds 85%+ test coverage Custom data formatting feature Reduced package size New packages ( web3-types, web3-errors, web3-validator, web3-rpc-methods ) Validation functionality using schema
Documentation: Web3.js documentation Web3 API Migration Guide from 1.x Plugin Developers Plugin Users
Detailed List of changes are mentioned under: 4.0.0-alpha.0 4.0.1-alpha.1 4.0.1-alpha.2 4.0.1-alpha.3 4.0.1-alpha.4 4.0.1-alpha.5 4.0.1-rc.0 4.0.1-rc.1 4.0.1-rc.2
If there are any bugs, improvements, optimizations or any new feature proposal feel free to create github issue, or post a pull request for contributions.
- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
- Fixed #6162 @types/ws issue (#6205)
- Fixed Batch requests erroring out on one request (#6164)
- Fixed the issue: Subscribing to multiple blockchain events causes every listener to be fired for every registered event (#6210)
- Fixed the issue: Unsubscribe at a Web3Subscription class will still have the id of the subscription at the Web3SubscriptionManager (#6210)
- Fixed the issue: A call to the provider is made for every subscription object (#6210)
- Support for "decoding" indexed string event arguments (returns the keccak256 hash of the string value instead of the actual string value) (#6167)
- Fixed "The
randsreturned bysignTransactionto does not always consist of 64 characters #6207" (#6216)
- Event filtering using non-indexed and indexed string event arguments (#6167)
- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
- Fixed #6162 @types/ws issue (#6205)
- Fixed bug #6185, now web3.js compiles on typescript v5 (#6195)
- Exported
Web3Context,Web3PluginBase,Web3EthPluginBasefrom'web3-core', andWeb3Validatorfrom'web3-validator'(#6165)
- Web3Subscription constructor accept a Subscription Manager (as an alternative to accepting Request Manager that is now marked marked as deprecated) (#6210)
- Added the
SimpleProviderinterface which has onlyrequest(args)method that is compatible with EIP-1193 (#6210) - Added the
Eip1193EventNametype that contains the possible events names according to EIP-1193 (#6210)
- Web3Subscription constructor overloading that accept a Request Manager is marked as deprecated (#6210)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- The
EIP1193Providerclass has now all the events (foronandremoveListener) according to EIP-1193 (#6210)
- Dependencies updated
- Dependencies updated
- Fixed bug #6236 by adding personal type in web3.eth (#6245)
- Rpc method
getPastLogsaccept blockHash as a parameter https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs (#6181)
- type
FilterincludesblockHash(#6206)
- BigInts pass validation within the method
numberToHex(#6206)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Added minimum support of web3.extend function
- Added minimum support of web3.extend function
RpcErrorMessagesthat contains mapping for standard RPC Errors and their messages. (#6230)- created
TransactionGasMismatchInnerErrorfor clarity on the error inTransactionGasMismatchError(#6215) - created
MissingGasInnerErrorfor clarity on the error inMissingGasError(#6215)
- A
rpc_method_wrapper(signTypedData) for the rpc callseth_signTypedDataandeth_signTypedData_v4(#6286) - A
signTypedDatamethod to theWeb3Ethclass (#6286)
- A
getEncodedEip712Datamethod that takes an EIP-712 typed data object and returns the encoded data with the option to also keccak256 hash it (#6286)
- A
signTypedDatamethod toeth_rpc_methodsfor the rpc callseth_signTypedDataandeth_signTypedData_v4(#6286)
eth_signTypedDataandeth_signTypedData_v4toweb3_eth_execution_api(#6286)Eip712TypeDetailsandEip712TypedDatatoeth_types(#6286)
- Added
json-schemaas a main json schema type (#6264)
- Fixed the issue: "Version 4.x does not fire connected event for subscriptions. #6252". (#6262)
- Fixed: "'disconnect' in Eip1193 provider must emit ProviderRpcError #6003".(#6230)
- sendTransaction will have gas filled by default using method
estimateGasunless transaction builderoptions.fillGasis false. (#6249) - Missing
blockHeaderSchemaproperties causing some properties to not appear in response ofnewHeadssubscription (#6243) - Missing
blockHeaderSchemaproperties causing some properties to not appear in response ofnewHeadssubscription (#6243)
- Ensure a fixed version for "@types/ws": "8.5.3" (#6309)
- No need to pass
CommonSubscriptionEvents &at every child class ofWeb3Subscription(#6262) - Implementation of
_processSubscriptionResultand_processSubscriptionErrorhas been written in the base classWeb3Subscriptionand maidpublic. (#6262) - A new optional protected method
formatSubscriptionResultcould be used to customize data formatting instead of re-implementing_processSubscriptionResult. (#6262) - No more needed to pass
CommonSubscriptionEvents &for the first generic parameter ofWeb3Subscriptionwhen inheriting from it. (#6262)
MissingGasErrorerror message changed for clarity (#6215)inputanddataare no longer auto populated for transaction objects if they are not present. Instead, whichever property is provided by the user is formatted and sent to the RPC provider. Transaction objects returned from RPC responses are still formatted to contain bothinputanddataproperties (#6294)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
inputanddataare now optional properties onPopulatedUnsignedBaseTransaction(previouslyinputwas a required property, anddatawas not available) (#6294)
- Dependencies updated
- Replace
is-my-json-validwithzoddependency. Related code was changed (#6264) - Types
ValidationErrorandJsonSchemawere changed (#6264)
- Missing
blockHeaderSchemaproperties causing some properties to not appear in response ofnewHeadssubscription (#6243) - Type
RawValidationErrorwas removed (#6264)
- Type
RawValidationErrorwas removed (#6264)
- To fix issue #6190, added the functionality to introduce different timeout value for Web3. (#6336)
- To fix issue #6190, added the functionality to introduce different timeout value for Web3. (#6336)
- In case of error events there will be inner error also available for details
- Added return type for
formatSubscriptionResultin classNewHeadsSubscription(#6368)
- Fixed rpc errors not being sent as an inner error when using the
sendmethod on request manager (#6300).
- ESM import bug (#6359)
- Fixed bug in
contract.events.allEvents
- ESM import bug (#6359)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Fix of incorrect provider warning behavior
- Fixed "The
randsreturned bysignto does not always consist of 64 characters" (#6411)
soliditySha3()with BigInt support
- Added to
Web3ConfigpropertycontractDataInputFillallowing users to have the choice using propertydata,inputorbothfor contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400)
- Added to
Web3ConfigpropertycontractDataInputFillallowing users to have the choice using propertydata,inputorbothfor contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400) - Added
ALL_EVENTSandALL_EVENTS_ABIconstants,SendTransactionEventsBasetype,decodeEventABImethod (#6410)
- Added
dataInputFillas a ContractInitOption, allowing users to have the choice using propertydata,inputorbothfor contract methods to be sent to the RPC provider. (#6355) - Added to
Web3ConfigpropertycontractDataInputFillallowing users to have the choice using propertydata,inputorbothfor contract methods to be sent to the RPC provider when creating contracts. (#6377)
- add
asEIP1193ProvidertoWeb3BaseProviderso every inherited class can have the returned value ofrequestmethod, fully compatible with EIP-1193. (#6407)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Various web3 sub packages has new functions details are in root changelog
- Added
ALL_EVENTSandALL_EVENTS_ABIconstants,SendTransactionEventsBasetype,decodeEventABImethod (#6410)
- Added public function
privateKeyToPublicKey - Added exporting
BaseTransactionfrom the package (#6493) - Added exporting
txUtilsfrom the package (#6493)
- Interface
EventLogwas added. (#6410)
- As a replacment of the node EventEmitter, a custom
EventEmitterhas been implemented and exported. (#6398)
- Fix the issue: "Uncaught TypeError: Class extends value undefined is not a constructor or null #6371". (#6398)
- Added new SchemaFormatError (#6434)
- Ensure provider.supportsSubscriptions exists before watching by subscription (#6440)
- Fixed param sent to
checkRevertBeforeSendinginsendSignedTransaction - Fixed
defaultTransactionBuilderfor value issue (#6509)
- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506)
- Fixed
recoverfunction,vwill be normalized to value 0,1 (#6344)
- Fix issue lquixada/cross-fetch#78, enabling to run web3.js in service worker (#6463)
- Fixed bug in chunks processing logic (#6496)
- Fixed bug in chunks processing logic (#6496)
- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506)
- Fixed bug in chunks processing logic (#6496)
- Multi-dimensional arrays are now handled properly when parsing ABIs (#6435)
- Fix issue with default config with babel (and React): "TypeError: Cannot convert a BigInt value to a number #6187" (#6506)
- Validator will now properly handle all valid numeric type sizes: intN / uintN where 8 <= N <= 256 and N % 8 == 0 (#6434)
- Will now throw SchemaFormatError when unsupported format is passed to
convertToZodmethod (#6434)
- Dependencies updated
- defaultTransactionType is now type 0x2 instead of 0x0 (#6282)
- Allows formatter to parse large base fee (#6456)
- The package now uses
EventEmitterfromweb3-utilsthat works in node envrioment as well as in the browser. (#6398)
- Transactions will now default to type 2 transactions instead of type 0, similar to 1.x version. (#6282)
- The
eventsproperty was added to thereceiptobject (#6410)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Bump cross-fetch to version 4 (#6463).
- Dependencies updated
- Bug fix of
ERR_UNSUPPORTED_DIR_IMPORTin ABI (#6535)
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Dependencies updated
- Added
isMetaMaskProviderfunction to check if provider is metamask (#6534)
- Interface
MetaMaskProvideradded and is part ofSupportedProviders(#6534) gasPricewas added toTransaction1559UnsignedAPItype. (#6539)
- Dependencies updated
- Fixed grammar and spelling in
transactionTimeoutHint(#6559)
- Will populate
datafor transactions in contract for metamask provider instead ofinput(#6534)
- Web3config
contractDataInputFillhas been defaulted todata, instead ofinput. (#6622)
- By default, contracts will fill
datainstead ofinputwithin method calls (#6622)
SocketProvidernow contains public functiongetPendingRequestQueueSize,getSentRequestsQueueSizeandclearQueues(#6479)- Added
safeDisconnectas aSocketProvidermethod to disconnect only when request queue size and send request queue size is 0 (#6479) - Add
isContractInitOptionsmethod (#6555)
- Added methods (privateKeyToAddress, parseAndValidatePrivateKey, and privateKeyToPublicKey) to web3.eth.accounts (#6620)
- Fix web3-types import #6590 (#6589)
- Fix unnecessary array copy when pack encoding (#6553)
- Catch
TransactionPollingTimeoutErrorwas added to send transaction events (#6623)
- Use
AbiErrorinstead ofErrorfor errors at web3-eth-abi (#6641).
- Allow the
deployfunction to accept parameters, even when no ABI was provided to theContract(#6635)
- Dependencies updated
- Fixed an issue with detecting Uint8Array (#6486)
- Send Transaction config used to be ignored if the passed
commondid not have acopy()and thechainIdwas not provided (#6663) - Fixed an issue with detecting Uint8Array (#6486)
- Fix and error that happen when trying to get past events by calling
contract.getPastEventsorcontract.events.allEvents(), if there is no matching events. (#6647) - Fixed: The Contract is not using the context wallet passed if context was passed at constructor. (#6661)
- Fixed an issue with detecting Uint8Array (#6486)
- Fixed an issue with detecting Uint8Array (#6486)
- Adds missing exported type
AbiItemfrom 1.x to v4 for compatabiltiy (#6678)
- Adds missing exported type
AbiItemfrom 1.x to v4 for compatabiltiy (#6678)
- Dependencies updated
- Added EIP-6963 utility function
requestEIP6963Providersfor multi provider discovery
- Added
eth.getMaxPriorityFeePerGasmethod (#6748)
- Added function
setAddressin ENS and Resolver classes (#5956)
- Added
getMaxPriorityFeePerGasmethod (#6748)
- Type
FeeDatato be filled byawait web3.eth.calculateFeeData()to be used with EIP-1559 transactions (#6795)
- replaced our eventEmitter to EventEmitter3 to support react native builds (#6253)
- Types
ContractDeploySend,ContractMethodSend,Web3PromiEventwas exported (#6883)
- Added function getText and getName in ENS and resolver classes (#6914)
- Multi-dimensional arrays(with a fix length) are now handled properly when parsing ABIs (#6798)
- fixed erroneous parsing of big numbers in the
toNumber(...)function (#6880)
- Dependencies updated
- Dependencies updated
- Fix an issue with smart contract function overloading (#6922)
- fixed toHex incorrectly hexing Uint8Arrays and Buffer (#6957)
- fixed isUint8Array not returning true for Buffer (#6957)
- Added a console warning in case of an ambiguous call to a solidity method with parameter overloading (#6942)
- Added contract.deploy(...).decodeData(...) and contract.decodeMethodData(...) that decode data based on the ABI (#6950)
- method
getBlocknow includes properties of eip 4844, 4895, 4788 when returning block (#6933) - update type
withdrawalsSchema,blockSchemaandblockHeaderSchemaschemas to include properties of eip 4844, 4895, 4788 (#6933)
- Added
signatureto typeAbiFunctionFragment(#6922) - update type
Withdrawals,blockandBlockHeaderOutputto include properties of eip 4844, 4895, 4788 (#6933)
- Updated type
Web3EthInterface.accountsto includesprivateKeyToAccount,privateKeyToAddress,andprivateKeyToPublicKey(#6762)
defaultReturnFormatwas added to the configuration options. (#6947)
- Added
InvalidIntegerErrorerror for fromWei and toWei (#7052)
defaultReturnFormatwas added to all methods that haveReturnTypeparam. (#6947)getTransactionFromOrToAttr,waitForTransactionReceipt,trySendTransaction,SendTxHelperwas exported (#7000)
defaultReturnFormatwas added to all methods that haveReturnTypeparam. (#6947)
defaultReturnFormatwas added to all methods that haveReturnTypeparam. (#6947)
defaultReturnFormatwas added to all methods that haveReturnTypeparam. (#6947)
- Added
signatureto typeAbiFunctionFragment(#6922) - update type
Withdrawals,blockandBlockHeaderOutputto include properties of eip 4844, 4895, 4788 (#6933)
toWeiadd warning when using large numbers or large decimals that may cause precision loss (#6908)toWeiandfromWeinow supports integers as a unit. (#7053)
- Fixed issue with simple transactions, Within
checkRevertBeforeSendingif there is no data set in transaction, set gas to be21000(#7043)
toWeisupport numbers in scientific notation (#6908)toWeiandfromWeitrims according to ether unit successfuly (#7044)
- The JSON schema conversion process now correctly assigns an id when the
abi.nameis not available, for example, in the case of public mappings. (#6981) browserentry point that was pointing to a non-existing bundle file was removed frompackage.json(#7015)
- Set a try catch block if processesingError fails (#7022)
- Interface
RequestManagerMiddlewarewas changed (#7003)
- Added parameter
customTransactionReceiptSchemainto methodsemitConfirmation,waitForTransactionReceipt,watchTransactionByPolling,watchTransactionBySubscription,watchTransactionForConfirmations(#7000) - Changed functionality: For networks that returns
baseFeePerGas===0x0fillmaxPriorityFeePerGasandmaxFeePerGasbygetGasPricemethod (#7050)
- Dependencies updated
- Change
estimateGasmethod to add possibility pass Transaction type (#7000)
- Now when existing packages are added in web3, will be avalible for plugins via context. (#7088)
- Now when existing packages are added in web3, will be avalible for plugins via context. (#7088)
sendTransactioninrpc_method_wrappersaccepts optional param ofTransactionMiddleware(#7088)- WebEth has
setTransactionMiddlewareandgetTransactionMiddlewarefor automatically passing tosentTransaction(#7088)
getTextnow supports first param AddressgetNamehas optional second param checkInterfaceSupport
- Added
resultas optionalneveranderroras optionalnever in typeJsonRpcNotification` (#7091) - Added
JsonRpcNotficationas a union type inJsonRpcResponse(#7091)
- RC release
getNamereverse resolution
- Fixed geth issue when running a new instance, transactions will index when there are no blocks created (#7098)
web3.eth.Contractwill get transaction middleware and use it, ifweb3.ethhas transaction middleware. (#7138)
populateTransactionwas added to contract methods (#7124)- Contract has
setTransactionMiddlewareandgetTransactionMiddlewarefor automatically passing tosentTransactionfordeployandsendfunctions (#7138)
- fix encodedata in EIP-712 (#7095)
_sendPendingRequestswill catch unhandled errors from_sendToSocket(#6968)
- Fixed geth issue when running a new instance, transactions will index when there are no blocks created (#7098)
- baseTransaction method updated (#7095)
- Update dependancies (#7109)
- Dependencies updated
- Change request return type
Promise<ResultType>toPromise<JsonRpcResponseWithResult<ResultType>>(#7102)
populateTransactionwas added to contract methods (#7124)- Contract has
setTransactionMiddlewareandgetTransactionMiddlewarefor automatically passing tosentTransactionfordeployandsendfunctions (#7138)
- When error is returned with code 429, throw rate limit error (#7102)
web3.eth.Contractwill get transaction middleware and use it, ifweb3.ethhas transaction middleware. (#7138)
- Fixed the undefined data in
Eip838ExecutionErrorconstructor (#6905)
- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
- Change method
getTransactionReceiptto not be casted asTransactionReceiptto give proper return type (#7159)
- Remove redundant constructor of contractBuilder (#7150)
setConfig()fix forsetMaxListenerWarningThresholdfix (#5079)
- Fix
TransactionFactory.registerTransactionTypenot working, if there is a version mistatch betweenweb3-ethandweb3-eth-accountsby savingextraTxTypesatglobals. (#7197)
- Added public function
signMessageWithPrivateKey(#7174)
- Added
populateTransactionto thecontract.deploy(...)properties. (#7197)
- Added
statusCodeof response in ResponseError,statusCodeis optional property in ResponseError.
- Updated rate limit error of QuickNode provider for HTTP transport
- Added optional
HttpProviderOptions | SocketOptionsinWeb3ExternalProviderandQuickNodeProviderfor provider configs
- Added optional
statusCodeproperty of response in ResponseError.
- The returnred properties of
contract.deploy(...)are structured with a newly created class namedDeployerMethodClass. (#7197) - Add a missed accepted type for the
abiparameter, atdataInputEncodeMethodHelperandgetSendTxParams. (#7197)
- Revert
TransactionFactory.registerTransactionTypeif there is a version mistatch betweenweb3-ethandweb3-eth-accountsand fix nextjs problem. (#7216)
- Adds a new property (
customTransactionSchema) toWeb3ConfigOptions(#7227)
- Adds the same
{transactionSchema?: ValidationSchemaInput}that exists informatTransactiontovalidateTransactionForSigning
- Add COMMITTED to BlockTags (#7124)
- Forwards the new
web3Context.config.customTransactionSchematoformatTransaction
- Forwards the new
web3Context.config.customTransactionSchematoformatTransaction
Web3.providersnamespace exportstype EIP6963ProviderResponse = Map<string, EIP6963ProviderDetail>. Return type for the staticWeb3.requestEIP6963Providersfunction is nowPromise<EIP6963ProviderResponse>. (#7239)- The callback function provided to the static
Web3.onNewProviderDiscoveredfunction expects a parameter of typeEIP6963ProvidersMapUpdateEventas opposed toEIP6963AnnounceProviderEvent. (#7242)
- Added new property
ignoreGasPricingtoWeb3ConfigOptions. IfignoreGasPricingis true, gasPrice will not be estimated (#7320)
syncingsubscription now supports Besu and Nethermind payload formatpopulateGasPricefunction now checksWeb3Context.config.ignoreGasPricing. IfignoreGasPricingis true, gasPrice will not be estimated (#7320)
- Exported EIP-6963 types are no longer under the
providersnamespace. (#7270)
- Allow
getEthereumjsTxDataFromto return additional fields that may be passed if using acustomTransactionSchema.
- update the type for
baseFeePerGasatweb3.eth.getFeeHistoryto be a number. (#7291)
- Allow specifying percentage based factor in Web3Eth.calculateFeeData Param baseFeePerGasFactor #7332
decodeLog,decodeParametersWith,decodeParametersanddecodeParametersnow accepts first immutable param as well (#7288)
- fix
padRightvalidation failure on largeuint(#7265)
createNewPendingTransactionFilter,createNewFilter,createNewBlockFilter,uninstallFilter,getFilterChangesandgetFilterLogsare exported fromWeb3Ethandfiltering_rpc_method_wrappers(#7353)
- added
decodeFunctionCallanddecodeFunctionReturn. (#7345)
hashMessagenow has a new optional paramskipPrefixwith a default value offalse. A new functionsignRawwas added to sign a message without prefix. (#7346)
- PublicNodeProvider was added (#7322)
FilterParamstype added (#7353)
- Fix Contract methods input param type any[] (#7340)
- Export Web3Account, Wallet and signature related types. (#7374)
- Make
fromWeireturn "0" when input is0(#7387)
- Move signature related types to web3-types. Re-export them for backwards compatibility. (#7374)
- Add signature related types. (#7374)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- RC release
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Updated Typescript version 4 -> 5 (#7272)
- Add web3-validator dist path for react-native builds (#7416)