Get the minimum withdrawal order size for an account
Reads the minimum withdrawal order size from the on-chain WithdrawQueue contract. Use this to validate user input before submitting a withdrawal order.
Import
import { getMinimumWithdrawalOrderSize } from '@paxoslabs/amplify-sdk'
Usage
import { getMinimumWithdrawalOrderSize, getVaultsByConfig, YieldType,} from '@paxoslabs/amplify-sdk'const [vault] = await getVaultsByConfig({ yieldType: YieldType.CORE, chainId: 1 })const result = await getMinimumWithdrawalOrderSize({ vaultName: vault.name, chainId: 1, assetAddress: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',})console.log(result.minimumOrderSize) // bigintconsole.log(result.shareDecimals) // number