Storage

Get a list of storage items for a pallet.

Returns a list of storage item metadata for storage items of the specified palletId.

GEThttps://dot-playbook.nownodes.io/pallets/{palletId}/storage
Path parameters
palletId*string

Name or index of the pallet to query the storage of. Note: the pallet name must match what is specified in the runtime metadata.

Query parameters
Response

successful operation

Body
palletstring

Name of the pallet.

Example: "democracy"
palletIndexstring

Index of the pallet for looking up storage.

Example: "15"
itemsarray of PalletStorageItemMetadata (object)

Array containing metadata for each storage entry of the pallet.

Request
const response = await fetch('https://dot-playbook.nownodes.io/pallets/{palletId}/storage', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "pallet": "democracy",
  "palletIndex": "15",
  "items": [
    {
      "name": "ReferendumInfoOf",
      "modifier": "Optional",
      "fallback": "0x00",
      "docs": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
    }
  ]
}

Get the value of a storage item.

Returns the value stored under the storageItemId. If it is a map, query param key1 is required. If the storage item is double map query params key1 and key2 are required.

GEThttps://dot-playbook.nownodes.io/pallets/{palletId}/storage/{storageItemId}
Path parameters
palletId*string

Name or index of the pallet to query the storage of. Note: pallet name aligns with pallet name as specified in runtime metadata.

storageItemId*string

Id of the storage item to query for.

Query parameters
Response

successful operation

Body
atBlockIdentifiers (object)

Block number and hash at which the call was made.

palletstring

Name of the pallet.

Example: "democracy"
palletIndexstring

Index of the pallet for looking up storage.

Example: "15"
storageItemstring

Name of the storage item.

Example: "referendumInfoOf"
keysarray of string

N Storage keys passed in as the keys query param.

valueobject

Value returned by this storage query.

metadataPalletStorageItemMetadata (object)

Metadata of a storage item from a FRAME pallet.

Request
const response = await fetch('https://dot-playbook.nownodes.io/pallets/{palletId}/storage/{storageItemId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "at": {
    "hash": "text",
    "height": "text"
  },
  "pallet": "democracy",
  "palletIndex": "15",
  "storageItem": "referendumInfoOf",
  "keys": [
    "0x00",
    "0x01"
  ],
  "value": {
    "Ongoing": {
      "end": "1612800",
      "proposalHash": "0x7de70fc8be782076d0b5772be77153d172a5381c72dd56d3385e25f62abf507e",
      "threshold": "Supermajorityapproval",
      "delay": "403200",
      "tally": {
        "ayes": "41925212461400000",
        "nays": "214535586500000",
        "turnout": "34485320658000000"
      }
    }
  },
  "metadata": {
    "name": "ReferendumInfoOf",
    "modifier": "Optional",
    "fallback": "0x00",
    "docs": " Information concerning any given referendum.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control."
  }
}