# alchemy_requestGasAndPaymasterAndData

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://eth-mainnet.g.alchemy.com/v2/{apiKey}

Requests gas coverage for a `UserOperation`. Optionally accepts fee parameter overrides to be used in the `UserOperation`.


Reference: https://www.alchemy.com/docs/wallets/api-reference/gas-manager-admin-api/gas-abstraction-api-endpoints/alchemy-request-gas-and-paymaster-and-data

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| params[0] | object | Yes | Object containing the sponsorship request parameters. |

## Result

**Response** (object): The response depends on the EntryPoint version used in the request.

## Example

### Request

```json
{
  "jsonrpc": "2.0",
  "method": "alchemy_requestGasAndPaymasterAndData",
  "params": [
    {
      "webhookData": "example webhook data",
      "policyId": "69d524a7-e932-4214-8673-dcdcba31bb42",
      "entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
      "dummySignature": "0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c",
      "userOperation": {
        "sender": "0x1234567890123456789012345678901234567890",
        "nonce": "0x1",
        "callData": "0xabcdef",
        "callGasLimit": "0x5208",
        "verificationGasLimit": "0x5208",
        "preVerificationGas": "0x5208",
        "maxFeePerGas": "0x1",
        "maxPriorityFeePerGas": "0x1"
      }
    }
  ],
  "id": 1
}
```

### Response

```json
{
  "jsonrpc": "2.0",
  "result": {
    "paymaster": "0x4685d4c74BaC297e23D5C7D1a2bFc1b4581e6704",
    "paymasterData": "0x00000067890abcdef1234567890abcdef1234567890abcdef",
    "callGasLimit": "0x5208",
    "verificationGasLimit": "0x5208",
    "preVerificationGas": "0x5208",
    "maxFeePerGas": "0x1",
    "maxPriorityFeePerGas": "0x1",
    "paymasterVerificationGasLimit": "0x5208",
    "paymasterPostOpGasLimit": "0x5208"
  },
  "id": 1
}
```

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "alchemy_requestGasAndPaymasterAndData",
  "params": [
    {
      "policyId": "string",
      "erc20Context": {
        "tokenAddress": "string",
        "maxTokenAmount": 1,
        "permit": "string"
      },
      "entryPoint": "string",
      "dummySignature": "string",
      "userOperation": {
        "sender": "string",
        "nonce": "string",
        "initCode": "string",
        "callData": "string",
        "callGasLimit": "string",
        "verificationGasLimit": "string",
        "preVerificationGas": "string",
        "maxFeePerGas": "string",
        "maxPriorityFeePerGas": "string",
        "eip7702Auth": {
          "chain_id": "string",
          "address": "string",
          "nonce": "string",
          "y_parity": "string",
          "r": "string",
          "s": "string"
        }
      },
      "overrides": {
        "maxFeePerGas": "string",
        "maxPriorityFeePerGas": "string",
        "callGasLimit": "string",
        "verificationGasLimit": "string",
        "preVerificationGas": "string"
      },
      "stateOverrideSet": {
        "balance": "string",
        "nonce": "string",
        "code": "string",
        "state": {
          "property1": "string"
        },
        "stateDiff": {
          "property1": "string"
        }
      },
      "webhookData": "string"
    }
  ]
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'alchemy_requestGasAndPaymasterAndData',
    params: [
      {
        policyId: 'string',
        erc20Context: {tokenAddress: 'string', maxTokenAmount: 1, permit: 'string'},
        entryPoint: 'string',
        dummySignature: 'string',
        userOperation: {
          sender: 'string',
          nonce: 'string',
          initCode: 'string',
          callData: 'string',
          callGasLimit: 'string',
          verificationGasLimit: 'string',
          preVerificationGas: 'string',
          maxFeePerGas: 'string',
          maxPriorityFeePerGas: 'string',
          eip7702Auth: {
            chain_id: 'string',
            address: 'string',
            nonce: 'string',
            y_parity: 'string',
            r: 'string',
            s: 'string'
          }
        },
        overrides: {
          maxFeePerGas: 'string',
          maxPriorityFeePerGas: 'string',
          callGasLimit: 'string',
          verificationGasLimit: 'string',
          preVerificationGas: 'string'
        },
        stateOverrideSet: {
          balance: 'string',
          nonce: 'string',
          code: 'string',
          state: {property1: 'string'},
          stateDiff: {property1: 'string'}
        },
        webhookData: 'string'
      }
    ]
  })
};

