# default7702GasEstimator | @aa-sdk/core

> A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator. This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`.

{/* This file is auto-generated by TypeDoc. Do not edit manually. */}

```ts
const default7702GasEstimator: (gasEstimator?) => ClientMiddlewareFn;
```

Defined in: [aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts:16](https://github.com/alchemyplatform/aa-sdk/blob/main/aa-sdk/core/src/middleware/defaults/7702gasEstimator.ts#L16)

A middleware function to estimate the gas usage of a user operation when using an EIP-7702 delegated account. Has an optional custom gas estimator.
This function is only compatible with accounts using EntryPoint v0.7.0, and the account must have an implementation address defined in `getImplementationAddress()`.

## Deprecated

The EIP-7702 auth is now set in initUserOperation instead. This middleware is no longer necessary.

## Parameters

<table>
  <thead>
    <tr>
      <th align="left">Parameter</th>
      <th align="left">Type</th>
      <th align="left">Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `gasEstimator?`
      </td>

      <td>
        `ClientMiddlewareFn`
      </td>

      <td>
        Optional custom gas estimator function
      </td>
    </tr>

  </tbody>
</table>

## Returns

`ClientMiddlewareFn`

A function that takes user operation struct and parameters, estimates gas usage, and returns the user operation with gas limits.