# Evm.enableBalBuilder

Starts building a block access list from what executions touch.

Each committed transaction folds its post-state in at the current index, so [`Evm.setBalIndex`](/evm/execution/Evm/setBalIndex) is advanced once per transaction. Read the result with [`Evm.takeBal`](/evm/execution/Evm/takeBal), or abandon it with [`Evm.clearBalBuilder`](/evm/execution/Evm/clearBalBuilder).

## Imports

:::code-group
```ts [Named]
import { Evm } from 'ox/evm'
```

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

## Examples

```ts twoslash
// @noErrors
import { Evm } from 'ox/evm'

Evm.enableBalBuilder(evm)

// Transaction `i` records at index `i + 1`.
Evm.setBalIndex(evm, 1n)
Evm.transact(evm, transaction)

const bal = Evm.takeBal(evm)
```

## Definition

```ts
function enableBalBuilder<asynchronous>(
  evm: Evm<asynchronous>,
): Awaitable<asynchronous, void>
```

**Source:** [src/evm/Evm.ts](https://github.com/wevm/ox/blob/main/src/evm/Evm.ts#L966)

## Parameters

### evm

* **Type:** `Evm<asynchronous>`

EVM to build from.

#### evm.'~async'

* **Type:** `asynchronous`

#### evm.'~chainId'

* **Type:** `bigint`

#### evm.'~config'

* **Type:** `{ block: Block; specId: "frontier" | "homestead" | "tangerine" | "spuriousDragon" | "byzantium" | "petersburg" | "istanbul" | "berlin" | "london" | "merge" | "shanghai" | "cancun" | "prague" | "osaka" | "amsterdam"; version?: Version; }`

The engine's current execution config.

Held so a setter can replace one half without discarding the other, since
the adapter's operation carries both.

#### evm.'~driver'

* **Type:** `asynchronous extends true ? Driver : undefined`

Drives the asynchronous source, when there is one.

#### evm.'~engine'

* **Type:** `Engine`

#### evm.block

* **Type:** `Block`

#### evm.specId

* **Type:** `"frontier" | "homestead" | "tangerine" | "spuriousDragon" | "byzantium" | "petersburg" | "istanbul" | "berlin" | "london" | "merge" | "shanghai" | "cancun" | "prague" | "osaka" | "amsterdam"`

#### evm.version

* **Type:** `Version`
* **Optional**

## Return Type

`Awaitable<asynchronous, void>`
