Skip to content

Commit

Permalink
Update docs in types-support for retrieving metadata for typegen
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Mar 7, 2024
1 parent 6a9a53c commit 6ed625b
Showing 1 changed file with 20 additions and 0 deletions.
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
```

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

0 comments on commit 6ed625b

Please sign in to comment.