Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions frame/mosaic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.1

log = { version = "0.4.14", default-features = false }
scale-info = { version = "1.0", default-features = false, features = ["derive"] }
num-traits = "0.2.14"
num-traits = { version = "0.2.14", default-features = false }
plotters = {version = "0.3.1", optional = true}

[dev-dependencies]
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13" }
proptest = "0.9.6"
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "17a791edf431d7d7aee1ea3dfaeeb7bc21944301" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "17a791edf431d7d7aee1ea3dfaeeb7bc21944301", default-features = false}
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "17a791edf431d7d7aee1ea3dfaeeb7bc21944301", default-features = false }
composable-tests-helpers = { version = "0.0.1", path = "../composable-tests-helpers", default-features = false }

composable-tests-helpers = { path = "../composable-tests-helpers", default-features = false }

[features]
default = ["std"]
Expand All @@ -61,12 +59,13 @@ std = [
"sp-core/std",
"sp-std/std",
"xcm/std",
"num-traits/std",
]

runtime-benchmarks = [
'frame-benchmarking',
'frame-support/runtime-benchmarks',
'frame-system/runtime-benchmarks',
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]

visualization = ["plotters"]
3 changes: 3 additions & 0 deletions frame/mosaic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ pub mod pallet {
type PalletId: Get<PalletId>;
type Assets: Mutate<AccountIdOf<Self>> + Transfer<AccountIdOf<Self>>;

#[pallet::constant]
type MinimumTTL: Get<BlockNumberOf<Self>>;
#[pallet::constant]
type MinimumTimeLockPeriod: Get<BlockNumberOf<Self>>;

type BudgetPenaltyDecayer: Decayer<BalanceOf<Self>, BlockNumberOf<Self>>
Expand Down Expand Up @@ -116,6 +118,7 @@ pub mod pallet {
}

#[pallet::storage]
#[pallet::getter(fn relayer)]
pub type Relayer<T: Config> =
StorageValue<_, StaleRelayer<T::AccountId, T::BlockNumber>, OptionQuery>;

Expand Down
7 changes: 5 additions & 2 deletions runtime/dali/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ assets = { package = "pallet-assets", path = '../../frame/assets', default-featu
crowdloan-rewards = { package = "pallet-crowdloan-rewards", path = '../../frame/crowdloan-rewards', default-features = false }
bonded-finance = { package = "pallet-bonded-finance", path = "../../frame/bonded-finance", default-features = false }
vesting = { package = "pallet-vesting", path = "../../frame/vesting", default-features = false }
dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false }
dutch-auction = { package = "pallet-dutch-auction", path = "../../frame/dutch-auction", default-features = false }
common = { path = "../common", default-features = false }
primitives = { path = "../primitives", default-features = false }
oracle = { package = "pallet-oracle", path = "../../frame/oracle", default-features = false }
Expand All @@ -67,6 +67,7 @@ governance-registry = { package = "pallet-governance-registry", path = "../../fr
currency-factory = { package = "pallet-currency-factory", path = "../../frame/currency-factory", default-features = false }
composable-traits = { path = "../../frame/composable-traits" , default-features = false}
call-filter = { package = "pallet-call-filter", path = "../../frame/call-filter", default-features = false }
mosaic = { package = "pallet-mosaic", path = "../../frame/mosaic", default-features = false }

# Used for the node template's RPCs
system-rpc-runtime-api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.13", default-features = false }
Expand Down Expand Up @@ -172,7 +173,8 @@ std = [
"crowdloan-rewards/std",
"bonded-finance/std",
"dutch-auction/std",
"vesting/std"
"vesting/std",
"mosaic/std"
]
runtime-benchmarks = [
"assets/runtime-benchmarks",
Expand Down Expand Up @@ -207,4 +209,5 @@ runtime-benchmarks = [
"assets/runtime-benchmarks",
"bonded-finance/runtime-benchmarks",
"dutch-auction/runtime-benchmarks",
"mosaic/runtime-benchmarks"
]
17 changes: 17 additions & 0 deletions runtime/dali/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,22 @@ impl dutch_auction::Config for Runtime {
type WeightInfo = weights::dutch_auction::WeightInfo<Runtime>;
}

parameter_types! {
pub const MosaicId: PalletId = PalletId(*b"plmosaic");
pub const MinimumTTL: BlockNumber = 10;
pub const MinimumTimeLockPeriod: BlockNumber = 20;
}

impl mosaic::Config for Runtime {
type Event = Event;
type PalletId = MosaicId;
type Assets = Assets;
type MinimumTTL = MinimumTTL;
type MinimumTimeLockPeriod = MinimumTimeLockPeriod;
type BudgetPenaltyDecayer = mosaic::BudgetPenaltyDecayer<Balance, BlockNumber>;
type NetworkId = u32;
}

construct_runtime!(
pub enum Runtime where
Block = Block,
Expand Down Expand Up @@ -913,6 +929,7 @@ construct_runtime!(
Vesting: vesting::{Call, Event<T>, Pallet, Storage} = 59,
BondedFinance: bonded_finance::{Call, Event<T>, Pallet, Storage} = 60,
DutchAuction: dutch_auction::{Pallet, Call, Storage, Event<T>} = 61,
Mosaic: mosaic::{Pallet, Call, Storage, Event<T>} = 62,

CallFilter: call_filter::{Pallet, Call, Storage, Event<T>} = 100,
}
Expand Down