Skip to content

Commit d2998be

Browse files
authored
use workspace.dependencies (#2643)
* use workspace.dependencies * update * remove unused deps * update * update * update * update * fix features * update wasm-bencher
1 parent cab5cd8 commit d2998be

File tree

138 files changed

+5327
-4532
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+5327
-4532
lines changed

Cargo.lock

Lines changed: 3478 additions & 2689 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 245 additions & 233 deletions
Large diffs are not rendered by default.

inspect/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ authors = ["Acala Developers"]
55
edition = "2021"
66

77
[dependencies]
8-
codec = { package = "parity-scale-codec", version = "3.4.0" }
9-
clap = { version = "4.0.9", features = ["derive"] }
10-
derive_more = "0.99"
11-
log = "0.4.17"
12-
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
13-
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
14-
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
15-
sp-blockchain = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
16-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
17-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
8+
parity-scale-codec = { workspace = true, features = ["std"] }
9+
clap = { workspace = true, features = ["derive"] }
10+
derive_more = { workspace = true }
11+
log = { workspace = true }
12+
sc-cli = { workspace = true }
13+
sc-client-api = { workspace = true }
14+
sc-service = { workspace = true }
15+
sp-blockchain = { workspace = true }
16+
sp-core = { workspace = true, features = ["std"] }
17+
sp-runtime = { workspace = true, features = ["std"] }

inspect/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
pub mod cli;
2222
pub mod command;
2323

24-
use codec::{Decode, Encode};
24+
use parity_scale_codec::{Decode, Encode};
2525
use sc_client_api::BlockBackend;
2626
use sp_blockchain::HeaderBackend;
2727
use sp_core::hexdisplay::HexDisplay;
@@ -69,7 +69,7 @@ impl<TBlock: Block> PrettyPrinter<TBlock> for DebugPrinter {
6969
#[derive(Debug, derive_more::From, derive_more::Display)]
7070
pub enum Error {
7171
/// Could not decode Block or Extrinsic.
72-
Codec(codec::Error),
72+
Codec(parity_scale_codec::Error),
7373
/// Error accessing blockchain DB.
7474
Blockchain(sp_blockchain::Error),
7575
/// Given block has not been found.

modules/aggregated-dex/Cargo.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ authors = ["Acala Developers"]
55
edition = "2021"
66

77
[dependencies]
8-
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
9-
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
10-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
11-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
12-
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
13-
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
14-
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
15-
orml-traits = { path = "../../orml/traits", default-features = false }
16-
support = { package = "module-support", path = "../support", default-features = false }
17-
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
18-
nutsfinance-stable-asset = { path = "../../ecosystem-modules/stable-asset/lib/stable-asset", version = "0.1.0", default-features = false }
19-
module-dex = { package = "module-dex", path = "../dex", default-features = false }
20-
orml-tokens = { path = "../../orml/tokens", default-features = false }
8+
parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
9+
scale-info = { workspace = true }
10+
sp-core = { workspace = true }
11+
sp-runtime = { workspace = true }
12+
frame-support = { workspace = true }
13+
frame-system = { workspace = true }
14+
sp-std = { workspace = true }
15+
orml-traits = { workspace = true }
16+
module-support = { workspace = true }
17+
primitives = { workspace = true }
18+
nutsfinance-stable-asset = { workspace = true }
19+
module-dex = { workspace = true }
20+
orml-tokens = { workspace = true }
2121

2222
[dev-dependencies]
23-
orml-tokens = { path = "../../orml/tokens" }
24-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
25-
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
26-
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
23+
orml-tokens = { workspace = true, features = ["std"] }
24+
sp-core = { workspace = true, features = ["std"] }
25+
sp-io = { workspace = true, features = ["std"] }
26+
pallet-balances = { workspace = true, features = ["std"] }
2727

2828
[features]
2929
default = ["std"]
3030
std = [
31-
"codec/std",
31+
"parity-scale-codec/std",
3232
"frame-support/std",
3333
"frame-system/std",
3434
"module-dex/std",
@@ -39,7 +39,7 @@ std = [
3939
"scale-info/std",
4040
"sp-runtime/std",
4141
"sp-std/std",
42-
"support/std",
42+
"module-support/std",
4343
]
4444
try-runtime = [
4545
"frame-support/try-runtime",

modules/aggregated-dex/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424

2525
use frame_support::{pallet_prelude::*, transactional};
2626
use frame_system::pallet_prelude::*;
27+
use module_support::{AggregatedSwapPath, DEXManager, RebasedStableAssetError, Swap, SwapLimit};
2728
use nutsfinance_stable_asset::traits::StableAsset as StableAssetT;
2829
use primitives::{Balance, CurrencyId};
2930
use sp_runtime::traits::{Convert, Zero};
3031
use sp_std::{marker::PhantomData, vec::Vec};
31-
use support::{AggregatedSwapPath, DEXManager, RebasedStableAssetError, Swap, SwapLimit};
3232

3333
mod mock;
3434
mod tests;

modules/aggregated-dex/src/mock.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ use frame_support::{
2727
PalletId,
2828
};
2929
use frame_system::EnsureSignedBy;
30+
pub use module_support::{ExchangeRate, RebasedStableAsset};
3031
use orml_tokens::ConvertBalance;
3132
pub use orml_traits::{parameter_type_with_key, MultiCurrency};
3233
use primitives::{Amount, TokenSymbol, TradingPair};
3334
use sp_runtime::{testing::H256, traits::IdentityLookup, AccountId32, ArithmeticError, BuildStorage, FixedPointNumber};
34-
pub use support::{ExchangeRate, RebasedStableAsset};
3535

3636
pub type AccountId = AccountId32;
3737

modules/asset-registry/Cargo.toml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,35 @@ authors = ["Acala Developers"]
55
edition = "2021"
66

77
[dependencies]
8-
log = { version = "0.4.17", default-features = false }
9-
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
10-
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
11-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
12-
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
13-
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
14-
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
15-
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
8+
log = { workspace = true }
9+
scale-info = { workspace = true }
10+
parity-scale-codec = { workspace = true }
11+
sp-runtime = { workspace = true }
12+
sp-std = { workspace = true }
13+
frame-support = { workspace = true }
14+
frame-system = { workspace = true }
15+
primitives = { workspace = true }
1616

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

19-
module-support = { path = "../support", default-features = false }
19+
module-support = { workspace = true }
2020

2121
[dev-dependencies]
22-
serde_json = "1.0.81"
23-
hex = "0.4"
24-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
25-
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
26-
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
27-
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
22+
serde_json = { workspace = true, features = ["std"] }
23+
hex = { workspace = true, features = ["std"] }
24+
sp-core = { workspace = true, features = ["std"] }
25+
sp-io = { workspace = true, features = ["std"] }
26+
pallet-balances = { workspace = true, features = ["std"] }
27+
pallet-timestamp = { workspace = true, features = ["std"] }
2828

29-
module-evm = { path = "../evm" }
30-
module-evm-bridge = { path = "../evm-bridge" }
29+
module-evm = { workspace = true, features = ["std"] }
30+
module-evm-bridge = { workspace = true, features = ["std"] }
3131

3232
[features]
3333
default = ["std"]
3434
std = [
3535
"log/std",
36-
"codec/std",
36+
"parity-scale-codec/std",
3737
"scale-info/std",
3838
"sp-runtime/std",
3939
"sp-std/std",

modules/auction-manager/Cargo.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@ authors = ["Acala Developers"]
55
edition = "2021"
66

77
[dependencies]
8-
log = { version = "0.4.17", default-features = false }
9-
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
10-
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
11-
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
12-
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
13-
orml-traits = { path = "../../orml/traits", default-features = false }
14-
orml-utilities = { path = "../../orml/utilities", default-features = false }
15-
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
16-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
17-
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
18-
support = { package = "module-support", path = "../support", default-features = false }
19-
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
8+
log = { workspace = true }
9+
parity-scale-codec = { workspace = true }
10+
scale-info = { workspace = true }
11+
frame-support = { workspace = true }
12+
frame-system = { workspace = true }
13+
sp-io = { workspace = true }
14+
sp-runtime = { workspace = true }
15+
sp-std = { workspace = true }
16+
orml-traits = { workspace = true }
17+
orml-utilities = { workspace = true }
18+
module-support = { workspace = true }
19+
primitives = { workspace = true }
2020

2121
[dev-dependencies]
22-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
23-
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
24-
orml-auction = { path = "../../orml/auction" }
25-
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
26-
module-dex = { path = "../dex" }
27-
orml-tokens = { path = "../../orml/tokens" }
22+
sp-core = { workspace = true, features = ["std"] }
23+
pallet-balances = { workspace = true, features = ["std"] }
24+
orml-auction = { workspace = true, features = ["std"] }
25+
module-cdp-treasury = { workspace = true, features = ["std"] }
26+
module-dex = { workspace = true, features = ["std"] }
27+
orml-tokens = { workspace = true, features = ["std"] }
2828

2929
[features]
3030
default = ["std"]
3131
std = [
32-
"codec/std",
32+
"parity-scale-codec/std",
3333
"frame-support/std",
3434
"frame-system/std",
3535
"orml-traits/std",
@@ -39,7 +39,7 @@ std = [
3939
"sp-io/std",
4040
"sp-runtime/std",
4141
"sp-std/std",
42-
"support/std",
42+
"module-support/std",
4343
]
4444
try-runtime = [
4545
"frame-support/try-runtime",

modules/auction-manager/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,17 @@
3030
#![allow(clippy::upper_case_acronyms)]
3131
#![allow(clippy::unnecessary_unwrap)]
3232

33-
use codec::MaxEncodedLen;
3433
use frame_support::{pallet_prelude::*, transactional};
3534
use frame_system::{
3635
offchain::{SendTransactionTypes, SubmitTransaction},
3736
pallet_prelude::*,
3837
};
38+
use module_support::{
39+
AuctionManager, CDPTreasury, CDPTreasuryExtended, EmergencyShutdown, PriceProvider, Rate, SwapLimit,
40+
};
3941
use orml_traits::{Auction, AuctionHandler, Change, MultiCurrency, OnNewBidResult};
4042
use orml_utilities::OffchainErr;
43+
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
4144
use primitives::{AuctionId, Balance, CurrencyId};
4245
use scale_info::TypeInfo;
4346
use sp_runtime::{
@@ -53,7 +56,6 @@ use sp_runtime::{
5356
DispatchError, DispatchResult, FixedPointNumber, RuntimeDebug,
5457
};
5558
use sp_std::prelude::*;
56-
use support::{AuctionManager, CDPTreasury, CDPTreasuryExtended, EmergencyShutdown, PriceProvider, Rate, SwapLimit};
5759

5860
mod mock;
5961
mod tests;

modules/auction-manager/src/mock.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ use frame_support::{
2727
PalletId,
2828
};
2929
use frame_system::EnsureSignedBy;
30+
pub use module_support::Price;
31+
use module_support::{mocks::MockStableAsset, SpecificJointsSwap};
3032
use orml_traits::parameter_type_with_key;
3133
use primitives::{TokenSymbol, TradingPair};
3234
use sp_core::H256;
@@ -36,8 +38,6 @@ use sp_runtime::{
3638
BuildStorage,
3739
};
3840
use sp_std::cell::RefCell;
39-
pub use support::Price;
40-
use support::{mocks::MockStableAsset, SpecificJointsSwap};
4141

4242
pub type AccountId = u128;
4343
pub type BlockNumber = u64;
@@ -123,7 +123,7 @@ parameter_types! {
123123
];
124124
}
125125

126-
impl cdp_treasury::Config for Runtime {
126+
impl module_cdp_treasury::Config for Runtime {
127127
type RuntimeEvent = RuntimeEvent;
128128
type Currency = Tokens;
129129
type GetStableCurrencyId = GetStableCurrencyId;
@@ -225,7 +225,7 @@ construct_runtime!(
225225
AuctionManagerModule: auction_manager,
226226
Tokens: orml_tokens,
227227
AuctionModule: orml_auction,
228-
CDPTreasuryModule: cdp_treasury,
228+
CDPTreasuryModule: module_cdp_treasury,
229229
DEXModule: module_dex,
230230
}
231231
);

modules/auction-manager/src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
use super::*;
2424
use frame_support::{assert_noop, assert_ok};
2525
use mock::{RuntimeCall as MockCall, RuntimeEvent, *};
26+
use module_support::DEXManager;
2627
use sp_core::offchain::{testing, DbExternalities, OffchainDbExt, OffchainWorkerExt, StorageKind, TransactionPoolExt};
2728
use sp_io::offchain;
2829
use sp_runtime::traits::One;
29-
use support::DEXManager;
3030

3131
fn run_to_block_offchain(n: u64) {
3232
while System::block_number() < n {

modules/cdp-engine/Cargo.toml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,41 @@ authors = ["Acala Developers"]
55
edition = "2021"
66

77
[dependencies]
8-
log = { version = "0.4.17", default-features = false }
9-
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
10-
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
11-
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
12-
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
13-
orml-traits = { path = "../../orml/traits", default-features = false }
14-
orml-utilities = { path = "../../orml/utilities", default-features = false }
15-
sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
16-
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
17-
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
18-
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
19-
support = { package = "module-support", path = "../support", default-features = false }
20-
loans = { package = "module-loans", path = "../loans", default-features = false }
21-
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
22-
rand_chacha = { version = "0.2", default-features = false }
23-
nutsfinance-stable-asset = { version = "0.1.0", default-features = false, path = "../../ecosystem-modules/stable-asset/lib/stable-asset", package = "nutsfinance-stable-asset" }
8+
log = { workspace = true }
9+
rand_chacha = { workspace = true }
10+
parity-scale-codec = { workspace = true }
11+
scale-info = { workspace = true }
12+
frame-support = { workspace = true }
13+
frame-system = { workspace = true }
14+
sp-application-crypto = {workspace = true }
15+
orml-traits = { workspace = true }
16+
orml-utilities = { workspace = true }
17+
sp-io = {workspace = true }
18+
sp-runtime = {workspace = true }
19+
sp-std = {workspace = true }
20+
module-support = { workspace = true }
21+
module-loans = { workspace = true }
22+
primitives = { workspace = true }
23+
24+
nutsfinance-stable-asset = { workspace = true }
2425

2526
[dev-dependencies]
26-
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
27-
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
28-
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
29-
orml-currencies = { path = "../../orml/currencies" }
30-
dex = { package = "module-dex", path = "../dex" }
31-
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
32-
evm-accounts = { package = "module-evm-accounts", path = "../evm-accounts" }
33-
orml-tokens = { path = "../../orml/tokens" }
27+
sp-core = { workspace = true, features = ["std"] }
28+
pallet-balances = { workspace = true, features = ["std"] }
29+
pallet-timestamp = { workspace = true, features = ["std"] }
30+
orml-currencies = { workspace = true, features = ["std"] }
31+
module-dex = { workspace = true, features = ["std"] }
32+
module-cdp-treasury = { workspace = true, features = ["std"] }
33+
module-evm-accounts = { workspace = true, features = ["std"] }
34+
orml-tokens = { workspace = true, features = ["std"] }
3435

3536
[features]
3637
default = ["std"]
3738
std = [
38-
"codec/std",
39+
"parity-scale-codec/std",
3940
"frame-support/std",
4041
"frame-system/std",
41-
"loans/std",
42+
"module-loans/std",
4243
"nutsfinance-stable-asset/std",
4344
"orml-traits/std",
4445
"orml-utilities/std",
@@ -49,10 +50,10 @@ std = [
4950
"sp-io/std",
5051
"sp-runtime/std",
5152
"sp-std/std",
52-
"support/std",
53+
"module-support/std",
5354
]
5455
try-runtime = [
5556
"frame-support/try-runtime",
5657
"frame-system/try-runtime",
57-
"loans/try-runtime",
58+
"module-loans/try-runtime",
5859
]

0 commit comments

Comments
 (0)