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

Update to polkadot-stable2412 #1

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
12,419 changes: 8,744 additions & 3,675 deletions Cargo.lock

Large diffs are not rendered by default.

283 changes: 140 additions & 143 deletions Cargo.toml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/rpc-core/debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = { workspace = true }
version = "0.1.0"

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }
ethereum-types = { workspace = true, features = [ "std" ] }
futures = { workspace = true, features = [ "compat" ] }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc-core/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = { workspace = true }
version = "0.6.0"

[dependencies]
ethereum = { workspace = true, features = [ "std", "with-codec" ] }
ethereum = { workspace = true, features = [ "std", "with-scale" ] }
ethereum-types = { workspace = true, features = [ "std" ] }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
serde = { workspace = true, features = [ "derive" ] }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/debug/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sp-runtime = { workspace = true, features = [ "std" ] }
sp-trie = { workspace = true, features = [ "std" ] }

# Frontier
ethereum = { workspace = true, features = [ "std", "with-codec" ] }
ethereum = { workspace = true, features = [ "std", "with-scale" ] }
ethereum-types = { workspace = true, features = [ "std" ] }
fc-consensus = { workspace = true }
fc-db = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion client/rpc/trace/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = { workspace = true }
version = "0.6.0"

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }
ethereum-types = { workspace = true }
futures = { workspace = true }
jsonrpsee = { workspace = true, features = [ "macros", "server" ] }
Expand Down
2 changes: 1 addition & 1 deletion pallets/ethereum-xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = "1.0.0-dev"
targets = [ "x86_64-unknown-linux-gnu" ]

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }
serde = { workspace = true, optional = true }

# Parity
Expand Down
2 changes: 1 addition & 1 deletion pallets/xcm-transactor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1106,7 +1106,7 @@ pub mod pallet {
}
instructions.push(Transact {
origin_kind,
require_weight_at_most: dispatch_weight,
fallback_max_weight: Some(dispatch_weight),
call: call.into(),
});
Ok(Xcm(instructions))
Expand Down
8 changes: 4 additions & 4 deletions pallets/xcm-weight-trader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use frame_support::weights::WeightToFee;
use frame_system::pallet_prelude::*;
use sp_runtime::traits::{Convert, Zero};
use sp_std::vec::Vec;
use xcm::v4::{Asset, AssetId as XcmAssetId, Error as XcmError, Fungibility, Location, XcmContext};
use xcm::v5::{Asset, AssetId as XcmAssetId, Error as XcmError, Fungibility, Location, XcmContext};
use xcm::{IntoVersion, VersionedAssetId};
use xcm_executor::traits::{TransactAsset, WeightTrader};
use xcm_runtime_apis::fees::Error as XcmPaymentApiError;
Expand Down Expand Up @@ -269,13 +269,13 @@ pub mod pallet {
return Err(XcmPaymentApiError::UnhandledXcmVersion);
}

