Transaction Constraints
Parameters needed to create a tx
Getting Pool Limits
Different privacy pools have different limits for deposit and withdraw operations. Limits can also depend on the user's 0x
-address (address can be whitelisted).
Parameters
address
:directRequest
: Request limits from the pool contract whentrue
(otherwise, request from the relayer node).
Returns
Promise
returns PoolLimits
Example
Minimum Transaction Amount
The transaction amount cannot be less than the return value. This is applicable for each transaction type (for multi-transfer tx each note is must meet this minimum value).
Returns
Promise
returns minimum transaction amount in the pool dimension.
Example
Maximum Supported Token Swap During Withdraw
Privacy pools have the optional ability to swap an amount of tokens to native coins during a withdraw transaction (typically to seed a wallet with native tokens for operations). The following method returns the maximum number of tokens that can be swapped to native coins.
The swap is unavailable if maxSupportedTokenSwap
returns 0
Returns
Promise
returns maximum number of tokens available to swap to native coins (in the pool dimension).
Example
Last updated