mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 03:31:03 +00:00
Add tipping into treasury (#4480)
* First draft * Initial work on tests * Add tests. * Ensure old members can't tip. * Fix complexity * Update node runtime * Build fix. * build fix * Fix tests * Fix tests * Refactor Contains impl for tests * Introduce new way to avoid impl Contains conflicts * Fixes * Docs. * Docs. * Typo * Whitespace * Docs * Typo * Formatting * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/treasury/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Apply suggestions from code review Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Add provisional weights. Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
committed by
Shawn Tabrizi
parent
586685fca0
commit
67202b7ec3
@@ -227,11 +227,15 @@ mod tests {
|
||||
use super::*;
|
||||
|
||||
use std::cell::RefCell;
|
||||
use frame_support::{assert_ok, assert_noop, impl_outer_origin, parameter_types, weights::Weight};
|
||||
use frame_support::{
|
||||
assert_ok, assert_noop, impl_outer_origin, parameter_types, weights::Weight,
|
||||
ord_parameter_types
|
||||
};
|
||||
use frame_support::traits::Contains;
|
||||
use sp_core::H256;
|
||||
// The testing primitives are very useful for avoiding having to work with signatures
|
||||
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are requried.
|
||||
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header, traits::BadOrigin};
|
||||
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup, BadOrigin}, testing::Header};
|
||||
use frame_system::EnsureSignedBy;
|
||||
|
||||
impl_outer_origin! {
|
||||
@@ -267,7 +271,7 @@ mod tests {
|
||||
type Version = ();
|
||||
type ModuleToIndex = ();
|
||||
}
|
||||
parameter_types! {
|
||||
ord_parameter_types! {
|
||||
pub const One: u64 = 1;
|
||||
pub const Two: u64 = 2;
|
||||
pub const Three: u64 = 3;
|
||||
|
||||
Reference in New Issue
Block a user