Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Substrate Utilities - SCALE Decoder #1

Closed
lucgerrits opened this issue Mar 23, 2021 · 3 comments
Closed

Substrate Utilities - SCALE Decoder #1

lucgerrits opened this issue Mar 23, 2021 · 3 comments

Comments

@lucgerrits
Copy link

Hi,
The SCALE Decoder looks useful but I can't make it work. I'm trying to decode Substrate metadata (V12).
I get a long array of numbers, I'm not sure what to think about it.
I don't know exactly what to put in the custom types.

Do you have any suggestions?

-Luc

@shawntabrizi
Copy link
Owner

SCALE Decoder does not automatically know what you want to decode. You must provide it the types and structures you need.

The metadata type is very complex, and there are easier ways to retrieve it using Polkadot JS:

const data = await api.rpc.state.getMetadata()

What is it you are trying to do specifically?

@lucgerrits
Copy link
Author

lucgerrits commented Mar 23, 2021

I see. Well, my goal is to decode metadata for polkadot_api_cpp . The issue usetech-llc/polkadot_api_cpp#32 resume my situation.

In short: polkadot_api_cpp has metadata maintained up to V6 (see here), and I'm trying to use the polkadot_api_cpp for metadata V12. I need to be in C++ because my goal is to implement it on a small (or even very small) IoT.

Your tool could maybe help me to understand better the metadata structure to code the V12 in polkadot_api_cpp. But it doesn't seem easy!!

@shawntabrizi
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants