mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 16:31:07 +00:00
decouple balances from some modules (#1641)
* decouple balances from some module by creating a new traits in support/traits * improve decl_event
This commit is contained in:
@@ -32,7 +32,7 @@ mod tests {
|
||||
use substrate_executor::{WasmExecutor, NativeExecutionDispatch};
|
||||
use parity_codec::{Encode, Decode, Joiner};
|
||||
use keyring::Keyring;
|
||||
use runtime_support::{Hashable, StorageValue, StorageMap};
|
||||
use runtime_support::{Hashable, StorageValue, StorageMap, traits::Currency};
|
||||
use state_machine::{CodeExecutor, Externalities, TestExternalities};
|
||||
use primitives::{
|
||||
twox_128, Blake2Hasher, ChangesTrieConfiguration, ed25519::{Public, Pair}, NeverNativeValue
|
||||
|
||||
@@ -65,8 +65,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
spec_name: create_runtime_str!("node"),
|
||||
impl_name: create_runtime_str!("substrate-node"),
|
||||
authoring_version: 10,
|
||||
spec_version: 24,
|
||||
impl_version: 24,
|
||||
spec_version: 25,
|
||||
impl_version: 25,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -141,11 +141,13 @@ impl session::Trait for Runtime {
|
||||
}
|
||||
|
||||
impl staking::Trait for Runtime {
|
||||
type Currency = balances::Module<Self>;
|
||||
type OnRewardMinted = Treasury;
|
||||
type Event = Event;
|
||||
}
|
||||
|
||||
impl democracy::Trait for Runtime {
|
||||
type Currency = balances::Module<Self>;
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
}
|
||||
@@ -165,6 +167,7 @@ impl council::motions::Trait for Runtime {
|
||||
}
|
||||
|
||||
impl treasury::Trait for Runtime {
|
||||
type Currency = balances::Module<Self>;
|
||||
type ApproveOrigin = council_motions::EnsureMembers<_4>;
|
||||
type RejectOrigin = council_motions::EnsureMembers<_2>;
|
||||
type Event = Event;
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user