Skip to main content
Reads the withdrawal fee from the on-chain FeeModule contract. Performs two sequential RPC calls: reads the FeeModule address from the WithdrawQueue, then multicalls calculateOfferFees and offerFeePercentage.

Import

Usage

Parameters

ParameterTypeRequiredDescription
vaultNamestringYesAccount name from getVaultsByConfig()
chainIdChainIdYesBlockchain network ID
assetAddressAddressYesAsset address for account lookup
amountstringYesWithdrawal amount as decimal string
offerAssetAddressYesAccount share token address
wantAssetAddressYesToken the user wants to receive
receiverAddressYesAddress receiving the withdrawal

Return Type

Example: Fee Preview

Error Handling

Error Message PatternDescriptionResolution
"No vault found"No account matches parametersVerify yieldType, asset, chainId
"SDK not initialized"SDK not initializedCall initAmplifySDK() first