Router v2
Last updated
Last updated
Contract name: pancake::router Contract address: c7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa::router
Admin Multi Sig: b11ccaed0056a75472539c2b0d9511c82fc6a36622bec7578216af5fe550dd0d
Name | Type | Description |
---|---|---|
Create the pool pair for swap.
Name | Type | Descripton |
---|---|---|
Add liquidity to the pool.
Remove liquidity from the pool.
Swap exact amount of tokenX to tokenY.
Swap tokenX to exact amount of tokenY.
Swap exact amount of tokenX to tokenZ using 2 pools (Pool XY and Pool YZ).
Swap tokenX to exact amount of tokenZ using 2 pools (Pool XY and Pool YZ).
Swap exact amount of tokenX to tokenA using 3 pools (Pool XY, Pool YZ and Pool ZA).
Swap tokenX to exact amount of tokenA using 3 pools (Pool XY, Pool YZ and Pool ZA).
Swap exact amount of tokenX to tokenB using 3 pools (Pool XY, Pool YZ, Pool ZA and Pool AB).
Swap tokenX to exact amount of tokenB using 3 pools (Pool XY, Pool YZ, Pool ZA and Pool AB).
Swap exact amount of tokenX to tokenY.
Swap tokenX to the exact amount of tokenY.
The amount required in order to the the output amount.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | Description |
---|---|
Name | Type | Description |
---|---|---|
Position | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Type | |
---|---|
X
type address
The coin type address of token X in the pair.
Y
type address
The coin type address of token Y in the pair.
sender
signer
The sender's signer when calling the function.
sender
signer
The sender's signer when calling the function.
amount_x_desired
u64
The amount of tokenX you'd like to provide as liquidity.
amount_y_desired
u64
The amount of tokenY you'd like to provide as liquidity.
amount_x_min
u64
The minimum amount of tokenX to provide (slippage impact).
amount_y_min
u64
The minimum amount of tokenY to provide (slippage impact).
sender
signer
The sender's signer when calling the function.
liquidity
u64
The amount of LP Tokens to remove.
amount_x_min
u64
The minimum amount of tokenX to remove (slippage impact).
amount_y_min
u64
The minimum amount of tokenY to remove (slippage impact).
sender
signer
The sender's signer when calling the function.
x_in
u64
Payable amount of input tokenX.
y_min_out
u64
The minimum amount tokenY to receive.
sender
signer
The sender's signer when calling the function.
y_out
u64
Payable amount of output tokenY.
x_max_in
u64
The maximum amount tokenX to input.
sender
signer
The sender's signer when calling the function.
x_in
u64
Payable amount of input tokenX.
z_min_out
u64
The minimum amount tokenZ to receive.
sender
signer
The sender's signer when calling the function.
z_out
u64
Payable amount of output tokenZ.
x_max_in
u64
The maximum amount tokenX to input.
sender
signer
The sender's signer when calling the function.
x_in
u64
Payable amount of input tokenX.
a_min_out
u64
The minimum amount tokenA to receive.
sender
signer
The sender's signer when calling the function.
a_out
u64
Payable amount of output tokenA.
x_max_in
u64
The maximum amount tokenX to input.
sender
signer
The sender's signer when calling the function.
x_in
u64
Payable amount of input tokenX.
b_min_out
u64
The minimum amount tokenB to receive.
sender
signer
The sender's signer when calling the function.
b_out
u64
Payable amount of output tokenB.
x_max_in
u64
The maximum amount tokenX to input.
x_in
coin::Coin
The coin resource of tokenX that the user will swap.
coin::Coin
The coin resource of tokenY that the user will receive.
x_in
coin::Coin
The coin resource of tokenX that the user will swap.
y_out_amount
u64
The expected amount of tokenY that user will receive.
0
coin::Coin
The coin resource of tokenX that the user will swap.
1
coin::Coin
The coin resource of tokenY that user will receive.
y_out_amount
u64
The amount of tokenY that user will receive.
u64
The amount of tokenX required to get the amount of tokenY.