RPC Access

This uses a demo network which is deployed for all users to access Polygon CDK network RPC. You can use the same thing with the newly deployed network.

Step 1: Register/Login - Create a new account or Log in to the existing account on the Zeeve Platform.

Step 2: Zeeve Dashboard - On the Zeeve platform dashboard click on the Polygon CDK option under the APPCHAINS & ROLLUPS section available in the left sidebar. This will show your deployed Polygon CDK network.

Step 3: Demo Network Card - Once you go to the network list you can see a network card is already there with a demo label. This is a predeployed network that is accessible to all users in the zeeve.

Step 4: My Nodes - You will land on the overview tab where you can see the overview of the network, navigate to the My Nodes tab.

Step 5: Node List - Here you can see the deployed node in the Polygon CDK, and navigate to the RPC nodes.

Step 6: RPC Node - Once you are in the RPC node tab click on the info icon. It will open the RPC node details page. Here you can the RPC node details like general info, RPC configurations, and RPC endpoints

Step 7: RPC Endpoint - in this section, You will get the endpoint for Polygon CDK RPC. You can use the polygon CDK JSON RPC methods with this.

Step 8: RPC Username And Password - You can find the RPC username in the RPC endpoint section. The password will be the same as you set in the network creation time. in the demo network case, username is demouser and the password is demopass

RPC calls using curl -

# curl to get polygon cdk block height
curl https://demouser:demopass@rpcnode.demo-vali-02aa6b.zeeve.net/rpc \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}'

RPC calls using WebSocket -

# web socket to get block number
npx wscat -c wss://demouser:demopass@rpcnode.demo-vali-02aa6b.zeeve.net/ws
# calling the json rpc method after websocket connection
{"method":"eth_blockNumber","params":[],"id":1,"jsonrpc":"2.0"}

Last updated