Releases: web3/web3.js
Releases · web3/web3.js
v4.1.2
Fixed
web3
- Fix of incorrect provider warning behavior
web3-eth-accounts
- Fixed "The
r
ands
returned bysign
to does not always consist of 64 characters" (#6411)
web3-eth-contract
web3-utils
soliditySha3()
with BigInt support
Added
web3-core
- Added to
Web3Config
propertycontractDataInputFill
allowing users to have the choice using propertydata
,input
orboth
for contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400)
web3-eth
- Added to
Web3Config
propertycontractDataInputFill
allowing users to have the choice using propertydata
,input
orboth
for contract methods to be sent to the RPC provider when creating contracts. (#6377) (#6400)
web3-eth-contract
- Added
dataInputFill
as a ContractInitOption, allowing users to have the choice using propertydata
,input
orboth
for contract methods to be sent to the RPC provider. (#6355) - Added to
Web3Config
propertycontractDataInputFill
allowing users to have the choice using propertydata
,input
orboth
for contract methods to be sent to the RPC provider when creating contracts. (#6377)
web3-types
- add
asEIP1193Provider
toWeb3BaseProvider
so every inherited class can have the returned value ofrequest
method, fully compatible with EIP-1193. (#6407)
Changed
- Dependencies updated of packages
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.