Skip to main content
Calculates the deposit fee for a given amount by reading the fee module’s depositTokenFeeData and ONE_HUNDRED_PERCENT on-chain. Returns both the variable (percentage-based) and flat fee components, along with the total fee and the net deposit amount after fees.
Returns zero fees with hasFees: false for accounts without a deposit fee module configured. No RPC call is made in that case.

Import

Usage

Parameters

Return Type

Example: Fee Preview UI

Error Handling