Releases: web3/web3.js
Releases · web3/web3.js
v1.10.0
Fixed
- Improved the error propagation in
web3-providers-http
package to effectively propagate useful error infomation about failed HTTP connections (#5955) - Fixed "Uncaught TypeError" calling a contract function that revert using MetaMask (#4454) and related "n.data.substring is not a function", that is raised when there is a revert and
web.eth.handleRevert = true
(#6000)
Changed
transaction.type
is now formatted to a hex string before being send to provider (#5979)- When sending a transaction, if
transaction.type === '0x1' && transaction.accessList === undefined
, thentransaction.accessList
is set to[]
(#5979) - Removed an unnecessary
chainId
parameter fromtoChecksumAddress()
function types (#5888)
Added
- Added support for
getPastEvents
method to filterallEvents
and specific event (#6015)
Security
- Updated dependencies (#6044)
v1.10.0-rc.0
Fixed
- Improved the error propagation in
web3-providers-http
package to effectively propagate useful error infomation about failed HTTP connections (#5955) - Fixed "Uncaught TypeError" calling a contract function that revert using MetaMask (#4454) and related "n.data.substring is not a function", that is raised when there is a revert and
web.eth.handleRevert = true
(#6000)
Changed
transaction.type
is now formatted to a hex string before being send to provider (#5979)- When sending a transaction, if
transaction.type === '0x1' && transaction.accessList === undefined
, thentransaction.accessList
is set to[]
(#5979) - Removed an unnecessary
chainId
parameter fromtoChecksumAddress()
function types (#5888)
Added
- Added support for
getPastEvents
method to filterallEvents
and specific event (#6015)
Security
- Updated dependencies (#6044)
v4.0.1-rc.1
Changed
web3
- No need for polyfilling nodejs
net
andfs
modules (#5978) - Removed IPC provider dependency, IPC path is no longer viable provider. If you wanna use IPC, please install
web3-providers-ipc
and instantiate provider yourself (#5978)
web3-core
- If a transaction object with a
data
property is passed totxInputOptionsFormatter
, it will now be replaced withinput
(#5915) - The types
TransactionTypeParser
andTransactionBuilder
are now utilizing the typeTransaction
for the transaction object. (#5993) - No need for polyfilling nodejs
net
andfs
modules (#5978) - Removed IPC provider dependency, IPC path is no longer viable provider. If you wanna use IPC, please install
web3-providers-ipc
and instantiate provider yourself (#5978)
web3-errors
gasLimit
is no longer accepted as a parameter forMissingGasError
and `TransactionGasMismatchError, and is also no longer included in error message (#5915)
web3-eth
signTransaction
will now returngas
instead ofgasLimit
for returned transaction object regardless of what property name the provider uses (#5915)formatTransaction
will now replacedata
transaction property withinput
(#5915)isTransactionCall
will now check ifvalue.input
isHexStrict
if provided (#5915)- The functions
defaultTransactionBuilder
andtransactionBuilder
are now utilizing the typeTransaction
for the transaction object. (#5993)
web3-eth-accounts
- Moved @ethereumjs/tx, @ethereumjs/common code to our source code (#5963)
- The method
signTransaction
returned byprivateKeyToAccount
is now accepting the typeTransaction
for its argument. (#5993)
web3-eth-contract
getSendTxParams
will now returninput
instead ofdata
in returned transaction parameters object (#5915)Contract
constructor will now thrown newContractTransactionDataAndInputError
if bothdata
andinput
are passed inContractInitOptions
forContract
constructor (#5915)- The types
ContractInitOptions
,NonPayableCallOptions
andPayableCallOptions
are moved toweb3-types
. (#5993)
web3-types
data
property inTransactionOutput
was renamed toinput
(#5915)- The method
signTransaction
insideWeb3BaseWalletAccount
is now utilizing the typeTransaction
for its argument. (#5993) - The types
FMT_NUMBER
,NumberTypes
,FMT_BYTES
,ByteTypes
,DataFormat
,DEFAULT_RETURN_FORMAT
,ETH_DATA_FORMAT
andFormatType
moved fromweb3-utils
. (#5993) - The types
ContractInitOptions
,NonPayableCallOptions
andPayableCallOptions
are moved fromweb3-eth-contract
. (#5993)
web3-utils
- The types
FMT_NUMBER
,NumberTypes
,FMT_BYTES
,ByteTypes
,DataFormat
,DEFAULT_RETURN_FORMAT
,ETH_DATA_FORMAT
andFormatType
moved toweb3-types
. (#5993)
Added
web3
web3-core
web3-errors
web3-eth
- Added source files (#5956)
web3-eth-abi
web3-eth-accounts
web3-eth-contract
input
is now an acceptable property forContractInitOptions
in place ofdata
(either can be used, butinput
is used withing theContract
class) (#5915)- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
web3-eth-ens
web3-eth-iban
web3-eth-personal
web3-net
web3-providers-http
web3-providers-ipc
web3-providers-ws
web3-rpc-methods
web3-types
web3-utils
web3-validator
- Added source files (#5956)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added functions
isHexString
,isHexPrefixed
,validateNoLeadingZeroes
(#5963)
Removed
web3-core
getConfig
method fromWeb3Config
class,config
is now public and accessible usingWeb3Config.config
(#5950)
web3-eth
- Removed dependencies @ethereumjs/tx, @ethereumjs/common (#5963)
web3-eth-abi
- Removed
formatDecodedObject
function (#5934)
web3-eth-contract
data
was removed as a property ofContractOptions
type (#5915)
web3-utils
- Removed dependencies @ethereumjs/tx, @ethereumjs/common (#5963)
Fixed
web3-eth-ens
- Bug fix of
checkNetwork
in ENS (#5988)
v1.9.0
Fixed
- Fixed skipped ws-ganache tests (#5759)
- Fixed "provider started to reconnect error" in web3-provider-ws (#5820)
- Fixed Error: Number can only safely store up to 53 bits (#5845)
- Fixed types for packages which have default exports but not declared default export in .d.ts (#5866)
- Fixed Transaction type by adding missing properties (#5856)
Changed
- Add optional
hexFormat
param togetTransaction
andgetBlock
that accepts the value'hex'
(#5845) utils.toNumber
andutils.hexToNumber
can now return the large unsafe numbers asBigInt
, iftrue
was passed to a new optional parameter calledbigIntOnOverflow
(#5845)- Updated @types/bn.js dependency to 5.1.1 in web3, web3-core and web3-eth-contract as reason mentioned in #5640 (#5885)
- Add description to error for failed connection on websocket (#5884)
Security
- Updated dependencies (#5885)
v4.0.1-rc.0
Added
web3
registeredSubscriptions
was 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-errors
andweb3
. (#5771) - Fix few issues with
new Web3().eth.contract
(#5824)
web3-core
- Added rpc exception codes following eip-1474 as an experimental feature (if
useRpcCallSpecification
atenableExperimentalFeatures
istrue
) (#5525) - Added support of
safe
andfinalized
block tags (#5823)
web3-errors
- Added error class
InvalidMethodParamsError
and error codeERR_INVALID_METHOD_PARAMS = 207
(#5824) request
property toResponseError
(#5854)data
property toTransactionRevertInstructionError
(#5854)TransactionRevertWithCustomError
was added to handle custom solidity errors (#5854)
web3-eth
- Added
createAccessList
functionality ( #5780 ) - Added support of
safe
andfinalized
block tags (#5823) contractAbi
option toSendTransactionOptions
andSendSignedTransactionOptions
to added the ability to parse custom solidity errors (#5854)
web3-eth-abi
decodeErrorData
fromweb3-eth-contract
is now exported from this package and was renamed todecodeContractErrorData
(#5844)
web3-eth-contract
- Added functionality of
createAccessList
for contracts ( #5780 ) - An instance of
Contract
willsubscribeToContextEvents
upon instantiation ifsyncWithContext
is set totrue
and the constructor is passed an instance ofWeb3Context
(#5833) - Added support of
safe
andfinalized
block tags (#5823)
web3-providers-http
- Added named export for
HttpProvider
(#5771)
web3-providers-ipc
- Added named export for
IpcProvider
(#5771) - Pass
_socketOptions
fromIpcProvider
constructor to the underlyingSocket
(#5891) - The getter of
SocketConnection
inIpcProvider
(inherited fromSocketProvider
) returnsnet.Socket
(#5891)
web3-providers-ws
- Added named export for
WebSocketProvider
(#5771) - The getter of
SocketConnection
inWebSocketProvider
(inherited fromSocketProvider
) returns isomorphicWebSocket
(#5891)
web3-rpc-methods
- Added
createAccessList
functionality ( #5780 ) - Added support of
safe
andfinalized
block tags (#5823)
web3-types
- Added types from
web3-eth-abi
andTypedArray
from (#5771) - Added
TypedArray
fromweb3-utils
andweb3-validator
(it was defined twice) (#5771) - Added
safe
andfinalized
block tags inBlockTags
andBlockTag
types (#5823)
web3-utils
- Added support of
safe
andfinalized
block tags (#5823)
web3-validator
- Added support of
safe
andfinalized
block tags inisBlockTag
method (#5823)
Changed
web3
require('web3')
will now return all web3 exported-objects organized in namespaces . (#5771)
web3-errors
- The abstract class
Web3Error
is renamed toBaseWeb3Error
(#5771) - Renamed TransactionRevertError to TransactionRevertInstructionError to remain consistent with 1.x
- Using
MaxAttemptsReachedOnReconnectingError
with the same message for 1.x but also adding themaxAttempts
(#5894)
web3-eth
- Update imports statements for objects that was moved between web3 packages (#5771)
sendTransaction
andsendSignedTransaction
now errors with (anderror
event emits) the following possible errors:TransactionRevertedWithoutReasonError
,TransactionRevertInstructionError
,TransactionRevertWithCustomError
,InvalidResponseError
, orContractExecutionError
(#5854)
web3-eth-accounts
- Updated dependencies (#5912)
web3-eth-contract
- Update imports statements for objects that was moved between web3 packages (#5771)
web3-eth-ens
- Updated dependencies (#5912)
web3-eth-iban
- Updated dependencies (#5912)
web3-eth-personal
- Updated dependencies (#5912)
web3-net
- Updated dependencies (#5912)
web3-utils
compareBlockNumbers
function now only supports comparison of both blocktags params ( exceptearliest
vs number) or both block number params (#5842)SocketProvider
abstract class now resolves JSON RPC response errors instead of rejecting them (#5844)- Exposes the getter of
SocketConnection
inSocketProvider
(#5891)
Removed
web3
- Private static
_contracts:Contract[]
and staticsetProvider
function was removed (#5792)
web3-eth
getRevertReason
is no longer exported (#5844)
web3-eth-abi
- Moved all types and interfaces to
web3-types
(#5771)
web3-eth-contract
decodeErrorData
is no longer exported (method was moved toweb3-eth-abi
and renameddecodeContractErrorData
) (#5844)
web3-utils
- Moved
TypedArray
toweb3-types
(was also duplicated atweb3-validator
) (#5771) - Removed support of
genesis
tag incompareBlockNumbers
function (#5823)
web3-validator
- Moved
TypedArray
toweb3-types
(was also duplicated atweb3-utils
) (#5771)
Fixed
web3-eth-contract
v1.9.0-rc.0
Fixed
- Fixed skipped ws-ganache tests (#5759)
- Fixed "provider started to reconnect error" in web3-provider-ws (#5820)
- Fixed Error: Number can only safely store up to 53 bits (#5845)
- Fixed types for packages which have default exports but not declared default export in .d.ts (#5866)
- Fixed Transaction type by adding missing properties (#5856)
Changed
- Add optional
hexFormat
param togetTransaction
andgetBlock
that accepts the value'hex'
(#5845) utils.toNumber
andutils.hexToNumber
can now return the large unsafe numbers asBigInt
, iftrue
was passed to a new optional parameter calledbigIntOnOverflow
(#5845)- Updated @types/bn.js dependency to 5.1.1 in web3, web3-core and web3-eth-contract as reason mentioned in #5640 (#5885)
- Add description to error for failed connection on websocket (#5884)
Security
- Updated dependencies (#5885)
v1.8.2
Changed
- Updated Webpack 4 to Webpack 5, more details at (#5629)
crypto-browserify
module is now used only in webpack builds for polyfilling browsers (#5629)- Updated
ethereumjs-util
to7.1.5
(#5629) - Updated
lerna
4 to version 6 (#5680) - Bump utils 0.12.0 to 0.12.5 (#5691)
Fixed
- Fixed types for
web3.utils._jsonInterfaceMethodToString
(#5550) - Fixed Next.js builds failing on Node.js v16, Abortcontroller added if it doesn't exist globally (#5601)
- Builds fixed by updating all typescript versions to 4.1 (#5675)
Removed
clean-webpack-plugin
has been removed from dev-dependencies (#5629)
Added
https-browserify
,process
,stream-browserify
,stream-http
,crypto-browserify
added to dev-dependencies for polyfilling (#5629)- Add
readable-stream
to dev-dependancies for webpack (#5629)
Security
npm audit fix
for libraries update (#5726)
v4.0.1-alpha.5
[4.0.1-alpha.5]
Removed
web3
build
entry frompackage.json
(#5755)
web3-validator
build
entry frompackage.json
(#5755)
Changed
web3-core
- web3.js dependencies (#5757)
web3-errors
- web3.js dependencies (#5757)
web3-eth
- web3.js dependencies (#5757)
web3-eth-abi
- web3.js dependencies (#5757)
web3-eth-accounts
- web3.js dependencies (#5757)
web3-eth-contract
- web3.js dependencies (#5757)
web3-eth-ens
- web3.js dependencies (#5757)
web3-eth-iban
- web3.js dependencies (#5757)
web3-eth-personal
- web3.js dependencies (#5757)
web3-eth-net
- web3.js dependencies (#5757)
web3-providers-http
- web3.js dependencies (#5757)
web3-providers-ipc
- web3.js dependencies (#5757)
web3-providers-ws
- web3.js dependencies (#5757)
web3-rpc-methods
- web3.js dependencies (#5757)
web3-utils
- web3.js dependencies (#5757)
Fixed
web3-eth
- Enable transaction with local wallet index in the
to
field (#5731)
Added
web3-types
- Add
TransactionWithFromLocalWalletIndex
,TransactionWithToLocalWalletIndex
andTransactionWithFromAndToLocalWalletIndex
types (#5731)
v4.0.1-alpha.4
Changed
web3
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-core
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-errors
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-eth
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-eth-abi
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-eth-accounts
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-eth-contract
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-eth-ens
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-eth-iban
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-eth-personal
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-net
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-providers-http
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-providers-ipc
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-providers-ws
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-rpc-methods
main
andfiles
entries inpackage.json
changed tolib/
directory fromdist/
(#5739)
web3-types
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-utils
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-validator
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
web3-providers-ipc
- Refactor to use common SocketProvider class (#5683)
web3-providers-ws
- Refactor to use common SocketProvider class (#5683)
web3-utils
- Add SocketProvider class and Eip1193Provider abstract class (#5683)
web3-types
- These types were added: ProviderRpcError, EthSubscription, ProviderMessage, ProviderConnectInfo (#5683)
v1.8.2-rc.0
Changed
- Updated Webpack 4 to Webpack 5, more details at (#5629)
crypto-browserify
module is now used only in webpack builds for polyfilling browsers (#5629)- Updated
ethereumjs-util
to7.1.5
(#5629) - Updated
lerna
4 to version 6 (#5680) - Bump utils 0.12.0 to 0.12.5 (#5691)
Fixed
- Fixed types for
web3.utils._jsonInterfaceMethodToString
(#5550) - Fixed Next.js builds failing on Node.js v16, Abortcontroller added if it doesn't exist globally (#5601)
- Builds fixed by updating all typescript versions to 4.1 (#5675)
Removed
clean-webpack-plugin
has been removed from dev-dependencies (#5629)
Added
https-browserify
,process
,stream-browserify
,stream-http
,crypto-browserify
added to dev-dependencies for polyfilling (#5629)- Add
readable-stream
to dev-dependancies for webpack (#5629)
Security
npm audit fix
for libraries update (#5726)