How to Connect to Optimism

Learn how easy it is to connect to the Optimism infrastructure via RPC with Blockdaemon.

It's easy to connect to your Optimism infrastructure via RPC.

If you haven’t configured any Optimism infrastructure, visit the Optimism marketplace page to learn more about Blockdaemon’s Optimism options.

Once you have purchased your Blockdaemon Optimism infrastructure, your Blockdaemon Technical Account Manager (TAM) will send you the necessary access credentials.

Note: These are one-time views, so make sure to copy them. In this guide, you'll learn how to connect to Optimism via cURL.

How to Connect to Optimism HTTP RPC via cURL

Here's how you add your access credentials to a cURL request:

curl --location --request POST 'YOUR_ENDPOINT_URL' \ --header 'X-Auth-Token: YOUR_AUTH_TOKEN' \ --header 'Content-Type: application/json' \ --data-raw '{ "jsonrpc": "2.0", "method": "YOUR_RPC_METHOD", "params": YOUR_PARAMS }' 
  • Replace YOUR_ENDPOINT_URL with the Endpoint URL sent by your Blockdaemon TAM.
  • Replace YOUR_AUTH_TOKEN with the Auth Token sent by your Blockdaemon TAM.
  • Replace YOUR_RPC_METHOD with your chosen RPC method.
  • Replace YOUR_PARAMS with the necessary params for your RPC.