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

refactor: remove config and add generic extension type #176

Conversation

chungquantin
Copy link
Collaborator

Alternative design of the PR: #163

  • Removing the Config trait so there is no relationship between the Runtime and the extension.
  • Types need to be passed to the generic extension type ApiExtension.
    This alternative approach removes all the connections with the Runtime, every configuration will be on the level of the ApiExtension

Copy link
Collaborator

@evilrobot-01 evilrobot-01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one query for one last possible improvement. Its minor, but I prefer to not overexpose things. The VersionedDispatch enum only needs to know the type of he RuntimeCall, not the whole Runtime which implements some Config trait to then determine the RuntimeCall.

Far simpler to only pass the runtime call type.

extension/src/lib.rs Outdated Show resolved Hide resolved
@chungquantin chungquantin merged commit de41a05 into chungquantin/refactor-duplicate_chain_extensions Aug 12, 2024
6 checks passed
@chungquantin chungquantin deleted the chungquantin/refactor-show_generic_extension branch August 12, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants