- Osmosis — EIP-1559 style fee market (
/osmosis.txfees.v1beta1.Query/GetEipBaseFee) - Skip feemarket — used by Cosmos Hub and other chains (
/feemarket.feemarket.v1.Query/GasPrices)
Configuration
Pass aDynamicGasPriceConfig instead of a static GasPrice:
How It Works
When"auto" fee is used with a DynamicGasPriceConfig:
- The chain’s fee module is queried for the current base gas price (Osmosis uses
/osmosis.txfees.v1beta1.Query/GetEipBaseFee; other chains use Skip’s/feemarket.feemarket.v1.Query/GasPrices) - The
multiplieris applied (default 1.3x) to stay above the minimum - The result is clamped between
minGasPriceandmaxGasPrice - If the query fails,
minGasPriceis used as a fallback
DynamicGasPriceConfig Fields
Checking Support
You can verify whether a chain supports dynamic gas pricing before configuring it:Getting Gas Prices from the Chain Registry
CosmJS does not integrate with the Cosmos Chain Registry directly, but you can use it as a source for gas prices. The registry publishes recommended gas prices for each chain in itschain.json files.
Fetching from the Chain Registry
Using
average_gas_price is a reasonable default. Use high_gas_price for
time-sensitive transactions.
Libraries That Wrap the Registry
Several community libraries provide typed access to the chain registry:chain-registry— typed chain registry data as an npm package@chain-registry/client— client with fetching and caching