The Dynamic Fees module enables multi-asset fee payments by maintaining NTRN-denominated prices for supported assets. It works in conjunction with the fee market module to convert between different denominations.
// Estimate fees in different assetsasync function estimateFeesInAssets(gasUsed: number): Promise<Map<string, string>> { const params = await client.dynamicfees.params(); const feeEstimates = new Map<string, string>(); // Base fee in NTRN const baseFeeNtrn = gasUsed * 0.025; // Example gas price // Convert to other assets for (const price of params.params.ntrnPrices) { const assetFee = baseFeeNtrn / parseFloat(price.amount); feeEstimates.set(price.denom, assetFee.toString()); } return feeEstimates;}
This guide covers the essential operations for working with the Dynamic Fees module, from basic queries to advanced integration patterns and governance operations.