JSON-RPC API
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)
| Type | URL |
|---|---|
| HTTP RPC (Primary) | https://blockchain.ramestta.com |
| HTTP RPC (Secondary) | https://blockchain2.ramestta.com |
| WebSocket | wss://blockchain.ramestta.com/ws |
Testnet (Chain ID: 1371)
| Type | URL |
|---|---|
| HTTP RPC | https://testnet.ramestta.com |
| WebSocket | wss://testnet.ramestta.com/ws |
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.
curl -X POST https://blockchain.ramestta.com \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'{
"jsonrpc": "2.0",
"id": 1,
"result": "0x55a" // 1370 (Mainnet)
}eth_blockNumber
Returns the current block number.
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.
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.
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.
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).
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.
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).
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.
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.
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.
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.
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
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 transactions
ws.send(JSON.stringify({
jsonrpc: '2.0',
id: 2,
method: 'eth_subscribe',
params: ['newPendingTransactions']
}));// 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
| Method | Description |
|---|---|
| eth_chainId | Returns chain ID (0x55a for mainnet) |
| eth_blockNumber | Current block number |
| eth_getBalance | Address RAMA balance |
| eth_getStorageAt | Contract storage at position |
| eth_getTransactionCount | Nonce of address |
| eth_getCode | Contract bytecode |
| eth_getBlockByNumber | Block by number |
| eth_getBlockByHash | Block by hash |
| eth_getTransactionByHash | Transaction by hash |
| eth_getTransactionByBlockHashAndIndex | Transaction by block hash and index |
| eth_getTransactionByBlockNumberAndIndex | Transaction by block number and index |
| eth_getTransactionReceipt | Transaction receipt |
| eth_call | Contract read call |
| eth_estimateGas | Estimate gas usage |
| eth_sendRawTransaction | Send signed transaction |
| eth_getLogs | Query event logs |
| eth_gasPrice | Current gas price |
| eth_feeHistory | Fee history for blocks |
| eth_maxPriorityFeePerGas | Max priority fee |
| eth_subscribe | WebSocket subscription |
| eth_unsubscribe | Remove subscription |
| bor_getAuthor | Block author/producer |
| bor_getCurrentValidators | Current validator set |
| bor_getCurrentProposer | Current proposer |
| bor_getRootHash | Root hash for span |
| net_version | Network ID |
| net_listening | Is node listening |
| net_peerCount | Number of peers |
| web3_clientVersion | Client version |
| web3_sha3 | Keccak-256 hash |
Using with Libraries
Ethers.js
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
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
- âĸ ~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
- âĸ RamaScan ETH RPC API Docs
- âĸ Blockscout ETH RPC Reference
- âĸ GitHub: github.com/ramestta