let v4_assets = [VersionedAssetId::V4(XcmAssetId::from(
let v4_assets = [VersionedAssetId::V5(XcmAssetId::from(
T::NativeLocation::get(),
))]
.into_iter()
.chain(
SupportedAssets::<T>::iter().filter_map(|(asset_location, (enabled, _))| {
enabled.then(|| VersionedAssetId::V4(XcmAssetId(asset_location)))
enabled.then(|| VersionedAssetId::V5(XcmAssetId(asset_location)))
}),
)
.collect::<Vec<_>>();
Expand All @@ -294,7 +294,7 @@ pub mod pallet {
weight: Weight,
asset: VersionedAssetId,
) -> Result<u128, XcmPaymentApiError> {
if let VersionedAssetId::V4(XcmAssetId(asset_location)) = asset
if let VersionedAssetId::V5(XcmAssetId(asset_location)) = asset
.into_version(4)
.map_err(|_| XcmPaymentApiError::VersionedConversionFailed)?
{
Expand Down
2 changes: 1 addition & 1 deletion primitives/rpc/evm-tracing-events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ parity-scale-codec = { workspace = true }
sp-runtime-interface = { workspace = true }

# Ethereum
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }
ethereum-types = { workspace = true }
evm = { workspace = true, features = [ "with-codec" ] }
evm-gasometer = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion primitives/rpc/txpool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repository = { workspace = true }
version = "0.6.0"

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
ethereum = { workspace = true, features = [ "with-scale" ] }

# Substrate
parity-scale-codec = { workspace = true }
Expand Down
3 changes: 2 additions & 1 deletion primitives/xcm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ version = "0.1.1"
targets = [ "x86_64-unknown-linux-gnu" ]

[dependencies]
ethereum = { workspace = true, features = [ "with-codec" ] }
# TODO: replace with ethereum fork usage
ethereum = { workspace = true, features = [ "with-scale" ] }
ethereum-types = { workspace = true }
hex = { workspace = true }
impl-trait-for-tuples = { workspace = true }
Expand Down
26 changes: 13 additions & 13 deletions primitives/xcm/src/asset_id_conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use sp_runtime::traits::MaybeEquivalence;
use sp_std::marker::PhantomData;
use xcm::v3::Location;
use xcm::v4::Location;
use xcm_executor::traits::ConvertLocation;

/// Converter struct implementing `AssetIdConversion` converting a numeric asset ID
Expand All @@ -41,22 +41,22 @@ where
AssetIdInfoGetter::get_asset_type(what.clone()).and_then(Into::into)
}
}
impl<AssetId, AssetType, AssetIdInfoGetter> MaybeEquivalence<xcm::v4::Location, AssetId>
impl<AssetId, AssetType, AssetIdInfoGetter> MaybeEquivalence<xcm::v5::Location, AssetId>
for AsAssetType<AssetId, AssetType, AssetIdInfoGetter>
where
AssetId: Clone,
AssetType: From<Location> + Into<Option<Location>> + Clone,
AssetIdInfoGetter: AssetTypeGetter<AssetId, AssetType>,
{
fn convert(id: &xcm::v4::Location) -> Option<AssetId> {
let v3_location =
xcm_builder::WithLatestLocationConverter::<xcm::v3::Location>::convert(id)?;
AssetIdInfoGetter::get_asset_id(v3_location.clone().into())
fn convert(id: &xcm::v5::Location) -> Option<AssetId> {
let v4_location =
xcm_builder::WithLatestLocationConverter::<xcm::v4::Location>::convert(id)?;
AssetIdInfoGetter::get_asset_id(v4_location.clone().into())
}
fn convert_back(what: &AssetId) -> Option<xcm::v4::Location> {
let v3_location: Location =
fn convert_back(what: &AssetId) -> Option<xcm::v5::Location> {
let v4_location: Location =
AssetIdInfoGetter::get_asset_type(what.clone()).and_then(Into::into)?;
xcm_builder::WithLatestLocationConverter::convert_back(&v3_location)
xcm_builder::WithLatestLocationConverter::convert_back(&v4_location)
}
}
impl<AssetId, AssetType, AssetIdInfoGetter> ConvertLocation<AssetId>
Expand All @@ -66,10 +66,10 @@ where
AssetType: From<Location> + Into<Option<Location>> + Clone,
AssetIdInfoGetter: AssetTypeGetter<AssetId, AssetType>,
{
fn convert_location(id: &xcm::v4::Location) -> Option<AssetId> {
let v3_location =
xcm_builder::WithLatestLocationConverter::<xcm::v3::Location>::convert(id)?;
AssetIdInfoGetter::get_asset_id(v3_location.clone().into())
fn convert_location(id: &xcm::v5::Location) -> Option<AssetId> {
let v4_location =
xcm_builder::WithLatestLocationConverter::<xcm::v4::Location>::convert(id)?;
AssetIdInfoGetter::get_asset_id(v4_location.clone().into())
}
}

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.77.0"
channel = "1.81.0"
components = [ "rustfmt", "clippy", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"
Loading