Skip to content

Releases: zksync-sdk/zksync2-go

v1.0.0

06 Nov 05:34
Compare
Choose a tag to compare

1.0.0 (2024-11-06)

Bug Fixes

  • accounts: implement lazy chaching in wallets (60f84ab)

Features

  • accounts: add Cache which provides lazy caching for bridge contracts (542647f)
  • accounts: add PaymasterParams and GasPerPubdata to TransferCallMsg (8cf5594)
  • accounts: add PaymasterParams and GasPerPubdata to WithdrawalCallMsg (d294db0)
  • accounts: add TransactionOpts with ZKsync features (f4321a3)
  • accounts: change SmartAccount.Balance to utilize CallOpts (e4155d6)
  • accounts: change WalletL2.Balance to utilize CallOpts (1d28994)
  • accounts: remove PaymasterParams from transfer and withdrawal tx (efc0f60)
  • accounts: rename DepositTransaction fields (c070cfe)
  • accounts: rename NewBaseSignerFromMnemonic method (1b2bf80)
  • accounts: rename Transaction method (fb1bbe9)
  • accounts: rename TransactionOpts to TransactionOptsL1 (ba3ad1e)
  • accounts: rename WalletL1.ApproveERC20 to WalletL1.ApproveToken (80dd564)
  • accounts: rename WalletL1.EstimateCustomBridgeDepositL2Gas (f310974)
  • accounts: rename WalletL1.EstimateDefaultBridgeDepositL2Gas (bbc0b48)
  • accounts: use TransactionOptsL1 in WalletL1 (2757f4b)
  • accounts: use TransactOpts in Deployer (5491f63)
  • accounts: use zksync transaction for transfer and withdrawal (99762f5)
  • clients: add CustomSignature and GasPerPubdata to TransferCallMsq (df00687)
  • clients: add CustomSignature and GasPerPubdata to WithdrawalCallMsq (4cd0dcf)
  • clients: rename TransferCallMsg methods (487b902)
  • clients: rename WithdrawalCallMsg methods (bd63b3d)
  • eip712: change the API of Domain struct (670010a)
  • eip712: remove TypedData interface (9f69f2e)
  • redesign Signer and replace BaseSigner with ECDSASigner (a38b8bc)
  • remove AllowList field from transaction and message types (571fb96)
  • remove Deployer, AdapterL1 and AdapterL1 interfaces (dfcc937)
  • remove EIP712Meta struct and inline its properties in CallMsg (4e48d91)
  • remove deprecated code (269f787)
  • rename BaseClient to Client (e91f3bc)
  • types: improve the design of L2 transaction (c2aa297)
  • types: rename EIP712TxType to TxType (f009818)
  • types: rename the fields for default ERC20 bridges in BridgeContracts (5fb3925)
  • types: update FeeParams field types from uint64 to big.Int (02d02a2)
  • types: use big.Int for block and batch number in BlockDetails (8fb632b)
  • types: use big.Int for gas prices and block numbers in BatchDetails (02a6e8e)

