Releases: web3/web3.js
Releases · web3/web3.js
v1.10.2
v4.1.1
Added
web3
web3-core
web3-eth-contract
- In case of error events there will be inner error also available for details
Fixed
web3-eth
- Added return type for
formatSubscriptionResult
in classNewHeadsSubscription
(#6368)
web3-core
- Fixed rpc errors not being sent as an inner error when using the
send
method on request manager (#6300).
web3-errors
- ESM import bug (#6359)
web3-eth-contract
- Fixed bug in
contract.events.allEvents
web3-validator
- ESM import bug (#6359)
Changed
- Updated web3 dependencies of other packages
v4.1.0
Added
web3
- Added minimum support of web3.extend function
web3-core
- Added minimum support of web3.extend function
web3-errors
RpcErrorMessages
that contains mapping for standard RPC Errors and their messages. (#6230)- created
TransactionGasMismatchInnerError
for clarity on the error inTransactionGasMismatchError
(#6215) - created
MissingGasInnerError
for clarity on the error inMissingGasError
(#6215)
web3-eth
- A
rpc_method_wrapper
(signTypedData
) for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286) - A
signTypedData
method to theWeb3Eth
class (#6286)
web3-eth-abi
- A
getEncodedEip712Data
method that takes an EIP-712 typed data object and returns the encoded data with the option to also keccak256 hash it (#6286)
web3-rpc-methods
- A
signTypedData
method toeth_rpc_methods
for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286)
web3-types
eth_signTypedData
andeth_signTypedData_v4
toweb3_eth_execution_api
(#6286)Eip712TypeDetails
andEip712TypedData
toeth_types
(#6286)
web3-validator
- Added
json-schema
as a main json schema type (#6264)
Fixed
web3-core
web3-errors
web3-eth
- sendTransaction will have gas filled by default using method
estimateGas
unless transaction builderoptions.fillGas
is false. (#6249) - Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243) - Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243)
web3-providers-ws
- Ensure a fixed version for "@types/ws": "8.5.3" (#6309)
Changed
web3-core
- No need to pass
CommonSubscriptionEvents &
at every child class ofWeb3Subscription
(#6262) - Implementation of
_processSubscriptionResult
and_processSubscriptionError
has been written in the base classWeb3Subscription
and maidpublic
. (#6262) - A new optional protected method
formatSubscriptionResult
could be used to customize data formatting instead of re-implementing_processSubscriptionResult
. (#6262) - No more needed to pass
CommonSubscriptionEvents &
for the first generic parameter ofWeb3Subscription
when inheriting from it. (#6262)
web3-eth
MissingGasError
error message changed for clarity (#6215)input
anddata
are 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 bothinput
anddata
properties (#6294)
web3-eth-accounts
- Dependencies updated
web3-eth-contract
- Dependencies updated
web3-eth-ens
- Dependencies updated
web3-eth-iban
- Dependencies updated
web3-eth-personal
- Dependencies updated
web3-net
- Dependencies updated
web3-providers-http
- Dependencies updated
web3-providers-ipc
- Dependencies updated
web3-types
input
anddata
are now optional properties onPopulatedUnsignedBaseTransaction
(previouslyinput
was a required property, anddata
was not available) (#6294)
web3-utils
- Dependencies updated
web3-validator
- Replace
is-my-json-valid
withzod
dependency. Related code was changed (#6264) - Types
ValidationError
andJsonSchema
were changed (#6264)
Removed
web3-eth
- Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243) - Type
RawValidationError
was removed (#6264)
web3-validator
- Type
RawValidationError
was removed (#6264)
v1.10.1
v4.1.0-rc.0
Added
web3
- Added minimum support of web3.extend function
web3-core
- Added minimum support of web3.extend function
web3-errors
RpcErrorMessages
that contains mapping for standard RPC Errors and their messages. (#6230)- created
TransactionGasMismatchInnerError
for clarity on the error inTransactionGasMismatchError
(#6215) - created
MissingGasInnerError
for clarity on the error inMissingGasError
(#6215)
web3-eth
- A
rpc_method_wrapper
(signTypedData
) for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286) - A
signTypedData
method to theWeb3Eth
class (#6286)
web3-eth-abi
- A
getEncodedEip712Data
method that takes an EIP-712 typed data object and returns the encoded data with the option to also keccak256 hash it (#6286)
web3-rpc-methods
- A
signTypedData
method toeth_rpc_methods
for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286)
web3-types
eth_signTypedData
andeth_signTypedData_v4
toweb3_eth_execution_api
(#6286)Eip712TypeDetails
andEip712TypedData
toeth_types
(#6286)
web3-validator
- Added
json-schema
as a main json schema type (#6264)
Fixed
web3-core
web3-errors
web3-eth
- sendTransaction will have gas filled by default using method
estimateGas
unless transaction builderoptions.fillGas
is false. (#6249) - Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243) - Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243)
web3-providers-ws
- Ensure a fixed version for "@types/ws": "8.5.3" (#6309)
Changed
web3-core
- No need to pass
CommonSubscriptionEvents &
at every child class ofWeb3Subscription
(#6262) - Implementation of
_processSubscriptionResult
and_processSubscriptionError
has been written in the base classWeb3Subscription
and maidpublic
. (#6262) - A new optional protected method
formatSubscriptionResult
could be used to customize data formatting instead of re-implementing_processSubscriptionResult
. (#6262) - No more needed to pass
CommonSubscriptionEvents &
for the first generic parameter ofWeb3Subscription
when inheriting from it. (#6262)
web3-eth
MissingGasError
error message changed for clarity (#6215)input
anddata
are 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 bothinput
anddata
properties (#6294)
web3-eth-accounts
- Dependencies updated
web3-eth-contract
- Dependencies updated
web3-eth-ens
- Dependencies updated
web3-eth-iban
- Dependencies updated
web3-eth-personal
- Dependencies updated
web3-net
- Dependencies updated
web3-providers-http
- Dependencies updated
web3-providers-ipc
- Dependencies updated
web3-types
input
anddata
are now optional properties onPopulatedUnsignedBaseTransaction
(previouslyinput
was a required property, anddata
was not available) (#6294)
web3-utils
- Dependencies updated
web3-validator
- Replace
is-my-json-valid
withzod
dependency. Related code was changed (#6264) - Types
ValidationError
andJsonSchema
were changed (#6264)
Removed
web3-eth
- Missing
blockHeaderSchema
properties causing some properties to not appear in response ofnewHeads
subscription (#6243) - Type
RawValidationError
was removed (#6264)
web3-validator
- Type
RawValidationError
was removed (#6264)
v1.10.1-rc.0
v4.0.3
Fixed
web3
web3-rpc-methods
- Rpc method
getPastLogs
accept blockHash as a parameter https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs (#6181)
web3-types
- type
Filter
includesblockHash
(#6206)
web3-utils
- BigInts pass validation within the method
numberToHex
(#6206)
Changed
web3-core
- Dependencies updated
web3-errors
- Dependencies updated
web3-eth
- Dependencies updated
web3-eth-abi
- Dependencies updated
web3-eth-accounts
- Dependencies updated
web3-eth-contract
- Dependencies updated
web3-eth-ens
- Dependencies updated
web3-eth-iban
- Dependencies updated
web3-eth-personal
- Dependencies updated
web3-net
- Dependencies updated
web3-providers-http
- Dependencies updated
web3-providers-ipc
- Dependencies updated
web3-providers-ws
- Dependencies updated
web3-validator
- Dependencies updated
v4.0.2
Fixed
web3
web3-core
- 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)
web3-eth-abi
- Support for "decoding" indexed string event arguments (returns the keccak256 hash of the string value instead of the actual string value) (#6167)
web3-eth-accounts
- Fixed "The
r
ands
returned bysignTransaction
to does not always consist of 64 characters #6207" (#6216)
web3-eth-contract
- Event filtering using non-indexed and indexed string event arguments (#6167)
web3-eth-ens
web3-providers-ws
web3-types
Added
web3
- Exported
Web3Context
,Web3PluginBase
,Web3EthPluginBase
from'web3-core'
, andWeb3Validator
from'web3-validator'
(#6165)
web3-core
- Web3Subscription constructor accept a Subscription Manager (as an alternative to accepting Request Manager that is now marked marked as deprecated) (#6210)
web3-types
- Added the
SimpleProvider
interface which has onlyrequest(args)
method that is compatible with EIP-1193 (#6210) - Added the
Eip1193EventName
type that contains the possible events names according to EIP-1193 (#6210)
Changed
web3-core
- Web3Subscription constructor overloading that accept a Request Manager is marked as deprecated (#6210)
web3-errors
- Dependencies updated
web3-eth
- Dependencies updated
web3-eth-iban
- Dependencies updated
web3-eth-personal
- Dependencies updated
web3-net
- Dependencies updated
web3-providers-http
- Dependencies updated
web3-providers-ipc
- Dependencies updated
web3-rpc-methods
- Dependencies updated
web3-types
- The
EIP1193Provider
class has now all the events (foron
andremoveListener
) according to EIP-1193 (#6210)
web3-utils
- Dependencies updated
web3-validator
- Dependencies updated
v4.0.1
Web3.js 4.0.1 is written in TypeScript and has many exciting features such as:
- Easy extensibility ( with web3 Plugins feature. example: Chainlink Plugin )
- 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
- Web3 Plugin Developers Guide
- Web3 Plugin Users Guide
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.
v4.0.1-rc.2
Added
web3-errors
InvalidPropertiesForTransactionTypeError
with error code429
(#6102)
web3-eth-contract
- Added support for
getPastEvents
method to filterallEvents
and specific event (#6010) - Added
maxPriorityFeePerGas
andmaxFeePerGas
inContractOptions
type and updated function using it in utils (#6118) - Added method's type autodetection by ABI param (#6137)
web3-types
- Added
filters
param to theFilter
type (#6010) - Added types
JsonRpcSubscriptionResultOld
,Web3ProviderMessageEventCallback
. Added.on('data')
type support for old providers (#6082) - Export for
HardforksOrdered
enum (#6102) - Export for
Web3ValidationErrorObject
type (#6102)
web3-utils
- Optional
hexstrict
parameter added to numberToHex (#6004)
Fixed
web3-eth
- Fixed
ignoreGasPricing
bug with wallet in context (#6071)
web3-eth-accounts
- Fixed ESM import bugs reported in (#6032) and (#6034)
- ESM projects will not need to run --experimental-specifier-resolution=node (#6127)
Changed
web3-core
- Replaced Buffer for Uint8Array (#6004)
web3-errors
- Nested Smart Contract error data is extracted at
Eip838ExecutionError
constructor and the nested error is set atinnerError
(#6045)
web3-eth
formatTransaction
no longer throws aTransactionDataAndInputError
if it's passed a transaction object with bothdata
andinput
properties set (as long as they are the same value) (#6064)- Refactored documentation for
rpc_method_wrappers
to point to the previously duplicated documentation found under theWeb3Eth
class documentation (#6054) - Replaced Buffer for Uint8Array (#6004)
- Refactored
defaultTransactionTypeParser
to return correct EIP-2718 types, prior implementation was prioritizingtransaction.hardfork
and ignoring the use oftransaction.gasLimit
.defaultTransactionTypeParser
will now throwInvalidPropertiesForTransactionTypeError
s for properties are used that are incompatible withtransaction.type
(#6102) prepareTransactionForSigning
anddefaultTransactionBuilder
now accepts optionalfillGasPrice
flag and by default will not fill gas(#6071)
web3-eth-abi
- 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)
web3-eth-accounts
- Replaced
Buffer
forUint8Array
(#6004) - The methods
recover
,encrypt
,privateKeyToAddress
does not support typeBuffer
but supports typeUint8Array
(#6004) - The method
parseAndValidatePrivateKey
returns a typeUint8Array
instead of typeBuffer
(#6004)
web3-providers-ipc
- Replaced Buffer for Uint8Array (#6004)
web3-types
- Removed chainId, to, data & input properties from NonPayableCallOptions
- Replaced Buffer for Uint8Array (#6004)
- types
FMT_BYTES.BUFFER
,Bytes
andFormatType
and encryption option types forsalt
andiv
has replaced support forBuffer
forUint8Array
(#6004) - Added
internalType
property to theAbiParameter
type.
web3-utils
- Replaced Buffer for Uint8Array (#6004)
- The methods
hexToBytes
,randomBytes
does not return typeBuffer
but typeUint8Array
(#6004) - The methods
sha3
andkeccak256Wrapper
does not accept typeBuffer
but typeUint8Array
(#6004) - The method
bytesToBuffer
has been removed for the usage ofbytesToUint8Array
(#6004)
web3-validator
- Replaced Buffer for Uint8Array (#6004)
Removed
web3-eth-ens
- Removed non read-only methods (#6084)
web3-validator
Web3ValidationErrorObject
type is now exported fromweb3-types
package (#6102)