Approve token allowence

Execution Scope (Single-hop vs Multihop)

/public/emigroswap/buildTransaction returns a fully-formed single-hop transaction, including:

  • routerAddress

  • abiFunctionSignature

  • abiParameters

  • adapterAddress

  • adapterData

  • amountOut (RAW) and minAmountIn (RAW)

What’s supported internally (multihop): Your backend service already supports multihop execution via swapExactInputPathVia(...) when an intent is created and executed by the server. That flow is internal today.

Planned/optional (future public multihop): If/when you expose multihop via the public buildTransaction, the response will mirror the single-hop shape and include:

  • routerAddress

  • abiFunctionSignature: "swapExactInputPathVia(address,address[],uint256,uint256,address,bytes)"

  • abiParameters (with path and per-hop adapterData encoded)

Until that is exposed, external callers should use single-hop buildTransaction responses as-is.

If you need for refference, you can check in API REFERENCE the correct smartcontract router address in the correct chain



Approve the router (ERC-20)


You can optionally adapt the flow to satisfy conditions in your system, such as creating a swapIntent to save in your database. However, for a clear and error-free execution, simply passing the information received from the quote endpoint to the build calldata already satisfies the requirements to perform the on-chain swap.

Last updated