Migration to smart contract v2
Upgrading your current Unizen API implementation to Version 2 is a simple process. Follow these steps to seamlessly transition to the new version and take advantage of its improved features.
Migration Steps
Enable Version 2 in Quote Requests
In your quote endpoint, include the parameter
version=v2
.This ensures that our system utilizes the latest version of the smart contracts.
Update the Unizen Contract Addresses Package
Upgrade to the latest Unizen contract addresses package to retrieve the new
unizenRouter
address.This is the only address needed for approvals—no more version-specific handling.
Use the Unizen Router for Transaction Execution
When executing a transaction from the user's wallet (for non-gasless trades), use the Unizen Router address.
The swap endpoint will continue to return the correct contract details, including the necessary approval information (if applicable, unless it’s a Permit2 trade).
That's It!
With just these simple steps, your integration will be fully compatible with Version 2 of Unizen’s API. By upgrading, you ensure improved efficiency, reduced costs, and enhanced functionality.
Last updated
Was this helpful?