Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dao reserve #663

Merged
merged 3 commits into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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