Dispatchables

Get a list of dispatchables for a pallet.

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

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

Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is specified in the runtime metadata.

Query parameters
Response

successful operation

Body
atobject

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 dispatchables.

Example: "14"
itemsarray of object

Array containing metadata for each dispatchable entry of the pallet.

Request
const response = await fetch('https://dot-playbook.nownodes.io/pallets/{palletId}/dispatchables', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "at": {
    "hash": "text",
    "height": "text"
  },
  "pallet": "democracy",
  "palletIndex": "14",
  "items": [
    {
      "name": "propose",
      "fields": [
        "text"
      ],
      "index": "0",
      "docs": "Information concerning any given dispatchable.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control.",
      "args": [
        "text"
      ]
    }
  ]
}

Get the value of a dispatchable item.

Returns the value stored under the dispatchableItemId.

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

Name or index of the pallet to read dispatchable metadata for. Note: the pallet name must match what is specified in the runtime metadata.

dispatchableItemId*string

Id of the dispatchable item to query for.

Query parameters
Response

successful operation

Body
palletstring

Name of the pallet.

Example: "democracy"
palletIndexstring

Index of the pallet for looking up dispatchables.

Example: "14"
dispatchableItemstring

Name of the dispatchable item.

Example: "vote"
metadataobject

Metadata of a dispatchable item from a FRAME pallet.

Request
const response = await fetch('https://dot-playbook.nownodes.io/pallets/{palletId}/dispatchables/{dispatchableItemId}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "pallet": "democracy",
  "palletIndex": "14",
  "dispatchableItem": "vote",
  "metadata": {
    "name": "propose",
    "fields": [
      "text"
    ],
    "index": "0",
    "docs": "Information concerning any given dispatchable.\n\n TWOX-NOTE: SAFE as indexes are not under an attacker’s control.",
    "args": [
      "text"
    ]
  }
}