Skip to content

Commit

Permalink
upgrade to polkadot v1.3.0 (#248)
Browse files Browse the repository at this point in the history
* bend tomls to crates.io polkadot v1.3.0

* fixes

* more crates.io

* cleanup

* fix
  • Loading branch information
brenzi authored Feb 2, 2024
1 parent 2f3f1e2 commit 0525c08
Show file tree
Hide file tree
Showing 18 changed files with 617 additions and 207 deletions.
724 changes: 564 additions & 160 deletions Cargo.lock

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,38 @@ base64 = { version = "0.13", default-features = false, features = ["alloc"] }
chrono = { version = "0.4", default-features = false, features = ["serde"] }
derive_more = "0.99.16"
env_logger = "0.9.0"
hex = { default-features = false, version = "0.4.3", features = ["alloc"] }
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
hex-literal = "0.3.3"
log = { version = "0.4.14", default-features = false }
log = { version = "0.4.20", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.171", default-features = false, features = ["alloc", "derive"] }
serde_derive = { version = "1.0.171" }
serde = { version = "1.0.188", default-features = false, features = ["alloc", "derive"] }
serde_derive = { version = "1.0.188" }
serde_json = { version = "1.0", default-features = false }

# crypto [no_std]
der = { default-features = false, version = "0.6.0" }
der = { version = "0.6.0", default-features = false }
libsecp256k1 = { version = "0.7.0", default-features = false }
ring = { version = "0.16.20", default-features = false, features = ["alloc"] }
webpki = { git = "https://github.com/rustls/webpki", version = "=0.102.0-alpha.3", rev = "da923ed", package = "rustls-webpki", default-features = false, features = ["alloc", "ring"] }
x509-cert = { default-features = false, version = "0.1.0", features = ["alloc"] }
webpki = { version = "=0.102.0-alpha.3", default-features = false, features = ["alloc", "ring"], git = "https://github.com/rustls/webpki", rev = "da923ed", package = "rustls-webpki" }
x509-cert = { version = "0.1.0", default-features = false, features = ["alloc"] }

# polkadot-sdk and ecosystem crates [no_std]
cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/cumulus.git", branch = "polkadot-v1.0.0" }
frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-vesting = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
cumulus-primitives-core = { version = "0.4.0", default-features = false }
frame-benchmarking = { version = "25.0.0", default-features = false }
frame-support = { version = "25.0.0", default-features = false }
frame-system = { version = "25.0.0", default-features = false }
pallet-balances = { version = "25.0.0", default-features = false }
pallet-timestamp = { version = "24.0.0", default-features = false }
pallet-vesting = { version = "25.0.0", default-features = false }
parity-scale-codec = { version = "3.6.4", default-features = false, features = ["derive"] }
scale-info = { version = "2.10.0", default-features = false, features = ["derive", "serde"] }
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
substrate-fixed = { tag = "v0.5.9", default-features = false, git = "https://github.com/encointer/substrate-fixed.git" }
xcm = { default-features = false, git = "https://github.com/paritytech/polkadot.git", branch = "release-v1.0.0" }
sp-core = { version = "25.0.0", default-features = false }
sp-io = { version = "27.0.0", default-features = false }
sp-runtime = { version = "28.0.0", default-features = false }
sp-std = { version = "12.0.0", default-features = false }
staging-xcm = { version = "4.0.0", default-features = false }
substrate-fixed = { version = "0.5.9", default-features = false }

# dev-deps [std]
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
externalities = { package = "sp-externalities", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
sp-keyring = { version = "28.0.0", default-features = false }
sp-externalities = { version = "0.23.0", default-features = false }
11 changes: 6 additions & 5 deletions claims/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,13 +631,13 @@ mod tests {

use parity_scale_codec::Encode;
use sp_core::H256;
use sp_runtime::{generic, DispatchError::Token, TokenError::Frozen};
use sp_runtime::{generic, DispatchError, TokenError};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use super::Call as ClaimsCall;
use frame_support::{
assert_err, assert_noop, assert_ok,
dispatch::{DispatchError::BadOrigin, GetDispatchInfo, Pays},
dispatch::{GetDispatchInfo, Pays},
ord_parameter_types, parameter_types,
traits::{ExistenceRequirement, WithdrawReasons},
};
Expand Down Expand Up @@ -706,6 +706,7 @@ mod tests {
type WeightInfo = ();
type FreezeIdentifier = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type MaxHolds = ();
type MaxFreezes = ();
}
Expand Down Expand Up @@ -826,7 +827,7 @@ mod tests {
assert_eq!(Balances::free_balance(42), 0);
assert_noop!(
Claims::move_claim(RuntimeOrigin::signed(1), eth(&alice()), eth(&bob()), None),
BadOrigin
DispatchError::BadOrigin
);
assert_ok!(Claims::move_claim(
RuntimeOrigin::signed(6),
Expand Down Expand Up @@ -1128,7 +1129,7 @@ mod tests {
180,
ExistenceRequirement::AllowDeath
),
Token(Frozen),
DispatchError::Token(TokenError::Frozen),
);
});
}
Expand Down Expand Up @@ -1403,7 +1404,7 @@ mod tests {
mod benchmarking {
use super::{pallet::Call, *};
use frame_benchmarking::{account, benchmarks};
use frame_support::dispatch::UnfilteredDispatchable;
use frame_support::traits::UnfilteredDispatchable;
use frame_system::RawOrigin;
use secp_utils::*;
use sp_runtime::{traits::ValidateUnsigned, DispatchResult};
Expand Down
2 changes: 1 addition & 1 deletion enclave-bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ test-utils = { path = "../test-utils", optional = true }

[dev-dependencies]
env_logger = { workspace = true }
externalities = { workspace = true }
sp-externalities = { workspace = true }
frame-benchmarking = { workspace = true, features = ["std"] }
hex-literal = { workspace = true }
pallet-balances = { workspace = true, features = ["std"] }
Expand Down
1 change: 1 addition & 0 deletions enclave-bridge/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ impl pallet_balances::Config for Test {
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down
2 changes: 1 addition & 1 deletion enclave-bridge/src/tests/test_indirect_invocation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn unshield_is_only_executed_once_for_the_same_call_hash() {

let amount = 50;

assert_ok!(Balances::transfer(
assert_ok!(Balances::transfer_allow_death(
RuntimeOrigin::signed(shielder),
bonding_account.clone(),
1 << 50
Expand Down
1 change: 1 addition & 0 deletions parentchain/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ impl pallet_balances::Config for Test {
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeHoldReason = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down
5 changes: 3 additions & 2 deletions primitives/xcm-transactor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ common-primitives = { path = "../common", default-features = false }

# substrate
frame-support = { workspace = true }
sp-runtime = { workspace = true }
sp-std = { workspace = true }

# xcm/polkadot
xcm = { workspace = true }
staging-xcm = { workspace = true }

# cumulus
cumulus-primitives-core = { workspace = true }
Expand All @@ -32,5 +33,5 @@ std = [
"frame-support/std",
"parity-scale-codec/std",
"sp-std/std",
"xcm/std",
"staging-xcm/std",
]
8 changes: 3 additions & 5 deletions primitives/xcm-transactor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
#![cfg_attr(not(feature = "std"), no_std)]

pub use cumulus_primitives_core::ParaId;
use frame_support::{
pallet_prelude::{Get, PhantomData},
RuntimeDebug,
};
use frame_support::pallet_prelude::{Get, PhantomData};
use parity_scale_codec::{Decode, Encode, FullCodec};
use sp_runtime::RuntimeDebug;
use sp_std::vec;
use xcm::{latest::Weight as XcmWeight, prelude::*};
use staging_xcm::{latest::Weight as XcmWeight, prelude::*};

pub trait BuildRelayCall {
type RelayCall: FullCodec;
Expand Down
2 changes: 1 addition & 1 deletion sidechain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test-utils = { path = "../test-utils", optional = true }

[dev-dependencies]
env_logger = { workspace = true }
externalities = { workspace = true }
sp-externalities = { workspace = true }
frame-benchmarking = { workspace = true, features = ["std"] }
hex-literal = { workspace = true }
pallet-balances = { workspace = true, features = ["std"] }
Expand Down
1 change: 1 addition & 0 deletions sidechain/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ impl pallet_balances::Config for Test {
type WeightInfo = ();
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down
4 changes: 2 additions & 2 deletions teeracle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ teeracle-primitives = { path = "../primitives/teeracle", default-features = fals
teerex-primitives = { path = "../primitives/teerex", default-features = false }

# encointer
substrate-fixed = { tag = "v0.5.9", default-features = false, git = "https://github.com/encointer/substrate-fixed.git" }
substrate-fixed = { workspace = true }

# substrate
frame-support = { workspace = true }
Expand All @@ -36,7 +36,7 @@ pallet-timestamp = { workspace = true, optional = true }
test-utils = { path = "../test-utils", optional = true }

[dev-dependencies]
externalities = { workspace = true }
sp-externalities = { workspace = true }
frame-benchmarking = { workspace = true, features = ["std"] }
hex-literal = { workspace = true }
sp-keyring = { workspace = true }
Expand Down
1 change: 1 addition & 0 deletions teeracle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl pallet_balances::Config for Test {
type WeightInfo = ();
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down
2 changes: 1 addition & 1 deletion teerex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test-utils = { path = "../test-utils", optional = true }

[dev-dependencies]
env_logger = { workspace = true }
externalities = { workspace = true, features = ["std"] }
sp-externalities = { workspace = true, features = ["std"] }
frame-benchmarking = { workspace = true, features = ["std"] }
hex-literal = { workspace = true }
pallet-balances = { workspace = true, features = ["std"] }
Expand Down
1 change: 1 addition & 0 deletions teerex/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ impl pallet_balances::Config for Test {
type WeightInfo = ();
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down
8 changes: 4 additions & 4 deletions xcm-transactor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ sp-runtime = { workspace = true }
sp-std = { workspace = true }

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

# cumulus
cumulus-primitives-core = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v1.0.0" }
cumulus-primitives-core = { workspace = true }

[dev-dependencies]
externalities = { workspace = true }
sp-externalities = { workspace = true }
frame-benchmarking = { workspace = true }
hex-literal = { workspace = true }
pallet-balances = { workspace = true }
Expand All @@ -58,7 +58,7 @@ std = [
"sp-runtime/std",
"sp-std/std",
"xcm-transactor-primitives/std",
"xcm/std",
"staging-xcm/std",
]
runtime-benchmarks = []

Expand Down
2 changes: 1 addition & 1 deletion xcm-transactor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub mod pallet {
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use sp_std::vec;
use xcm::latest::{prelude::*, Weight as XcmWeight};
use staging_xcm::latest::{prelude::*, Weight as XcmWeight};
use xcm_transactor_primitives::*;

#[pallet::pallet]
Expand Down
3 changes: 2 additions & 1 deletion xcm-transactor/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use sp_runtime::{
};

use sp_runtime::BuildStorage;
use xcm::latest::prelude::*;
use staging_xcm::latest::prelude::*;
use xcm_transactor_primitives::*;

pub type Signature = sp_runtime::MultiSignature;
Expand Down Expand Up @@ -103,6 +103,7 @@ impl pallet_balances::Config for Test {
type WeightInfo = ();
type MaxReserves = ();
type ReserveIdentifier = ();
type RuntimeFreezeReason = ();
type FreezeIdentifier = ();
type MaxHolds = ();
type MaxFreezes = ();
Expand Down

0 comments on commit 0525c08

Please sign in to comment.