We can check if a userOp is valid and will be accepted by the bundler.

A sample request through curl like this can be used, with any Skandha bundler deployment being the endpoint.

This can be run in any command line.

skandha_validateUserOperation is the method.

curl --location 'https://polygon-bundler.etherspot.io/' \
--header 'Content-Type: application/json' \
--data '{
    "method": "skandha_validateUserOperation",
    "params": [
        {
            "sender": "0xbba97eC4fFF328d485382DfD5A9bf9653c6018Af",
            "nonce": "0x0",
            "initCode": "0x9406cc6185a346906296840746125a0e449764545fbfb9cf00000000000000000000000005449b55b91e9ebdd099ed584cb6357234f2ab3b0000000000000000000000000000000000000000000000000000000000000000",
            "callData": "0xb61d27f60000000000000000000000007743d0ec8f1f848dc76e21a18dc5b478f7d87b6e0000000000000000000000000000000000000000000000000000000005f5e10000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000",
            "callGasLimit": "0x879d7",
            "verificationGasLimit": "0x5dfa8",
            "preVerificationGas": "0xadbc",
            "maxFeePerGas": "0xbebc200",
            "maxPriorityFeePerGas": "0x0",
            "paymasterAndData": "0x",
            "signature": "0xa5dc9910e3af2c4e00e311c22dce5905ee91efa093d4707f25e86fefb6c9985713b7720078851ca78d4de3fd35a9641de5ae19e8fa940d492f0beea4df463de11c"
        },
        "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
    ],
    "id": 44,
    "jsonrpc": "2.0"
}'

The skandha_validateUserOperation method accepts 2 params:

  • userOp : a full userOp to check.
  • entryPoint: The entryPoint contract address.

In return the bundler will return a collection of historical gas prices for submitted userops.

A successful response will look like this:

{
    "jsonrpc":"2.0",
    "id":44,"error": {
        "message":"AA10 sender already constructed",
        "code":-32500
    }
}

This response means we’ve already created a wallet at this address.