Skip to main content
Version: Legacy

ISimpleKyberProxy

interface ISimpleKyberProxy#

imports IERC20

Source: ISimpleKyberProxy.sol


INDEX#

<AUTOGENERATED_TABLE_OF_CONTENTS>

REFERENCE#

Functions#

swapTokenToEther#

Execute a simple ETH -> ERC20 token trade.


function swapTokenToEther(IERC20 token, uint256 srcAmount, uint256 minConversionRate) external returns (uint256 destAmount) | Parameter | Type | Description | | ------------------- |:-------:|:-------------------------------------------------------------------:| | token | IERC20 | destination ERC20 token contract address | | srcAmount | uint256 | source ERC20 token amount in its token decimals | | minConversionRate | uint256 | minimum conversion rate; trade is canceled if actual rate is lower | Returns:\ destAmount - Amount of actual destination ETH wei


swapEtherToToken#

Execute a simple ERC20 token -> ETH trade.


function swapEtherToToken(IERC20 token, uint256 minConversionRate) external returns (uint256 destAmount) | Parameter | Type | Description | | ------------------- |:-------:|:--------------------------------------------------------------------:| | token | IERC20 | destination ERC20 token contract address | | minConversionRate | uint256 | minimum conversion rate; trade is canceled if actual rate is lower | Returns:\ destAmount - Amount of actual destination tokens in twei


swapTokenToToken#

Makes a simple ERC20 -> ERC20 token trade.


function swapTokenToToken(IERC20 src, uint256 srcAmount, IERC20 dest, uint256 minConversionRate) external returns (uint256 destAmount) | Parameter | Type | Description | | ------------------- |:-------:|:--------------------------------------------------------------------:| | src | IERC20 | source ERC20 token contract address | | srcAmount | uint256 | wei amount of source ERC20 token | | dest | IERC20 | destination ERC20 token contract address | | minConversionRate | uint256 | minimum conversion rate; trade is canceled if actual rate is lower | Returns:\ destAmount - Amount of actual destination tokens in twei