From f01d070617406f5b4b897e7fe6378202e1d4f55a Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 5 Mar 2024 13:41:44 -0500 Subject: [PATCH] Update docs again --- packages/types-support/src/metadata/README.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index 615c31371db7..394726f6de1c 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -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. +To retrieve the metadata - + +`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getMetadata", "params":[]}' http://localhost:9944` + +- Add it to the relevant folders e.g. `v14/{kusama, polkadot, substrate}-hex.json` + +To retrieve the rpc methods - + +`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "rpc_methods", "params":[]}' http://localhost:9944` + +- Add it to the relevant folders e.g. `v14/{kusama, polkadot, substrate}-rpc.ts` + +To retrieve the runtime versions - + +`curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getRuntimeVersion", "params":[]}' http://localhost:9944` + +- Add it to the relevant folders e.g. `v14/{kusama, polkadot, substrate}-ver.ts` + +NOTE: This all works for manual updating, but for an easier process run from root for each respective chain: `node ./scripts/metadata-get.mjs` + ## extraction (Legacy) For Substrate & Polkadot (dev chains) -