Skip to content

Commit

Permalink
restructure tomls (#369)
Browse files Browse the repository at this point in the history
* restructure tomls

* move local deps too

* sort and fmt

* fix clippy
  • Loading branch information
brenzi authored Feb 20, 2024
1 parent 6f5a51c commit aacb5e4
Show file tree
Hide file tree
Showing 69 changed files with 673 additions and 653 deletions.
70 changes: 70 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,76 @@ members = [
'vouches',
]

[workspace.dependencies]
# local pin
encointer-ceremonies-assignment = { path = "ceremonies/assignment", default-features = false, version = "3.0.2" }
encointer-meetup-validation = { path = "ceremonies/meetup-validation", 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"] }
crc = "2.1.0"
fixed = { package = "substrate-fixed", default-features = false, version = "0.5.9" }
geohash = { package = "substrate-geohash", version = "0.13.0" }
impl-serde = { version = "0.4.0", default-features = false }
impl-trait-for-tuples = { version = "0.2.2", default-features = false }
log = { version = "0.4.20", default-features = false }
parity-scale-codec = { version = "3.6.4", default-features = false, features = ["derive", "max-encoded-len"] }
parking_lot = "0.12.0"
scale-info = { version = "2.10.0", default-features = false, features = ["derive"] }
serde = { version = "1.0.188", default-features = false, features = ["derive", "alloc"] }
thiserror = "1.0.31"

# polkadot-sdk [no_std]
frame-benchmarking = { default-features = false, version = "25.0.0" }
frame-support = { default-features = false, version = "25.0.0" }
frame-system = { default-features = false, version = "25.0.0" }
pallet-asset-tx-payment = { default-features = false, version = "25.0.0" }
pallet-balances = { default-features = false, version = "25.0.0" }
pallet-timestamp = { default-features = false, version = "24.0.0" }
pallet-transaction-payment = { default-features = false, version = "25.0.0" }
pallet-treasury = { default-features = false, version = "24.0.0" }
sp-api = { default-features = false, version = "23.0.0" }
sp-application-crypto = { default-features = false, version = "27.0.0" }
sp-arithmetic = { default-features = false, version = "20.0.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-io = { default-features = false, version = "27.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
sp-std = { default-features = false, version = "12.0.0" }

# rpc stuff [std]
jsonrpsee = { version = "0.16.3", features = ["client-core", "server", "macros"] }
jsonrpsee-core = { version = "0.16.3" }
jsonrpsee-types = { version = "0.16.3" }
pallet-transaction-payment-rpc = { version = "27.0.0" }
sc-rpc = "26.0.0"
sc-rpc-api = "0.30.0"
sp-blockchain = "25.0.0"
sp-rpc = "23.0.0"

# dev deps
approx = "0.5.1"
itertools = "0.10.3"
rstest = "0.12.0"
serde_json = "1.0.105"
sp-inherents = "23.0.0"
sp-keyring = "28.0.0"
sp-keystore = "0.31.0"

#[patch."https://github.com/encointer/substrate-fixed"]
#substrate-fixed = { path = "../substrate-fixed"}
#
Expand Down
32 changes: 14 additions & 18 deletions balances-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,34 @@ repository = "https://github.com/encointer/pallets"
license = "GPL-3.0-or-later"

[dependencies]
log = { version = "0.4.20", default-features = false }
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 = { default-features = false, version = "25.0.0" }
frame-system = { default-features = false, version = "25.0.0" }
pallet-asset-tx-payment = { default-features = false, version = "25.0.0" }
pallet-transaction-payment = { default-features = false, version = "25.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-asset-tx-payment = { workspace = true }
pallet-transaction-payment = { workspace = true }
sp-runtime = { workspace = true }

[dev-dependencies]
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = [
"derive",
] }
rstest = "0.12.0"
scale-info = { version = "2.10.0", default-features = false }
sp-io = "27.0.0"
test-utils = { path = "../test-utils" }
parity-scale-codec = { workspace = true }
rstest = { workspace = true }
scale-info = { workspace = true }
sp-io = { workspace = true, features = ["std"] }
test-utils = { workspace = true }

[features]
default = ["std"]
std = [
"encointer-primitives/std",
# substrate deps
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-asset-tx-payment/std",
# encointer deps
"pallet-encointer-balances/std",
"pallet-encointer-ceremonies/std",
"pallet-transaction-payment/std",
Expand Down
38 changes: 17 additions & 21 deletions balances-tx-payment/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,24 @@ repository = "https://github.com/encointer/pallets"
license = "GPL-3.0-or-later"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false }
jsonrpsee = { version = "0.16.3", features = [
"client-core",
"server",
"macros",
] }
log = "0.4.20"
parking_lot = "0.12.0"
thiserror = "1.0.31"
jsonrpsee = { workspace = true }
log = { workspace = true, features = ["std"] }
parity-scale-codec = { workspace = true }
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 = { version = "25.0.0" }
pallet-transaction-payment-rpc = { version = "27.0.0" }
sc-rpc = "26.0.0"
sc-rpc-api = "0.30.0"
sp-api = "23.0.0"
sp-blockchain = "25.0.0"
sp-core = "25.0.0"
sp-rpc = "23.0.0"
sp-runtime = "28.0.0"
pallet-transaction-payment = { workspace = true, features = ["std"] }
pallet-transaction-payment-rpc = { workspace = true }
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
sp-api = { workspace = true, features = ["std"] }
sp-blockchain = { workspace = true }
sp-core = { workspace = true, features = ["std"] }
sp-rpc = { workspace = true }
sp-runtime = { workspace = true, features = ["std"] }
16 changes: 7 additions & 9 deletions balances-tx-payment/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,21 @@ 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
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = [
"derive",
] }
frame-support = { default-features = false, version = "25.0.0" }
scale-info = { version = "2.10.0", default-features = false }
sp-api = { default-features = false, version = "23.0.0" }
sp-std = { default-features = false, version = "12.0.0" }
frame-support = { workspace = true }
parity-scale-codec = { workspace = true }
scale-info = { workspace = true }
sp-api = { workspace = true }
sp-std = { workspace = true }

[features]
default = ["std"]
std = [
"codec/std",
"encointer-primitives/std",
"frame-support/std",
"parity-scale-codec/std",
"scale-info/std",
"sp-api/std",
"sp-std/std",
Expand Down
2 changes: 1 addition & 1 deletion balances-tx-payment/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Encointer. If not, see <http://www.gnu.org/licenses/>.

use codec::Codec;
use core::fmt::Display;
use encointer_balances_tx_payment_rpc_runtime_api::{
BalancesTxPaymentApi as BalancesTxPaymentApiRuntimeApi, Error,
Expand All @@ -27,6 +26,7 @@ use jsonrpsee::{
pub use pallet_transaction_payment::RuntimeDispatchInfo;
use pallet_transaction_payment::{FeeDetails, InclusionFee};
use pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi;
use parity_scale_codec::Codec;
use sp_api::{Decode, Encode, ProvideRuntimeApi};
use sp_blockchain::HeaderBackend;
use sp_core::Bytes;
Expand Down
36 changes: 16 additions & 20 deletions balances/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,38 @@ repository = "https://github.com/encointer/pallets"
license = "GPL-3.0-or-later"

[dependencies]
approx = { version = "0.5.1", optional = true }
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = [
"derive",
] }
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.10.0", default-features = false }
approx = { workspace = true, optional = true }
log = { workspace = true }
parity-scale-codec = { 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 = { default-features = false, optional = true, version = "25.0.0" }
frame-support = { default-features = false, version = "25.0.0" }
frame-system = { default-features = false, version = "25.0.0" }
pallet-asset-tx-payment = { default-features = false, version = "25.0.0" }
pallet-transaction-payment = { default-features = false, version = "25.0.0" }
sp-runtime = { default-features = false, version = "28.0.0" }
sp-std = { default-features = false, version = "12.0.0" }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
pallet-asset-tx-payment = { workspace = true }
pallet-transaction-payment = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

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

[features]
default = ["std"]
std = [
"codec/std",
# local deps
"encointer-primitives/std",
# substrate deps
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-asset-tx-payment/std",
"pallet-transaction-payment/std",
"parity-scale-codec/std",
"scale-info/std",
"sp-runtime/std",
"sp-std/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
36 changes: 16 additions & 20 deletions bazaar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,47 @@ repository = "https://github.com/encointer/pallets"
license = "GPL-3.0-or-later"

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.4", default-features = false, features = [
"derive",
] }
log = { version = "0.4.20", default-features = false }
scale-info = { version = "2.10.0", default-features = false }
log = { workspace = true }
parity-scale-codec = { 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 = { default-features = false, optional = true, version = "25.0.0" }
frame-support = { default-features = false, version = "25.0.0" }
frame-system = { default-features = false, version = "25.0.0" }
sp-core = { default-features = false, version = "25.0.0" }
sp-std = { default-features = false, version = "12.0.0" }
frame-benchmarking = { workspace = true, optional = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
sp-core = { workspace = true }
sp-std = { workspace = true }

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

[features]
default = ["std"]
std = [
"codec/std",
# local deps
"encointer-communities/std",
"encointer-primitives/std",
# substrate deps
"frame-support/std",
"frame-system/std",
"log/std",
"pallet-encointer-communities/std",
"parity-scale-codec/std",
"scale-info/std",
"sp-core/std",
"sp-std/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",
"frame-system/try-runtime",
"pallet-encointer-communities/try-runtime",
]
28 changes: 12 additions & 16 deletions bazaar/rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,19 @@ repository = "https://github.com/encointer/pallets"
license = "GPL-3.0-or-later"

[dependencies]
jsonrpsee = { version = "0.16.3", features = [
"client-core",
"server",
"macros",
] }
log = "0.4.20"
parking_lot = "0.12.0"
thiserror = "1.0.31"
jsonrpsee = { workspace = true }
log = { workspace = true, features = ["std"] }
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" }
encointer-primitives = { workspace = true }
encointer-rpc = { workspace = true }
pallet-encointer-bazaar-rpc-runtime-api = { workspace = true }

# substrate deps
sc-rpc = "26.0.0"
sc-rpc-api = "0.30.0"
sp-api = "23.0.0"
sp-blockchain = "25.0.0"
sp-runtime = "28.0.0"
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
sp-api = { workspace = true, features = ["std"] }
sp-blockchain = { workspace = true }
sp-runtime = { workspace = true, features = ["std"] }
Loading

0 comments on commit aacb5e4

Please sign in to comment.