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-stable2417 #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

4meta5
Copy link
Collaborator

@4meta5 4meta5 commented Jan 10, 2025

Required for OpenZeppelin/polkadot-runtime-templates#374 by both templates

Required by Generic Template

  • WIP update xcm-primitives
  • pallet-asset-manager
  • pallet-xcm-transactor
  • pallet-xcm-weight-trader

Required by Evm Template

...more

@4meta5
Copy link
Collaborator Author

4meta5 commented Jan 10, 2025

xcm-primitives compilation errors, requires updating some types apparently

   Compiling xcm-primitives v0.1.1 (/Users/4meta5/oz/moonbeam/primitives/xcm)
error[E0053]: method `convert_location` has an incompatible type for trait
  --> primitives/xcm/src/asset_id_conversions.rs:69:26
   |
69 |     fn convert_location(id: &xcm::v4::Location) -> Option<AssetId> {
   |                             ^^^^^^^^^^^^^^^^^^ expected `cumulus_primitives_core::Location`, found `staging_xcm::v4::Location`
   |
   = note: expected signature `fn(&cumulus_primitives_core::Location) -> std::option::Option<_>`
              found signature `fn(&staging_xcm::v4::Location) -> std::option::Option<_>`
help: change the parameter type to match the trait
   |
69 |     fn convert_location(id: &cumulus_primitives_core::Location) -> Option<AssetId> {
   |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0599]: the function or associated item `convert` exists for struct `WithLatestLocationConverter<MultiLocation>`, but its trait bounds were not satisfied
  --> primitives/xcm/src/asset_id_conversions.rs:53:67
   |
53 |             xcm_builder::WithLatestLocationConverter::<xcm::v3::Location>::convert(id)?;
   |                                                                            ^^^^^^^ function or associated item cannot be called on `WithLatestLocationConverter<MultiLocation>` due to unsatisfied trait bounds
   |
  ::: /Users/4meta5/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/967989c/polkadot/xcm/src/v3/multilocation.rs:67:1
   |
67 | pub struct MultiLocation {
   | ------------------------ doesn't satisfy `_: TryFrom<Location>` or `_: TryInto<Location>`
   |
  ::: /Users/4meta5/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/967989c/polkadot/xcm/xcm-builder/src/matches_location.rs:59:1
   |
59 | pub struct WithLatestLocationConverter<Target>(PhantomData<Target>);
   | ---------------------------------------------- doesn't satisfy `_: MaybeEquivalence<Location, MultiLocation>`
   |
   = note: the following trait bounds were not satisfied:
           `MultiLocation: TryInto<cumulus_primitives_core::Location>`
           which is required by `WithLatestLocationConverter<MultiLocation>: MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`
           `MultiLocation: TryFrom<cumulus_primitives_core::Location>`
           which is required by `WithLatestLocationConverter<MultiLocation>: MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`

error[E0277]: the trait bound `MultiLocation: From<cumulus_primitives_core::Location>` is not satisfied
  --> primitives/xcm/src/asset_id_conversions.rs:59:3
   |
59 |         xcm_builder::WithLatestLocationConverter::convert_back(&v3_location)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<cumulus_primitives_core::Location>` is not implemented for `MultiLocation`, which is required by `WithLatestLocationConverter<_>: MaybeEquivalence<_, _>`
   |
   = help: the following other types implement trait `From<T>`:
             `MultiLocation` implements `From<()>`
             `MultiLocation` implements `From<(J0, J1)>`
             `MultiLocation` implements `From<(J0, J1, J2)>`
             `MultiLocation` implements `From<(J0, J1, J2, J3)>`
             `MultiLocation` implements `From<(J0, J1, J2, J3, J4)>`
             `MultiLocation` implements `From<(J0, J1, J2, J3, J4, J5)>`
             `MultiLocation` implements `From<(J0, J1, J2, J3, J4, J5, J6)>`
             `MultiLocation` implements `From<(J0, J1, J2, J3, J4, J5, J6, J7)>`
           and 106 others
   = note: required for `cumulus_primitives_core::Location` to implement `Into<MultiLocation>`
   = note: required for `MultiLocation` to implement `TryFrom<cumulus_primitives_core::Location>`
   = note: required for `WithLatestLocationConverter<MultiLocation>` to implement `MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`

error[E0277]: the trait bound `cumulus_primitives_core::Location: From<MultiLocation>` is not satisfied
  --> primitives/xcm/src/asset_id_conversions.rs:59:3
   |
59 |         xcm_builder::WithLatestLocationConverter::convert_back(&v3_location)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<MultiLocation>` is not implemented for `cumulus_primitives_core::Location`, which is required by `WithLatestLocationConverter<_>: MaybeEquivalence<_, _>`
   |
   = help: the following other types implement trait `From<T>`:
             `cumulus_primitives_core::Location` implements `From<()>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2, J3)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2, J3, J4)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2, J3, J4, J5)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2, J3, J4, J5, J6)>`
             `cumulus_primitives_core::Location` implements `From<(J0, J1, J2, J3, J4, J5, J6, J7)>`
           and 109 others
   = note: required for `MultiLocation` to implement `Into<cumulus_primitives_core::Location>`
   = note: required for `cumulus_primitives_core::Location` to implement `TryFrom<MultiLocation>`
   = note: required for `MultiLocation` to implement `TryInto<cumulus_primitives_core::Location>`
   = note: required for `WithLatestLocationConverter<MultiLocation>` to implement `MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`

error[E0308]: mismatched types
  --> primitives/xcm/src/asset_id_conversions.rs:59:3
   |
56 |     fn convert_back(what: &AssetId) -> Option<xcm::v4::Location> {
   |                                        ------------------------- expected `std::option::Option<staging_xcm::v4::Location>` because of return type
...
59 |         xcm_builder::WithLatestLocationConverter::convert_back(&v3_location)
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `staging_xcm::v4::Location`, found `cumulus_primitives_core::Location`
   |
   = note: expected enum `std::option::Option<staging_xcm::v4::Location>`
              found enum `std::option::Option<cumulus_primitives_core::Location>`

error[E0599]: the function or associated item `convert` exists for struct `WithLatestLocationConverter<MultiLocation>`, but its trait bounds were not satisfied
  --> primitives/xcm/src/asset_id_conversions.rs:71:67
   |
71 |             xcm_builder::WithLatestLocationConverter::<xcm::v3::Location>::convert(id)?;
   |                                                                            ^^^^^^^ function or associated item cannot be called on `WithLatestLocationConverter<MultiLocation>` due to unsatisfied trait bounds
   |
  ::: /Users/4meta5/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/967989c/polkadot/xcm/src/v3/multilocation.rs:67:1
   |
67 | pub struct MultiLocation {
   | ------------------------ doesn't satisfy `_: TryFrom<Location>` or `_: TryInto<Location>`
   |
  ::: /Users/4meta5/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/967989c/polkadot/xcm/xcm-builder/src/matches_location.rs:59:1
   |
59 | pub struct WithLatestLocationConverter<Target>(PhantomData<Target>);
   | ---------------------------------------------- doesn't satisfy `_: MaybeEquivalence<Location, MultiLocation>`
   |
   = note: the following trait bounds were not satisfied:
           `MultiLocation: TryInto<cumulus_primitives_core::Location>`
           which is required by `WithLatestLocationConverter<MultiLocation>: MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`
           `MultiLocation: TryFrom<cumulus_primitives_core::Location>`
           which is required by `WithLatestLocationConverter<MultiLocation>: MaybeEquivalence<cumulus_primitives_core::Location, MultiLocation>`

Some errors have detailed explanations: E0053, E0277, E0308, E0599.
For more information about an error, try `rustc --explain E0053`.
error: could not compile `xcm-primitives` (lib) due to 6 previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant