Fee Estimations
Calculating exact fee values for the different transactions
Estimate Transaction Fee
Calculate the relayer fee amount for the provided transaction configuration. A transaction request may produce several transactions, with the following method you have an ability to display fee details
Parameters
transfersGwei
- a set of transfer amounts (ignored for all transactions except withtxType == TxType.Transfer
)txType
is transaction type (a member of TxType enum)withdrawSwap
is an optional amount of tokens to swap in the withdraw transaction. This may influence the typical withdraw transaction cost due to the extra fee component (ignored for other transaction types).updateState
- update the state before fee estimation iftrue
(fee may depends on account and notes configuration)
Returns
Promise
returns FeeAmount object with fee estimation
Example
Last updated