Skip to content
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

Ab/polkadot v1.7.0 #371

Merged
merged 4 commits into from
Feb 27, 2024
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
482 changes: 217 additions & 265 deletions Cargo.lock

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,26 @@ members = [

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

# various
array-bytes = "6.1.0"
bs58 = { version = "0.4.0", default-features = false, features = ["alloc"] }
bs58 = { version = "0.5.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" }
Expand All @@ -61,40 +61,40 @@ serde = { version = "1.0.195", default-features = false, features = ["derive", "
thiserror = "1.0.50"

# polkadot-sdk [no_std]
frame-benchmarking = { default-features = false, version = "28.0.0" }
frame-support = { default-features = false, version = "28.0.0" }
frame-system = { default-features = false, version = "28.0.0" }
pallet-asset-tx-payment = { default-features = false, version = "28.0.0" }
pallet-balances = { default-features = false, version = "28.0.0" }
pallet-timestamp = { default-features = false, version = "27.0.0" }
pallet-transaction-payment = { default-features = false, version = "28.0.0" }
pallet-treasury = { default-features = false, version = "27.0.0" }
sp-api = { default-features = false, version = "26.0.0" }
sp-application-crypto = { default-features = false, version = "30.0.0" }
sp-arithmetic = { default-features = false, version = "23.0.0" }
sp-core = { default-features = false, version = "28.0.0" }
sp-io = { default-features = false, version = "30.0.0" }
sp-runtime = { default-features = false, version = "31.0.0" }
frame-benchmarking = { default-features = false, version = "29.0.0" }
frame-support = { default-features = false, version = "29.0.0" }
frame-system = { default-features = false, version = "29.0.0" }
pallet-asset-tx-payment = { default-features = false, version = "29.0.0" }
pallet-balances = { default-features = false, version = "29.0.0" }
pallet-timestamp = { default-features = false, version = "28.0.0" }
pallet-transaction-payment = { default-features = false, version = "29.0.0" }
pallet-treasury = { default-features = false, version = "28.0.0" }
sp-api = { default-features = false, version = "27.0.0" }
sp-application-crypto = { default-features = false, version = "31.0.0" }
sp-arithmetic = { default-features = false, version = "24.0.0" }
sp-core = { default-features = false, version = "29.0.0" }
sp-io = { default-features = false, version = "31.0.0" }
sp-runtime = { default-features = false, version = "32.0.0" }
sp-std = { default-features = false, version = "14.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 = "30.0.0" }
sc-rpc = "29.0.0"
sc-rpc-api = "0.33.0"
sp-blockchain = "28.0.0"
sp-rpc = "26.0.0"
jsonrpsee = { version = "0.20.3", features = ["client-core", "server", "macros"] }
jsonrpsee-core = { version = "0.20.3" }
jsonrpsee-types = { version = "0.20.3" }
pallet-transaction-payment-rpc = { version = "31.0.0" }
sc-rpc = "30.0.0"
sc-rpc-api = "0.34.0"
sp-blockchain = "29.0.0"
sp-rpc = "27.0.0"

# dev deps
approx = "0.5.1"
itertools = "0.10.5"
rstest = "0.12.0"
serde_json = "1.0.111"
sp-inherents = "26.0.0"
sp-keyring = "31.0.0"
sp-keystore = "0.34.0"
sp-inherents = "27.0.0"
sp-keyring = "32.0.0"
sp-keystore = "0.35.0"

#[patch."https://github.com/encointer/substrate-fixed"]
#substrate-fixed = { path = "../substrate-fixed"}
Expand Down
2 changes: 1 addition & 1 deletion balances-tx-payment/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-balances-tx-payment"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Balances tx payment for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion balances-tx-payment/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-balances-tx-payment-rpc"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Balances tx payment rpc for the Encointer blockchain runtime"
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
@@ -1,6 +1,6 @@
[package]
name = "encointer-balances-tx-payment-rpc-runtime-api"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Balances tx payment rpc runtime api for the Encointer blockchain runtime"
Expand Down
19 changes: 8 additions & 11 deletions balances-tx-payment/rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ use core::fmt::Display;
use encointer_balances_tx_payment_rpc_runtime_api::{
BalancesTxPaymentApi as BalancesTxPaymentApiRuntimeApi, Error,
};
use jsonrpsee::{
core::RpcResult,
proc_macros::rpc,
types::error::{CallError, ErrorObject},
};
use jsonrpsee::types::ErrorObjectOwned;
use jsonrpsee::{core::RpcResult, proc_macros::rpc, types::error::ErrorObject};
pub use pallet_transaction_payment::RuntimeDispatchInfo;
use pallet_transaction_payment::{FeeDetails, InclusionFee};
use pallet_transaction_payment_rpc::TransactionPaymentRuntimeApi;
Expand Down Expand Up @@ -94,18 +91,18 @@ where
let encoded_len = encoded_xt.len() as u32;

let uxt: Block::Extrinsic = Decode::decode(&mut &*encoded_xt).map_err(|e| {
CallError::Custom(ErrorObject::owned(
ErrorObject::owned(
Error::DecodeError.into(),
"Unable to query fee details.",
Some(format!("{e:?}")),
))
)
})?;
let fee_details = api.query_fee_details(at, uxt, encoded_len).map_err(|e| {
CallError::Custom(ErrorObject::owned(
ErrorObject::owned(
Error::RuntimeError.into(),
"Unable to query fee details.",
Some(e.to_string()),
))
)
})?;

Ok(FeeDetails {
Expand Down Expand Up @@ -150,6 +147,6 @@ where
}
}

fn runtime_api_error_into_rpc_error<E: Display>(e: E, msg: &str) -> CallError {
CallError::Custom(ErrorObject::owned(Error::RuntimeError.into(), msg, Some(e.to_string())))
fn runtime_api_error_into_rpc_error<E: Display>(e: E, msg: &str) -> ErrorObjectOwned {
ErrorObject::owned(Error::RuntimeError.into(), msg, Some(e.to_string()))
}
2 changes: 1 addition & 1 deletion balances/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-balances"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Balances pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion bazaar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-bazaar"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Bazaar pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion bazaar/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-bazaar-rpc"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Bazaar rpc for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion bazaar/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-bazaar-rpc-runtime-api"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Bazaar rpc runtime API for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-ceremonies"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Ceremonies pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/assignment/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-ceremonies-assignment"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Ceremonies assignments for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/meetup-validation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-meetup-validation"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Meetup validation for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-ceremonies-rpc"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Ceremonies rpc for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion ceremonies/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-ceremonies-rpc-runtime-api"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Ceremonies rpc runtime API for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion communities/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-communities"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Communities pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion communities/rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-communities-rpc"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Communities rpc for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion communities/rpc/runtime-api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-communities-rpc-runtime-api"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Communities rpc runtime api for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion democracy/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-democracy"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Democracy pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion faucet/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-faucet"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Faucet pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-primitives"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Primitives for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion primitives/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ep-core"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Core primitives for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion reputation-commitments/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-reputation-commitments"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Reputation commitments pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "encointer-rpc"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "RPC for the Encointer blockchain runtime"
Expand Down
8 changes: 4 additions & 4 deletions rpc/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use jsonrpsee_core::error::Error as JsonRpseeError;
use jsonrpsee_types::error::{CallError, ErrorObject};
use jsonrpsee_types::error::ErrorObject;
use jsonrpsee_types::ErrorObjectOwned;

mod error_codes {
pub const RUNTIME_ERROR: i32 = 1; // Arbitrary number, but substrate uses the same
Expand Down Expand Up @@ -36,8 +36,8 @@ impl Error {
}
}

impl From<Error> for JsonRpseeError {
impl From<Error> for ErrorObjectOwned {
fn from(err: Error) -> Self {
CallError::Custom(ErrorObject::owned(err.code(), err.to_string(), None::<()>)).into()
ErrorObject::owned(err.code(), err.to_string(), None::<()>)
}
}
2 changes: 1 addition & 1 deletion scheduler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-scheduler"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Scheduler pallet for the Encointer blockchain runtime"
Expand Down
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "test-utils"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Test utils for the Encointer blockchain runtime"
Expand Down
1 change: 0 additions & 1 deletion test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ macro_rules! impl_balances {
type RuntimeHoldReason = ();
type RuntimeFreezeReason = RuntimeFreezeReason;
type FreezeIdentifier = ();
type MaxHolds = frame_support::traits::ConstU32<0>;
type MaxFreezes = frame_support::traits::ConstU32<0>;
}
};
Expand Down
2 changes: 1 addition & 1 deletion vouches/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pallet-encointer-vouches"
version = "5.0.0"
version = "6.0.0"
authors = ["Encointer Association <[email protected]>"]
edition = "2021"
description = "Vouches pallet for the Encointer blockchain runtime"
Expand Down
Loading