Customize your Substrate chain CLI using StructOpt | Substrate Seminar VIDEO
This week Cecile Tonglet explores how Substrate uses the Stuct Opt library to build an extensible CLI interface.
0:00 What is StructOpt
3:35 Example of using StructOpt
9:48 How Substrate's uses structOpt
12:23 Defining a Substrate Node CLI
22:00 Example adding a subcommand
28:08 Parsing complex parameters
31:08 Non Exhaustive Structs (https://github.com/rust-lang/rust/pull/64639/ )
33:12 Wiring additional parameters tog the service
36:50 The SubstrateCLI Trait
44:13 Live Coding another new parameter
55:28 Overriding default values for built-in flags
1:04:30 Adding a new subcommand
1:11:28 Polkadot's CLI
Links from the Seminar
UTXO node we hacked - https://github.com/substrate-developer-hub/utxo-workshop/
Structopt docs - https://docs.rs/structopt/0.3.13/structopt/
cargo watch - https://github.com/passcod/cargo-watch
⎼⎼⎼⎼⎼⎼⎼
→ For more videos on blockchain development and building Web 3.0,
subscribe to the channel: https://www.youtube.com/channel/UCSs5vZi0U7qHLkUjF3QnaWg?sub_confirmation=1
→ Website: https://www.parity.io/
→ To stay informed about Parity updates and events,
subscribe to the newsletter: https://www.parity.io/newsletter/
→ Follow us on Twitter (@ParityTech): https://twitter.com/ParityTech
→ Check our code on GitHub: https://github.com/paritytech/
#rustlang #substrate #blockchaindevelopment
Other Videos By Parity Tech 2020-05-25 Sub0 Online: Rust: Lifetimes, Traits, and Generics - Maciej Hirsz, Parity Technologies 2020-05-25 Sub0 Online: Offchain Workers - Tomasz Drwięga, Igor Matuszewski, Bernhard Schuster, Rakan Al-Hneiti 2020-05-25 Sub0 Online: Substrate Ideas Lab - Fabi Gompf, Frederik Harryson, Shawn Tabrizi 2020-05-22 Offline Phragmen and Hybrid Consensus | Substrate Seminar | Archives 2020-05-12 Build a blog UI with VueJS | Substrate Seminar 2020-05-12 Transaction lifecycle | Substrate Seminar 2020-05-06 Substrate Execute Block Code Walkthrough with Joe Petrowski and Shawn Tabrizi 2020-05-06 Substrate Transaction Queue Code Walkthrough with Joe Petrowski and Tomasz Drwięga 2020-04-23 The Present and Future of Building Blockchains with Substrate 2020-04-22 Building a UTXO chain from scratch | Substrate Seminar 2020-04-22 Customize your Substrate chain CLI using StructOpt | Substrate Seminar 2020-04-16 Substrate Social Recovery Pallet Code Walkthrough with Joe Petrowski and Shawn Tabrizi 2020-04-07 Implement an uncollateralized stablecoin and storage adapters | Substrate Seminar 2020-04-07 Manual seal and instant seal | Substrate Seminar 2020-03-27 The EVM Pallet and Purestake's Moonbeam | Substrate Seminar | Archives 2020-03-25 Intro to Substrate Off-Chain Workers with Joe Petrowski and Tomasz Drwięga 2020-03-20 [TUTORIAL] Build a proof of existence blockchain in 30 minutes 2020-03-11 PolkaHub and Totem Live | Substrate Seminar | Archives 2020-03-11 Polkadot validator node setup with Joe Petrowski and Will Pankiewicz 2020-03-09 VuePolkadot, CLE Coin, Staking Demo | Substrate Seminar | Archives 2020-03-01 Solving the NPoS problem with Phragmen | Substrate Seminar | Archives
Tags: Substrate
Blockchain
Rust
StructOpt