Skip to content

use workspace.dependencies #2643

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

Merged
merged 9 commits into from
Nov 14, 2023
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
6,167 changes: 3,478 additions & 2,689 deletions Cargo.lock

Large diffs are not rendered by default.

478 changes: 245 additions & 233 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ecosystem-modules/stable-asset
20 changes: 10 additions & 10 deletions inspect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ authors = ["Acala Developers"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.4.0" }
clap = { version = "4.0.9", features = ["derive"] }
derive_more = "0.99"
log = "0.4.17"
sc-cli = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sc-client-api = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sc-service = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
sp-blockchain = { 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-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
parity-scale-codec = { workspace = true, features = ["std"] }
clap = { workspace = true, features = ["derive"] }
derive_more = { workspace = true }
log = { workspace = true }
sc-cli = { workspace = true }
sc-client-api = { workspace = true }
sc-service = { workspace = true }
sp-blockchain = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-runtime = { workspace = true, features = ["std"] }
4 changes: 2 additions & 2 deletions inspect/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
pub mod cli;
pub mod command;

use codec::{Decode, Encode};
use parity_scale_codec::{Decode, Encode};
use sc_client_api::BlockBackend;
use sp_blockchain::HeaderBackend;
use sp_core::hexdisplay::HexDisplay;
Expand Down Expand Up @@ -69,7 +69,7 @@ impl<TBlock: Block> PrettyPrinter<TBlock> for DebugPrinter {
#[derive(Debug, derive_more::From, derive_more::Display)]
pub enum Error {
/// Could not decode Block or Extrinsic.
Codec(codec::Error),
Codec(parity_scale_codec::Error),
/// Error accessing blockchain DB.
Blockchain(sp_blockchain::Error),
/// Given block has not been found.
Expand Down
38 changes: 19 additions & 19 deletions modules/aggregated-dex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@ authors = ["Acala Developers"]
edition = "2021"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["max-encoded-len"] }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
nutsfinance-stable-asset = { path = "../../ecosystem-modules/stable-asset/lib/stable-asset", version = "0.1.0", default-features = false }
module-dex = { package = "module-dex", path = "../dex", default-features = false }
orml-tokens = { path = "../../orml/tokens", default-features = false }
parity-scale-codec = { workspace = true, features = ["max-encoded-len"] }
scale-info = { workspace = true }
sp-core = { workspace = true }
sp-runtime = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-std = { workspace = true }
orml-traits = { workspace = true }
module-support = { workspace = true }
primitives = { workspace = true }
nutsfinance-stable-asset = { workspace = true }
module-dex = { workspace = true }
orml-tokens = { workspace = true }

[dev-dependencies]
orml-tokens = { path = "../../orml/tokens" }
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" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
orml-tokens = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
pallet-balances = { workspace = true, features = ["std"] }

[features]
default = ["std"]
std = [
"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"module-dex/std",
Expand All @@ -39,7 +39,7 @@ std = [
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
"support/std",
"module-support/std",
]
try-runtime = [
"frame-support/try-runtime",
Expand Down
2 changes: 1 addition & 1 deletion modules/aggregated-dex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

use frame_support::{pallet_prelude::*, transactional};
use frame_system::pallet_prelude::*;
use module_support::{AggregatedSwapPath, DEXManager, RebasedStableAssetError, Swap, SwapLimit};
use nutsfinance_stable_asset::traits::StableAsset as StableAssetT;
use primitives::{Balance, CurrencyId};
use sp_runtime::traits::{Convert, Zero};
use sp_std::{marker::PhantomData, vec::Vec};
use support::{AggregatedSwapPath, DEXManager, RebasedStableAssetError, Swap, SwapLimit};

mod mock;
mod tests;
Expand Down
2 changes: 1 addition & 1 deletion modules/aggregated-dex/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ use frame_support::{
PalletId,
};
use frame_system::EnsureSignedBy;
pub use module_support::{ExchangeRate, RebasedStableAsset};
use orml_tokens::ConvertBalance;
pub use orml_traits::{parameter_type_with_key, MultiCurrency};
use primitives::{Amount, TokenSymbol, TradingPair};
use sp_runtime::{testing::H256, traits::IdentityLookup, AccountId32, ArithmeticError, BuildStorage, FixedPointNumber};
pub use support::{ExchangeRate, RebasedStableAsset};

pub type AccountId = AccountId32;

Expand Down
38 changes: 19 additions & 19 deletions modules/asset-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@ authors = ["Acala Developers"]
edition = "2021"

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

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

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

[dev-dependencies]
serde_json = "1.0.81"
hex = "0.4"
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" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
serde_json = { workspace = true, features = ["std"] }
hex = { workspace = true, features = ["std"] }
sp-core = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
pallet-balances = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true, features = ["std"] }

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

[features]
default = ["std"]
std = [
"log/std",
"codec/std",
"parity-scale-codec/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/std",
Expand Down
40 changes: 20 additions & 20 deletions modules/auction-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ authors = ["Acala Developers"]
edition = "2021"

[dependencies]
log = { version = "0.4.17", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-utilities = { path = "../../orml/utilities", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
log = { workspace = true }
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-io = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }
orml-traits = { workspace = true }
orml-utilities = { workspace = true }
module-support = { workspace = true }
primitives = { workspace = true }

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

[features]
default = ["std"]
std = [
"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"orml-traits/std",
Expand All @@ -39,7 +39,7 @@ std = [
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"support/std",
"module-support/std",
]
try-runtime = [
"frame-support/try-runtime",
Expand Down
6 changes: 4 additions & 2 deletions modules/auction-manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,17 @@
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::unnecessary_unwrap)]

use codec::MaxEncodedLen;
use frame_support::{pallet_prelude::*, transactional};
use frame_system::{
offchain::{SendTransactionTypes, SubmitTransaction},
pallet_prelude::*,
};
use module_support::{
AuctionManager, CDPTreasury, CDPTreasuryExtended, EmergencyShutdown, PriceProvider, Rate, SwapLimit,
};
use orml_traits::{Auction, AuctionHandler, Change, MultiCurrency, OnNewBidResult};
use orml_utilities::OffchainErr;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use primitives::{AuctionId, Balance, CurrencyId};
use scale_info::TypeInfo;
use sp_runtime::{
Expand All @@ -53,7 +56,6 @@ use sp_runtime::{
DispatchError, DispatchResult, FixedPointNumber, RuntimeDebug,
};
use sp_std::prelude::*;
use support::{AuctionManager, CDPTreasury, CDPTreasuryExtended, EmergencyShutdown, PriceProvider, Rate, SwapLimit};

mod mock;
mod tests;
Expand Down
8 changes: 4 additions & 4 deletions modules/auction-manager/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ use frame_support::{
PalletId,
};
use frame_system::EnsureSignedBy;
pub use module_support::Price;
use module_support::{mocks::MockStableAsset, SpecificJointsSwap};
use orml_traits::parameter_type_with_key;
use primitives::{TokenSymbol, TradingPair};
use sp_core::H256;
Expand All @@ -36,8 +38,6 @@ use sp_runtime::{
BuildStorage,
};
use sp_std::cell::RefCell;
pub use support::Price;
use support::{mocks::MockStableAsset, SpecificJointsSwap};

pub type AccountId = u128;
pub type BlockNumber = u64;
Expand Down Expand Up @@ -123,7 +123,7 @@ parameter_types! {
];
}

impl cdp_treasury::Config for Runtime {
impl module_cdp_treasury::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Tokens;
type GetStableCurrencyId = GetStableCurrencyId;
Expand Down Expand Up @@ -225,7 +225,7 @@ construct_runtime!(
AuctionManagerModule: auction_manager,
Tokens: orml_tokens,
AuctionModule: orml_auction,
CDPTreasuryModule: cdp_treasury,
CDPTreasuryModule: module_cdp_treasury,
DEXModule: module_dex,
}
);
Expand Down
2 changes: 1 addition & 1 deletion modules/auction-manager/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
use super::*;
use frame_support::{assert_noop, assert_ok};
use mock::{RuntimeCall as MockCall, RuntimeEvent, *};
use module_support::DEXManager;
use sp_core::offchain::{testing, DbExternalities, OffchainDbExt, OffchainWorkerExt, StorageKind, TransactionPoolExt};
use sp_io::offchain;
use sp_runtime::traits::One;
use support::DEXManager;

fn run_to_block_offchain(n: u64) {
while System::block_number() < n {
Expand Down
57 changes: 29 additions & 28 deletions modules/cdp-engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,41 @@ authors = ["Acala Developers"]
edition = "2021"

[dependencies]
log = { version = "0.4.17", default-features = false }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
scale-info = { version = "2.9.0", default-features = false, features = ["derive"] }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
orml-traits = { path = "../../orml/traits", default-features = false }
orml-utilities = { path = "../../orml/utilities", default-features = false }
sp-application-crypto = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }
support = { package = "module-support", path = "../support", default-features = false }
loans = { package = "module-loans", path = "../loans", default-features = false }
primitives = { package = "acala-primitives", path = "../../primitives", default-features = false }
rand_chacha = { version = "0.2", default-features = false }
nutsfinance-stable-asset = { version = "0.1.0", default-features = false, path = "../../ecosystem-modules/stable-asset/lib/stable-asset", package = "nutsfinance-stable-asset" }
log = { workspace = true }
rand_chacha = { workspace = true }
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-application-crypto = {workspace = true }
orml-traits = { workspace = true }
orml-utilities = { workspace = true }
sp-io = {workspace = true }
sp-runtime = {workspace = true }
sp-std = {workspace = true }
module-support = { workspace = true }
module-loans = { workspace = true }
primitives = { workspace = true }

nutsfinance-stable-asset = { workspace = true }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" }
orml-currencies = { path = "../../orml/currencies" }
dex = { package = "module-dex", path = "../dex" }
cdp-treasury = { package = "module-cdp-treasury", path = "../cdp-treasury" }
evm-accounts = { package = "module-evm-accounts", path = "../evm-accounts" }
orml-tokens = { path = "../../orml/tokens" }
sp-core = { workspace = true, features = ["std"] }
pallet-balances = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true, features = ["std"] }
orml-currencies = { workspace = true, features = ["std"] }
module-dex = { workspace = true, features = ["std"] }
module-cdp-treasury = { workspace = true, features = ["std"] }
module-evm-accounts = { workspace = true, features = ["std"] }
orml-tokens = { workspace = true, features = ["std"] }

[features]
default = ["std"]
std = [
"codec/std",
"parity-scale-codec/std",
"frame-support/std",
"frame-system/std",
"loans/std",
"module-loans/std",
"nutsfinance-stable-asset/std",
"orml-traits/std",
"orml-utilities/std",
Expand All @@ -49,10 +50,10 @@ std = [
"sp-io/std",
"sp-runtime/std",
"sp-std/std",
"support/std",
"module-support/std",
]
try-runtime = [
"frame-support/try-runtime",
"frame-system/try-runtime",
"loans/try-runtime",
"module-loans/try-runtime",
]
Loading