eth_accounts - Mantle

Example code for the eth_accounts JSON-RPC method. Complete guide on how to use eth_accounts JSON-RPC in GetBlock Web3 documentation.

This method returns a list of addresses owned by the client. Note that this method always returns an empty array when using a public RPC provider.

Parameters

  • None

Request

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_accounts",
    "params": [],
    "id": "getblock.io"
}'

Response

{
    "jsonrpc": "2.0",
    "id": "getblock.io",
    "result": []
}

Response Parameters

Field
Type
Description

result

array

Array of addresses owned by the client (empty for public RPC)

Use Case

The eth_accounts method is typically used for:

  • Checking for locally managed accounts

  • Wallet integration testing

  • Node configuration verification

  • Development environment setup

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid ACCESS-TOKEN

Web3 Integration

Last updated

Was this helpful?