Skip to content

[FEATURE] Give the rpc url usage example in documentation for API #261

@ChiHaoLu

Description

@ChiHaoLu

Is your feature request related to a problem? Please describe.
I am confused how to directly use the API to call the Bundler.

I use the public API Key which is mentioned in sdk. And the RPC call is always failed but I don't know how to use the API with the key.

curl --request POST \
  --url https://testnet-rpc.etherspot.io/v2/11155111?api-key=eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6ImVhMzc3MTNlZDhmYjQ4MWU4ZDE2ZDFkZmUzNmYzMzY0IiwiaCI6Im11cm11cjEyOCJ9 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_estimateUserOperationGas",
  "params": [
    {
      "sender":"0xb341FEAFaF71b09089d03B7D114599f8F491EE45",
      "nonce":"0x0",
      "initCode":"0x5de4839a76cf55d0c90e2061ef4386d962E15ae3296601cd0000000000000000000000000da6a956b9488ed4dd761e59f52fdc6c8068e6b5000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d1f57894000000000000000000000000d9ab5096a832b9ce79914329daee236f8eea039000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000014375cd3E53E18f65672E9d0Eb6AD174511b0BF98100000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callData":"0x5194544700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callGasLimit":"0x0",
      "verificationGasLimit":"0x0",
      "preVerificationGas":"0x0",
      "maxPriorityFeePerGas":"0x3b9aca00",
      "maxFeePerGas":"0x7a5cf70d5",
      "paymasterAndData":"0x",
      "signature":"0x00000000fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
    },"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
  ],
  "id": 123
}'
zsh: no matches found: https://testnet-rpc.etherspot.io/v2/11155111?api-key=eyJvcmciOiI2NTIzZjY5MzUwOTBmNzAwMDFiYjJkZWIiLCJpZCI6ImVhMzc3MTNlZDhmYjQ4MWU4ZDE2ZDFkZmUzNmYzMzY0IiwiaCI6Im11cm11cjEyOCJ9

If I using the url like https://polygon-bundler.etherspot.io/ , the error occurs:

curl --request POST \
  --url https://polygon-bundler.etherspot.io/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_estimateUserOperationGas",
  "params": [
    {
      "sender":"0xb341FEAFaF71b09089d03B7D114599f8F491EE45",
      "nonce":"0x0",
      "initCode":"0x5de4839a76cf55d0c90e2061ef4386d962E15ae3296601cd0000000000000000000000000da6a956b9488ed4dd761e59f52fdc6c8068e6b5000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000084d1f57894000000000000000000000000d9ab5096a832b9ce79914329daee236f8eea039000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000014375cd3E53E18f65672E9d0Eb6AD174511b0BF98100000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callData":"0x5194544700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
      "callGasLimit":"0x0",
      "verificationGasLimit":"0x0",
      "preVerificationGas":"0x0",
      "maxPriorityFeePerGas":"0x3b9aca00",
      "maxFeePerGas":"0x7a5cf70d5",
      "paymasterAndData":"0x",
      "signature":"0x00000000fffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"
    },"0x0000000071727De22E5E9d8BAf0edAc6f37da032"
  ],
  "id": 123
}'
{"jsonrpc":"2.0","id":123,"error":{"message":"Invalid Entrypoint","code":-32600}}% 

Describe the solution you'd like

Please mention what the correct RPC call in the documentation for EP v0.7 with the API key in documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions