Noah Router
Contract info
Contract name: Noah Router
View NoahRouter.sol on Github.
EOS EVM Network Contract address: 0x1c8f68e8AdBD75c23281e5c88E44D0b7023a4238 View the Noah Swap:Router contract on evm
Read functions
WETH
function WETH() external pure returns (address);
Returns the canonical address fo EOS EVM: WEOS token
factory
function factory() external pure returns (address);
Returns the canonical address for Noah Swap:Factory contract on evm
getAmountOut
function getAmountOut(uint
feeRate,uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut);
getAmountIn
function getAmountIn(uint
feeRate,uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn);
getAmountsOut
function getAmountsOut(uint amountIn, address[] memory path) internal view returns (uint[] memory amounts);
getAmountsIn
function getAmountsIn(uint amountOut, address[] memory path) internal view returns (uint[] memory amounts);
quote
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB);
Write functions
addLiquidity
Adds liquidity to a pool.
Name | Type | Description |
---|---|---|
tokenA |
| The contract address of one token from your liquidity pair. |
tokenB |
| The contract address of the other token from your liquidity pair. |
amountADesired |
| The amount of tokenA you'd like to provide as liquidity. |
amountBDesired |
| The amount of tokenA you'd like to provide as liquidity. |
amountAMin |
| The minimum amount of tokenA to provide (slippage impact). |
amountBMin |
| The minimum amount of tokenB to provide (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
addLiquidityETH
Adds liquidity to a token A⇄WEOS pool.
Name | Type | |
---|---|---|
addLiquidityETH |
| The payable amount in EOS. |
token |
| The contract address of the token to add liquidity. |
amountTokenDesired |
| The amount of the token you'd like to provide as liquidity. |
amountTokenMin |
| The minimum amount of the token to provide (slippage impact). |
amountETHMin |
| The minimum amount of EOS to provide (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
removeLiquidity
Removes liquidity from a token A⇄token B pool.
Name | Type | |
---|---|---|
tokenA |
| The contract address of one token from your liquidity pair. |
tokenB |
| The contract address of the other token from your liquidity pair. |
liquidity |
| The amount of LP Tokens to remove. |
amountAMin |
| The minimum amount of tokenA to remove (slippage impact). |
amountBMin |
| The minimum amount of tokenB to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
removeLiquidityETH
Removes liquidity from a token A⇄WEOS pool.
Name | Type | |
---|---|---|
token |
| The contract address of the token to remove liquidity. |
liquidity |
| The amount of LP Tokens to remove. |
amountTokenMin |
| The minimum amount of the token to remove (slippage impact). |
amountETHMin |
| The minimum amount of EOS to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
removeLiquidityETHSupportingFeeOnTransferTokens
Removes liquidity from a token A⇄WEOS for tokens that take a fee on transfer.
Name | Type | |
---|---|---|
token |
| The contract address of the token to remove liquidity. |
liquidity |
| The amount of LP Tokens to remove. |
amountTokenMin |
| The minimum amount of the token to remove (slippage impact). |
amountETHMin |
| The minimum amount of EOS to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
removeLiquidityETHWithPermit
Removes liquidity from a token A⇄WEOS and receives EOS, without pre-approval, via permit.
Name | Type | |
---|---|---|
token |
| The contract address of the token to remove liquidity. |
liquidity |
| The amount of LP Tokens to remove. |
amountTokenMin |
| The minimum amount of the token to remove (slippage impact). |
amountETHMin |
| The minimum amount of EOS to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
approveMax |
| Whether or not the approval amount in the signature is for liquidity or |
v |
| The v component of the permit signature. |
r |
| The r component of the permit signature. |
s |
| The s component of the permit signature. |
removeLiquidityETHWithPermitSupportingFeeOnTransferTokens
Removes liquidity from a token A⇄WEOS and receives EOS via permit for tokens that take a fee on transfer.
Name | Type | |
---|---|---|
token |
| The contract address of the token to remove liquidity. |
liquidity |
| The amount of LP Tokens to remove. |
amountTokenMin |
| The minimum amount of the token to remove (slippage impact). |
amountETHMin |
| The minimum amount of EOS to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
approveMax |
| Whether or not the approval amount in the signature is for liquidity or |
v |
| The v component of the permit signature. |
r |
| The r component of the permit signature. |
s |
| The s component of the permit signature. |
removeLiquidityWithPermit
Removes liquidity from a token A⇄token B, without pre-approval, via permit.
Name | Type | |
---|---|---|
tokenA |
| The contract address of one token from your liquidity pair. |
tokenB |
| The contract address of the other token from your liquidity pair. |
liquidity |
| The amount of LP Tokens to remove. |
amountTokenMin |
| The minimum amount of the token to remove (slippage impact). |
amountETHMin |
| The minimum amount of EOS to remove (slippage impact). |
to |
| Address of LP Token recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
approveMax |
| Whether or not the approval amount in the signature is for liquidity or |
v |
| The v component of the permit signature. |
r |
| The r component of the permit signature. |
s |
| The s component of the permit signature. |
swapETHForExactTokens
Receive an exact amount of output tokens for as little EOS as possible.
Name | Type | |
---|---|---|
swapETHForExactTokens |
| Payable EOS amount. |
amountOut |
| The amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactETHForTokens
Receive as many output tokens as possible for an exact amount of EOS.
Name | Type | |
---|---|---|
swapExactETHForTokens |
| Payable EOS amount. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactETHForTokensSupportingFeeOnTransferTokens
Receive as many output tokens as possible for an exact amount of EOS. Supports tokens that take a fee on transfer.
Name | Type | |
---|---|---|
swapExactETHForTokensSupportingFeeOnTransferTokens |
| Payable EOS amount. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactTokensForETH
Receive as much EOS as possible for an exact amount of input tokens.
Name | Type | |
---|---|---|
amountIn |
| Payable amount of input tokens. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactTokensForETHSupportingFeeOnTransferTokens
Receive as much EOS as possible for an exact amount of tokens. Supports tokens that take a fee on transfer.
Name | Type | |
---|---|---|
amountIn |
| Payable amount of input tokens. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactTokensForTokens
Receive as many output tokens as possible for an exact amount of input tokens.
Name | Type | |
---|---|---|
amountIn |
| Payable amount of input tokens. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapExactTokensForTokensSupportingFeeOnTransferTokens
Receive as many output tokens as possible for an exact amount of input tokens. Supports tokens that take a fee on transfer.
Name | Type | |
---|---|---|
amountIn |
| Payable amount of input tokens. |
amountOutMin |
| The minimum amount tokens to receive. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapTokensForExactETH
Receive an exact amount of EOS for as few input tokens as possible.
Name | Type | |
---|---|---|
amountOut |
| Payable amount of input tokens. |
amountInMax |
| The minimum amount tokens to input. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
swapTokensForExactTokens
Receive an exact amount of output tokens for as few input tokens as possible.
Name | Type | |
---|---|---|
amountOut |
| Payable amount of input tokens. |
amountInMax |
| The maximum amount tokens to input. |
path (address[]) |
| An array of token addresses. |
to |
| Address of recipient. |
deadline |
| Unix timestamp deadline by which the transaction must confirm. |
Interface
Last updated