# StateChange.tee

Returns a sink forwarding every change to two sinks.

## Imports

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

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

## Examples

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

StateChange.visit(
  pendingState,
  StateChange.tee(persist, audit)
)
```

## Definition

```ts
function tee(
  a: Sink,
  b: Sink,
): Sink
```

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

## Parameters

### a

* **Type:** [`Sink`](/evm/execution/StateChange/types#statechangesink)

First sink.

#### a.account

* **Type:** `(change: AccountChange) => void`
* **Optional**

An account whose value changed.

#### a.accountRead

* **Type:** `(change: AccountChange) => void`
* **Optional**

An account the transaction loaded but left unchanged.

#### a.bytecode

* **Type:** `(codeHash: 0x${string}, code: Uint8Array) => void`
* **Optional**

Bytecode, keyed by its hash.

#### a.storage

* **Type:** `(change: StorageChange) => void`
* **Optional**

A storage slot whose value changed.

#### a.storageRead

* **Type:** `(change: StorageChange) => void`
* **Optional**

A storage slot the transaction loaded but left unchanged.

#### a.storageWipe

* **Type:** `(address: abitype_Address) => void`
* **Optional**

An account whose storage was wiped, before its slot changes.

### b

* **Type:** [`Sink`](/evm/execution/StateChange/types#statechangesink)

Second sink.

#### b.account

* **Type:** `(change: AccountChange) => void`
* **Optional**

An account whose value changed.

#### b.accountRead

* **Type:** `(change: AccountChange) => void`
* **Optional**

An account the transaction loaded but left unchanged.

#### b.bytecode

* **Type:** `(codeHash: 0x${string}, code: Uint8Array) => void`
* **Optional**

Bytecode, keyed by its hash.

#### b.storage

* **Type:** `(change: StorageChange) => void`
* **Optional**

A storage slot whose value changed.

#### b.storageRead

* **Type:** `(change: StorageChange) => void`
* **Optional**

A storage slot the transaction loaded but left unchanged.

#### b.storageWipe

* **Type:** `(address: abitype_Address) => void`
* **Optional**

An account whose storage was wiped, before its slot changes.

## Return Type

A sink feeding both.

[`Sink`](/evm/execution/StateChange/types#statechangesink)
