Skip to content

Latest commit

 

History

History
534 lines (401 loc) · 14.8 KB

IUniswapExchange.md

File metadata and controls

534 lines (401 loc) · 14.8 KB

IUniswapExchange.sol

View Source: contracts/interfaces/IUniswapExchange.sol

IUniswapExchange

Contract Members

Constants & Variables

bytes32 public name;
bytes32 public symbol;
uint256 public decimals;

Functions

tokenAddress

function tokenAddress() external view
returns(token address)

Arguments

Name Type Description

factoryAddress

function factoryAddress() external view
returns(factory address)

Arguments

Name Type Description

addLiquidity

function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable
returns(uint256)

Arguments

Name Type Description
min_liquidity uint256
max_tokens uint256
deadline uint256

removeLiquidity

function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external nonpayable
returns(uint256, uint256)

Arguments

Name Type Description
amount uint256
min_eth uint256
min_tokens uint256
deadline uint256

getEthToTokenInputPrice

function getEthToTokenInputPrice(uint256 eth_sold) external view
returns(tokens_bought uint256)

Arguments

Name Type Description
eth_sold uint256

getEthToTokenOutputPrice

function getEthToTokenOutputPrice(uint256 tokens_bought) external view
returns(eth_sold uint256)

Arguments

Name Type Description
tokens_bought uint256

getTokenToEthInputPrice

function getTokenToEthInputPrice(uint256 tokens_sold) external view
returns(eth_bought uint256)

Arguments

Name Type Description
tokens_sold uint256

getTokenToEthOutputPrice

function getTokenToEthOutputPrice(uint256 eth_bought) external view
returns(tokens_sold uint256)

Arguments

Name Type Description
eth_bought uint256

ethToTokenSwapInput

function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable
returns(tokens_bought uint256)

Arguments

Name Type Description
min_tokens uint256
deadline uint256

ethToTokenTransferInput

function ethToTokenTransferInput(uint256 min_tokens, uint256 deadline, address recipient) external payable
returns(tokens_bought uint256)

Arguments

Name Type Description
min_tokens uint256
deadline uint256
recipient address

ethToTokenSwapOutput

function ethToTokenSwapOutput(uint256 tokens_bought, uint256 deadline) external payable
returns(eth_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
deadline uint256

ethToTokenTransferOutput

function ethToTokenTransferOutput(uint256 tokens_bought, uint256 deadline, address recipient) external payable
returns(eth_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
deadline uint256
recipient address

tokenToEthSwapInput

function tokenToEthSwapInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline) external nonpayable
returns(eth_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_eth uint256
deadline uint256

tokenToEthTransferInput

function tokenToEthTransferInput(uint256 tokens_sold, uint256 min_eth, uint256 deadline, address recipient) external nonpayable
returns(eth_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_eth uint256
deadline uint256
recipient address

tokenToEthSwapOutput

function tokenToEthSwapOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
eth_bought uint256
max_tokens uint256
deadline uint256

tokenToEthTransferOutput

function tokenToEthTransferOutput(uint256 eth_bought, uint256 max_tokens, uint256 deadline, address recipient) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
eth_bought uint256
max_tokens uint256
deadline uint256
recipient address

tokenToTokenSwapInput

function tokenToTokenSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr) external nonpayable
returns(tokens_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_tokens_bought uint256
min_eth_bought uint256
deadline uint256
token_addr address

tokenToTokenTransferInput

function tokenToTokenTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address token_addr) external nonpayable
returns(tokens_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_tokens_bought uint256
min_eth_bought uint256
deadline uint256
recipient address
token_addr address

tokenToTokenSwapOutput

function tokenToTokenSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address token_addr) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
max_tokens_sold uint256
max_eth_sold uint256
deadline uint256
token_addr address

tokenToTokenTransferOutput

function tokenToTokenTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address token_addr) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
max_tokens_sold uint256
max_eth_sold uint256
deadline uint256
recipient address
token_addr address

tokenToExchangeSwapInput

function tokenToExchangeSwapInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address exchange_addr) external nonpayable
returns(tokens_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_tokens_bought uint256
min_eth_bought uint256
deadline uint256
exchange_addr address

tokenToExchangeTransferInput

function tokenToExchangeTransferInput(uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address recipient, address exchange_addr) external nonpayable
returns(tokens_bought uint256)

Arguments

Name Type Description
tokens_sold uint256
min_tokens_bought uint256
min_eth_bought uint256
deadline uint256
recipient address
exchange_addr address

tokenToExchangeSwapOutput

function tokenToExchangeSwapOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address exchange_addr) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
max_tokens_sold uint256
max_eth_sold uint256
deadline uint256
exchange_addr address

tokenToExchangeTransferOutput

function tokenToExchangeTransferOutput(uint256 tokens_bought, uint256 max_tokens_sold, uint256 max_eth_sold, uint256 deadline, address recipient, address exchange_addr) external nonpayable
returns(tokens_sold uint256)

Arguments

Name Type Description
tokens_bought uint256
max_tokens_sold uint256
max_eth_sold uint256
deadline uint256
recipient address
exchange_addr address

transfer

function transfer(address _to, uint256 _value) external nonpayable
returns(bool)

Arguments

Name Type Description
_to address
_value uint256

transferFrom

function transferFrom(address _from, address _to, uint256 value) external nonpayable
returns(bool)

Arguments

Name Type Description
_from address
_to address
value uint256

approve

function approve(address _spender, uint256 _value) external nonpayable
returns(bool)

Arguments

Name Type Description
_spender address
_value uint256

allowance

function allowance(address _owner, address _spender) external view
returns(uint256)

Arguments

Name Type Description
_owner address
_spender address

balanceOf

function balanceOf(address _owner) external view
returns(uint256)

Arguments

Name Type Description
_owner address

totalSupply

function totalSupply() external view
returns(uint256)

Arguments

Name Type Description

setup

function setup(address token_addr) external nonpayable

Arguments

Name Type Description
token_addr address

Contracts