Skip to content

Commit

Permalink
Merge pull request #227 from InvArch/francisco-upgrade_polkadot_sdk_v…
Browse files Browse the repository at this point in the history
…1.6.0

Upgrade Polkadot SDK version to v1.6.0
  • Loading branch information
arrudagates authored May 8, 2024
2 parents 07fc0de + 175d381 commit cd32136
Show file tree
Hide file tree
Showing 22 changed files with 320 additions and 288 deletions.
49 changes: 48 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,52 @@ members = [
"INV4/pallet-inv4",
"OCIF/staking",
"pallet-checked-inflation",
"pallet-rings"
"pallet-rings",
]

[workspace.dependencies]

# crates.io dependencies
codec = { package = "parity-scale-codec", version = "3.6.5", features = [
"derive",
], default-features = false }
log = { version = "0.4.20", default-features = false }
num-traits = { version = "0.2", default-features = false }
scale-info = { version = "2.10.0", default-features = false, features = [
"derive",
] }
serde = { version = "1.0.189", features = ["derive"] }
smallvec = { version = "1.6.1" }

# polkadot-sdk dependencies
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
frame-support = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
frame-system = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
pallet-session = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-api = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-arithmetic = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-core = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-io = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-staking = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
sp-std = { git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }
xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk.git", default-features = false, branch = "release-polkadot-v1.6.0" }


# dev dependencies

orml-asset-registry = { git = "https://github.com/InvArch/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" }
orml-tokens2 = { package = "orml-tokens", git = "https://github.com/arrudagates/open-runtime-module-library.git", default-features = false, rev = "bc6b41e8a9539971a2da5d62cf8f550cde985f00" }
orml-traits2 = { package = "orml-traits", git = "https://github.com/arrudagates/open-runtime-module-library.git", default-features = false, rev = "bc6b41e8a9539971a2da5d62cf8f550cde985f00" }

orml-tokens = { package = "orml-tokens", git = "https://github.com/InvArch/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" }
orml-traits = { package = "orml-traits", git = "https://github.com/InvArch/open-runtime-module-library.git", default-features = false, branch = "polkadot-v1.6.0" }

# orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
# orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
# orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
81 changes: 44 additions & 37 deletions INV4/pallet-inv4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,67 @@ repository = 'https://github.com/InvArch/InvArch-Frames'
version = '0.1.0-dev'

[dependencies]
serde = { version = "1.0.132", optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false }
sp-api = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
sp-arithmetic = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
frame-system = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
smallvec = "1.6.1"
serde = { workspace = true, optional = true }
codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = [
"derive", "max-encoded-len"
] }
sp-runtime = { workspace = true, default-features = false }
sp-arithmetic = { workspace = true, default-features = false }
sp-std = { workspace = true, default-features = false }
frame-support = { workspace = true, default-features = false }
smallvec = { workspace = true }

scale-info = { version = "2.0.0", features = ["derive"], default-features = false }
scale-info = { workspace = true, default-features = false }

log = { version = "0.4.14", default-features = false }
log = { workspace = true, default-features = false }

# InvArch dependencies
primitives = { package = "invarch-primitives", path = "../../primitives", default-features = false }

sp-io = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
sp-core = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "polkadot-v0.9.43" }
sp-io = { workspace = true, default-features = false }
sp-api = { workspace = true, default-features = false }
sp-core = { workspace = true, default-features = false }

pallet-balances = { git = 'https://github.com/paritytech/substrate.git', default-features = false , branch = "polkadot-v0.9.43" }
pallet-balances = { workspace = true, default-features = false }

frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', default-features = false, optional = true , branch = "polkadot-v0.9.43" }
frame-system = { workspace = true, default-features = false } # frame-benchmarking requires system
frame-benchmarking = { workspace = true, default-features = false, optional = true }

orml-tokens2 = { package = "orml-tokens", git = "https://github.com/arrudagates/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }

xcm = { git = "https://github.com/paritytech/polkadot", default-features = false , branch = "release-v0.9.43" }
xcm = { workspace = true, default-features = false }
orml-tokens2 = { workspace = true, default-features = false }

[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }
orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
orml-traits2 = { package = "orml-traits", git = "https://github.com/arrudagates/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }
orml-asset-registry = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, rev = "7ecebeab7e3dbc2226ed58d32ee159271a8176ae" }

orml-traits2 = { workspace = true, default-features = false }
orml-tokens = { workspace = true, default-features = false }
orml-traits = { workspace = true, default-features = false }
orml-asset-registry = { workspace = true, default-features = false }


[features]
default = ["std"]
std = [
"serde",
"codec/std",
"sp-runtime/std",
"sp-std/std",
"frame-support/std",
"frame-system/std",
"sp-io/std",
"scale-info/std",
"pallet-balances/std",
"frame-benchmarking?/std",
"orml-asset-registry/std",
"orml-tokens/std",
"serde",
"codec/std",
"sp-runtime/std",
"sp-std/std",
"frame-support/std",
"frame-system/std",
"sp-io/std",
"scale-info/std",
"pallet-balances/std",
"frame-benchmarking?/std",
"xcm/std",
"orml-asset-registry/std",
"orml-tokens/std",
"orml-tokens2/std",
"orml-traits/std",
"orml-traits2/std",
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"frame-benchmarking/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"frame-system/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
2 changes: 1 addition & 1 deletion INV4/pallet-inv4/src/account_derivation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{Config, Pallet};
use codec::{Compact, Encode};
use frame_support::traits::Get;
use sp_io::hashing::blake2_256;
use xcm::latest::{BodyId, BodyPart, Junction, Junctions};
use xcm::v3::{BodyId, BodyPart, Junction, Junctions};
/// Trait providing the XCM location and the derived account of a core.
pub trait CoreAccountDerivation<T: Config> {
/// Derives the core's AccountId.
Expand Down
7 changes: 3 additions & 4 deletions INV4/pallet-inv4/src/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ use crate::{
origin::{INV4Origin, MultisigInternalOrigin},
Config, Error,
};
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo},
pallet_prelude::*,
};
use frame_support::{dispatch::GetDispatchInfo, pallet_prelude::*};

use sp_runtime::traits::Dispatchable;

/// Dispatch a call executing pre/post dispatch for proper fee handling.
pub fn dispatch_call<T: Config>(
Expand Down
4 changes: 2 additions & 2 deletions INV4/pallet-inv4/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub mod pallet {
use super::*;
use codec::FullCodec;
use frame_support::{
dispatch::{Dispatchable, GetDispatchInfo, Pays, PostDispatchInfo},
dispatch::{GetDispatchInfo, Pays, PostDispatchInfo},
pallet_prelude::*,
traits::{
fungibles,
Expand All @@ -76,7 +76,7 @@ pub mod pallet {
use primitives::CoreInfo;
use scale_info::prelude::fmt::Display;
use sp_runtime::{
traits::{AtLeast32BitUnsigned, Member},
traits::{AtLeast32BitUnsigned, Dispatchable, Member},
Perbill,
};
use sp_std::{boxed::Box, convert::TryInto, vec::Vec};
Expand Down
2 changes: 1 addition & 1 deletion INV4/pallet-inv4/src/origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{
Config,
};
use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{error::BadOrigin, RuntimeDebug};
use frame_support::{error::BadOrigin, pallet_prelude::RuntimeDebug};
use scale_info::TypeInfo;

/// Origin representing a core by its id.
Expand Down
Loading

0 comments on commit cd32136

Please sign in to comment.