From 28ac5e66cba7c46e8b07cc986e4d83a3f66ae29c Mon Sep 17 00:00:00 2001 From: Meyo Stpehen <90961928+letodunc@users.noreply.github.com> Date: Fri, 19 Aug 2022 09:27:53 +0200 Subject: [PATCH] 98 voting pallet (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Updating branch with main updates (#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 Co-authored-by: Kazunobu Ndong <33208377+ndkazu@users.noreply.github.com> * Merge main into voting pallet branch (#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 (#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 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” * 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 * added unit tests * added more tests * renamed house_council to council in configuration * removed democracy_porpose() call in investor voting Co-authored-by: ndkazu 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” --- pallets/voting/src/lib.rs | 3 --- pallets/voting/src/tests.rs | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/pallets/voting/src/lib.rs b/pallets/voting/src/lib.rs index a5af1f58..7ff3bae6 100644 --- a/pallets/voting/src/lib.rs +++ b/pallets/voting/src/lib.rs @@ -298,9 +298,6 @@ pub mod pallet { // A part of the initial deposit is freed to be reserved in the Democracy::propose() function T::LocalCurrency::unreserve(&account_id, deposit); - // Call Democracy propose - DEMO::Pallet::::propose(RawOrigin::Signed(account_id.clone()).into(),proposal_hash, propose_deposit)?; - let threshold = DEMO::VoteThreshold::SimpleMajority; let delay = ::Delay::get(); diff --git a/pallets/voting/src/tests.rs b/pallets/voting/src/tests.rs index 5e4d0877..3a7ed955 100644 --- a/pallets/voting/src/tests.rs +++ b/pallets/voting/src/tests.rs @@ -704,16 +704,5 @@ fn investor_vote_proposal_fail_should_succeed() { VotingModule::democracy_proposals(hash.clone()).is_none(), true ); - - let mut event = >::events() - .pop() - .expect("Expected at least one EventRecord to be found") - .event; - - // check that the event has been raised - assert_eq!( - event, - crate::mock::Event::Democracy(Event::NotPassed{ref_index: 1}), - ); }); }