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

VersionedXcm is not created with versioned_type #3846

Open
franciscoaguirre opened this issue Mar 26, 2024 · 2 comments · May be fixed by #4378
Open

VersionedXcm is not created with versioned_type #3846

franciscoaguirre opened this issue Mar 26, 2024 · 2 comments · May be fixed by #4378
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T6-XCM This PR/Issue is related to XCM.

Comments

@franciscoaguirre
Copy link
Contributor

The VersionedXcm type is defined like so:

pub enum VersionedXcm<RuntimeCall> {
	#[codec(index = 2)]
	V2(v2::Xcm<RuntimeCall>),
	#[codec(index = 3)]
	V3(v3::Xcm<RuntimeCall>),
	#[codec(index = 4)]
	V4(v4::Xcm<RuntimeCall>),
}

meanwhile, all other versioned types use the versioned_type macro to get some automatic functionality.

Is there a reason for this? Should we just use the macro for this type as well?

@franciscoaguirre franciscoaguirre added T6-XCM This PR/Issue is related to XCM. C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. labels Mar 26, 2024
@bkontur
Copy link
Contributor

bkontur commented Mar 27, 2024

My guess is that it's because of the type parameter RuntimeCall - pub enum VersionedXcm<RuntimeCall>, and it seems like the only difference in the derive stuff is #[scale_info(bounds(), skip_type_params(RuntimeCall))].

@franciscoaguirre
Copy link
Contributor Author

True. If there was a way to put that inside of the macro I think we'd save ourselves from some duplication.

@dastansam dastansam linked a pull request May 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. T6-XCM This PR/Issue is related to XCM.
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

2 participants