-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
a745a19
to
33b3a7e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state_queryStorageAt
isn't the right method. Looks like we'll either need to use mapArray
or give up paging and use state_getPairs
.
Note: was confused by the name of the result, storage changeset. Doesn't represent a diff after all.
The first entry doesn't, but subsequent entries do.
This is the same approach used by pjs apps. Try reading statemine's uniques classes storage map. Same output. getPairs is deprecated and calling it results in a server error. This approach allows for retrieval with 2 round trips... that being said, yea: it's not the prettiest. Not sure if we have any better alternative though. |
This is interesting. Yea, even if we did go this route, we'd need to skip decoding the subsequent diffs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I confused state_queryStorageAt
with state_queryStorage
. The former does a single block, the latter is the history-diffing one.
Eventually we should rename .entry
to .get
or .value
, but for now I think we should leave it as-is.
Resolves #643
Allows one to retrieve a list of entries as they do a list of keys.
Will soon be complemented by #567.