swap

This method swaps one hosted ERC20 token for another hosted ERC20 token. This low-level function should be called from a contract which performs important safety checks.

Function

function swap(
    address _token0, 
    address _token1, 
    address _to
) external;

Parameters

ParameterDescription

_token0

An ERC20 token address. Token must have already a pool.

_token1

An ERC20 token address. Token must have already a pool.

_to

The address of the recipient that receives the _amount1Out tokens.

Last updated