Skip to content

Commit

Permalink
use workspace deps (open-web3-stack#960)
Browse files Browse the repository at this point in the history
* use workspace deps

* fix

* fix

* fix

* fix

* bump
  • Loading branch information
xlc authored Oct 25, 2023
1 parent b3694e6 commit 83a76c2
Show file tree
Hide file tree
Showing 56 changed files with 422 additions and 391 deletions.
128 changes: 68 additions & 60 deletions Cargo.dev.toml

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,50 @@ name = "orml-asset-registry"
description = "Registry for (foreign) assets"
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/asset-registry"
license = "Apache-2.0"
version = "0.4.1-dev"
version = "0.5.0-dev"
authors = ["Interlay Ltd, etc"]
edition = "2021"

[dependencies]
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
log = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }
parity-scale-codec = { workspace = true }

# substrate
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

# polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
pallet-xcm = { workspace = true }
xcm = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }

# orml
orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
orml-traits = { path = "../traits", version = "0.5.0-dev", default-features = false }

[dev-dependencies]
# substrate
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
pallet-message-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-balances = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
pallet-message-queue = { workspace = true, features = ["std"] }

# cumulus
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
parachain-info = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
cumulus-primitives-core = { workspace = true, features = ["std"] }
cumulus-pallet-dmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-xcmp-queue = { workspace = true, features = ["std"] }
cumulus-pallet-xcm = { workspace = true, features = ["std"] }
parachain-info = { workspace = true, features = ["std"] }

