Skip to content

Commit

Permalink
move local deps too
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Feb 19, 2024
1 parent c31d9c5 commit 0810b94
Show file tree
Hide file tree
Showing 48 changed files with 347 additions and 308 deletions.
19 changes: 19 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,25 @@ members = [
]

[workspace.dependencies]
# local pin
encointer-meetup-validation = { path = "ceremonies/meetup-validation", default-features = false, version = "3.0.2" }
encointer-ceremonies-assignment = { path = "ceremonies/assignment", default-features = false, version = "3.0.2" }
encointer-primitives = { path = "primitives", default-features = false, features = ["serde_derive"], version = "3.0.2" }
encointer-rpc = { path = "rpc", version = "3.0.2" }
ep-core = { path = "primitives/core", default-features = false, version = "3.0.2" }
pallet-encointer-balances = { path = "balances", default-features = false, version = "3.0.2" }
pallet-encointer-ceremonies = { path = "ceremonies", default-features = false, version = "3.0.2" }
pallet-encointer-communities = { path = "communities", default-features = false, version = "3.0.3" }
pallet-encointer-reputation-commitments = { path = "reputation-commitments", default-features = false, version = "3.0.2" }
pallet-encointer-scheduler = { path = "scheduler", default-features = false, version = "3.0.3" }
test-utils = { path = "test-utils" }
# rpc apis
encointer-balances-tx-payment-rpc-runtime-api = { path = "balances-tx-payment/rpc/runtime-api", version = "3.0.2" }
pallet-encointer-bazaar-rpc-runtime-api = { path = "bazaar/rpc/runtime-api", version = "3.0.2" }
pallet-encointer-ceremonies-rpc-runtime-api = { path = "ceremonies/rpc/runtime-api", version = "3.0.2" }
pallet-encointer-communities-rpc-runtime-api = { path = "communities/rpc/runtime-api", version = "3.0.2" }

# various
array-bytes = "6.1.0"
bs58 = { version = "0.4.0", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "3.6.4", default-features = false, features = [ "derive", "max-encoded-len"] }
Expand Down
8 changes: 4 additions & 4 deletions balances-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ license = "GPL-3.0-or-later"
[dependencies]
log = { workspace = true }

encointer-primitives = { path = "../primitives", default-features = false, version = "3.0.2" }
pallet-encointer-balances = { path = "../balances", default-features = false, version = "3.0.2" }
pallet-encointer-ceremonies = { path = "../ceremonies", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }
pallet-encointer-balances = { workspace = true }
pallet-encointer-ceremonies = { workspace = true }

# substrate dependencies
frame-support = { workspace = true }
Expand All @@ -27,7 +27,7 @@ parity-scale-codec = { workspace = true }
rstest = { workspace = true }
scale-info = { workspace = true }
sp-io = { workspace = true, features = ["std"] }
test-utils = { path = "../test-utils" }
test-utils = { workspace = true }

[features]
default = ["std"]
Expand Down
6 changes: 3 additions & 3 deletions balances-tx-payment/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ parking_lot = { workspace = true }
thiserror = { workspace = true }

# local deps
encointer-balances-tx-payment-rpc-runtime-api = { package = "encointer-balances-tx-payment-rpc-runtime-api", path = "runtime-api", version = "3.0.2" }
encointer-primitives = { path = "../../primitives", version = "3.0.2" }
encointer-rpc = { path = "../../rpc", version = "3.0.2" }
encointer-balances-tx-payment-rpc-runtime-api = { workspace = true }
encointer-primitives = { workspace = true }
encointer-rpc = { workspace = true }

# substrate deps
pallet-transaction-payment = { workspace = true, features = ["std"] }
Expand Down
2 changes: 1 addition & 1 deletion balances-tx-payment/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later"

