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.
web3-rpc-methods
dependency (#5441)- Added chain and hardfork validation for transaction and transaction.common object in
validateTransactionForSigning
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)
- Moved the errors' classes from
web3-eth/src/errors.ts
toweb3-errors/src/errors/transaction_errors.ts
(#5462)
- Fix
getBlock
returning empty transactions object onhydrated
true (#5556) - setimmediate package to polyfill setImmediate for browsers (#5450)
- Updated Web3.js dependencies (#5664)
- Updated dependencies (#5725)
tsc
compiled files moved tolib/
directory fromdist/
(#5739)
- web3.js dependencies (#5757)
- Enable transaction with local wallet index in the
to
field (#5731)
- 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)
- 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)
getRevertReason
is no longer exported (#5844)
- Added hybrid build (ESM and CJS) of library (#5904)
- Added source files (#5956)
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)
- Removed dependencies @ethereumjs/tx, @ethereumjs/common (#5963)
- Fixed
ignoreGasPricing
bug with wallet in context (#6071)
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)
Release Notes:
Detailed List of change logs are mentioned under previous 4.x alpha and RC releases.
Documentation: Web3.js documentation Web3 API Migration Guide from 1.x
- Dependencies updated
- Dependencies updated
- 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)
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)
- A
rpc_method_wrapper
(signTypedData
) for the rpc callseth_signTypedData
andeth_signTypedData_v4
(#6286) - A
signTypedData
method to theWeb3Eth
class (#6286)
- Added return type for
formatSubscriptionResult
in classNewHeadsSubscription
(#6368)
- 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)
- Transactions will now default to type 2 transactions instead of type 0, similar to 1.x version. (#6282)
- Ensure provider.supportsSubscriptions exists before watching by subscription (#6440)
- Fixed param sent to
checkRevertBeforeSending
insendSignedTransaction
- Fixed
defaultTransactionBuilder
for value issue (#6509)
- Added
ALL_EVENTS
andALL_EVENTS_ABI
constants,SendTransactionEventsBase
type,decodeEventABI
method (#6410)
- Dependencies updated
- Catch
TransactionPollingTimeoutError
was added to send transaction events (#6623)
- Added
eth.getMaxPriorityFeePerGas
method (#6748)
- method
getBlock
now includes properties of eip 4844, 4895, 4788 when returning block (#6933) - update type
withdrawalsSchema
,blockSchema
andblockHeaderSchema
schemas to include properties of eip 4844, 4895, 4788 (#6933)
defaultReturnFormat
was added to all methods that haveReturnType
param. (#6947)getTransactionFromOrToAttr
,waitForTransactionReceipt
,trySendTransaction
,SendTxHelper
was exported (#7000)
- Added parameter
customTransactionReceiptSchema
into methodsemitConfirmation
,waitForTransactionReceipt
,watchTransactionByPolling
,watchTransactionBySubscription
,watchTransactionForConfirmations
(#7000) - Changed functionality: For networks that returns
baseFeePerGas===0x0
fillmaxPriorityFeePerGas
andmaxFeePerGas
bygetGasPrice
method (#7050)
- Fixed issue with simple transactions, Within
checkRevertBeforeSending
if there is no data set in transaction, set gas to be21000
(#7043)
sendTransaction
inrpc_method_wrappers
accepts optional param ofTransactionMiddleware
(#7088)- WebEth has
setTransactionMiddleware
andgetTransactionMiddleware
for automatically passing tosentTransaction
(#7088) TransactionMiddleware
andTransactionMiddleware
data types are exported (#7088)
- Fixed geth issue when running a new instance, transactions will index when there are no blocks created (#7098)
- Adds transaction property to be an empty list rather than undefined when no transactions are included in the block (#7151)
- Change method
getTransactionReceipt
to not be casted asTransactionReceipt
to give proper return type (#7159)
- Forwards the new
web3Context.config.customTransactionSchema
toformatTransaction
- Adds the same
{transactionSchema?: ValidationSchemaInput}
that exists informatTransaction
tovalidateTransactionForSigning
- Allow
getEthereumjsTxDataFrom
to return additional fields that may be passed if using acustomTransactionSchema
.
populateGasPrice
function now checksWeb3Context.config.ignoreGasPricing
. IfignoreGasPricing
is true, gasPrice will not be estimated (#7320)