0

I have recently upgraded our blockchain to use polkadot-v0.9.26 but when I am building the code I get the following

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:900:39
    |
900 |                         ToReserve | ToNonReserve => Xcm(vec![
    |                                                         ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:895:31
    |
895 |                         SelfReserveAsset => Xcm(vec![TransferReserveAsset {
    |                                                 ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:837:39
    |
837 |                         ToReserve | ToNonReserve => Xcm(vec![
    |                                                         ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:832:31
    |
832 |                         SelfReserveAsset => Xcm(vec![TransferReserveAsset {
    |                                                 ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:740:12
    |
740 |                 Ok(Xcm(vec![
    |                        ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:720:12
    |
720 |                 Ok(Xcm(vec![
    |                        ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:684:11
    |
684 |             Ok(Xcm(vec![
    |                    ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:667:11
    |
667 |             Ok(Xcm(vec![TransferReserveAsset {
    |                    ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:438:39
    |
438 |             Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight)
    |                                                ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

error: cannot find macro `vec` in this scope
   --> /home/aibrayanov/.cargo/git/checkouts/open-runtime-module-library-d1f2e33a8ae5e2c9/33dbc5e/xtokens/src/lib.rs:400:39
    |
400 |             Self::do_transfer_multiassets(who, vec![asset.clone()].into(), asset, dest, dest_weight)
    |                                                ^^^
    |
    = note: consider importing one of these items:
            codec::alloc::vec
            scale_info::prelude::vec
            sp_std::vec

for orml-xtokens . I have tried to import all of the suggested items but still get the same error. Any idea how I can fix this? You can find the code here

1 Answer 1

2

I think you missed something like orml-xtokens/std in the Cargo.toml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.