Base JSON-RPC API Reference
Complete reference for Base's JSON-RPC API methods available through BlockEden.xyz. Base is fully EVM-compatible, supporting all standard Ethereum JSON-RPC methods with Layer 2 optimizations.
Endpoint
POST https://api.blockeden.xyz/base/<your-api-key>
Request Format
All requests use the JSON-RPC 2.0 protocol:
{
"jsonrpc": "2.0",
"method": "method_name",
"params": [...],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"result": "...",
"id": 1
}
Account Methods
eth_getBalance
Returns the balance of an account at a given block.
Parameters:
address
- Address to check for balanceblock
- Block number or tag ("latest"
,"earliest"
,"pending"
)
Example:
curl -X POST https://api.blockeden.xyz/base/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4", "latest"],
"id": 1
}'
Response:
{
"jsonrpc": "2.0",
"result": "0x1b1ae4d6e2ef500000",
"id": 1
}
eth_getTransactionCount
Returns the number of transactions sent from an address (nonce).
Parameters:
address
- Address to get transaction count forblock
- Block number or tag
Example:
curl -X POST https://api.blockeden.xyz/base/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getTransactionCount",
"params": ["0x742D5Cc6bF2442E8C7c74c7b4Be6AB9d6f10f5B4", "latest"],
"id": 1
}'
eth_getCode
Returns the contract code at a given address.
Parameters:
address
- Contract addressblock
- Block number or tag
Example:
curl -X POST https://api.blockeden.xyz/base/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getCode",
"params": ["0xa0b86a33e6d4c3d0c4f74d08ba3c8b7c2d1e8b9f", "latest"],
"id": 1
}'
Block Methods
eth_blockNumber
Returns the current block number.
Parameters: None
Example:
curl -X POST https://api.blockeden.xyz/base/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Response:
{
"jsonrpc": "2.0",
"result": "0x1b4",
"id": 1
}
eth_getBlockByNumber
Returns block information by block number.
Parameters:
block
- Block number (hex) or tagfull_transactions
- Iftrue
, returns full transaction objects
Example:
curl -X POST https://api.blockeden.xyz/base/<your-api-key> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}'
Response:
{
"jsonrpc": "2.0",
"result": {
"number": "0x1b4",
"hash": "0x...",
"parentHash": "0x...",
"timestamp": "0x...",
"gasLimit": "0x1c9c380",
"gasUsed": "0x...",
"transactions": ["0x..."]
},
"id": 1
}