[dependencies]
# local deps
encointer-primitives = { path = "../../../primitives", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
parity-scale-codec = { workspace = true }
Expand Down
4 changes: 2 additions & 2 deletions balances/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ log = { workspace = true }
scale-info = { workspace = true }

# local deps
encointer-primitives = { path = "../primitives", default-features = false, features = ["serde_derive"], version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
frame-benchmarking = { workspace = true, optional = true }
Expand All @@ -29,7 +29,7 @@ sp-std = { workspace = true }
[dev-dependencies]
approx = { workspace = true, features = ["std"] }
sp-io = { workspace = true, features = ["std"] }
test-utils = { path = "../test-utils" }
test-utils = { workspace = true }

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion balances/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ frame_support::construct_runtime!(
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
EncointerScheduler: encointer_scheduler::{Pallet, Call, Storage, Config<T>, Event},
EncointerScheduler: pallet_encointer_scheduler::{Pallet, Call, Storage, Config<T>, Event},
EncointerBalances: dut::{Pallet, Call, Storage, Event<T>, Config<T>},
}
);
Expand Down
12 changes: 6 additions & 6 deletions bazaar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ log = { workspace = true }
scale-info = { workspace = true }

# local deps
encointer-communities = { package = "pallet-encointer-communities", path = "../communities", default-features = false, version = "3.0.3" }
encointer-primitives = { path = "../primitives", default-features = false, features = ["serde_derive"], version = "3.0.2" }
encointer-primitives = { workspace = true }
pallet-encointer-communities = { workspace = true }

# substrate deps
frame-benchmarking = { workspace = true, optional = true }
Expand All @@ -26,14 +26,14 @@ sp-std = { workspace = true }

[dev-dependencies]
sp-io = { workspace = true, features = ["std"] }
test-utils = { path = "../test-utils" }
test-utils = { workspace = true }

[features]
default = ["std"]
std = [
"parity-scale-codec/std",
# local deps
"encointer-communities/std",
"pallet-encointer-communities/std",
"encointer-primitives/std",
# substrate deps
"frame-support/std",
Expand All @@ -45,13 +45,13 @@ std = [
]

runtime-benchmarks = [
"encointer-communities/runtime-benchmarks",
"pallet-encointer-communities/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]

try-runtime = [
"encointer-communities/try-runtime",
"pallet-encointer-communities/try-runtime",
"frame-system/try-runtime",
]
6 changes: 3 additions & 3 deletions bazaar/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ parking_lot = { workspace = true }
thiserror = { workspace = true }

# local deps
encointer-bazaar-rpc-runtime-api = { package = "pallet-encointer-bazaar-rpc-runtime-api", path = "runtime-api", version = "3.0.2" }
encointer-primitives = { path = "../../primitives", version = "3.0.2" }
encointer-rpc = { path = "../../rpc", version = "3.0.2" }
pallet-encointer-bazaar-rpc-runtime-api = { workspace = true }
encointer-primitives = { workspace = true }
encointer-rpc = { workspace = true }

# substrate deps
sc-rpc = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion bazaar/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later"

[dependencies]
# local deps
encointer-primitives = { path = "../../../primitives", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
frame-support = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion bazaar/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::traits::Block as BlockT;
use std::sync::Arc;

use encointer_bazaar_rpc_runtime_api::BazaarApi as BazaarRuntimeApi;
use encointer_primitives::{
bazaar::{Business, BusinessIdentifier, OfferingData},
communities::CommunityIdentifier,
};
use pallet_encointer_bazaar_rpc_runtime_api::BazaarApi as BazaarRuntimeApi;

#[rpc(client, server)]
pub trait BazaarApi<BlockHash, AccountId>
Expand Down
7 changes: 4 additions & 3 deletions bazaar/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ fn create_community<T: Config>() -> CommunityIdentifier {
let bs = vec![alice.clone(), bob.clone(), charlie.clone()];
let community_meta: CommunityMetadata = CommunityMetadata::default();

encointer_communities::Pallet::<T>::set_min_solar_trip_time_s(RawOrigin::Root.into(), 1).ok();
encointer_communities::Pallet::<T>::set_max_speed_mps(RawOrigin::Root.into(), 83).ok();
pallet_encointer_communities::Pallet::<T>::set_min_solar_trip_time_s(RawOrigin::Root.into(), 1)
.ok();
pallet_encointer_communities::Pallet::<T>::set_max_speed_mps(RawOrigin::Root.into(), 83).ok();

encointer_communities::Pallet::<T>::new_community(
pallet_encointer_communities::Pallet::<T>::new_community(
RawOrigin::Root.into(),
location,
bs.clone(),
Expand Down
4 changes: 2 additions & 2 deletions bazaar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub mod pallet {
use frame_system::pallet_prelude::*;

#[pallet::config]
pub trait Config: frame_system::Config + encointer_communities::Config {
pub trait Config: frame_system::Config + pallet_encointer_communities::Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
type WeightInfo: WeightInfo;
}
Expand All @@ -65,7 +65,7 @@ pub mod pallet {
let sender = ensure_signed(origin)?;
// Check that the supplied community is actually registered
ensure!(
<encointer_communities::Pallet<T>>::community_identifiers().contains(&cid),
<pallet_encointer_communities::Pallet<T>>::community_identifiers().contains(&cid),
Error::<T>::NonexistentCommunity
);

Expand Down
8 changes: 4 additions & 4 deletions bazaar/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ frame_support::construct_runtime!(
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
EncointerScheduler: encointer_scheduler::{Pallet, Call, Storage, Config<T>, Event},
EncointerCommunities: encointer_communities::{Pallet, Call, Storage, Event<T>},
EncointerBalances: encointer_balances::{Pallet, Call, Storage, Event<T>},
EncointerScheduler: pallet_encointer_scheduler::{Pallet, Call, Storage, Config<T>, Event},
EncointerCommunities: pallet_encointer_communities::{Pallet, Call, Storage, Event<T>},
EncointerBalances: pallet_encointer_balances::{Pallet, Call, Storage, Event<T>},
EncointerBazaar: dut::{Pallet, Call, Storage, Event<T>},
}
);
Expand All @@ -48,7 +48,7 @@ impl_encointer_scheduler!(TestRuntime);
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::<TestRuntime>::default().build_storage().unwrap();

encointer_communities::GenesisConfig::<TestRuntime> {
pallet_encointer_communities::GenesisConfig::<TestRuntime> {
min_solar_trip_time_s: 1,
max_speed_mps: 83,
..Default::default()
Expand Down
32 changes: 16 additions & 16 deletions ceremonies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ log = { workspace = true }
scale-info = { workspace = true }

# local deps
encointer-balances = { package = "pallet-encointer-balances", path = "../balances", default-features = false, version = "3.0.2" }
encointer-ceremonies-assignment = { path = "assignment", default-features = false, version = "3.0.2" }
encointer-communities = { package = "pallet-encointer-communities", path = "../communities", default-features = false, version = "3.0.3" }
encointer-meetup-validation = { path = "meetup-validation", default-features = false, version = "3.0.2" }
encointer-primitives = { path = "../primitives", default-features = false, features = ["serde_derive"], version = "3.0.2" }
encointer-scheduler = { package = "pallet-encointer-scheduler", path = "../scheduler", default-features = false, version = "3.0.3" }
encointer-ceremonies-assignment = { workspace = true }
encointer-meetup-validation = { workspace = true }
encointer-primitives = { workspace = true }
pallet-encointer-balances = { workspace = true }
pallet-encointer-communities = { workspace = true }
pallet-encointer-scheduler = { workspace = true }

# substrate deps
frame-support = { workspace = true }
Expand All @@ -40,18 +40,18 @@ itertools = { workspace = true }
rstest = { workspace = true }
sp-io = { workspace = true, features = ["std"] }
sp-keystore = { workspace = true }
test-utils = { path = "../test-utils" }
test-utils = { workspace = true }

[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"encointer-balances/std",
"pallet-encointer-balances/std",
"encointer-ceremonies-assignment/std",
"encointer-communities/std",
"pallet-encointer-communities/std",
"encointer-meetup-validation/std",
"encointer-primitives/std",
"encointer-scheduler/std",
"pallet-encointer-scheduler/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
Expand All @@ -65,19 +65,19 @@ std = [
]

runtime-benchmarks = [
"encointer-balances/runtime-benchmarks",
"encointer-communities/runtime-benchmarks",
"encointer-scheduler/runtime-benchmarks",
"pallet-encointer-balances/runtime-benchmarks",
"pallet-encointer-communities/runtime-benchmarks",
"pallet-encointer-scheduler/runtime-benchmarks",
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-application-crypto",
]

try-runtime = [
"encointer-balances/try-runtime",
"encointer-communities/try-runtime",
"encointer-scheduler/try-runtime",
"pallet-encointer-balances/try-runtime",
"pallet-encointer-communities/try-runtime",
"pallet-encointer-scheduler/try-runtime",
"frame-system/try-runtime",
]

Expand Down
2 changes: 1 addition & 1 deletion ceremonies/assignment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later"

[dependencies]
# local deps
encointer-primitives = { path = "../../primitives", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
sp-runtime = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/meetup-validation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ scale-info = { workspace = true }
serde = { workspace = true }

# local deps
encointer-primitives = { path = "../../primitives", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
sp-runtime = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions ceremonies/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ parking_lot = { workspace = true }
thiserror = { workspace = true }

# local deps
encointer-ceremonies-rpc-runtime-api = { package = "pallet-encointer-ceremonies-rpc-runtime-api", path = "runtime-api", version = "3.0.2" }
encointer-primitives = { path = "../../primitives", version = "3.0.2" }
encointer-rpc = { path = "../../rpc", version = "3.0.2" }
pallet-encointer-ceremonies-rpc-runtime-api = { workspace = true }
encointer-primitives = { workspace = true }
encointer-rpc = { workspace = true }

# substrate deps
sc-rpc = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "GPL-3.0-or-later"

[dependencies]
# local deps
encointer-primitives = { path = "../../../primitives", default-features = false, version = "3.0.2" }
encointer-primitives = { workspace = true }

# substrate deps
frame-support = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ use sp_blockchain::HeaderBackend;
use sp_runtime::traits::Block as BlockT;
use std::sync::Arc;

use encointer_ceremonies_rpc_runtime_api::CeremoniesApi as CeremoniesRuntimeApi;
use encointer_primitives::{
ceremonies::{
reputation_cache_dirty_key, reputation_cache_key, AggregatedAccountData, CeremonyInfo,
Expand All @@ -34,6 +33,7 @@ use encointer_primitives::{
communities::CommunityIdentifier,
scheduler::CeremonyIndexType,
};
use pallet_encointer_ceremonies_rpc_runtime_api::CeremoniesApi as CeremoniesRuntimeApi;

#[rpc(client, server)]
pub trait CeremoniesApi<BlockHash, AccountId, Moment>
Expand Down
Loading

0 comments on commit 0810b94

Please sign in to comment.