Skip to content

Commit

Permalink
cleanup and progress update
Browse files Browse the repository at this point in the history
  • Loading branch information
SkymanOne committed Aug 1, 2022
1 parent 69b2f45 commit df002c8
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
Polkadot Blockchain Academy 2022 Cohort Final Exam Project.

## Milestones
- [ ] Basic quadratic voting system
- [ ] Anonymous quadratic system (commit-reveal)
- [ ] Staking
- [x] Basic quadratic voting system
- [x] Anonymous quadratic system (commit-reveal)
- [x] Staking
- [ ] Slashing
- [ ] Caching-out
- [ ] Tests

## Potential idea for anonymous voting

Expand Down
2 changes: 0 additions & 2 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::marker::PhantomData;

use node_template_runtime::{
AccountId, AuraConfig, BalancesConfig, GenesisConfig, GrandpaConfig,
Signature, SudoConfig, SystemConfig, WASM_BINARY,
Expand Down
7 changes: 7 additions & 0 deletions pallets/slashing-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ pub mod pallet {
let current_block = frame_system::Pallet::<T>::block_number();
ensure!(reveal_end <= current_block, Error::<T>::TooEarly);

//refund voting tokens to voters
for (_, (account, amount)) in proposal_data.votes.iter().enumerate() {
Self::deposit_votes(account, *amount);
}

//TODO: slashing

Ok(())
}

Expand Down
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ use sp_std::prelude::*;
use sp_version::NativeVersion;
use sp_version::RuntimeVersion;

use frame_support::traits::EitherOfDiverse;
use frame_system::EnsureRoot;

// A few exports that help ease life for downstream crates.
Expand Down

0 comments on commit df002c8

Please sign in to comment.