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

smoketest: send_token_to_penpal test fails to compile #1353

Closed
Lederstrumpf opened this issue Dec 10, 2024 · 2 comments
Closed

smoketest: send_token_to_penpal test fails to compile #1353

Lederstrumpf opened this issue Dec 10, 2024 · 2 comments

Comments

@Lederstrumpf
Copy link
Contributor

Compilation log:

./run-tests.sh
+ cargo test --no-run
   Compiling snowbridge-smoketest v0.1.0
error[E0277]: the trait bound `&snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v4::location::Location: Borrow<snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v5::location::Location>` is not satisfied
   --> tests/send_token_to_penpal.rs:197:75
    |
197 |     let penpal_asset_address = penpal::api::storage().foreign_assets().asset(&penpal_asset_id);
    |                                                                        ----- ^^^^^^^^^^^^^^^^ the trait `Borrow<snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v5::location::Location>` is not implemented for `&snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v4::location::Location`
    |                                                                        |
    |                                                                        required by a bound introduced by this call
    |
note: required by a bound in `snowbridge_smoketest::parachains::penpal::api::foreign_assets::storage::StorageApi::asset`
   --> /home/lederstrumpf/polkadot/snowbridge/snowbridge-fresh/smoketest/src/parachains/penpal.rs:1:765483
    |
1   | ..."] pub fn asset (& self , _0 : impl :: core :: borrow :: Borrow < types :: asset :: Param0 > ,) -> :: subxt :: ext :: subxt_core :: storage :: address :: StaticAddress :: < :...
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StorageApi::asset`

error[E0308]: mismatched types
   --> tests/send_token_to_penpal.rs:216:68
    |
216 |     let create_asset_call = penpal::api::tx().foreign_assets().create(penpal_asset_id, admin, 1);
    |                                                                ------ ^^^^^^^^^^^^^^^ expected `Location`, found a different `Location`
    |                                                                |
    |                                                                arguments to this method are incorrect
    |
note: method defined here
   --> /home/lederstrumpf/polkadot/snowbridge/snowbridge-fresh/smoketest/src/parachains/penpal.rs:1:691709
    |
1   | ...s `Created` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] pub fn create (& self , id : types :: create :: Id , admin : types :: create :: Admin , min_balan...
    |                                                                                        ^^^^^^

error[E0277]: the trait bound `&snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v4::location::Location: Borrow<snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v5::location::Location>` is not satisfied
   --> tests/send_token_to_penpal.rs:237:72
    |
237 |     let dot_asset_address = penpal::api::storage().foreign_assets().asset(&dot_asset_id);
    |                                                                     ----- ^^^^^^^^^^^^^ the trait `Borrow<snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v5::location::Location>` is not implemented for `&snowbridge_smoketest::parachains::penpal::api::runtime_types::staging_xcm::v4::location::Location`
    |                                                                     |
    |                                                                     required by a bound introduced by this call
    |
note: required by a bound in `snowbridge_smoketest::parachains::penpal::api::foreign_assets::storage::StorageApi::asset`
   --> /home/lederstrumpf/polkadot/snowbridge/snowbridge-fresh/smoketest/src/parachains/penpal.rs:1:765483
    |
1   | ..."] pub fn asset (& self , _0 : impl :: core :: borrow :: Borrow < types :: asset :: Param0 > ,) -> :: subxt :: ext :: subxt_core :: storage :: address :: StaticAddress :: < :...
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StorageApi::asset`

error[E0308]: mismatched types
   --> tests/send_token_to_penpal.rs:256:68
    |
256 |     let create_asset_call = penpal::api::tx().foreign_assets().create(dot_asset_id, admin, 1);
    |                                                                ------ ^^^^^^^^^^^^ expected `Location`, found a different `Location`
    |                                                                |
    |                                                                arguments to this method are incorrect
    |
note: method defined here
   --> /home/lederstrumpf/polkadot/snowbridge/snowbridge-fresh/smoketest/src/parachains/penpal.rs:1:691709
    |
1   | ...s `Created` event when successful."] # [doc = ""] # [doc = "Weight: `O(1)`"] pub fn create (& self , id : types :: create :: Id , admin : types :: create :: Admin , min_balan...
    |                                                                                        ^^^^^^

Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `snowbridge-smoketest` (test "send_token_to_penpal") due to 4 previous errors
@alistair-singh
Copy link
Contributor

It is failing because xcm v5 has been merged into master but the bridge does not support it yet. This will be patched as part of the v2 work.

@alistair-singh
Copy link
Contributor

Addressed by this PR if you want to use master (with xcm v5 enabled) version of polkadot-sdk: #1357

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

No branches or pull requests

2 participants