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

Update docs in types-support for retrieving metadata for typegen #5809

Merged
merged 5 commits into from
Mar 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions packages/types-support/src/metadata/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository

`--dev` sets the flag `--tmp` automatically so there is no need for purging the dev db.

For Polkadot & Kusama -

Clone the [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes/tree/main) repository and from the ROOT run:

```bash
$ unset SKIP_WASM_BUILD
$ cargo build --release -p chain-spec-generator --features fast-runtime
$ ./target/release/chain-spec-generator polkadot-dev > polkadotDevChainSpec.json
```

Note: For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`.

Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository and from the ROOT run:

```bash
$ cargo build --release --bin polkadot-prepare-worker --features fast-runtime
$ cargo build --release --bin polkadot-execute-worker --features fast-runtime
$ ./target/release/polkadot --chain polkadotDevChainSpec.json
TarikGul marked this conversation as resolved.
Show resolved Hide resolved
```

To retrieve the metadata -

`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getMetadata", "params":[]}' http://localhost:9944`
Expand Down
Loading