BREAKING CHANGES

  • accounts: Rename NewBaseSignerFromMnemonic method to
    NewECDSASignerFromMenmonic.
  • types: Change FeeParams field types from uint64 to
    big.Int.
  • accounts: Rename Transaction.ToTransaction712 to
    Transaction.ToTransaction.
  • accounts: Renamed DepositTransaction fields:
    ApproveERC20 to ApproveToken, ApproveBaseERC20 to
    ApproveBaseToken.
  • accounts: Rename WalletL1.ApproveERC20 to WalletL1.ApproveToken.
  • accounts: The SmartAccount.Balance method utilizes CallOpts.
  • accounts: The WalletL2.Balance method utilizes CallOpts.
  • accounts: Remove PaymasterParams from TransferTransaction
    and WithdrawalTransaction since it can be utilze using TransactionOpts.
  • accounts: Use TransactionOptsL1 in WalletL1 when
    interacting with contract API.
  • accounts: The TransactionOpts is renamed to
    TransactionOptsL1 since it's changed to be used only for
    L1 interaction.
  • accounts: WalletL2 and Wallet for transfer and
    withdraw methods use zksync transaction in order to provide
    utilization of zksync features.
  • clients: Rename WithdrawalCallMsg.ToCallMsg to
    WithdrawalCallMsg.ToL1CallMsg and WithdrawalCallMsg.ToZkCallMsg
    to WithdrawalCallMsg.ToCallMsg.
  • clients: Rename TransferCallMsg.ToCallMsg to
    TransferCallMsg.ToL1CallMsg and TransferCallMsg.ToZkCallMsg to
    TransferCallMsg.ToCallMsg.
  • eip712: The eip712.Domain methods have been renamed
    to be more convenient.
  • eip712: Removed eip712.TypedData interface.
  • types: Rename properties L1Erc20DefaultBridge to L1Erc20Bridge
    and L2Erc20DefaultBridge to L2Erc20Bridge in BridgeContracts.
  • types: Use big.Int type in BlockDetails for Number
    and L1BatchNumber.
  • types: Use big.Int type in BatchDetails for Number,
    L2FairGasPrice and L1GasPrice.
  • The EIP712Meta struct has been removed, and its properties
    are now directly inlined into the CallMsg struct.
  • types: Rename constant EIP712TxType to TxType.
  • The Signer interface has been redesigned to be minimal and more
    extensible. The BaseSigner has been replaced by ECDSASigner. Additionally,
    Wallet, WalletL1, and WalletL2 now use ECDSASigner in their constructors.
  • types: Transaction712 has been replaced by Transaction, an improved version
    that offers a more convenient API and greater extensibility.
  • accounts: Rename WalletL1.EstimateCustomBridgeDepositL2Gas to
    WalletL1.EstimateDepositL2GasFromCustomBridge. Added the missing
    l2Value parameter.
  • accounts: Rename WalletL1.EstimateDefaultBridgeDepositL2Gas to
    WalletL1.EstimateDepositL2GasFromDefaultBridge.
  • Remove Deployer, AdapterL1 and AdapterL2
    interfaces. Rename BaseDeployer to Deployer.
  • Remove Client interface and rename BaseClient
    to Client.
  • Remove AllowList field from transaction and message types.
  • Remove deprecated code.

v0.7.0

27 Jul 17:24
Compare
Choose a tag to compare

0.7.0 (2024-07-27)

Features

  • clients: add BaseClient.BalanceAtByTag method (abff602)
  • clients: add BaseClient.BlockByTag method (d86c806)
  • clients: add BaseClient.CallContractByTag method (1d64eab)
  • clients: add BaseClient.CodeAtByTag method (b8ab9e4)
  • clients: add BaseClient.HeaderByTag method (12cddcd)
  • clients: add BaseClient.IsMessageSignatureCorrect (e2d1312)
  • clients: add BaseClient.IsTypedDataSignatureCorrect (f95918a)
  • clients: add BaseClient.NonceAtByTag method (1dc6a59)
  • clients: add BaseClient.StorageAtByTag method (24c3361)
  • clients: add BaseClient.TransactionCountByTag method (b01170e)
  • utils: add HashedL2ToL1Msg method (98e7825)
  • utils: add IsMessageSignatureCorrect (001cfef)
  • utils: add IsTypedDataSignatureCorrect function (09d9b5d)

v0.6.0

27 Jul 17:23
Compare
Choose a tag to compare

0.6.0 (2024-06-24)

