debug_accountRange - BSC

Example code for the debug_accountRange JSON RPC method. Сomplete guide on how to use debug_accountRange JSON RPC in GetBlock Web3 documentation.

The debug_accountRange method enumerates all accounts at a given block with paging support on the BNB Smart Chain.

Parameters

Parameter
Type
Required
Description

blockHashOrNumber

string

Yes

Block hash or number

txIndex

number

Yes

Transaction index

addressHash

string

Yes

Starting address hash

maxResults

number

Yes

Maximum results

Request Example

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

Response Example

Response Parameters

Parameter
Type
Description

accounts

object

Account data map

next

string

Next hash for pagination

Use Cases

  • Enumerate accounts at block

  • State analysis

  • Account enumeration

Error Handling

Error Code
Description

-32602

Invalid params

-32601

Method not supported

SDK Integration

Last updated

Was this helpful?