Skip to main content

ISwapper

ISwapper

swap

function swap(address fromAsset, address toAsset, uint256 fromAssetAmount, uint256 minToAssetAmmount, bytes data) external returns (uint256 toAssetAmount)

Parameters

NameTypeDescription
fromAssetaddressThe token address of the asset being sold.
toAssetaddressThe token address of the asset being purchased.
fromAssetAmountuint256The amount of assets being sold.
minToAssetAmmountuint256The minimum amount of assets to be purchased.
databytestx.data returned from 1Inch's /v5.0/1/swap API