Build a Blockchain from Scratch with Rust - Rust #1.3 - Interacting with Balances Pallet State
5.0(5)
40 learners
What you'll learn
This course includes
3.3 hours of video
Certificate of completion
Access on mobile and TV
Summary
Full Transcript
In this lesson, we delve deeper into using the BTreeMap structure for managing state in our Rust blockchain module. We'll demonstrate how to insert and retrieve values using key-value pairs, handle optional values with pattern matching, and utilize the unwrap_or method for default values. You’ll also learn to implement functions to set and get user balances, leveraging BTreeMap within the Pallet struct. By the end of this video, you’ll have a solid understanding of managing in-memory state effectively with Rust's powerful standard library tools.
This video is part of a learning journey created by WEB3DEV. To watch all videos and learn more, sign-up at https://build.w3d.community/
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.