sub0 reset

Workshop: Learn How to Implement a Voting Mechanism in your DAO
2024-11-09 , 5 Floor. Workshop room

This session dives into techniques for optimizing storage in ink! DAO smart contracts, an essential component for reducing costs and improving performance within the Polkadot ecosystem. Participants will explore how efficient storage solutions can minimize on-chain resource usage, speed up execution times, and lower transaction fees.

In the first 30 minutes of the workshop, you will learn about:

  • How ink! storage works
  • Storage optimized data structures: StorageVec and Mapping
  • Maintain a StorageVec of valid voter addresses.
  • Maintain a Mapping of voter addresses to votes

In the second half of the workshop, you will get in-class guidance to help you complete one of the ink! challenges: Add voters and votes to your DAO contract by using the APIs you learnt about in the first part.