NativePool
Functions
getAmountIn
Call the Registry contract to get the amount of output token based on input amount
amountOut
uint256
Amount of output token
tokenIn
address
Input token
tokenOut
address
Output token
getAmountOut
Call the Registry contract to get the amount of input token based on output amount
amountIn
uint256
Amount of input token
tokenIn
address
Input token
tokenOut
address
Output token
pairExists
Check if the pair exists
tokenIn
address
The token address of one side of the pair
tokenOut
address
The token address of the other side of the pair
getPairFee
Get fees for the given pair config
tokenIn
address
The token address of one side of the pair
tokenOut
address
The token address of the
other side of the pair
updatePairs
Update the pairs of this pool. In the form of array to update multiple pairs
_fees
uint256[]
Swap fee of the pair
_tokenAs
address[]
The token address of one side of the pair
_tokenBs
address[]
The token address of the other side of the pair
_pricingModelIds
uint256[]
Pricing model ID this pair is using
removePair
Remove the pair by specifying the token
tokenIn
address
The token address of one side of the pair
tokenOut
address
The token address of the other side of the pair
swap
It can only be called by the Router contract.
Verify signature, order not expired, valid nonce, pair is whitelisted, valid amount input
Get firm quote based on pricing ID
Actually execute the swap and transfer the funds between user, Router, Pool and Treasury
order
bytes
Contains the data in an order. Including signer, buyer/seller address, expected deadline, buy/sell token/amount, etc.
signature
bytes
Signature generated by the signer
flexibleAmount
int256
The
recipient
address
Fund recipient of the swap (could be Router for multi-hop swaps)
callback
bytes
Callback data after at the end of the swap
setRouter
Set the router address allowed to call the swap function
_router
address
The router address
addSigner
Whitelist new signer for the Pool
_signer
address
The signer address
removeSigner
Remove existing signer from the whitelist
_signer
address
The signer address
getNonce
Get the nonce for the specific seller
seller
address
The seller address
increaseNonce
Increase the nonce by 1 for the specific seller
seller
address
The seller address
Last updated