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

Add generics on cumulus xcm emulate Chain trait on signature types #4652

Open
2 tasks done
MrishoLukamba opened this issue May 31, 2024 · 0 comments
Open
2 tasks done
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@MrishoLukamba
Copy link

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Motivation

To support account other than sr25519 and add more flexbility on testing xcm

Request

To support account other than sr25519

Solution

Add generic on trait Chain

pub trait Chain: TestExt {
	type Network: Network;
	type Runtime: SystemConfig;
	type RuntimeCall;
	type RuntimeOrigin;
	type RuntimeEvent;
	type System;

	fn account_id_of(seed: &str) -> AccountId {
		helpers::get_account_id_from_seed::<sr25519::Public>(seed)
	}

	fn account_data_of(account: AccountIdOf<Self::Runtime>) -> AccountData<Balance>;

	fn events() -> Vec<<Self as Chain>::RuntimeEvent>;
} 

Are you willing to help with this request?

Yes!

@MrishoLukamba MrishoLukamba added the I5-enhancement An additional feature request. label May 31, 2024
@github-actions github-actions bot added the I10-unconfirmed Issue might be valid, but it's not yet known. label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I5-enhancement An additional feature request. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

1 participant