Added
web3-core
- If the response error was
execution reverted
, raiseContractExecutionError
and 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) registerPlugin
method toWeb3Context
(#5393)Web3PluginBase
exported abstract class (#5393)Web3EthPluginBase
exported abstract class (#5393)
web3-error
- Add optional
innerError
property to the abstract classWeb3Error
. ThisinnerError
could beError
,Error[]
orundefined
. (#5435) (#5434) - The class
Web3ContractError
is moved to this package fromweb3-eth-contract
. (#5434) - Added the error code
ERR_TX_SIGNING
and used it insideTransactionSigningError
(#5462) - Added the error code
ERR_TX_GAS_MISMATCH
and used it insideTransactionGasMismatchError
(#5462) - Added
SignatureError
toweb3-errors/src/errors/signature_errors.ts
(moved fromweb3-eth/src/errors.ts
) (#5462) - Added the errors' classes to
web3-errors/src/errors/transaction_errors.ts
fromweb3-eth/src/errors.ts
(#5462) - Added
TransactionBlockTimeoutError
class and its error codeERR_TX_BLOCK_TIMEOUT
(#5294) ExistingPluginNamespaceError
class and it's error codeERR_EXISTING_PLUGIN_NAMESPACE
(#5393)
web3-eth
web3-rpc-methods
dependency (#5441)- Added chain and hardfork validation for transaction and transaction.common object in
validateTransactionForSigning
web3-eth-abi
- If an error happens when decoding a value, preserve that exception at
innerError
inside the error classAbiError
. (#5435) - Add basic functionality that is used, by
web3-eth-contract
, when decoding error data according to EIP-838. (#5434)
web3-eth-contract
- Decoding error data, using Error ABI if available, according to EIP-838. (#5434)
- The class
Web3ContractError
is moved from this package toweb3-error
. (#5434)
web3-plugin-example
- Example plugin for wrapping contract methods to provide custom functionality (#5393)
- Example plugin for custom RPC methods using the
requestManager
(#5393)
web3-utils
- Added and exported three reusable utility functions:
pollTillDefined
,rejectIfTimeout
andrejectIfConditionAtInterval
which 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-eth-personal
web3-rpc-methods
dependency (#5441)
web3-eth-net
web3-rpc-methods
dependency (#5441)
web3-providers-ipc
- Show error message and return dummy promise if socket is not writable (#5294)
web3-rpc-methods
- web3-rpc-methods package added
web3-types
Changed
web3-core
- Default value for
API
generic forWeb3ContextObject
fromany
tounknown
(#5393) - Default value for
API
generic forWeb3ContextInitOptions
fromany
tounknown
(#5393) - Added validation when
defaultHardfork
anddefaultCommon.hardfork
are different in web3config - Added validation when
defaultChain
anddefaultCommon.basechain
are different in web3config - Added a new configuration variable
enableExperimentalFeatures
. (#5481)
web3-error
- Moved
SignerError
fromweb3-errors/src/errors/signature_errors.ts
toweb3-errors/src/errors/transaction_errors.ts
, and renamed it toTransactionSigningError
(#5462) - Corrected the error code for
JSONRPC_ERR_UNAUTHORIZED
to be4100
(#5462)
web3-eth
Web3EthExecutionAPI
is now imported viaweb3-types
instead ofweb3_eth_execution_api.ts
(#5441)- Replace the imported methods from
rpc_methods.ts
withethRpcMethods
imports fromweb3-rpc-methods
(#5441) Web3NetAPI
is now imported fromweb3-types
instead ofweb3-net
(#5441)- Moved
rpc_methods
tests toweb3-rpc-methods
(#5441) - Implemented the logic for
transactionBlockTimeout
(#5294) - Use subscription at
rejectIfBlockTimeout
when the provider supports subscription. Implement this as an experimental feature (ifuseSubscriptionWhenCheckingBlockTimeout
atenableExperimentalFeatures
istrue
). (#5481) - At some test cases, optimized some codes. (#5481)
web3-eth-accounts
signTransaction
andprivateKeyToAccount
will throwTransactionSigningError
instead ofSignerError
now (#5462)
web3-eth-ens
Web3NetAPI
is now imported fromweb3-types
instead ofweb3-net
(#5441)
web3-eth-personal
- Import
EthPersonalAPI
fromweb3-types
instead of local import (#5441) - Replace the imported methods from
rcp_methods.ts
withpersonalRpcMethods
imports fromweb3-rpc-methods
(#5441) - Replace use of
EthPersonalAPIManager
withWeb3RequestManager<EthPersonalAPI>
(#5441)
web3-eth-net
Web3NetAPI
is now imported fromweb3-types
instead ofweb3_net_api.ts
(#5441)- Replace the imported methods from
rpc_methods.ts
withnetRpcMethods
imports fromweb3-rpc-methods
(#5441)
web3-types
Web3APISpec
,Web3APIMethod
, andWeb3APIParams
now supportsunknown
APIs (#5393)
Fixed
web3-error
- Corrected the error code for
JSONRPC_ERR_UNAUTHORIZED
to be4100
(#5462)
web3-eth
- Fix
getBlock
returning empty transactions object onhydrated
true (#5556) - setimmediate package to polyfill setImmediate for browsers (#5450)
web3-eth-contract
- 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)
web3-eth-abi
- Return
BigInt
instead ofstring
when decoding function parameters for large numbers, such asuint256
. (#5435)
web3-types
Web3APISpec
,Web3APIMethod
, andWeb3APIParams
now supportsunknown
APIs (#5393)
Removed
web3-eth
- Moved the errors' classes from
web3-eth/src/errors.ts
toweb3-errors/src/errors/transaction_errors.ts
(#5462)
web3-eth-personal
- Exported type
EthPersonalAPIManager
,EthPersonalAPI
is not exported viaweb3-types
(#5441)
web3-eth-net
rpcMethods
export, these methods are now exported viaweb3-rpc-methods
asnetRpcMethods
(#5441)Web3NetAPI
export, now exported viaweb3-types
asWeb3NetAPI
(#5441)
web3-validator
- Removed direct function
toJSON()
inWeb3ValidatorError
class as its available via base class (#5435)