eth_coinbase
Returns the client coinbase address on Avalanche C-Chain.
Parameters
This method accepts no parameters.
{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
}
Returns
DATA
, 20 bytes - the current coinbase address.
Implementation Example
- cURL
- JavaScript
curl -X POST https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_coinbase",
"params": [],
"id": 64
}'
const response = await fetch('https://api-avalanche-mainnet-archive.n.dwellir.com/YOUR_API_KEY/ext/bc/C/rpc', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_coinbase',
params: [],
id: 64
})
});
const data = await response.json();
console.log(data.result);
Response Example
{
"id": 64,
"jsonrpc": "2.0",
"result": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
}
Note: On Avalanche C-Chain, this method may return null or a default address as traditional PoW mining doesn't apply.
Need help? Contact our support team or check the Avalanche documentation.