Home

Get storage entry size

POST
https://moonbeam.nownodes.io/

Authorizations

ApiKeyAuthApiKeyAuth

api-key string

NOWNodes API key passed in the api-key header.

Returns the size of a storage entry in bytes.

The state_getStorageSize method retrieves the byte size of a specific storage entry at an optional block. This is useful for estimating storage costs, monitoring storage growth, and optimizing data structures.

This method is useful for:

  • Storage cost estimation
  • Data structure optimization
  • Storage growth monitoring
  • Resource planning

Body

application/json
jsonrpcstring2.0required

JSON-RPC version identifier

methodstringstate_getStorageSizerequired

The method to be invoked

idinteger | stringrequired

Request identifier for matching responses

paramsArray<string | string>required

Array containing storage key and optional block hash.

Show child attributes
One of

Storage key in hex format

string

Optional block hash to query storage at specific block. If omitted, uses the latest finalized block.

string

Response

200OK

Storage size retrieved successfully

400Bad Request

Invalid storage key or block hash

500Internal Server Error

Internal server error