Migration from zksync-web3
zksync-web3
Migration from This guide provides some high-level differences between zksync-web3
and zksync2-js
for those who are familiar with zksync-web3
and need a quick primer. zksync2-js
has several differences since it's using ethers.js v6
, compared to zksync-web3
, which uses ethers.js v5
. Before continuing to get to know the changes made in zksync2-js
, you should read the migration guide from ethers.js v5
to ethers.js v6
.
Differences:
Token.Address
has been removed because it was deprecated.Provider.getMessageProof
has been removed because it was deprecated.Provider.getTokenPrice
has been removed because it was deprecated.Provider.getBlockWithTransaction
has been replaced withProvider.getBlock(<BlockTag>, true)
.BlockWithTransaction
has been removed.TransactionRequest.calldata
has been changed fromBytesLike
tostring
.transaction.calldata
parameter inProvider.estimateL1ToL2Execute
has been changed fromBytesLike
tostring
.transaction.calldata
parameter inAdaterL1.getRequestExecuteTx
has been changed fromBytesLike
tostring
.transaction.calldata
parameter inAdapterL1.estimateGasRequestExecute
has been changed fromBytesLike
tostring
.transaction.calldata
parameter inAdapterL1.RequestExecute
has been changed fromBytesLike
tostring
.utils.parseTransaction
has been replaced byutils.parseEip712
.