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

Introduce sp_arithmetic as subxt::ext::sp_arithmetic and implement default substitues behind substrate-compat feature. #1181

Conversation

tadeohepperle
Copy link
Contributor

@tadeohepperle tadeohepperle commented Sep 28, 2023

Fixes #1170
This PR adds sp_arithmetic (16.0.0) as a dependency to subxt that is exposed unser subxt::ext::sp_arithmetic.

Currently I am facing the problem, that the types from sp_arithmetic do not implement EncodeAsType and DecodeAsType and we cannot easily implement them because of the orphan rule.

Draft PR. Incomplete.

@tadeohepperle tadeohepperle force-pushed the tadeohepperle/pull-in-sp-arithmetic-for-perbill-permill-etc branch from adfed21 to e488a16 Compare October 5, 2023 13:56
@tadeohepperle
Copy link
Contributor Author

Needs some more thought because the types from sp_arithmetic do not implement EncodeAsType/DecodeAsType. Which results in invalid code being generated, when they are used as fields of generated structs that derive EncodeAsType. Closing this PR for now.

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.

Provide implementations of Permill, Perbill etc in Subxt?
1 participant