Fix 'Option' return of storage #256
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Renew old PR #210
For example
For a storage that has a return type
Option<Vec<u8>>, the storage data through RPC will returns:0x00forSome([])0x080001forSome([0, 1])So, if subxt want to use the
Option<Vec<u8>>to decode the returns, the hex should be changed to:0x00to0x01000x080001to0x01080001which is prefixed with a
01for scale codecSomeOr, find a way to use
Vec<u8>to decode.