8000 GitHub - elliot-u410/desub: Decode Substrate with Backwards-Compatible Metadata
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

elliot-u410/desub

 
 

Repository files navigation

tests Coverage Status

De[code] Sub[strate]

† This software is experimental, and not intended for production use yet. Use at your own risk.

Encompassing decoder for substrate/polkadot/kusama types.

Gets type definitions from polkadot-js via JSON and decodes them into components that outline types and make decoding byte-strings possible, as long as the module/generic type name are known.

Supports Metadata versions from v8, which means all of Kusama (from CC1). Older networks are not supported (E.G Alexander).

  • makes decoding generic types from the substrate rpc possible
  • requires parsing JSON with type definitions, and implementing traits TypeDetective and Decoder in order to work for arbitrary chains. However, if the JSON follows the same format as PolkadotJS definitions (look at definitions.json and overrides.json) it would be possible to simply deserialize into Polkadot structs and utilize those. The decoding itself is generic enough to allow it.
  • types must adhere to the conventions set out by polkadot decoding
    • type definitions for Polkadot (Kusama) are taken from Polkadot.js and deserialized into Rust (extras/polkadot)
Chain Extrinsics Storage Map Double Map Blake_2* hashes Twox_* Hashes Identity Hash
Kusama
Polkadot
Westend
Kulupu

Currently Supported Metadata Versions (From Kusama CC1):

  • V8
  • V9
  • V10
  • V11
  • V12
  • V13
  • V14

(Tentative) Release & Maintenence

Note: Release description is in no way complete because of current & active development for legacy desub types & scale-info based types. it is purely here as a record for things that should be taken into account in the future

  • Depending on changes in legacy desub code, bump version in Cargo.toml for extras/, core/
  • note upgrade-blocks present here and modify the hard-coded upgrade blocks as necessary in the desub runtimes.rs file.
    • NOTE: this step may-or-may not be necessary depending on scale-info integration in the future.

About

Decode Substrate with Backwards-Compatible Metadata

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%
0