ChainUp Cloud
English
English
  • 👋Welcome to ChainUp Cloud
  • INTRODUCTION
    • 🔎Chainup Cloud API Quickstart
    • đŸ•šī¸Products
      • â›“ī¸Blockchain API
      • âš™ī¸Fullnode Service
      • âš’ī¸Dedicated Node
      • đŸ‘ĨWhite Label Validator
      • ⛲Staking
      • 🍧HashKing Aggregator
      • 💌ChainNova
    • 👷For Developers
      • â›“ī¸Use Blockchain API
      • âš’ī¸Deploy Dedicated Node
      • â˜ī¸Use distributed storage with IPFS API
    • 👾For Investors
      • ⛲How to stake Ethereum?
      • đŸ‘ĨRunning your own validators
  • ChainUpCloud Open API
    • Staking Rewards API
      • Validator Daily Rewards
      • Validator Total Rewards
      • Cloud Validator Settles EL Rewards
    • ETH Staking API
      • Broadcast Staking Tx
      • Create Validators
      • Get Validators
      • Exit Validators by Pubkeys
    • Error Codes
  • đŸˇī¸NFT API
    • Transfer API
    • NFT Metadata Access
    • Ownership & Token Gating
  • Blockchain API
    • 📚Overview
      • Create Blockchain API for your project
      • Dashboard stats
    • 💎Ethereum
      • JSON-RPC methods
      • WebSocket stream
    • Solana
      • JSON-RPC methods
      • Solana Nodes FAQ
      • Websocket Stream
    • TON
      • HTTP API
      • Indexer API
    • 🚔BNB
      • JSON-RPC methods
      • WebSocket stream
    • â›ŊPolygon (Matic)
      • JSON-RPC methods
      • WebSocket stream
    • 🌞Tron
      • JSON-RPC methods
    • đŸĒ™Bitcoin
      • JSON-RPC methods
    • 📂Filecoin
      • JSON-RPC methods
      • Public APIs
    • 🍡Polkadot
      • JSON-RPC methods
      • WebSocket stream
    • âšĒLitecoin
      • JSON-RPC methods
    • 🚃Near
      • JSON-RPC methods
    • 💎Ethereum Beacon
      • JSON-RPC methods
    • đŸĒ¨Ethereum Classic - ETC
      • JSON-RPC methods
    • đŸĨ€Bitcoin Cash - BCH
      • JSON-RPC methods
    • đŸĻƒKusama
      • JSON-RPC methods
      • WebSocket stream
    • 🍆EOS
      • JSON-RPC methods
    • đŸ‘ģFantom
      • JSON-RPC methods
    • ã€°ī¸Aptos
      • HTTP Methods
    • đŸ”ī¸Avalanche
      • JSON-RPC methods
    • 🔑Cosmos
      • HTTP Methods
    • 📚Omni
      • JSON-RPC methods
    • â˜¸ī¸Arbitrum
      • JSON-RPC methods
    • đŸ’¯Dogecoin
      • JSON-RPC methods
    • 🎷Optimism
      • JSON-RPC methods
    • Dash
      • JSON-RPC methods
    • Zcash
      • JSON-RPC methods
    • XRP
      • JSON-RPC methods
    • Base
      • JSON-RPC methods
    • Scroll
      • JSON-RPC methods
    • Qtum
      • JSON-RPC methods
  • Staking
    • 📘Overview
    • 💎Staking on Ethereum
      • 📀Shanghai Upgrade
      • ⛲How to stake Ethereum?
      • 📙How to generate Deposit Data?
    • 📏Staking on Ethereum with SSV
    • đŸ–Œī¸Registering SSV Operator
    • đŸ–Œī¸How to delegate to SSV Cluster?
    • 🌌Staking on Cosmos
      • Staking on Cosmos
      • 在 Cosmos 䏊贍æŠŧ
    • 📱Staking on Mina
    • 🍆Staking on EOS
    • 📂Staking on FIL
    • đŸ•ļī¸Staking on ZILLIQA
  • Validator Node
    • 📗Overview
    • 💎Ethereum
      • Running Validator Node
      • How to create Validator Keys?
  • RESOURCES
    • 📕FAQ Introduction
      • â›“ī¸Blockchain API
      • âš’ī¸Dedicated Node
    • đŸ—ŗī¸Support
    • Api Reference
Powered by GitBook
On this page
  • Optimism RPC
  • Example RPC

Was this helpful?

  1. Blockchain API
  2. Optimism

JSON-RPC methods

The standard Ethereum methods documented here are supported by Chainup Cloud on the Optimism network.

PreviousOptimismNextDash

Last updated 1 year ago

Was this helpful?

Optimism RPC

You can review custom methods specific to Optimism can be found in the .

Please note that the Optimism Bedrock migration introduces support for various JSON-RPC methods. For detailed information, refer to the .

Example RPC

curl https://api.chainup.net/optimism/mainnet/<YOUR_API_KEY> \
-X POST \
-H 'content-type: application/json' \
-H "CONSISTENT-HASH: true" \
--data '{"jsonrpc":"2.0","method":"getblockchaininfo","params":[],"id":1}' 
```javascript
const axios = require('axios');
//npm install axios if you don have the module installed`

let options = {
url: "https://api.chainup.net/optimism/mainnet/<YOUR_API_KEY>",
method: "post",
headers:
{
"content-type": "application/json",
"CONSISTENT-HASH": "true"
},
body: JSON.stringify({"jsonrpc":"2.0","method":"getblockchaininfo","params":[],"id":1})
};

request(options, (error, response, body) => {
if (error) {
console.error('An error has occurred: ', error);
} else {
console.log('Post successful: response: ', body);
}
});


```
import requests
import json

headers = {"content-type": "application/json",
            "CONSISTENT-HASH": "true" } 
payload = json.dumps({
"id": 1,
"jsonrpc": "2.0",
"method": "getblockchaininfo",
"params": []
})
r = requests.post(url="https://api.chainup.net/optimism/mainnet/<YOUR_API_KEY>", headers=headers, data=payload)
if r.status_code == 200:
print("Post successful: response: ", r.content)
else:
print("An error has occurred: ", r.status_code)
🎷
official Optimism API documentation
official Optimism API documentation