Downloading metadata from a Substrate node
Use the subxt-cli tool to download the metadata for your target runtime from a node.
- Install:
- To Save the metadata of
protocol-substrate: Run the release build of theprotocol-substratenode, then on another terminal run:
- To Save the metadata of
dkg: Run the release build of thedkgnode, then on another terminal run:
Same goes for any future runtimes.
Note: This defaults to querying the metadata of a locally running node on the default
http://localhost:9933/. If querying a different node then themetadatacommand accepts a--urlargument.
- Generating the rust code from the metadata:
Tip: See the build.rs file to see how everything is being generated.
Generating EVM Contracts
- Update any contracts inside the contracts directory.
- Run
Tip: See the build.rs file to see how everything is being generated.
Using Nix (with flakes)
- Install Nix
- Enable flakes (if you haven't already)
- Run
nix developto enter a shell with all the dependencies installed
Additionally, if you have direnv installed, you can run direnv allow to automatically enter the shell whenever you enter the directory.
Safety
This crate uses #![deny(unsafe_code)] to ensure everything is implemented in
100% Safe Rust.
Contributing
Want to join us? take a look at some of these issues: