Skip to content

Commit

Permalink
dao reserve (#663)
Browse files Browse the repository at this point in the history
  • Loading branch information
ETeissonniere authored Aug 25, 2022
1 parent 9080e5a commit 9c248bc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ fn eden_testnet_genesis(

// Allocations
allocations_oracles: Default::default(),

// DAO
dao_reserve: Default::default(),
}
}

Expand Down
3 changes: 3 additions & 0 deletions runtimes/eden/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ construct_runtime! {
// EmergencyShutdown: pallet_emergency_shutdown = 50,
Allocations: pallet_allocations = 51,
AllocationsOracles: pallet_membership::<Instance2> = 52,

// DAO
DaoReserve: pallet_reserve::<Instance4> = 60,
}
}

Expand Down
17 changes: 16 additions & 1 deletion runtimes/eden/src/pallets_governance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use crate::{constants, Call, Event, Origin, Runtime, TechnicalCommittee};
use frame_support::{parameter_types, traits::EitherOfDiverse, PalletId};
use frame_system::EnsureRoot;
use frame_system::{EnsureNever, EnsureRoot};
use primitives::{AccountId, BlockNumber};
pub use sp_runtime::{Perbill, Perquintill};

Expand Down Expand Up @@ -61,6 +61,21 @@ impl pallet_reserve::Config<pallet_reserve::Instance3> for Runtime {
type WeightInfo = pallet_reserve::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const DaoReservePalletId: PalletId = PalletId(*b"py/nddao"); // 5EYCAe5ijiYfABcws2T5dgN35iWYaWwvh8wPgbZaBKRRpMzV
}

impl pallet_reserve::Config<pallet_reserve::Instance4> for Runtime {
type Event = Event;
type Currency = pallet_balances::Pallet<Runtime>;
// as of now nobody can spend this, later, we need to map this to the
// correct governance origin.
type ExternalOrigin = EnsureNever<AccountId>;
type Call = Call;
type PalletId = DaoReservePalletId;
type WeightInfo = pallet_reserve::weights::SubstrateWeight<Runtime>;
}

parameter_types! {
pub const MotionDuration: BlockNumber = 2 * constants::DAYS;
pub const MaxProposals: u32 = 100;
Expand Down
2 changes: 1 addition & 1 deletion runtimes/eden/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
/// Version of the runtime specification. A full-node will not attempt to use its native
/// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
/// `spec_version` and `authoring_version` are the same between Wasm and native.
spec_version: 13,
spec_version: 14,

/// Version of the implementation of the specification. Nodes are free to ignore this; it
/// serves only as an indication that the code is different; as long as the other two versions
Expand Down

0 comments on commit 9c248bc

Please sign in to comment.