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
1 change: 1 addition & 0 deletions bin/subzero-standalone/cli/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ pub fn testnet_genesis(
min_join_bond: 1 * DOLLARS,
..Default::default()
},
asset_registry: Default::default(),
tokens: TokensConfig { balances: Default::default() },
control: ControlConfig { orgs: Default::default() }
}
Expand Down
16 changes: 13 additions & 3 deletions bin/subzero-standalone/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,16 @@ pallet-uniques = { default-features = false, git = "https://github.com/paritytec
pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }
pallet-whitelist = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.28" }

xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.28", default-features = false }

primitives = { path = "../../../modules/primitives", version = "2.0.0", package = "zero-primitives", default-features = false }

orml-tokens = { path = "../../../modules/orml/tokens", default-features = false }
orml-traits = { path = "../../../modules/orml/traits", default-features = false }
orml-currencies = { path = "../../../modules/orml/currencies", default-features = false }
orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }

pallet-rmrk-core = { git = "https://github.com/rmrk-team/rmrk-substrate", default-features = false, branch = "polkadot-v0.9.28" }
pallet-rmrk-equip = { git = "https://github.com/rmrk-team/rmrk-substrate", default-features = false, branch = "polkadot-v0.9.28" }
Expand Down Expand Up @@ -209,9 +214,14 @@ std = [
"pallet-child-bounties/std",
"pallet-alliance/std",

"xcm/std",
"xcm-executor/std",
"xcm-builder/std",

"orml-tokens/std",
"orml-currencies/std",
"orml-traits/std",
"orml-asset-registry/std",

"pallet-rmrk-core/std",
"pallet-rmrk-market/std",
Expand Down
30 changes: 28 additions & 2 deletions bin/subzero-standalone/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use frame_support::{
traits::{
tokens::nonfungibles::*,
AsEnsureOriginWithArg, ConstU8, ConstU16, ConstU32, Contains, Currency, EitherOfDiverse,
EnsureOrigin, EnsureOriginWithArg, EqualPrivilegeOnly, Everything, Imbalance,
EnsureOrigin, EnsureOriginWithArg, EqualPrivilegeOnly, Imbalance,
InstanceFilter, KeyOwnerProofSystem, LockIdentifier, Nothing, OnUnbalanced, U128CurrencyToVote,
},
weights::{
Expand All @@ -48,7 +48,7 @@ use frame_system::{
EnsureRoot, EnsureRootWithSuccess, EnsureSigned,
};
pub use primitives::{
currency::{ZERO, PLAY, GAME, CurrencyId},
currency::{ZERO, PLAY, GAME, CurrencyId, CustomMetadata},
dollar, cent, millicent,
AccountId, ReserveIdentifier, Signature, TokenSymbol
};
Expand Down Expand Up @@ -93,6 +93,7 @@ pub use pallet_sudo::Call as SudoCall;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;

use orml_asset_registry::SequentialId;
use orml_traits::parameter_type_with_key;
use orml_currencies::BasicCurrencyAdapter;

Expand Down Expand Up @@ -1637,6 +1638,30 @@ impl pallet_alliance::Config for Runtime {
type WeightInfo = pallet_alliance::weights::SubstrateWeight<Runtime>;
}

pub struct AssetAuthority;
impl EnsureOriginWithArg<Origin, Option<u32>> for AssetAuthority {
type Success = ();

fn try_origin(origin: Origin, _asset_id: &Option<u32>) -> Result<Self::Success, Origin> {
EnsureRoot::try_origin(origin)
}

#[cfg(feature = "runtime-benchmarks")]
fn successful_origin(_asset_id: &Option<u32>) -> Origin {
EnsureRoot::successful_origin()
}
}

impl orml_asset_registry::Config for Runtime {
type Event = Event;
type Balance = Balance;
type CustomMetadata = ();
type AssetProcessor = SequentialId<Runtime>;
type AssetId = u32;
type AuthorityOrigin = AssetAuthority;
type WeightInfo = ();
}

parameter_type_with_key! {
pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance {
match currency_id {
Expand Down Expand Up @@ -1837,6 +1862,7 @@ construct_runtime!(
RankedCollective: pallet_ranked_collective,

// ORML pallets:
AssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event<T>, Config<T>},
Tokens: orml_tokens::{Pallet, Storage, Event<T>, Config<T>},
Currencies: orml_currencies::{Pallet, Call},

Expand Down
1 change: 1 addition & 0 deletions bin/subzero-standalone/testing/src/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ pub fn config_endowed(code: Option<&[u8]>, extra_endowed: Vec<AccountId>) -> Gen
alliance: Default::default(),
alliance_motion: Default::default(),
nomination_pools: Default::default(),
asset_registry: Default::default(),
tokens: Default::default(),
control: Default::default()
}
Expand Down
22 changes: 11 additions & 11 deletions bin/subzero/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "r
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" }

# Cumulus
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }

primitives = { version = "2.0.0", package = "zero-primitives", default-features = false, path = "../../../modules/primitives" }

Expand Down
38 changes: 19 additions & 19 deletions bin/subzero/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,28 @@ xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features
xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" }

# Cumulus
cumulus-pallet-aura-ext = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-pallet-dmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-pallet-parachain-system = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-pallet-session-benchmarking = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false}
cumulus-pallet-xcm = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-pallet-xcmp-queue = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-primitives-timestamp = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-primitives-utility = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
pallet-collator-selection = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
parachain-info = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28', default-features = false }
cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-pallet-session-benchmarking = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false}
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
pallet-collator-selection = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28", default-features = false }

primitives = { version = "2.0.0", package = "zero-primitives", default-features = false, path = "../../../modules/primitives" }

orml-asset-registry = { path = "../../../modules/orml/asset-registry", default-features = false }
orml-currencies = { path = "../../../modules/orml/currencies", default-features = false }
orml-tokens = { path = "../../../modules/orml/tokens", default-features = false }
orml-traits = { path = "../../../modules/orml/traits", default-features = false }
orml-unknown-tokens = { path = "../../../modules/orml/unknown-tokens", default-features = false }
orml-xcm = { path = "../../../modules/orml/xcm", default-features = false }
orml-xcm-support = { path = "../../../modules/orml/xcm-support", default-features = false }
orml-xtokens = { path = "../../../modules/orml/xtokens", default-features = false }
orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }

pallet-rmrk-core = { git = "https://github.com/rmrk-team/rmrk-substrate", default-features = false, branch = "polkadot-v0.9.28" }
pallet-rmrk-equip = { git = "https://github.com/rmrk-team/rmrk-substrate", default-features = false, branch = "polkadot-v0.9.28" }
Expand Down
22 changes: 11 additions & 11 deletions bin/zero/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,17 @@ polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "r
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.28" }

# Cumulus
cumulus-client-cli = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-collator = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-consensus-aura = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-consensus-common = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-network = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-service = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-primitives-core = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-primitives-parachain-inherent = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-inprocess-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-relay-chain-rpc-interface = { git = 'https://github.com/paritytech/cumulus', branch = 'polkadot-v0.9.28' }
cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-collator = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }
cumulus-relay-chain-rpc-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.28" }

