Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danforbes/decode-substrate-metadata
The purpose of this project is to learn more about the SCALE codec by using it to decode Substrate metadata :nerd_face:
https://github.com/danforbes/decode-substrate-metadata
Last synced: 25 days ago
JSON representation
The purpose of this project is to learn more about the SCALE codec by using it to decode Substrate metadata :nerd_face:
- Host: GitHub
- URL: https://github.com/danforbes/decode-substrate-metadata
- Owner: danforbes
- License: unlicense
- Created: 2020-05-23T01:29:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T11:27:08.000Z (over 3 years ago)
- Last Synced: 2024-10-18T08:38:28.430Z (3 months ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 1
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Decode Substrate Metadata
[Substrate](https://www.substrate.io/)-based blockchains use the [SCALE](https://www.substrate.io/kb/advanced/codec)
codec to encode data, including [the metadata](https://www.substrate.io/kb/runtime/metadata) that describes the chain.
The purpose of this project is to learn more about the SCALE codec by using it to decode
[`v11` of Substrate metadata](https://crates.parity.io/frame_metadata/struct.RuntimeMetadataV11.html).## Usage
In order to use this project, you must first install its dependencies:
```
$ yarn
```Then, use the provided `start` command to fetch the latest metadata from `wss://kusama-rpc.polkadot.io/` and write the
raw metadata to `metadata.scale` & the parsed metadata to `metadata.json`.```
$ yarn start
```## Source
All of the code for this project is in a single file, [`index.js`](./index.js). Take a look and see the SCALE codec in
action :nerd_face: