Skip to content

Putu Arka Adiana | Register for OpenGuild FRAME Challenges #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arkaadiana
Copy link

I implemented the missing functionality in both governance.rs and staking.rs modules. For governance.rs, I added proper initialization for the GovernancePallet struct and implemented core functionality for proposal management including creating proposals, casting votes, retrieving information, and finalizing proposals. In staking.rs, I implemented a balance management system with proper error handling that correctly manages free and staked balances, performs safety checks, and handles edge cases like insufficient balances. I added annotations to suppress compiler warnings for unused imports and dead code. Both modules now pass all test cases, confirming that the implementation satisfies the expected behavior while maintaining the original design and following Rust best practices for error handling, state management, and ownership rules.

image

@NTP-996
Copy link
Contributor

NTP-996 commented Mar 31, 2025

Look great, can you create pow on Discord so we can give you your reward?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants