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 all commits
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
23 changes: 23 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,29 @@ 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
```

- For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`.
- When you have the `polkadot-sdk` cloned, make sure to copy the chainspec from the `runtimes` repository to `polkadot-sdk` repository.

Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, checkout the most recent releases tag 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
$ cargo build --release --bin polkadot --features fast-runtime
TarikGul marked this conversation as resolved.
Show resolved Hide resolved
$ cp ../runtimes/polkadotDevChainSpec.json .
$ ./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