fetch('https://eth-mainnet.g.alchemy.com/v2/docs-demo', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://eth-mainnet.g.alchemy.com/v2/docs-demo"

payload = {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "alchemy_requestGasAndPaymasterAndData",
    "params": [
        {
            "policyId": "string",
            "erc20Context": {
                "tokenAddress": "string",
                "maxTokenAmount": 1,
                "permit": "string"
            },
            "entryPoint": "string",
            "dummySignature": "string",
            "userOperation": {
                "sender": "string",
                "nonce": "string",
                "initCode": "string",
                "callData": "string",
                "callGasLimit": "string",
                "verificationGasLimit": "string",
                "preVerificationGas": "string",
                "maxFeePerGas": "string",
                "maxPriorityFeePerGas": "string",
                "eip7702Auth": {
                    "chain_id": "string",
                    "address": "string",
                    "nonce": "string",
                    "y_parity": "string",
                    "r": "string",
                    "s": "string"
                }
            },
            "overrides": {
                "maxFeePerGas": "string",
                "maxPriorityFeePerGas": "string",
                "callGasLimit": "string",
                "verificationGasLimit": "string",
                "preVerificationGas": "string"
            },
            "stateOverrideSet": {
                "balance": "string",
                "nonce": "string",
                "code": "string",
                "state": { "property1": "string" },
                "stateDiff": { "property1": "string" }
            },
            "webhookData": "string"
        }
    ]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://eth-mainnet.g.alchemy.com/v2/docs-demo"

	payload := strings.NewReader("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"alchemy_requestGasAndPaymasterAndData\",\n  \"params\": [\n    {\n      \"policyId\": \"string\",\n      \"erc20Context\": {\n        \"tokenAddress\": \"string\",\n        \"maxTokenAmount\": 1,\n        \"permit\": \"string\"\n      },\n      \"entryPoint\": \"string\",\n      \"dummySignature\": \"string\",\n      \"userOperation\": {\n        \"sender\": \"string\",\n        \"nonce\": \"string\",\n        \"initCode\": \"string\",\n        \"callData\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\",\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"eip7702Auth\": {\n          \"chain_id\": \"string\",\n          \"address\": \"string\",\n          \"nonce\": \"string\",\n          \"y_parity\": \"string\",\n          \"r\": \"string\",\n          \"s\": \"string\"\n        }\n      },\n      \"overrides\": {\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\"\n      },\n      \"stateOverrideSet\": {\n        \"balance\": \"string\",\n        \"nonce\": \"string\",\n        \"code\": \"string\",\n        \"state\": {\n          \"property1\": \"string\"\n        },\n        \"stateDiff\": {\n          \"property1\": \"string\"\n        }\n      },\n      \"webhookData\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://eth-mainnet.g.alchemy.com/v2/docs-demo")
  .header("Content-Type", "application/json")
  .body("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"alchemy_requestGasAndPaymasterAndData\",\n  \"params\": [\n    {\n      \"policyId\": \"string\",\n      \"erc20Context\": {\n        \"tokenAddress\": \"string\",\n        \"maxTokenAmount\": 1,\n        \"permit\": \"string\"\n      },\n      \"entryPoint\": \"string\",\n      \"dummySignature\": \"string\",\n      \"userOperation\": {\n        \"sender\": \"string\",\n        \"nonce\": \"string\",\n        \"initCode\": \"string\",\n        \"callData\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\",\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"eip7702Auth\": {\n          \"chain_id\": \"string\",\n          \"address\": \"string\",\n          \"nonce\": \"string\",\n          \"y_parity\": \"string\",\n          \"r\": \"string\",\n          \"s\": \"string\"\n        }\n      },\n      \"overrides\": {\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\"\n      },\n      \"stateOverrideSet\": {\n        \"balance\": \"string\",\n        \"nonce\": \"string\",\n        \"code\": \"string\",\n        \"state\": {\n          \"property1\": \"string\"\n        },\n        \"stateDiff\": {\n          \"property1\": \"string\"\n        }\n      },\n      \"webhookData\": \"string\"\n    }\n  ]\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://eth-mainnet.g.alchemy.com/v2/docs-demo");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddJsonBody("{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"alchemy_requestGasAndPaymasterAndData\",\n  \"params\": [\n    {\n      \"policyId\": \"string\",\n      \"erc20Context\": {\n        \"tokenAddress\": \"string\",\n        \"maxTokenAmount\": 1,\n        \"permit\": \"string\"\n      },\n      \"entryPoint\": \"string\",\n      \"dummySignature\": \"string\",\n      \"userOperation\": {\n        \"sender\": \"string\",\n        \"nonce\": \"string\",\n        \"initCode\": \"string\",\n        \"callData\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\",\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"eip7702Auth\": {\n          \"chain_id\": \"string\",\n          \"address\": \"string\",\n          \"nonce\": \"string\",\n          \"y_parity\": \"string\",\n          \"r\": \"string\",\n          \"s\": \"string\"\n        }\n      },\n      \"overrides\": {\n        \"maxFeePerGas\": \"string\",\n        \"maxPriorityFeePerGas\": \"string\",\n        \"callGasLimit\": \"string\",\n        \"verificationGasLimit\": \"string\",\n        \"preVerificationGas\": \"string\"\n      },\n      \"stateOverrideSet\": {\n        \"balance\": \"string\",\n        \"nonce\": \"string\",\n        \"code\": \"string\",\n        \"state\": {\n          \"property1\": \"string\"\n        },\n        \"stateDiff\": {\n          \"property1\": \"string\"\n        }\n      },\n      \"webhookData\": \"string\"\n    }\n  ]\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## OpenRPC Method Specification

```yaml
name: alchemy_requestGasAndPaymasterAndData
description: |
  Requests gas coverage for a `UserOperation`. Optionally accepts fee parameter overrides to be used in the `UserOperation`.
params:
  - name: params[0]
    required: true
    description: Object containing the sponsorship request parameters.
    schema:
      type: object
      required:
        - policyId
        - entryPoint
        - dummySignature
        - userOperation
      properties:
        policyId:
          description: The Gas Manager Policy ID or list of Gas Manager Policy IDs.
          oneOf:
            - type: string
              title: policyId
              format: uuid
            - type: array
              title: policyId Array
              items:
                type: string
                format: uuid
        erc20Context:
          description: Erc20 context, required to enable users to pay gas with ERC-20 tokens.
          title: Context for Erc20 paymaster
          type: object
          properties:
            tokenAddress:
              description: Erc20 contract address
              title: hex encoded address
              type: string
              pattern: ^0x[0-9a-fA-F]{40}$
            maxTokenAmount:
              description: Maximum allowed amount of value in raw token amount
              title: positive decimal number
              type: number
              minimum: 0
            permit:
              description: A 7597 typed permit
              title: hex encoded bytes
              type: string
              pattern: ^0x[0-9a-f]*$
        entryPoint:
          type: string
          pattern: ^0[xX][0-9a-fA-F]*$
          description: The EntryPoint address the request should be sent through. This MUST be one of the EntryPoints returned by the `supportedEntryPoints` RPC call and match the version of the userOperation in the `userOperation` field.
        dummySignature:
          type: string
          description: Dummy signature for the userOperation. This is useful for estimating gas costs. Check our [FAQs](/docs/reference/bundler-faqs#what-is-a-dummy-signature) to learn what a dummy signature is.
        userOperation:
          title: User Operation, either v0.6 or v0.7 (missing signature, paymasterData, and gas fields)
          description: An object containing optional gas parameters, `paymasterAndData`, and signature fields. It can be either a v0.6 or v0.7 userOperation but must match the version of the EntryPoint at the specified `entryPoint`.
          oneOf:
            - title: User Operation v0.6
              type: object
              properties:
                sender:
                  description: The account making the operation
                  title: hex encoded address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                nonce:
                  description: Anti-replay parameter; used as salt for first-time account creation
                  title: hex encoded unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                initCode:
                  description: The initCode of the account (needed if the account is not yet on-chain and needs creation)
                  title: hex encoded bytes
                  type: string
                  pattern: ^0x[0-9a-f]*$
                callData:
                  description: Encoded data for the primary function call or operation
                  title: hex encoded bytes
                  type: string
                  pattern: ^0x[0-9a-f]*$
                callGasLimit:
                  description: Gas allocated for the main execution call
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                verificationGasLimit:
                  description: Gas allocated for verification
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                preVerificationGas:
                  description: Gas for pre-verification execution and calldata
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                maxFeePerGas:
                  description: Maximum fee per gas (EIP-1559)
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                maxPriorityFeePerGas:
                  description: Max priority fee per gas (EIP-1559)
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                eip7702Auth:
                  description: The authorization tuple that an EOA account delegates to in EIP-7702
                  title: Eip 7702 Auth
                  type: object
                  properties:
                    chain_id:
                      description: The chain Id of the authorization
                      title: hex encoded 64 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                    address:
                      description: The address of the authorization
                      title: hex encoded address
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    nonce:
                      description: The nonce for the authorization
                      title: hex encoded 64 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                    y_parity:
                      description: Y parity of signed authorizzation tuple
                      title: hex encoded unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    r:
                      description: R of signed authorizzation tuple
                      title: hex encoded 256 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$
                    s:
                      description: S of signed authorizzation tuple
                      title: hex encoded 256 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$
            - title: User Operation v0.7
              type: object
              properties:
                sender:
                  description: Account initiating operation
                  title: hex encoded address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                nonce:
                  description: Account nonce or creation salt
                  title: hex encoded unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                callData:
                  description: Data for operation call
                  title: hex encoded bytes
                  type: string
                  pattern: ^0x[0-9a-f]*$
                callGasLimit:
                  description: Gas allocated for call
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                verificationGasLimit:
                  description: Gas allocated for verification
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                maxFeePerGas:
                  description: Max fee per gas (EIP-1559)
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                maxPriorityFeePerGas:
                  description: Priority fee per gas (EIP-1559)
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                paymaster:
                  description: Paymaster contract address
                  title: hex encoded address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                paymasterVerificationGasLimit:
                  description: The gas limit for paymaster verification.
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                factory:
                  description: The account factory address (needed if and only if the account is not yet on-chain and needs to be created)
                  title: hex encoded address
                  type: string
                  pattern: ^0x[0-9a-fA-F]{40}$
                factoryData:
                  description: Data for the account factory (only if the account factory exists)
                  title: hex encoded bytes
                  type: string
                  pattern: ^0x[0-9a-f]*$
                preVerificationGas:
                  description: The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                paymasterPostOpGasLimit:
                  description: The amount of gas to allocate for the paymaster post-op code (only if a paymaster exists)
                  title: hex encoded 64 bit unsigned integer
                  type: string
                  pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                eip7702Auth:
                  description: The authorization tuple that an EOA account delegates to in EIP-7702
                  title: Eip 7702 Auth
                  type: object
                  properties:
                    chain_id:
                      description: The chain Id of the authorization
                      title: hex encoded 64 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                    address:
                      description: The address of the authorization
                      title: hex encoded address
                      type: string
                      pattern: ^0x[0-9a-fA-F]{40}$
                    nonce:
                      description: The nonce for the authorization
                      title: hex encoded 64 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
                    y_parity:
                      description: Y parity of signed authorizzation tuple
                      title: hex encoded unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
                    r:
                      description: R of signed authorizzation tuple
                      title: hex encoded 256 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$
                    s:
                      description: S of signed authorizzation tuple
                      title: hex encoded 256 bit unsigned integer
                      type: string
                      pattern: ^0x([1-9a-f]+[0-9a-f]{0,31})|0$
        overrides:
          type: object
          description: |
            Optional fields that override our gas and fee estimates. Use this parameter to override: `maxFeePerGas`, `maxPriorityFeePerGas`, `callGasLimit`, `verificationGasLimit`, or `preVerificationGas`.

            This will apply either:
            - absolutes overrides (using a hex string) simply overriding estimated values entirely OR
            - multiplier overrides relative to our estimates (in the format of { "multiplier": number } with max precision of 4 decimal places). For example, if the override value is { multiplier: 1.1 } for the `maxPriorityFeePerGas` field, then a 1.1 multiplier, or a 10% increase, is applied to the estimated `maxPriorityFeePerGas` of the userOp.

            A higher buffer may give userOps a better chance to mine if the L1/L2 gas and fees change.

            ```json
            "overrides": {
              "maxFeePerGas": "hex string" | { "multiplier": number },
              "maxPriorityFeePerGas": "hex string" | { "multiplier": number },
              "callGasLimit": "hex string" | { "multiplier": number },
              "verificationGasLimit": "hex string" | { "multiplier": number },
              "preVerificationGas": "hex string" | { "multiplier": number },
            }
            ```
          properties:
            maxFeePerGas:
              oneOf:
                - type: string
                  description: Hex string.
                - type: object
                  properties:
                    multiplier:
                      type: number
                  description: Multiplier value.
            maxPriorityFeePerGas:
              oneOf:
                - type: string
                  description: Hex string.
                - type: object
                  properties:
                    multiplier:
                      type: number
                  description: Multiplier value.
            callGasLimit:
              oneOf:
                - type: string
                  description: Hex string.
                - type: object
                  properties:
                    multiplier:
                      type: number
                  description: Multiplier value.
            verificationGasLimit:
              oneOf:
                - type: string
                  description: Hex string.
                - type: object
                  properties:
                    multiplier:
                      type: number
                  description: Multiplier value.
            preVerificationGas:
              oneOf:
                - type: string
                  description: Hex string.
                - type: object
                  properties:
                    multiplier:
                      type: number
                  description: Multiplier value.
        stateOverrideSet:
          type: object
          description: |
            Allows changes to the state of a contract before executing the call. For example, you can modify variable values (like balances or approvals) for that call without changing the contract itself on the blockchain.

            In more technical terms, the state override set is an optional parameter that allows executing the call against a modified chain state. It is an address-to-state mapping, where each entry specifies some state to be overridden prior to executing the call.
          properties:
            balance:
              type: string
              description: Fake balance to set for the account before executing the call (<= 32 bytes)
            nonce:
              type: string
              description: Fake nonce to set for the account before executing the call (<= 8 bytes).
            code:
              type: string
              description: Fake EVM bytecode to inject into the account before executing the call.
            state:
              type: object
              description: Fake key-value mapping to override all slots in the account storage before executing the call.
            stateDiff:
              type: object
              description: Fake key-value mapping to override individual slots in the account storage before executing the call.
        webhookData:
          type: string
          description: Additional data you can include in the request, such as proof of humanity, if you have enabled custom rules in your Gas Manager policy.
result:
  name: Response
  description: The response depends on the EntryPoint version used in the request.
  schema:
    oneOf:
      - title: Entrypoint v0.6 Response
        type: object
        required:
          - paymasterAndData
        properties:
          paymasterAndData:
            description: The 0x‑prefixed hex string for the user to put into the UO's paymasterAndData field. Contains gas manager address, sigTimeRange, and secp256k1 signature.
            title: hex encoded bytes
            type: string
            pattern: ^0x[0-9a-f]*$
          callGasLimit:
            description: The amount of gas to allocate for the main execution call.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          verificationGasLimit:
            description: The amount of gas to allocate for the verification step.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          preVerificationGas:
            description: The amount of gas to compensate the bundler for pre-verification execution and calldata.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          maxFeePerGas:
            description: The maximum fee per gas to pay for the execution of this operation (similar to EIP-1559 max_fee_per_gas).
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          maxPriorityFeePerGas:
            description: Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas).
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
      - title: Entrypoint v0.7 Response
        type: object
        required:
          - paymaster
          - paymasterData
        properties:
          paymaster:
            description: The paymaster address used in the operation.
            title: hex encoded address
            type: string
            pattern: ^0x[0-9a-fA-F]{40}$
          paymasterData:
            description: The data for the paymaster in the operation.
            title: hex encoded bytes
            type: string
            pattern: ^0x[0-9a-f]*$
          callGasLimit:
            description: The amount of gas to allocate for the main execution call.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          verificationGasLimit:
            description: The amount of gas to allocate for the verification step.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          preVerificationGas:
            description: The amount of gas to compensate the bundler for pre-verification execution and calldata.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          maxFeePerGas:
            description: The maximum fee per gas to pay for the execution of this operation (similar to EIP-1559 max_fee_per_gas).
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          maxPriorityFeePerGas:
            description: Maximum priority fee per gas (similar to EIP-1559 max_priority_fee_per_gas).
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          paymasterVerificationGasLimit:
            description: The gas limit for paymaster verification.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
          paymasterPostOpGasLimit:
            description: The gas limit for paymaster post-operation.
            title: hex encoded 64 bit unsigned integer
            type: string
            pattern: ^0x([1-9a-f]+[0-9a-f]{0,15})|0$
examples:
  - name: alchemy_requestGasAndPaymasterAndData example
    params:
      - name: params
        value:
          webhookData: example webhook data
          policyId: 69d524a7-e932-4214-8673-dcdcba31bb42
          entryPoint: '0x0000000071727De22E5E9d8BAf0edAc6f37da032'
          dummySignature: '0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c'
          userOperation:
            sender: '0x1234567890123456789012345678901234567890'
            nonce: '0x1'
            callData: '0xabcdef'
            callGasLimit: '0x5208'
            verificationGasLimit: '0x5208'
            preVerificationGas: '0x5208'
            maxFeePerGas: '0x1'
            maxPriorityFeePerGas: '0x1'
    result:
      name: alchemy_requestGasAndPaymasterAndData response
      value:
        paymaster: '0x4685d4c74BaC297e23D5C7D1a2bFc1b4581e6704'
        paymasterData: '0x00000067890abcdef1234567890abcdef1234567890abcdef'
        callGasLimit: '0x5208'
        verificationGasLimit: '0x5208'
        preVerificationGas: '0x5208'
        maxFeePerGas: '0x1'
        maxPriorityFeePerGas: '0x1'
        paymasterVerificationGasLimit: '0x5208'
        paymasterPostOpGasLimit: '0x5208'
```
