ABIs
You are referring to the Legacy
version of KyberSwap docs.
For the most updated information, please refer to:
Classic
The contract Application Binary Interface (ABI) is the standard way to interact with the smart contracts in Ethereum.
We recommend importing the interfaces for the following functionalities:
IKyberNetworkProxy
: Fetch rates and execute tradesISimpleKyberProxy
: Simple APIs for trade executionIKyberHint
: Building and parsing hintsIKyberStorage
: Get reserve IDs for building hintsIKyberFeeHandler
: Claim staker rewards, reserve rebates or platform feesIKyberReserve
: Fetch rates of a specific reserveIERC20
: Token operations (Eg. token transfers / approvals)
The full contract ABIs are also given below the interface section.
Interface ABIs
IKyberNetworkProxy
IKyberNetworkProxy
[
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'trader',
type: 'address',
},
{
indexed: false,
internalType: 'contract IERC20',
name: 'src',
type: 'address',
},
{
indexed: false,
internalType: 'contract IERC20',
name: 'dest',
type: 'address',
},
{
indexed: false,
internalType: 'address',
name: 'destAddress',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'actualSrcAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'uint256',
name: 'actualDestAmount',
type: 'uint256',
},
{
indexed: false,
internalType: 'address',
name: 'platformWallet',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'platformFeeBps',
type: 'uint256',
},
],
name: 'ExecuteTrade',
type: 'event',
},
{
inputs: [
{ internalType: 'contract ERC20', name: 'src', type: 'address' },
{ internalType: 'contract ERC20', name: 'dest', type: 'address' },
{ internalType: 'uint256', name: 'srcQty', type: 'uint256' },
],
name: 'getExpectedRate',
outputs: [
{ internalType: 'uint256', name: 'expectedRate', type: 'uint256' },
{ internalType: 'uint256', name: 'worstRate', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
{ internalType: 'uint256', name: 'srcQty', type: 'uint256' },
{ internalType: 'uint256', name: 'platformFeeBps', type: 'uint256' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'getExpectedRateAfterFee',
outputs: [
{ internalType: 'uint256', name: 'expectedRate', type: 'uint256' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
{ internalType: 'address payable', name: 'destAddress', type: 'address' },
{ internalType: 'uint256', name: 'maxDestAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
{
internalType: 'address payable',
name: 'platformWallet',
type: 'address',
},
],
name: 'trade',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract ERC20', name: 'src', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'contract ERC20', name: 'dest', type: 'address' },
{ internalType: 'address payable', name: 'destAddress', type: 'address' },
{ internalType: 'uint256', name: 'maxDestAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
{ internalType: 'address payable', name: 'walletId', type: 'address' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'tradeWithHint',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
{ internalType: 'address payable', name: 'destAddress', type: 'address' },
{ internalType: 'uint256', name: 'maxDestAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
{
internalType: 'address payable',
name: 'platformWallet',
type: 'address',
},
{ internalType: 'uint256', name: 'platformFeeBps', type: 'uint256' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'tradeWithHintAndFee',
outputs: [{ internalType: 'uint256', name: 'destAmount', type: 'uint256' }],
stateMutability: 'payable',
type: 'function',
},
];
ISimpleKyberProxy
ISimpleKyberProxy
[
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
],
name: 'swapEtherToToken',
outputs: [{ internalType: 'uint256', name: 'destAmount', type: 'uint256' }],
stateMutability: 'payable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
],
name: 'swapTokenToEther',
outputs: [{ internalType: 'uint256', name: 'destAmount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
{ internalType: 'uint256', name: 'minConversionRate', type: 'uint256' },
],
name: 'swapTokenToToken',
outputs: [{ internalType: 'uint256', name: 'destAmount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
];
IKyberHint
IKyberHint
[
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenDest', type: 'address' },
{
internalType: 'enum IKyberHint.TradeType',
name: 'ethToTokenType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'ethToTokenReserveIds',
type: 'bytes32[]',
},
{
internalType: 'uint256[]',
name: 'ethToTokenSplits',
type: 'uint256[]',
},
],
name: 'buildEthToTokenHint',
outputs: [{ internalType: 'bytes', name: 'hint', type: 'bytes' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenSrc', type: 'address' },
{
internalType: 'enum IKyberHint.TradeType',
name: 'tokenToEthType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'tokenToEthReserveIds',
type: 'bytes32[]',
},
{
internalType: 'uint256[]',
name: 'tokenToEthSplits',
type: 'uint256[]',
},
],
name: 'buildTokenToEthHint',
outputs: [{ internalType: 'bytes', name: 'hint', type: 'bytes' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenSrc', type: 'address' },
{
internalType: 'enum IKyberHint.TradeType',
name: 'tokenToEthType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'tokenToEthReserveIds',
type: 'bytes32[]',
},
{
internalType: 'uint256[]',
name: 'tokenToEthSplits',
type: 'uint256[]',
},
{ internalType: 'contract IERC20', name: 'tokenDest', type: 'address' },
{
internalType: 'enum IKyberHint.TradeType',
name: 'ethToTokenType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'ethToTokenReserveIds',
type: 'bytes32[]',
},
{
internalType: 'uint256[]',
name: 'ethToTokenSplits',
type: 'uint256[]',
},
],
name: 'buildTokenToTokenHint',
outputs: [{ internalType: 'bytes', name: 'hint', type: 'bytes' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenDest', type: 'address' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'parseEthToTokenHint',
outputs: [
{
internalType: 'enum IKyberHint.TradeType',
name: 'ethToTokenType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'ethToTokenReserveIds',
type: 'bytes32[]',
},
{
internalType: 'contract IKyberReserve[]',
name: 'ethToTokenAddresses',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: 'ethToTokenSplits',
type: 'uint256[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenSrc', type: 'address' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'parseTokenToEthHint',
outputs: [
{
internalType: 'enum IKyberHint.TradeType',
name: 'tokenToEthType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'tokenToEthReserveIds',
type: 'bytes32[]',
},
{
internalType: 'contract IKyberReserve[]',
name: 'tokenToEthAddresses',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: 'tokenToEthSplits',
type: 'uint256[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'tokenSrc', type: 'address' },
{ internalType: 'contract IERC20', name: 'tokenDest', type: 'address' },
{ internalType: 'bytes', name: 'hint', type: 'bytes' },
],
name: 'parseTokenToTokenHint',
outputs: [
{
internalType: 'enum IKyberHint.TradeType',
name: 'tokenToEthType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'tokenToEthReserveIds',
type: 'bytes32[]',
},
{
internalType: 'contract IKyberReserve[]',
name: 'tokenToEthAddresses',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: 'tokenToEthSplits',
type: 'uint256[]',
},
{
internalType: 'enum IKyberHint.TradeType',
name: 'ethToTokenType',
type: 'uint8',
},
{
internalType: 'bytes32[]',
name: 'ethToTokenReserveIds',
type: 'bytes32[]',
},
{
internalType: 'contract IKyberReserve[]',
name: 'ethToTokenAddresses',
type: 'address[]',
},
{
internalType: 'uint256[]',
name: 'ethToTokenSplits',
type: 'uint256[]',
},
],
stateMutability: 'view',
type: 'function',
},
];
IKyberStorage
IKyberStorage
[
{
inputs: [
{ internalType: 'address', name: 'kyberProxy', type: 'address' },
{ internalType: 'uint256', name: 'maxApprovedProxies', type: 'uint256' },
],
name: 'addKyberProxy',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
name: 'getEntitledRebateData',
outputs: [
{ internalType: 'bool[]', name: 'entitledRebateArr', type: 'bool[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
name: 'getFeeAccountedData',
outputs: [
{ internalType: 'bool[]', name: 'feeAccountedArr', type: 'bool[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'getKyberProxies',
outputs: [
{
internalType: 'contract IKyberNetworkProxy[]',
name: '',
type: 'address[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
name: 'getRebateWalletsFromIds',
outputs: [
{ internalType: 'address[]', name: 'rebateWallets', type: 'address[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: 'reserveId', type: 'bytes32' }],
name: 'getReserveAddressesByReserveId',
outputs: [
{
internalType: 'address[]',
name: 'reserveAddresses',
type: 'address[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
name: 'getReserveAddressesFromIds',
outputs: [
{
internalType: 'address[]',
name: 'reserveAddresses',
type: 'address[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
{ internalType: 'uint256', name: 'startIndex', type: 'uint256' },
{ internalType: 'uint256', name: 'endIndex', type: 'uint256' },
],
name: 'getReserveAddressesPerTokenSrc',
outputs: [
{
internalType: 'address[]',
name: 'reserveAddresses',
type: 'address[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'reserve', type: 'address' }],
name: 'getReserveDetailsByAddress',
outputs: [
{ internalType: 'bytes32', name: 'reserveId', type: 'bytes32' },
{ internalType: 'address', name: 'rebateWallet', type: 'address' },
{
internalType: 'enum IKyberStorage.ReserveType',
name: 'resType',
type: 'uint8',
},
{ internalType: 'bool', name: 'isFeeAccountedFlag', type: 'bool' },
{ internalType: 'bool', name: 'isEntitledRebateFlag', type: 'bool' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'bytes32', name: 'reserveId', type: 'bytes32' }],
name: 'getReserveDetailsById',
outputs: [
{ internalType: 'address', name: 'reserveAddress', type: 'address' },
{ internalType: 'address', name: 'rebateWallet', type: 'address' },
{
internalType: 'enum IKyberStorage.ReserveType',
name: 'resType',
type: 'uint8',
},
{ internalType: 'bool', name: 'isFeeAccountedFlag', type: 'bool' },
{ internalType: 'bool', name: 'isEntitledRebateFlag', type: 'bool' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'reserve', type: 'address' }],
name: 'getReserveId',
outputs: [{ internalType: 'bytes32', name: 'reserveId', type: 'bytes32' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{
internalType: 'address[]',
name: 'reserveAddresses',
type: 'address[]',
},
],
name: 'getReserveIdsFromAddresses',
outputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
],
name: 'getReserveIdsPerTokenDest',
outputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
],
name: 'getReserveIdsPerTokenSrc',
outputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'bytes32[]', name: 'reserveIds', type: 'bytes32[]' },
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
],
name: 'getReservesData',
outputs: [
{ internalType: 'bool', name: 'areAllReservesListed', type: 'bool' },
{ internalType: 'bool[]', name: 'feeAccountedArr', type: 'bool[]' },
{ internalType: 'bool[]', name: 'entitledRebateArr', type: 'bool[]' },
{
internalType: 'contract IKyberReserve[]',
name: 'reserveAddresses',
type: 'address[]',
},
],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'isKyberProxyAdded',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: 'kyberProxy', type: 'address' }],
name: 'removeKyberProxy',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_kyberFeeHandler', type: 'address' },
{
internalType: 'address',
name: '_kyberMatchingEngine',
type: 'address',
},
],
name: 'setContracts',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_kyberDao', type: 'address' }],
name: 'setKyberDaoContract',
outputs: [],
stateMutability: 'nonpayable',
type: 'function',
},
];
IKyberFeeHandler
IKyberFeeHandler
[
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: 'uint256',
name: 'kncTWei',
type: 'uint256',
},
{
indexed: true,
internalType: 'contract IERC20',
name: 'token',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'KncBurned',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'platformWallet',
type: 'address',
},
{
indexed: true,
internalType: 'contract IERC20',
name: 'token',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'PlatformFeePaid',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'rebateWallet',
type: 'address',
},
{
indexed: true,
internalType: 'contract IERC20',
name: 'token',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'RebatePaid',
type: 'event',
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: 'staker',
type: 'address',
},
{
indexed: true,
internalType: 'uint256',
name: 'epoch',
type: 'uint256',
},
{
indexed: true,
internalType: 'contract IERC20',
name: 'token',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: 'amount',
type: 'uint256',
},
],
name: 'RewardPaid',
type: 'event',
},
{
inputs: [
{ internalType: 'address', name: 'platformWallet', type: 'address' },
],
name: 'claimPlatformFee',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'rebateWallet', type: 'address' },
],
name: 'claimReserveRebate',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: 'staker', type: 'address' },
{ internalType: 'uint256', name: 'epoch', type: 'uint256' },
],
name: 'claimStakerReward',
outputs: [{ internalType: 'uint256', name: 'amount', type: 'uint256' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'token', type: 'address' },
{ internalType: 'address[]', name: 'eligibleWallets', type: 'address[]' },
{
internalType: 'uint256[]',
name: 'rebatePercentages',
type: 'uint256[]',
},
{ internalType: 'address', name: 'platformWallet', type: 'address' },
{ internalType: 'uint256', name: 'platformFee', type: 'uint256' },
{ internalType: 'uint256', name: 'networkFee', type: 'uint256' },
],
name: 'handleFees',
outputs: [],
stateMutability: 'payable',
type: 'function',
},
];
IKyberReserve
IKyberReserve
[
{
inputs: [
{ internalType: 'contract IERC20', name: 'src', type: 'address' },
{ internalType: 'contract IERC20', name: 'dest', type: 'address' },
{ internalType: 'uint256', name: 'srcQty', type: 'uint256' },
{ internalType: 'uint256', name: 'blockNumber', type: 'uint256' },
],
name: 'getConversionRate',
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'contract IERC20', name: 'srcToken', type: 'address' },
{ internalType: 'uint256', name: 'srcAmount', type: 'uint256' },
{ internalType: 'contract IERC20', name: 'destToken', type: 'address' },
{ internalType: 'address payable', name: 'destAddress', type: 'address' },
{ internalType: 'uint256', name: 'conversionRate', type: 'uint256' },
{ internalType: 'bool', name: 'validate', type: 'bool' },
],
name: 'trade',
outputs: [{ internalType: 'bool', name: '', type: 'bool' }],
stateMutability: 'payable',
type: 'function',
},
];
IERC20
IERC20
[
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: 'address',
name: '_owner',
type: 'address',
},
{
indexed: true,
internalType: 'address',
name: '_spender',
type: 'address',
},
{
indexed: false,
internalType: 'uint256',
name: '_value',
type: 'uint256',
},
],
name: 'Approval',
type: 'event',
},
{
inputs: [
{ internalType: 'address', name: '_owner', type: 'address' },
{ internalType: 'address', name: '_spender', type: 'address' },
],
name: 'allowance',
outputs: [{ internalType: 'uint256', name: 'remaining', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_spender', type: 'address' },
{ internalType: 'uint256', name: '_value', type: 'uint256' },
],
name: 'approve',
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [{ internalType: 'address', name: '_owner', type: 'address' }],
name: 'balanceOf',
outputs: [{ internalType: 'uint256', name: 'balance', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'decimals',
outputs: [{ internalType: 'uint8', name: 'digits', type: 'uint8' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [],
name: 'totalSupply',
outputs: [{ internalType: 'uint256', name: 'supply', type: 'uint256' }],
stateMutability: 'view',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_to', type: 'address' },
{ internalType: 'uint256', name: '_value', type: 'uint256' },
],
name: 'transfer',
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
{
inputs: [
{ internalType: 'address', name: '_from', type: 'address' },
{ internalType: 'address', name: '_to', type: 'address' },
{ internalType: 'uint256', name: '_value', type: 'uint256' },
],
name: 'transferFrom',
outputs: [{ internalType: 'bool', name: 'success', type: 'bool' }],
stateMutability: 'nonpayable',
type: 'function',
},
];
KyberNetworkProxyInterface (V1)
KyberNetworkProxyInterface (V1)
[
{
constant: true,
inputs: [],
name: 'enabled',
outputs: [{ name: '', type: 'bool' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: false,
inputs: [
{ name: 'src', type: 'address' },
{ name: 'srcAmount', type: 'uint256' },
{ name: 'dest', type: 'address' },
{ name: 'destAddress', type: 'address' },
{ name: 'maxDestAmount', type: 'uint256' },
{ name: 'minConversionRate', type: 'uint256' },
{ name: 'walletId', type: 'address' },
{ name: 'hint', type: 'bytes' },
],
name: 'tradeWithHint',
outputs: [{ name: '', type: 'uint256' }],
payable: true,
stateMutability: 'payable',
type: 'function',
},
{
constant: true,
inputs: [],
name: 'maxGasPrice',
outputs: [{ name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ name: 'user', type: 'address' }],
name: 'getUserCapInWei',
outputs: [{ name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ name: 'src', type: 'address' },
{ name: 'dest', type: 'address' },
{ name: 'srcQty', type: 'uint256' },
],
name: 'getExpectedRate',
outputs: [
{ name: 'expectedRate', type: 'uint256' },
{ name: 'slippageRate', type: 'uint256' },
],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [
{ name: 'user', type: 'address' },
{ name: 'token', type: 'address' },
],
name: 'getUserCapInTokenWei',
outputs: [{ name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
{
constant: true,
inputs: [{ name: 'id', type: 'bytes32' }],
name: 'info',
outputs: [{ name: '', type: 'uint256' }],
payable: false,
stateMutability: 'view',
type: 'function',
},
];
ConversionRatesInterface
ConversionRatesInterface
[
{
constant: true,
inputs: [