From ab53e286693216d28d3011032cfcecdf497f1383 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 15 Jun 2021 08:22:02 +0300 Subject: [PATCH 1/2] Add support for childstate_getKeysPaged RPC --- CHANGELOG.md | 7 +++++ .../src/interfaces/childstate/definitions.ts | 31 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3e0bd0d5e3a..a543e53b552c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGELOG +## master + +Changes: + +- Added `childstate_getKeysPaged` RPC + + ## 4.14.1 Jun 14, 2021 Upgrade priority: Low. Internal adjustment only, no major external usage changes. diff --git a/packages/types/src/interfaces/childstate/definitions.ts b/packages/types/src/interfaces/childstate/definitions.ts index 7d7dc7b305e4..4899d17a8069 100644 --- a/packages/types/src/interfaces/childstate/definitions.ts +++ b/packages/types/src/interfaces/childstate/definitions.ts @@ -28,6 +28,37 @@ export default { ], type: 'Vec' }, + getKeysPaged: { + alias: ['childstate_getKeysPagedAt'], + description: 'Returns the keys with prefix from a child storage with pagination support', + params: [ + { + name: 'childKey', + type: 'PrefixedStorageKey' + }, + { + name: 'prefix', + type: 'StorageKey', + isOptional: true + }, + { + name: 'count', + type: 'u32' + }, + { + name: 'startKey', + type: 'StorageKey', + isOptional: true + }, + { + name: 'at', + type: 'Hash', + isHistoric: true, + isOptional: true + } + ], + type: 'Vec' + }, getStorage: { description: 'Returns a child storage entry at a specific block state', params: [ From 07f0141f207ec69645ce186ba8b8a80f7d595203 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 15 Jun 2021 09:01:34 +0300 Subject: [PATCH 2/2] Optional last --- packages/types/src/interfaces/childstate/definitions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/types/src/interfaces/childstate/definitions.ts b/packages/types/src/interfaces/childstate/definitions.ts index 4899d17a8069..36d10287407c 100644 --- a/packages/types/src/interfaces/childstate/definitions.ts +++ b/packages/types/src/interfaces/childstate/definitions.ts @@ -38,8 +38,7 @@ export default { }, { name: 'prefix', - type: 'StorageKey', - isOptional: true + type: 'StorageKey' }, { name: 'count',