diff --git a/docs/cookbook/storage.md b/docs/cookbook/storage.md index 8678a6f0fc..59dedd1b32 100644 --- a/docs/cookbook/storage.md +++ b/docs/cookbook/storage.md @@ -50,7 +50,7 @@ While we can retrieve only the keys for a specific era, using a argument for the ```js // Retrieves the keys for the slashed validators in era 652 -const slashedKeys = await api.query.staking.nominatorSlashInEra(652); +const slashedKeys = await api.query.staking.nominatorSlashInEra.keys(652); // key still contains (era, nominatorId) decoded, so args[1] console.log(`slashed: ${slashedKeys.map((k) => k.args[1].toString())`);