Uniswap V2 Pallet Extrinsics
Create
Create a new pool.
Emits PoolCreated
even when successful.
Buy
Execute a buy order on a pool.
The base_amount
always represent the base asset amount (A/B => A).
Emits Swapped
event when successful.
Sell
Execute a sell order on a pool.
The base_amount
always represent the base asset amount (A/B => A).
Emits Swapped
event when successful.
Swap
Execute a specific swap operation.
Buy operation if the pair is the original pool pair (A/B). Sell operation if the pair is the original pool pair swapped (B/A).
The quote_amount
is always the quote asset amount (A/B => B), (B/A => A).
Emits Swapped
event when successful.
Add Liquidity
Add liquidity to a constant_product pool.
Emits LiquidityAdded
event when successful.
Remove Liquidity
Remove liquidity from constant_product pool.
Emits LiquidityRemoved
event when successful.