Features

  • align types and RPC endpoints with version v24.7.0 of a node (a411218)
  • clients,types: add support for zks_getFeeParams RPC method (b6bce81)
  • clients,types: add support for zks_getProtocolVersion RPC method (72f2247)
  • clients,types: add support for zks_sendRawTransactionWithDetailedOutput RPC method (fa9c571)
  • clients: add BaseClient.IsL2BridgeLegacy method (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.0 of a node.

v0.5.0

09 Jun 13:38
Compare
Choose a tag to compare

0.5.0 (2024-06-09)

Bug Fixes

  • accounts: use correct token when trasfering and withdrawing ETH (573779b)

Features

  • add SmartAccount to provide better support for AA (65a5686)
  • add Bridgehub support (82d6474)
  • clients: add BaseClient.RawBlockTransactions and BaseClient.BytecodeByHash (0a41362)
  • types: add Transaction712.Decode() for decoding serialized transactions (9b6dbc1), closes #49

v0.4.0

23 Feb 11:20
Compare
Choose a tag to compare

0.4.0 (2024-02-23)

Bug Fixes

  • accounts: FullRequiredDepositFee use default bridge address when missing msg.BridgeAddress (840c653)
  • accounts: WalletL2.SignTransaction populates transaction before signing (13f8d7f)
  • accounts: change default priority fee to 0 for zksync tx (37dbd47)
  • accounts: resolve error in formating string (6be5c6b)
  • clients: allow requestExecute transactions in block without signatrues (1744ee7)
  • clients: deprecate client.ConfirmedTokens (33372c4)
  • clients: deprecate client.TokenPrice (d5acec3)
  • clients: patch to work with geth:1.13.13 version #27 (8ee9d08)
  • resolve colision among dependencies #29 (dc8ad7a)
  • types: aligned types with zksync-core v18 (191cc74)
  • types: extend bridge contracts with WETH bridges (a21f294)
  • utils: pass bytes to GetGeneralPaymasterInput function #30 (8e62183)

Features

  • accounts: add WalletL2.DeploymentNonce for fetching deployment nonce (8099778)
  • clients: add BaseClient.Proof method for fetching storage proofs (9e06517)
  • update contracts to align with version v20.4.0 (463a6f3)
  • utils: add NonceHolderAddress variable (0365a37)

v0.3.2

10 Nov 17:43
Compare
Choose a tag to compare

0.3.2 (2023-11-10)

Bug Fixes

  • accounts,types: resolve errors in error messages (167cf5b)

v0.3.1

21 Aug 17:21
Compare
Choose a tag to compare

0.3.1 (2023-08-21)

Bug Fixes

  • accounts: ensure the Context if it's nil in WalletL2.Balance (e0d6064)
  • accounts: use correct Context and block number in WalletL1.BalanceL1 (2af4513), closes #22

v0.3.0

11 Aug 15:54
Compare
Choose a tag to compare

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, or context.Context.
  • Method parameters have been organized into structures to provide clearer functions and facilitate easier usage.
  • The return type of Wallet.ClaimFailedDeposit has been changed from common.Hash to *types.Transaction.
  • The return type of Wallet.Transfer has been changed from common.Hash to *types.Transaction.
  • The return type of Wallet.Withdraw has been changed from common.Hash to *types.Transaction.
  • The method Wallet.EstimateAndSend has been removed.
  • The method Wallet.GetProvider has been removed.
  • The method EthSigner.GetAddress has been renamed to EthSigner.Address.
  • The method EthSigner.GetDomain has been renamed to EthSigner.Domain.
  • The methods in eip712.TypedData no longer have the Get prefix.
  • eip712.DefaultEip712Domain has been renamed to ZkSyncEraEIP712Domain.
  • types.MessengerAddress has been renamed to L1MessengerAddress.
  • The method utils.ComputeL2Create2Address has been renamed to Create2Address.
  • The method utils.ComputeL2CreateAddress has been renamed to CreateAddress.

Deprecations:

  • EthereumProvider has been deprecated in favor of the AdapterL1 interface and its implementation, WalletL1.
  • Provider is deprecated in favor of the Client interface and its implementation, BaseClient.
  • EthSigner is deprecated in favor of Signer and its implementation, BaseSigner.

v0.2.0

23 Jun 15:07
Compare
Choose a tag to compare
  • Add support for account abstraction and paymaster.
  • Eliminated the need to specify bind.TransactOpts.GasTipCap value (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.

v0.1.1

12 Apr 12:42
Compare
Choose a tag to compare

v0.1.1 (2023-04-12)

Few fixes and enhacements:

  • use SuggestGasPrice by default
  • add optional Tx value parameter to Execute method