1

Using the following line results in the error 'Bad Origin' in Runtime call.

let para = ensure_sibling_para(<T as Config>::RuntimeOrigin::from(origin.clone()))?;

I am building a pallet that sends XCM-encoded calls (Like a ping pallet) to another chain. However, the mentioned line always gives me the error Bad origin. What am I doing wrong? I am using sudo accounts as the origin (Alice/Bob). I even tried to use sudo with a sudo account.

1 Answer 1

0

Both ping and pong extrinsics of cumulus-ping pallet expect to be called by a sibling chain. In other words, it needs to be triggered by an XCM transact instruction that comes from any sibling parachain (see here). So if you are calling ping or pong as an extrinsic with normal (that is not a sovereign account of sibling para) account, it won't work.

To start sending ping messages to other parachain, use start or start_many calls.

Your Answer

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

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