> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gelato.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# gelato_getUserOperationQuote

> Returns a detailed quote for a `UserOperation` including gas limits, fees, and total cost.



## OpenAPI

````yaml /paymaster-&-bundler/bundler-api-endpoints/erc4337/gelato_getUserOperationQuote.json post /rpc/{chainId}
openapi: 3.1.0
info:
  title: gelato_getUserOperationQuote
  version: 1.0.0
servers:
  - url: https://api.gelato.cloud
security: []
paths:
  /rpc/{chainId}:
    post:
      summary: gelato_getUserOperationQuote
      description: >-
        Returns a detailed quote for a `UserOperation` including gas limits,
        fees, and total cost.
      parameters:
        - name: chainId
          in: path
          required: true
          schema:
            type: number
          description: Target network chain identifier.
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
          description: >-
            Gelato API key for higher rate limits. This must be provided if
            sponsoring off-chain via Gas Tank.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
            example:
              id: 1
              jsonrpc: '2.0'
              method: gelato_getUserOperationQuote
              params:
                - sender: 0x....
                  nonce: 0x....
                  factory: 0x....
                  factoryData: 0x....
                  callData: 0x....
                  signature: 0x....
                  maxFeePerGas: 0x....
                  maxPriorityFeePerGas: 0x....
                  paymaster: 0x....
                  paymasterData: 0x....
                  eip7702Auth:
                    address: 0x....
                    chainId: 0x....
                    nonce: 0x....
                    r: 0x....
                    s: 0x....
                    yParity: 0x....
                - '0x0000000071727De22E5E9d8BAf0edAc6f37da032'
                - 0xsender:
                    balance: 0x....
                    nonce: 0x....
                    code: 0x....
        required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
