# Fee.effectiveGasPrice

Computes the effective gas price an EIP-1559 transaction will pay:

```
effective = min(maxFeePerGas, baseFeePerGas + maxPriorityFeePerGas)
```

## Imports

:::code-group
```ts [Named]
import { Fee } from 'ox'
```

```ts [Entrypoint]
import * as Fee from 'ox/Fee'
```
:::

## Examples

```ts twoslash
import { Fee } from 'ox'

Fee.effectiveGasPrice({
  baseFeePerGas: 100n,
  maxFeePerGas: 200n,
  maxPriorityFeePerGas: 50n
})
// @log: 150n  (= 100n + 50n)

Fee.effectiveGasPrice({
  baseFeePerGas: 100n,
  maxFeePerGas: 120n,
  maxPriorityFeePerGas: 50n
})
// @log: 120n  (capped at maxFeePerGas)
```

## Definition

```ts
function effectiveGasPrice(
  args: {
    baseFeePerGas: bigint;
    maxFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
},
): bigint
```

**Source:** [src/core/Fee.ts](https://github.com/wevm/ox/blob/main/src/core/Fee.ts#L238)

## Parameters

### args

* **Type:** `{
    baseFeePerGas: bigint;
    maxFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
  }`

## Return Type

Effective gas price (in wei).

`bigint`
