-
Notifications
You must be signed in to change notification settings - Fork 8
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
98 voting pallet #107
98 voting pallet #107
Conversation
* Runtime update Update to polkadot-v0.9.26 * Token symbol and pallet-uniques Added the pallet-uniques to the runtime, and changed the token Symbol to USD * Benchmarking fixed Co-authored-by: ndkazu <ndongmefane@gmail.com> Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com>
* Runtime update Update to polkadot-v0.9.26 * Token symbol and pallet-uniques Added the pallet-uniques to the runtime, and changed the token Symbol to USD * Benchmarking fixed * refresh FS repo (#101) * update readme and badges * delete diagram * add w3f badge and adjust readme * adjust size and position * remove unused files * adjusted the readme some more * add w3f badge back * changed from docker hub to ghcr registry * small change to the DockerFile * 102 automatization tasks (#103) * added a script to add a new pallet from a pallet template and configure the runtime Cargo.toml and lib.rs * added a script to update polkadot lib in .toml files for the node, runtime, pallets and pallet template Co-authored-by: ndkazu <ndongmefane@gmail.com> Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> Co-authored-by: Ilhan <29432367+ilhanu@users.noreply.github.com> Co-authored-by: “ilhanu” <ilhanunlu@gmail.com>
Codecov Report
@@ Coverage Diff @@
## main #107 +/- ##
==========================================
- Coverage 60.34% 52.48% -7.87%
==========================================
Files 22 27 +5
Lines 1339 1551 +212
==========================================
+ Hits 808 814 +6
- Misses 531 737 +206
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a global review focusing on lib.rs, but I think we need to complete the testing part in order to do a better review and do the merge in main
pallets/voting/src/lib.rs
Outdated
// Check that the extrinsic was signed and get the signer | ||
let who = ensure_signed(origin)?; | ||
|
||
// Check that the account has the investor role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The role (correctly defined in the code) is Seller, instead of investor
}; | ||
|
||
use scale_info::TypeInfo; | ||
use scale_info::prelude::boxed::Box; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if scale_info::prelude::boxed::Box
is different from sp_std::boxed::Box
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, nice work!
pallets/voting/README.md
Outdated
@@ -0,0 +1 @@ | |||
License: Unlicense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
License Apache 2.0 or remove
/// A investor has voted | ||
InvestorVoted(T::AccountId, T::Hash, BlockNumberOf<T>), | ||
/// TODO: to remove, Event for test purpose | ||
CollectiveMotionChecked(BlockNumberOf<T>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think these events can be formed for the purpose of investor voting instead of removing them
} | ||
|
||
// Errors inform users that something went wrong. | ||
#[pallet::error] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about errors for the investor voting ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the voting bring up the democracy's errors for the investor voting
pallets/voting/src/lib.rs
Outdated
let block_number = <frame_system::Pallet<T>>::block_number(); | ||
let democration_motion_duration = block_number.saturating_add(<T as DEMO::Config>::VotingPeriod::get()).saturating_add(delay); | ||
|
||
// Set the the storage to be wathed for the democracy process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Set the the storage to be wathed for the democracy process | |
// Set the the storage to be watched for the democracy process |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man, hawkeye... Corrected!
* Updating branch with main updates (Fair-Squares#100) * Runtime update Update to polkadot-v0.9.26 * Token symbol and pallet-uniques Added the pallet-uniques to the runtime, and changed the token Symbol to USD * Benchmarking fixed Co-authored-by: ndkazu <ndongmefane@gmail.com> Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> * Merge main into voting pallet branch (Fair-Squares#104) * Runtime update Update to polkadot-v0.9.26 * Token symbol and pallet-uniques Added the pallet-uniques to the runtime, and changed the token Symbol to USD * Benchmarking fixed * refresh FS repo (Fair-Squares#101) * update readme and badges * delete diagram * add w3f badge and adjust readme * adjust size and position * remove unused files * adjusted the readme some more * add w3f badge back * changed from docker hub to ghcr registry * small change to the DockerFile * 102 automatization tasks (Fair-Squares#103) * added a script to add a new pallet from a pallet template and configure the runtime Cargo.toml and lib.rs * added a script to update polkadot lib in .toml files for the node, runtime, pallets and pallet template Co-authored-by: ndkazu <ndongmefane@gmail.com> Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> Co-authored-by: Ilhan <29432367+ilhanu@users.noreply.github.com> Co-authored-by: “ilhanu” <ilhanunlu@gmail.com> * added voting pallet, added config in runtime * added collective and democracy pallets to voting pallet and runtime config * added collective and democracy config to runtime * updated pallet_template * added members to house council * added functions to voting * added pallet roles to voting * update functions implementation * added events, refactored code * updated test configuration * added call formating for collective::propose() * added full process voting implementation with basic checks * added origin check on proposal dispatching from Democracy * added check origin call from collective pallet * added proposal status transition management and documentation * updated voting mockup for tests * refactored code * removed comments * code review updates * code review updates * fix for voting benchmarking * added fix for voting benchmarking * fix update * temporary deactivated voting benchmarking Co-authored-by: ndkazu <ndongmefane@gmail.com> Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> Co-authored-by: Ilhan <29432367+ilhanu@users.noreply.github.com> Co-authored-by: “ilhanu” <ilhanunlu@gmail.com>
Implemented functions to manage voting through the collective and democracy pallet for the House Council vote session and Investors vote session