# getNaiveEstimatedGasBySwapCount

> This module provides a utility function for calculating estimated gas costs based on the number of swaps in a transaction.

# getNaiveEstimatedGasBySwapCount

This module provides a utility function for calculating estimated gas costs based on the number of swaps in a transaction.

## Methods

This module exports a single function, available from `@gmx-io/sdk/utils/fees`.

### getNaiveEstimatedGasBySwapCount

```typescript
getNaiveEstimatedGasBySwapCount(
  singleSwap: GasLimitsConfig["singleSwap"],
  swapsCount: number
): bigint
```

Returns `singleSwap × swapsCount`. Use this to estimate the swap portion of an order's gas limit when building a quick pre-check or a UI estimate. Pass `gasLimits.singleSwap` as the first argument.

```typescript

// 2-hop swap path: USDC → WETH → WBTC
const swapGas = getNaiveEstimatedGasBySwapCount(gasLimits.singleSwap, 2);
// swapGas = gasLimits.singleSwap * 2n
```