# polkadot
polkadot-parachain = { package = "polkadot-parachain-primitives", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
xcm-simulator = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
polkadot-parachain-primitives = { workspace = true, features = ["std"] }
polkadot-runtime-parachains = { workspace = true, features = ["std"] }
xcm-simulator = { workspace = true }

# orml
orml-tokens = { path = "../tokens" }
Expand All @@ -59,7 +59,7 @@ default = ["std"]
std = [
"serde",

"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"orml-traits/std",
Expand Down
14 changes: 13 additions & 1 deletion asset-registry/src/mock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,19 @@ pub const ALICE: AccountId32 = AccountId32::new([0u8; 32]);
pub const BOB: AccountId32 = AccountId32::new([1u8; 32]);
pub const CHARLIE: AccountId32 = AccountId32::new([2u8; 32]);

#[derive(Encode, Decode, Eq, PartialEq, Copy, Clone, RuntimeDebug, PartialOrd, Ord, codec::MaxEncodedLen, TypeInfo)]
#[derive(
Encode,
Decode,
Eq,
PartialEq,
Copy,
Clone,
RuntimeDebug,
PartialOrd,
Ord,
parity_scale_codec::MaxEncodedLen,
TypeInfo,
)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum CurrencyId {
/// Relay chain token.
Expand Down
4 changes: 2 additions & 2 deletions asset-registry/src/mock/para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use super::{Amount, Balance, CurrencyId, CurrencyIdConvert, ParachainXcmRouter};

use crate as orml_asset_registry;

use codec::{Decode, Encode, MaxEncodedLen};
use cumulus_primitives_core::{ChannelStatus, GetChannelInfo, ParaId};
use frame_support::traits::{EnsureOrigin, EnsureOriginWithArg};
use frame_support::{
Expand All @@ -19,7 +18,8 @@ use orml_traits::{
};
use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset};
use pallet_xcm::XcmPassthrough;
use polkadot_parachain::primitives::Sibling;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use polkadot_parachain_primitives::primitives::Sibling;
use sp_core::H256;
use sp_runtime::{
traits::{AccountIdConversion, Convert, IdentityLookup},
Expand Down
2 changes: 1 addition & 1 deletion asset-registry/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use frame_support::{
};
use mock::{para::RuntimeCall, *};
use orml_traits::MultiCurrency;
use polkadot_parachain::primitives::Sibling;
use polkadot_parachain_primitives::primitives::Sibling;

use sp_runtime::{
traits::{AccountIdConversion, BadOrigin, Dispatchable},
Expand Down
24 changes: 12 additions & 12 deletions auction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@ name = "orml-auction"
description = "Auction module that implements `Auction` trait."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
license = "Apache-2.0"
version = "0.4.1-dev"
version = "0.5.0-dev"
authors = ["Acala Developers"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true }
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }

frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

orml-traits = { path = "../traits", version = "0.4.1-dev", default-features = false }
orml-traits = { path = "../traits", version = "0.5.0-dev", default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-core = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }

[features]
default = ["std"]
std = [
"serde",

"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"orml-traits/std",
Expand Down
6 changes: 3 additions & 3 deletions auction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#![allow(clippy::string_lit_as_bytes)]
#![allow(clippy::unused_unit)]

use codec::MaxEncodedLen;
use frame_support::pallet_prelude::*;
use frame_system::{ensure_signed, pallet_prelude::*};
use orml_traits::{Auction, AuctionHandler, AuctionInfo, Change};
use parity_scale_codec::MaxEncodedLen;
use sp_runtime::{
traits::{AtLeast32BitUnsigned, Bounded, CheckedAdd, MaybeSerializeDeserialize, Member, One, Zero},
DispatchError, DispatchResult,
Expand Down Expand Up @@ -54,8 +54,8 @@ pub mod module {
+ Copy
+ MaybeSerializeDeserialize
+ Bounded
+ codec::FullCodec
+ codec::MaxEncodedLen;
+ parity_scale_codec::FullCodec
+ parity_scale_codec::MaxEncodedLen;

/// The `AuctionHandler` that allow custom bidding logic and handles
/// auction result.
Expand Down
26 changes: 13 additions & 13 deletions authority/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@ name = "orml-authority"
description = "Utility pallet to perform ROOT calls in a PoA network"
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/auction"
license = "Apache-2.0"
version = "0.4.1-dev"
version = "0.5.0-dev"
authors = ["Acala Developers"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
parity-scale-codec = { workspace = true }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.145", optional = true }

frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

[dev-dependencies]
pallet-preimage = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-scheduler = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-root-testing = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-preimage = { workspace = true, features = ["std"] }
pallet-scheduler = { workspace = true, features = ["std"] }
pallet-root-testing = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }

[features]
default = ["std"]
std = [
"serde",

"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
Expand Down
2 changes: 1 addition & 1 deletion authority/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#![allow(clippy::borrowed_box)]
#![allow(clippy::unused_unit)]

use codec::MaxEncodedLen;
use frame_support::{
dispatch::PostDispatchInfo,
dispatch::{DispatchClass, GetDispatchInfo, Pays},
Expand All @@ -37,6 +36,7 @@ use frame_support::{
},
};
use frame_system::{pallet_prelude::*, EnsureRoot, EnsureSigned};
use parity_scale_codec::MaxEncodedLen;
use scale_info::TypeInfo;
use sp_core::defer;
use sp_runtime::{
Expand Down
2 changes: 1 addition & 1 deletion authority/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
#![cfg(test)]

use super::*;
use codec::{Decode, Encode};
use frame_support::{
parameter_types,
traits::{ConstU64, EqualPrivilegeOnly, Everything},
weights::Weight,
};
use frame_system::{ensure_root, ensure_signed, EnsureRoot};
use parity_scale_codec::{Decode, Encode};
use sp_core::H256;
use sp_runtime::{
traits::{BadOrigin, IdentityLookup},
Expand Down
2 changes: 1 addition & 1 deletion authority/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![cfg(test)]

use super::*;
use codec::MaxEncodedLen;
use frame_support::{
assert_noop, assert_ok,
dispatch::DispatchErrorWithPostInfo,
Expand All @@ -14,6 +13,7 @@ use mock::{
authority, run_to_block, Authority, BlockNumber, ExtBuilder, MockAsOriginId, OriginCaller, Runtime, RuntimeCall,
RuntimeOrigin, System,
};
use parity_scale_codec::MaxEncodedLen;
use sp_io::hashing::blake2_256;
use sp_runtime::{traits::BadOrigin, Perbill};

Expand Down
28 changes: 14 additions & 14 deletions benchmarking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,37 @@ name = "orml-benchmarking"
description = "Provide macro to benchmark Substrate runtime."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/benchmarking"
license = "Apache-2.0"
version = "0.4.1-dev"
version = "0.5.0-dev"
authors = ["Laminar Developers <[email protected]>"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
log = { version = "0.4.20", default-features = false }
parity-scale-codec = { workspace = true }
log = { workspace = true }
paste = "1.0.7"
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.136", optional = true }
serde = { workspace = true, optional = true }

frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-runtime-interface = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
sp-storage = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false , branch = "release-polkadot-v1.1.0" }
frame-benchmarking = { workspace = true }
frame-support = { workspace = true }
sp-api = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-runtime-interface = { workspace = true }
sp-std = { workspace = true }
sp-storage = { workspace = true }

[dev-dependencies]
hex-literal = "0.4.1"

frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
frame-system = { workspace = true, features = ["std"] }

[features]
default = [ "std" ]
std = [
"serde",

"codec/std",
"parity-scale-codec/std",
"frame-benchmarking/std",
"frame-support/std",
"log/std",
Expand Down
8 changes: 4 additions & 4 deletions benchmarking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

mod tests;

#[doc(hidden)]
pub use codec;
pub use frame_benchmarking::{
benchmarking, whitelisted_caller, BenchmarkBatch, BenchmarkConfig, BenchmarkError, BenchmarkList,
BenchmarkMetadata, BenchmarkParameter, BenchmarkResult, Benchmarking, BenchmarkingSetup,
Expand All @@ -18,6 +16,8 @@ pub use frame_support;
#[doc(hidden)]
pub use log;
#[doc(hidden)]
pub use parity_scale_codec;
#[doc(hidden)]
pub use paste;
#[doc(hidden)]
pub use sp_io::storage::root as storage_root;
Expand Down Expand Up @@ -291,13 +291,13 @@ macro_rules! benchmarks_iter {
>:: [< new_call_variant_ $dispatch >] (
$($arg),*
);
let __benchmarked_call_encoded = $crate::codec::Encode::encode(
let __benchmarked_call_encoded = $crate::parity_scale_codec::Encode::encode(
&__call
);
}: {
let __call_decoded = <
$pallet::Call::<$runtime $(, $instance )?>
as $crate::codec::Decode
as $crate::parity_scale_codec::Decode
>::decode(&mut &__benchmarked_call_encoded[..])
.expect("call is encoded above, encoding must be correct");
let __origin = $crate::to_origin!($origin $(, $origin_type)?);
Expand Down
2 changes: 1 addition & 1 deletion build-script-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "orml-build-script-utils"
description = "Crate with utility functions for `build.rs` scripts."
repository = "https://github.com/open-web3-stack/open-runtime-module-library/tree/master/build-script-utils"
license = "Apache-2.0"
version = "0.4.1-dev"
version = "0.5.0-dev"
authors = ["Parity Technologies <[email protected]>", "Laminar Developers <[email protected]>"]
edition = "2021"

Expand Down
Loading

0 comments on commit 83a76c2

Please sign in to comment.