Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ChiHaoLu opened this issue Nov 21, 2024 · 0 comments
Open

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

ChiHaoLu opened this issue Nov 21, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ChiHaoLu
Copy link

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.

@ChiHaoLu ChiHaoLu added the enhancement New feature or request label Nov 21, 2024
@ChiHaoLu ChiHaoLu changed the title [FEATURE] Give a true usage for API [FEATURE] Give the rpc url usage example in documentation for API Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant