2

I am getting an 'Unroutable' error when setting an Error Handler using ReportTransactStatus in my XCM Message.

I am using the polkadot-v1.0.0, at V3 of XCM.

match send_xcm::<T::XcmSender>(
    (Parent, Junction::Parachain(mult_para_id.into())).into(),
    Xcm(vec![
        SetErrorHandler(Xcm(vec![ReportTransactStatus(QueryResponseInfo {
            destination: Parachain(2000).into(),
            query_id,
            max_weight: Weight::from_all(0),
        })])),
        Transact {
            origin_kind: OriginKind::Native,
            require_weight_at_most: Weight::from_parts(1_000, 1_000),
            call: <T as Config>::RuntimeCall::from(Call::<T>::xcm_clone_file {
                signer,
                energy_bank_file: new_file
            })
            .encode()
            .into(),
        },
        ExpectTransactStatus(MaybeErrorCode::Success),
    ]),
) {
    Ok((hash, cost)) => Self::deposit_event(Event::Success(mult_para_id)),
    Err(e) => Self::deposit_event(Event::Error(e, mult_para_id)),
}

When no error occurs in the destiny, everything executes without problems. However, when an error happens the destiny parachain outputs the unroutable error.

That is confusing me because the channel is open in both ways, 2000 > 2001 and 2001 > 2000.

Is that the correct way of checking if the XCM call was executed without errors in the destiny? What I am doing wrong here and how could I fix it?

I would really appreciate any kind of help or directions in how to properly do this.

Thank you :)

1 Answer 1

2

Try changing the destination in SetErrorHandler to {parents:1, Parachain(2000)}, It would be executed on Parachain(2001) when error occurs, and the location of Parachain(2000) relative to Parachain(2001) is parents: 1, Parachain(2000)

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.