# Frame.assert

Asserts that a [`Frame.Frame`](/api/Frame/types#frame) satisfies frame-local constraints.

Sender-dependent approval, batch adjacency, expiry, and transaction-wide gas constraints require the enclosing transaction.

## Imports

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

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

## Examples

### Basic Usage

Check a verification frame before including it in a transaction.

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

Frame.assert({
  flags: 'approveExecutionAndPayment',
  gas: 50_000n,
  mode: 'verify'
})
```

## Definition

```ts
function assert(
  frame: Frame,
): void
```

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

## Parameters

### frame

* **Type:** `Frame`

The frame to assert.

#### frame.data

* **Type:** `0x${string}`
* **Optional**

Frame calldata.

#### frame.flags

* **Type:** `Flags`
* **Optional**

Approval scope and atomic batching bits.

#### frame.gas

* **Type:** `bigintType`
* **Optional**

Execution gas budget.

#### frame.mode

* **Type:** `Mode`
* **Optional**

Execution context: default, verify, or sender.

#### frame.stateGas

* **Type:** `bigintType`
* **Optional**

State gas budget.

#### frame.target

* **Type:** `Address.Address | undefined`
* **Optional**

Target address. Omit to target the transaction sender.

#### frame.value

* **Type:** `bigintType`
* **Optional**

Value transferred by a sender frame, in wei.

## Return Type

`void`
