/Docs/API Reference/JSON-RPC API

JSON-RPC API

ETH RPCEVM CompatibleBlockscout v9.0.2

Ramestta supports the standard Ethereum JSON-RPC API, making it compatible with all Ethereum tools, libraries, and applications. The RPC is powered by Bor (Polygon fork) and fully compatible with Web3.js, Ethers.js, and all EVM tooling.

RPC Endpoints

Mainnet (Chain ID: 1370)

TypeURL
HTTP RPC (Primary)https://blockchain.ramestta.com
HTTP RPC (Secondary)https://blockchain2.ramestta.com
WebSocketwss://blockchain.ramestta.com/ws

Testnet (Chain ID: 1371)

TypeURL
HTTP RPChttps://testnet.ramestta.com
WebSocketwss://testnet.ramestta.com/ws
â„šī¸Chain ID in Hex
Mainnet: 0x55a (1370) | Testnet: 0x55b (1371)

Standard Ethereum Methods

Ramestta supports all standard Ethereum JSON-RPC methods. See the Ethereum JSON-RPC Specification for complete details.

eth_chainId

Returns the chain ID of the network.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
Responsejson
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x55a"  // 1370 (Mainnet)
}

eth_blockNumber

Returns the current block number.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

eth_getBalance

Returns the RAMA balance of an address in wei.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"eth_getBalance",
    "params":["0x742d35Cc6634C0532925a3b844Bc9e7595f00000","latest"],
    "id":1
  }'

eth_gasPrice

Returns the current gas price in wei.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}'

eth_sendRawTransaction

Submits a signed transaction to the network.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"eth_sendRawTransaction",
    "params":["0xf86c...signed_tx_data"],
    "id":1
  }'

eth_call

Executes a contract call without creating a transaction (read-only).

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"eth_call",
    "params":[{
      "to":"0x0000000000000000000000000000000000001010",
      "data":"0x70a08231000000000000000000000000..."
    },"latest"],
    "id":1
  }'

eth_getTransactionReceipt

Returns the receipt of a transaction by hash.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"eth_getTransactionReceipt",
    "params":["0x88df016429689c079f3b2f6ad39fa052532c56795b733da78a91ebe6a713944b"],
    "id":1
  }'

eth_getLogs

Returns logs matching a filter (useful for querying events).

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"eth_getLogs",
    "params":[{
      "fromBlock":"0x1",
      "toBlock":"latest",
      "address":"0x0000000000000000000000000000000000001010",
      "topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
    }],
    "id":1
  }'

Bor-Specific Methods

Ramestta runs Bor (a Polygon fork), which includes additional RPC methods for validator and block producer information.

bor_getAuthor

Returns the author (block producer) of a block.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"bor_getAuthor",
    "params":["latest"],
    "id":1
  }'

bor_getCurrentValidators

Returns the current validator set.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"bor_getCurrentValidators","params":[],"id":1}'

bor_getCurrentProposer

Returns the current block proposer.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"bor_getCurrentProposer","params":[],"id":1}'

bor_getRootHash

Returns the root hash for a given span of blocks.

Requestbash
curl -X POST https://blockchain.ramestta.com \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "method":"bor_getRootHash",
    "params":[0, 1000],
    "id":1
  }'

WebSocket Subscriptions

Subscribe to New Blocksjavascript
const WebSocket = require('ws');
const ws = new WebSocket('wss://blockchain.ramestta.com/ws');

ws.on('open', () => {
  // Subscribe to new block headers
  ws.send(JSON.stringify({
    jsonrpc: '2.0',
    id: 1,
    method: 'eth_subscribe',
    params: ['newHeads']
  }));
});

ws.on('message', (data) => {
  const response = JSON.parse(data);
  if (response.method === 'eth_subscription') {
    console.log('New block:', response.params.result.number);
  }
});
Subscribe to Pending Transactionsjavascript
// Subscribe to pending transactions
ws.send(JSON.stringify({
  jsonrpc: '2.0',
  id: 2,
  method: 'eth_subscribe',
  params: ['newPendingTransactions']
}));
Subscribe to Contract Logsjavascript
// Subscribe to Transfer events on MRC20 contract
ws.send(JSON.stringify({
  jsonrpc: '2.0',
  id: 3,
  method: 'eth_subscribe',
  params: ['logs', {
    address: '0x0000000000000000000000000000000000001010',
    topics: ['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef']
  }]
}));

All Supported Methods

MethodDescription
eth_chainIdReturns chain ID (0x55a for mainnet)
eth_blockNumberCurrent block number
eth_getBalanceAddress RAMA balance
eth_getStorageAtContract storage at position
eth_getTransactionCountNonce of address
eth_getCodeContract bytecode
eth_getBlockByNumberBlock by number
eth_getBlockByHashBlock by hash
eth_getTransactionByHashTransaction by hash
eth_getTransactionByBlockHashAndIndexTransaction by block hash and index
eth_getTransactionByBlockNumberAndIndexTransaction by block number and index
eth_getTransactionReceiptTransaction receipt
eth_callContract read call
eth_estimateGasEstimate gas usage
eth_sendRawTransactionSend signed transaction
eth_getLogsQuery event logs
eth_gasPriceCurrent gas price
eth_feeHistoryFee history for blocks
eth_maxPriorityFeePerGasMax priority fee
eth_subscribeWebSocket subscription
eth_unsubscribeRemove subscription
bor_getAuthorBlock author/producer
bor_getCurrentValidatorsCurrent validator set
bor_getCurrentProposerCurrent proposer
bor_getRootHashRoot hash for span
net_versionNetwork ID
net_listeningIs node listening
net_peerCountNumber of peers
web3_clientVersionClient version
web3_sha3Keccak-256 hash

Using with Libraries

Ethers.js

ethers-example.tstypescript
import { ethers } from 'ethers';

// Connect to Ramestta Mainnet
const provider = new ethers.JsonRpcProvider('https://blockchain.ramestta.com');

// Or use secondary RPC for load balancing
// const provider = new ethers.JsonRpcProvider('https://blockchain2.ramestta.com');

// Get network info
const network = await provider.getNetwork();
console.log('Chain ID:', network.chainId); // 1370n

// Get balance
const balance = await provider.getBalance('0x...');
console.log('Balance:', ethers.formatEther(balance), 'RAMA');

// Get block
const block = await provider.getBlock('latest');
console.log('Latest block:', block.number);

Web3.js

web3-example.jsjavascript
const Web3 = require('web3');

// Connect to Ramestta
const web3 = new Web3('https://blockchain.ramestta.com');

// Get chain ID
const chainId = await web3.eth.getChainId();
console.log('Chain ID:', chainId); // 1370

// Get balance
const balance = await web3.eth.getBalance('0x...');
console.log('Balance:', web3.utils.fromWei(balance, 'ether'), 'RAMA');

// Get gas price
const gasPrice = await web3.eth.getGasPrice();
console.log('Gas price:', web3.utils.fromWei(gasPrice, 'gwei'), 'gwei');

Rate Limits & Best Practices

âš ī¸Public RPC Limits
Public RPC endpoints have rate limits to ensure fair usage:
  • â€ĸ ~100 requests per second per IP
  • â€ĸ WebSocket connections limited per IP
  • â€ĸ Large eth_getLogs queries may be rate limited

Best Practices

  • Use both primary and secondary RPC endpoints for redundancy
  • Implement exponential backoff for retries
  • Cache responses where appropriate (block data, receipts)
  • Use WebSocket for real-time data instead of polling
  • Consider running your own Bor node for production
  • Use batch requests to reduce API calls
✅More Resources

Found an issue with this page? Report on GitHub