components:
  schemas:
    Request:
      type: object
      properties:
        id:
          type: number
          default: 1
        jsonrpc:
          type: string
          default: '2.0'
        method:
          type: string
          default: gelato_getUserOperationQuote
        params:
          type: array
          description: >-
            1. Object - The `UserOperation` object (gas limits and prices are
            optional)

            2. String - The `EntryPoint` address the request should be sent
            through. This MUST be one of the entry points returned by the
            `eth_supportedEntryPoints` rpc call.

            3. Object - Optional state override set that allows changes to the
            state of a contract before executing the call.
          minItems: 2
          maxItems: 3
          items:
            oneOf:
              - $ref: '#/components/schemas/UserOperationEntryPoint0.7'
              - $ref: '#/components/schemas/UserOperationEntryPoint0.6'
              - $ref: '#/components/schemas/EntryPointAddress'
              - $ref: '#/components/schemas/StateOverrideSet'
    Response:
      type: object
      properties:
        id:
          type: number
          default: 1
        jsonrpc:
          type: string
          default: '2.0'
        result:
          type: object
          properties:
            callGasLimit:
              type: string
              description: Gas used by inner account execution
              example: '0x358e'
            fee:
              type: string
              description: Total fee for the UserOperation
              example: '0x2386f26fc10000'
            gas:
              type: string
              description: Total gas limit for the UserOperation
              example: '0x5208'
            l1Fee:
              type: string
              description: L1 fee for L2 networks (optional, only present on L2 chains)
              example: '0x0'
            preVerificationGas:
              type: string
              description: Gas overhead of this `UserOperation`
              example: '0x0'
            verificationGasLimit:
              type: string
              description: Gas used by the validation of this `UserOperation`
              example: '0x148a6'
          required:
            - callGasLimit
            - fee
            - gas
            - preVerificationGas
            - verificationGasLimit
    UserOperationEntryPoint0.7:
      type: object
      title: '`UserOperationEntryPoint0.7`'
      properties:
        sender:
          type: string
          description: >-
            The address of the account initiating the UserOperation. Can be a
            counterfactual address if the account is yet to be deployed.
        nonce:
          type: string
          description: >-
            A unique sequential number used to prevent replay attacks and ensure
            correct execution ordering.
        factory:
          type: string
          description: >-
            The address of the contract responsible for deploying the smart
            account, if the account is not yet deployed.
        factoryData:
          type: string
          description: >-
            Encoded constructor or init data to be passed to the factory
            contract for creating the smart account.
        eip7702Auth:
          $ref: '#/components/schemas/eip7702Auth'
        signature:
          type: string
          description: >-
            Cryptographic signature (or authorization data) from the account,
            used to prove that the operation is valid and authorized.
        callData:
          type: string
          description: >-
            Encoded data specifying one or more function calls the smart account
            will execute during the operation.
        maxFeePerGas:
          type: string
          description: Maximum fee per gas for the UserOperation
        maxPriorityFeePerGas:
          type: string
          description: Maximum priority fee per gas for the UserOperation
        paymaster:
          type: string
          description: Paymaster address (Empty for sponsored and native payments)
        paymasterData:
          type: string
          description: Paymaster data (Empty for sponsored and native payments)
      required:
        - sender
        - nonce
        - callData
        - signature
        - maxFeePerGas
        - maxPriorityFeePerGas
    UserOperationEntryPoint0.6:
      type: object
      title: '`UserOperationEntryPoint0.6`'
      properties:
        sender:
          type: string
          description: >-
            The address of the account initiating the UserOperation. Can be a
            counterfactual address if the account is yet to be deployed.
        nonce:
          type: string
          description: >-
            A unique sequential number used to prevent replay attacks and ensure
            correct execution ordering.
        initCode:
          type: string
          description: Applicable when account is not deployed
        eip7702Auth:
          $ref: '#/components/schemas/eip7702Auth'
        callData:
          type: string
          description: >-
            Encoded data specifying one or more function calls the smart account
            will execute during the operation.
        signature:
          type: string
          description: >-
            Cryptographic signature (or authorization data) from the account,
            used to prove that the operation is valid and authorized.
        maxFeePerGas:
          type: string
          description: Maximum fee per gas for the UserOperation
        maxPriorityFeePerGas:
          type: string
          description: Maximum priority fee per gas for the UserOperation
        paymasterAndData:
          type: string
          description: Paymaster data (Empty for sponsored and native payments)
      required:
        - sender
        - nonce
        - callData
        - signature
        - maxFeePerGas
        - maxPriorityFeePerGas
    EntryPointAddress:
      type: string
      title: '`EntryPointAddress`'
      default: '0x0000000071727De22E5E9d8BAf0edAc6f37da032'
    StateOverrideSet:
      type: object
      title: '`StateOverrideSet`'
      description: >-
        Enables temporary modifications to contract state during call execution.
        This allows testing scenarios with altered variable values such as
        balances or approvals without permanently modifying the blockchain
        state.
      additionalProperties:
        type: object
        properties:
          balance:
            type: string
            description: >-
              Temporary balance value to assign to the account during call
              execution (maximum 32 bytes)
          nonce:
            type: string
            description: >-
              Temporary nonce value to assign to the account during call
              execution (maximum 8 bytes)
          code:
            type: string
            description: >-
              Temporary EVM bytecode to insert into the account during call
              execution
          state:
            type: object
            description: >-
              Temporary key-value pairs to replace all storage slots in the
              account during call execution
          stateDiff:
            type: object
            description: >-
              Temporary key-value pairs to modify specific storage slots in the
              account during call execution
    eip7702Auth:
      type: object
      title: eip7702Auth
      description: The authorization object that an EOA account delegates to in EIP-7702
      properties:
        address:
          type: string
          description: The address of the authorization
        chainId:
          type: string
          description: The chain Id of the authorization
        nonce:
          type: string
          description: The nonce for the authorization
        r:
          type: string
          description: R parameter of signed authorization
        s:
          type: string
          description: S parameter of signed authorization
        yParity:
          type: string
          description: Y parity parameter of signed authorization

````