# Fee.fromHistoryRpc

Converts a [`Fee.FeeHistoryRpc`](/api/Fee/types#feehistoryrpc) to a [`Fee.FeeHistory`](/api/Fee/types#feehistory).

## Imports

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

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

## Examples

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

const history = Fee.fromHistoryRpc({
  baseFeePerGas: ['0x01', '0x02'],
  gasUsedRatio: [0.5, 0.6],
  oldestBlock: '0x10',
  reward: [['0x01']]
})
// @log: { baseFeePerGas: [1n, 2n], gasUsedRatio: [0.5, 0.6], oldestBlock: 16n, reward: [[1n]] }
```

## Definition

```ts
function fromHistoryRpc(
  history: FeeHistoryRpc,
): FeeHistory
```

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

## Parameters

### history

* **Type:** `FeeHistoryRpc`

The RPC fee history to convert.

## Return Type

An instantiated [`Fee.FeeHistory`](/api/Fee/types#feehistory).

`FeeHistory`
