Scripts
Module info
Public Functions
Create Pool
Create pool with two fungible assets
public entry fun create_pool(
creator: &signer,
token_0: Object<Metadata>,
token_1: Object<Metadata>,
fee: u64,
sqrt_price: u128,****
)Argument
Type
Description
Create pool with one coin and one fungible asset
Argument
Description
Argument
Type
Description
Create pool with two coins
Argument
Description
Argument
Type
Description
Add liquidity
Add liquidity to a pool with two fungible assets
Argument
Type
Description
Add liquidity to a pool with one coin and one fungible asset
Argument
Description
Argument
Type
Description
Add liquidity to a pool with two coins
Argument
Description
Argument
Type
Description
Remove liquidity |
Remove liquidity from a pool
Argument
Type
Description
Burn position
Argument
Type
Description
Collect fee
Argument
Type
Description
Collect reward
Argument
Type
Description
Swap functions
Swap exact fungible asset for fungible asset
Argument
Type
Description
Swap exact coin for fungible asset
Argument
Description
Argument
Type
Description
Swap fungible asset for exact fungible asset
Argument
Type
Description
Swap coin for exact fungible asset
Argument
Description
Argument
Type
Description
Swap exact fungible asset for fungible asset with multiple hops
Argument
Type
Description
Swap exact coin for fungible asset with multiple hops
Argument
Description
Argument
Type
Description
Swap fungible asset for exact fungible asset with multiple hops
Argument
Type
Description
Swap coin for exact fungible asset with multiple hops
Argument
Description
Argument
Type
Description
Last updated