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

About polkadot_metadata.scale #314

Closed
Cupnfish opened this issue Nov 9, 2021 · 3 comments
Closed

About polkadot_metadata.scale #314

Cupnfish opened this issue Nov 9, 2021 · 3 comments

Comments

@Cupnfish
Copy link

Cupnfish commented Nov 9, 2021

I don't know how to generate such a file for my own chain, is there a special document for it?

@insipx
Copy link
Contributor

insipx commented Nov 9, 2021

Hey @Cupnfish ,

you can get the polkadot_metadata.scale file, or really any .scale file from a running node with this unix command:

curl -sX POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"state_getMetadata", "id": 1}' localhost:9933 \
                    | jq .result \
                    | cut -d '"' -f 2 \
                    | xxd -r -p > ./your_scale_file.scale

@Cupnfish
Copy link
Author

Cupnfish commented Nov 9, 2021

Thanks 😊

@Cupnfish Cupnfish closed this as completed Nov 9, 2021
@ascjones
Copy link
Contributor

Also you can use subxt-cli now, cargo run -p subxt-cli -- metadata -f bytes > metadata.scale.

Just opened a PR #319 with that

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

3 participants