primitives = { version = "2.0.0", package = "zero-primitives", default-features = false, path = "../../../modules/primitives" }

Expand Down
17 changes: 8 additions & 9 deletions bin/zero/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,14 @@ parachain-info = { git = "https://github.com/paritytech/cumulus", default-featur
primitives = { version = "2.0.0", package = "zero-primitives", default-features = false, path = "../../../modules/primitives" }

# ORML
# SBP-M2 review: why you use your copy of orml instead of following main implementation?
orml-asset-registry = { path = "../../../modules/orml/asset-registry", default-features = false }
orml-currencies = { path = "../../../modules/orml/currencies", default-features = false }
orml-tokens = { path = "../../../modules/orml/tokens", default-features = false }
orml-traits = { path = "../../../modules/orml/traits", default-features = false }
orml-unknown-tokens = { path = "../../../modules/orml/unknown-tokens", default-features = false }
orml-xcm = { path = "../../../modules/orml/xcm", default-features = false }
orml-xcm-support = { path = "../../../modules/orml/xcm-support", default-features = false }
orml-xtokens = { path = "../../../modules/orml/xtokens", default-features = false }
orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-currencies = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }
orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch= "polkadot-v0.9.28", default-features = false }

# RMRK
pallet-rmrk-core = { git = "https://github.com/rmrk-team/rmrk-substrate", default-features = false, branch = "polkadot-v0.9.28" }
Expand Down
40 changes: 0 additions & 40 deletions modules/asset-registry/Cargo.toml

This file was deleted.

Loading