This guide covers the changes introduced in v2.0.0 and how to migrate from v1.x.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/1inch/cross-chain-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Overview
v2.0.0 introduces fee collection support with integrator and resolver fees, new event decoding utilities, and API versioning.Breaking Changes
Fee Parameters
The fee parameter structure has been completely redesigned to support both integrator and resolver fees.| v1.x | v2.x |
|---|---|
QuoteParams.takingFeeBps?: number | QuoteParams.integratorFee?: IntegratorFeeRequest |
OrderParams.fee?: TakingFeeInfo | Removed (fees derived from quote) |
Removed Types
Contract Address Changes
All escrow factory and implementation contracts have been updated to support the new fee collection mechanism.View Contract Address Mapping
View Contract Address Mapping
| Contract | v1.x Address | v2.x Address |
|---|---|---|
| ESCROW_FACTORY | 0xa7bcb4eac8964306f9e3764f67db6a7af6ddf99a | 0x03a25b3215a0e5c15cf23ac4d2e5cf86c0ff7efa |
| ESCROW_ZK_FACTORY | 0x584aeab186d81dbb52a8a14820c573480c3d4773 | 0xd9085ac07da21bd6eb003a530a524ab054ca8652 |
| ESCROW_SRC_IMPLEMENTATION | 0xcd70bf33cfe59759851db21c83ea47b6b83bef6a | 0x30476b0bf2f73f78a75488742920da7ff76c0ca0 |
| ESCROW_ZK_SRC_IMPLEMENTATION | 0xddc60c7babfc55d8030f51910b157e179f7a41fc | 0x198cc9a03192d767a29886b6ef626fee38e36959 |
| ESCROW_DST_IMPLEMENTATION | 0x9c3e06659f1c34f930ce97fcbce6e04ae88e535b | 0x5cd822f1c70469c36898aa98516a48f4aa04c73a |
| ESCROW_ZK_DST_IMPLEMENTATION | 0xdc4ccc2fc2475d0ed3fddd563c44f2bf6a3900c9 | 0x07d3d5e598cc23bfee9884b1e342ddaecd88dead |
If you have hardcoded any escrow factory or implementation addresses in your application, you must update them to the v2.x addresses.
zkSync Escrow Address Calculation
zkSync now uses the same escrow address calculation logic as other EVM chains. v1.x: zkSync had customcreate2 prefix and bytecode hash for address calculation.
v2.x: zkSync uses the standard EscrowFactory implementation (same as Ethereum, Polygon, etc.).
New Features
Fee Collection
v2.0 introduces comprehensive fee collection with support for both integrator and resolver fees.Event Decoding
New event classes for parsing escrow contract events with full fee information:API Versioning
Filter orders by API version to handle both legacy and new orders:Event Topic Hashes
| Event | v1.x Topic | v2.x Topic |
|---|---|---|
| SrcEscrowCreated | 0x0e534c62f0afd2fa0f0fa71198e8aa2d549f24daf2bb47de0d5486c7ce9288ca | 0x1140dcf80f027f65ebd1c2e98c33e3ebf7ef025d944a079256037cd55271bf98 |
| DstEscrowCreated | 0xc30e111dcc74fddc2c3a4d98ffb97adec4485c0a687946bf5b22c2a99c7ff96d | unchanged |
| EscrowCancelled | 0x6e3be9294e58d10b9c8053cfd5e09871b67e442fe394d6b0870d336b9df984a9 | unchanged |
| EscrowWithdrawal | 0xe346f5c97a360db5188bfa5d3ec5f0583abde420c6ba4d08b6cfe61addc17105 | unchanged |
| FundsRescued | 0xc4474c2790e13695f6d2b6f1d8e164290b55370f87a542fd7711abe0a1bf40ac | unchanged |
Immutables ABI Changes
TheImmutables struct now includes a parameters field for fee data.
parameters field encodes the ImmutableFees structure (128 bytes when present):
Hash Computation:
Immutables.hash() now includes keccak256(parameters) in the hash computation.Migration Steps
Follow these steps to migrate your v1.x service to v2.0:1. Update Event Listeners
Handle both topic hashes forSrcEscrowCreated to support both versions: