This repository was archived by the owner on Dec 10, 2025. It is now read-only.
Releases: zksync-sdk/zksync2-go
Releases · zksync-sdk/zksync2-go
v1.1.0
v1.0.0
1.0.0 (2024-11-06)
Bug Fixes
- accounts: implement lazy chaching in wallets (60f84ab)
Features
- accounts: add
Cachewhich provides lazy caching for bridge contracts (542647f) - accounts: add
PaymasterParamsandGasPerPubdatatoTransferCallMsg(8cf5594) - accounts: add
PaymasterParamsandGasPerPubdatatoWithdrawalCallMsg(d294db0) - accounts: add
TransactionOptswith ZKsync features (f4321a3) - accounts: change
SmartAccount.Balanceto utilizeCallOpts(e4155d6) - accounts: change
WalletL2.Balanceto utilizeCallOpts(1d28994) - accounts: remove
PaymasterParamsfrom transfer and withdrawal tx (efc0f60) - accounts: rename
DepositTransactionfields (c070cfe) - accounts: rename
NewBaseSignerFromMnemonicmethod (1b2bf80) - accounts: rename
Transactionmethod (fb1bbe9) - accounts: rename
TransactionOptstoTransactionOptsL1(ba3ad1e) - accounts: rename
WalletL1.ApproveERC20toWalletL1.ApproveToken(80dd564) - accounts: rename
WalletL1.EstimateCustomBridgeDepositL2Gas(f310974) - accounts: rename
WalletL1.EstimateDefaultBridgeDepositL2Gas(bbc0b48) - accounts: use
TransactionOptsL1inWalletL1(2757f4b) - accounts: use
TransactOptsinDeployer(5491f63) - accounts: use zksync transaction for transfer and withdrawal (99762f5)
- clients: add
CustomSignatureandGasPerPubdatatoTransferCallMsq(df00687) - clients: add
CustomSignatureandGasPerPubdatatoWithdrawalCallMsq(4cd0dcf) - clients: rename
TransferCallMsgmethods (487b902) - clients: rename
WithdrawalCallMsgmethods (bd63b3d) - eip712: change the API of
Domainstruct (670010a) - eip712: remove
TypedDatainterface (9f69f2e) - redesign
Signerand replaceBaseSignerwithECDSASigner(a38b8bc) - remove
AllowListfield from transaction and message types (571fb96) - remove
Deployer,AdapterL1andAdapterL1interfaces (dfcc937) - remove
EIP712Metastruct and inline its properties inCallMsg(4e48d91) - remove deprecated code (269f787)
- rename
BaseClienttoClient(e91f3bc) - types: improve the design of L2 transaction (c2aa297)
- types: rename
EIP712TxTypetoTxType(f009818) - types: rename the fields for default ERC20 bridges in
BridgeContracts(5fb3925) - types: update
FeeParamsfield types fromuint64tobig.Int(02d02a2) - types: use
big.Intfor block and batch number inBlockDetails(8fb632b) - types: use
big.Intfor gas prices and block numbers inBatchDetails(02a6e8e)
BREAKING CHANGES
- accounts: Rename
NewBaseSignerFromMnemonicmethod to
NewECDSASignerFromMenmonic. - types: Change
FeeParamsfield types fromuint64to
big.Int. - accounts: Rename
Transaction.ToTransaction712to
Transaction.ToTransaction. - accounts: Renamed
DepositTransactionfields:
ApproveERC20toApproveToken,ApproveBaseERC20to
ApproveBaseToken. - accounts: Rename
WalletL1.ApproveERC20toWalletL1.ApproveToken. - accounts: The
SmartAccount.Balancemethod utilizesCallOpts. - accounts: The
WalletL2.Balancemethod utilizesCallOpts. - accounts: Remove
PaymasterParamsfromTransferTransaction
andWithdrawalTransactionsince it can be utilze usingTransactionOpts. - accounts: Use
TransactionOptsL1inWalletL1when
interacting with contract API. - accounts: The
TransactionOptsis renamed to
TransactionOptsL1since it's changed to be used only for
L1 interaction. - accounts:
WalletL2andWalletfortransferand
withdrawmethods use zksync transaction in order to provide
utilization of zksync features. - clients: Rename
WithdrawalCallMsg.ToCallMsgto
WithdrawalCallMsg.ToL1CallMsgandWithdrawalCallMsg.ToZkCallMsg
toWithdrawalCallMsg.ToCallMsg. - clients: Rename
TransferCallMsg.ToCallMsgto
TransferCallMsg.ToL1CallMsgandTransferCallMsg.ToZkCallMsgto
TransferCallMsg.ToCallMsg. - eip712: The
eip712.Domainmethods have been renamed
to be more convenient. - eip712: Removed
eip712.TypedDatainterface. - types: Rename properties
L1Erc20DefaultBridgetoL1Erc20Bridge
andL2Erc20DefaultBridgetoL2Erc20BridgeinBridgeContracts. - types: Use
big.Inttype inBlockDetailsforNumber
andL1BatchNumber. - types: Use
big.Inttype inBatchDetailsforNumber,
L2FairGasPriceandL1GasPrice. - The
EIP712Metastruct has been removed, and its properties
are now directly inlined into theCallMsgstruct. - types: Rename constant
EIP712TxTypetoTxType. - The
Signerinterface has been redesigned to be minimal and more
extensible. TheBaseSignerhas been replaced byECDSASigner. Additionally,
Wallet,WalletL1, andWalletL2now useECDSASignerin their constructors. - types:
Transaction712has been replaced byTransaction, an improved version
that offers a more convenient API and greater extensibility. - accounts: Rename
WalletL1.EstimateCustomBridgeDepositL2Gasto
WalletL1.EstimateDepositL2GasFromCustomBridge. Added the missing
l2Valueparameter. - accounts: Rename
WalletL1.EstimateDefaultBridgeDepositL2Gasto
WalletL1.EstimateDepositL2GasFromDefaultBridge. - Remove
Deployer,AdapterL1andAdapterL2
interfaces. RenameBaseDeployertoDeployer. - Remove
Clientinterface and renameBaseClient
toClient. - Remove
AllowListfield from transaction and message types. - Remove deprecated code.
v0.7.0
0.7.0 (2024-07-27)
Features
- clients: add
BaseClient.BalanceAtByTagmethod (abff602) - clients: add
BaseClient.BlockByTagmethod (d86c806) - clients: add
BaseClient.CallContractByTagmethod (1d64eab) - clients: add
BaseClient.CodeAtByTagmethod (b8ab9e4) - clients: add
BaseClient.HeaderByTagmethod (12cddcd) - clients: add
BaseClient.IsMessageSignatureCorrect(e2d1312) - clients: add
BaseClient.IsTypedDataSignatureCorrect(f95918a) - clients: add
BaseClient.NonceAtByTagmethod (1dc6a59) - clients: add
BaseClient.StorageAtByTagmethod (24c3361) - clients: add
BaseClient.TransactionCountByTagmethod (b01170e) - utils: add
HashedL2ToL1Msgmethod (98e7825) - utils: add
IsMessageSignatureCorrect(001cfef) - utils: add
IsTypedDataSignatureCorrectfunction (09d9b5d)
v0.6.0
0.6.0 (2024-06-24)
Features
- align types and RPC endpoints with version
v24.7.0of a node (a411218) - clients,types: add support for
zks_getFeeParamsRPC method (b6bce81) - clients,types: add support for
zks_getProtocolVersionRPC method (72f2247) - clients,types: add support for
zks_sendRawTransactionWithDetailedOutputRPC method (fa9c571) - clients: add
BaseClient.IsL2BridgeLegacymethod (8209dc3) - clients: add
BaseClient.L2TokenAddressFromCustomBridge()method (ec03104) - provider support for custom shared bridge (cfdd543)
BREAKING CHANGES
- Types and RPC endpoints are aligned with version
v24.7.0of a node.
v0.5.0
v0.4.0
0.4.0 (2024-02-23)
Bug Fixes
- accounts:
FullRequiredDepositFeeuse default bridge address when missingmsg.BridgeAddress(840c653) - accounts:
WalletL2.SignTransactionpopulates transaction before signing (13f8d7f) - accounts: change default priority fee to 0 for zksync tx (37dbd47)
- accounts: resolve error in formating string (6be5c6b)
- clients: allow
requestExecutetransactions in block without signatrues (1744ee7) - clients: deprecate
client.ConfirmedTokens(33372c4) - clients: deprecate
client.TokenPrice(d5acec3) - clients: patch to work with
geth:1.13.13version #27 (8ee9d08) - resolve colision among dependencies #29 (dc8ad7a)
- types: aligned types with
zksync-corev18 (191cc74) - types: extend bridge contracts with WETH bridges (a21f294)
- utils: pass bytes to
GetGeneralPaymasterInputfunction #30 (8e62183)
Features
v0.3.2
v0.3.1
v0.3.0
The design of the SDK is intended to align with the structure of the geth library, making migration easier. To achieve this, certain breakable changes and deprecations were necessary.
Breakable changes
- All abstractions (
Client,AdapterL1,AdapterL2,Deployer,Adapter) now have context-aware methods through:bind.CallOpts,bind.TransactOpts,accounts.CallOpts,accounts.TransactOpts, orcontext.Context. - Method parameters have been organized into structures to provide clearer functions and facilitate easier usage.
- The return type of
Wallet.ClaimFailedDeposithas been changed fromcommon.Hashto*types.Transaction. - The return type of
Wallet.Transferhas been changed fromcommon.Hashto*types.Transaction. - The return type of
Wallet.Withdrawhas been changed fromcommon.Hashto*types.Transaction. - The method
Wallet.EstimateAndSendhas been removed. - The method
Wallet.GetProviderhas been removed. - The method
EthSigner.GetAddresshas been renamed toEthSigner.Address. - The method
EthSigner.GetDomainhas been renamed toEthSigner.Domain. - The methods in
eip712.TypedDatano longer have theGetprefix. eip712.DefaultEip712Domainhas been renamed toZkSyncEraEIP712Domain.types.MessengerAddresshas been renamed toL1MessengerAddress.- The method
utils.ComputeL2Create2Addresshas been renamed toCreate2Address. - The method
utils.ComputeL2CreateAddresshas been renamed toCreateAddress.
Deprecations:
EthereumProviderhas been deprecated in favor of theAdapterL1interface and its implementation,WalletL1.Provideris deprecated in favor of theClientinterface and its implementation,BaseClient.EthSigneris deprecated in favor ofSignerand its implementation,BaseSigner.
v0.2.0
- Add support for account abstraction and paymaster.
- Eliminated the need to specify
bind.TransactOpts.GasTipCapvalue (maxPriorityFeePerGas) when performing write operation on a smart contract.
Breakable changes
The source code is organized to several packages and because of that import statements needs to be updated.