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: more flexible extrinsic unwrapping for ctype fetching #837

Merged
merged 8 commits into from
Feb 15, 2024

Conversation

rflechtner
Copy link
Contributor

@rflechtner rflechtner commented Feb 7, 2024

fixes https://github.com/KILTprotocol/ticket/issues/3119

While I hot fixed the current behaviour in #836 to allow extrinsics submitted via dispatchAs, I think it's a better strategy for the future to build on top of on an unwrapper function that returns nested calls contained within other extrinsics that can easily be amended. E.g., we could easily add unwrapping of proxy calls to the logic here and everything still works.

How to test:

Ideally, fetch a CType with it.

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)
    • Either PR or Ticket to update the Docs
    • Link the PR/Ticket here

@rflechtner rflechtner requested a review from ntn-x2 February 7, 2024 16:15
@rflechtner rflechtner force-pushed the rf-refactor-ctype-fetching branch from 63257c9 to 065647b Compare February 8, 2024 10:05
@rflechtner rflechtner marked this pull request as ready for review February 8, 2024 10:29
Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

I like your solution, very elegant. I am wondering if it can be structured a bit better with regards to functions responsibilities. Other than that, I like it a lot!

Copy link
Member

@ntn-x2 ntn-x2 left a comment

Choose a reason for hiding this comment

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

Left one more minor comment, otherwise it looks good.

@rflechtner rflechtner force-pushed the rf-refactor-ctype-fetching branch from ce3b258 to 4b30fd4 Compare February 14, 2024 13:29
@rflechtner rflechtner merged commit b35dfa9 into develop Feb 15, 2024
12 of 13 checks passed
@rflechtner rflechtner deleted the rf-refactor-ctype-fetching branch February 15, 2024 09:21
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