The Avalanche Chain is much more than an EVM-compatible ecosystem, as it comprises multiple built-in chains. Therefore, to access a particular chain, it is imperative that you specify the desired chain.
Chain Name | URI |
Platform Chain (P-Chain) | /ext/bc/P |
Contract Chain (C-Chain) HTTPS | /ext/bc/C/rpc |
Contract Chain (C-Chain) WSS | /ext/bc/C/ws |
Exchange Chain (X-Chain) | /ext/bc/X |
If you would like to call EVM methods, you will need to add the C-Chain URI at the end of your endpoint URL, as follows: https://nd-123-456-789.p2pify.com/1234cecb00ee2da2f8c7aa3714205cf6/ext/bc/C/rpc
Here's a cURL example
curl -X POST \
'https://nd-123-456-789.p2pify.com/1234cecb00ee2da2f8c7aa3714205cf6/ext/bc/C/rpc' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Comments
0 comments
Article is closed for comments.