Provide implementations of `Permill`, `Perbill` etc in Subxt?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 489
- Forks
- 293
- Avg merge
- 18h 35m
- Merged PRs (30d)
- 3
Description
We fixed decoding into the generated Permill etc types a short while ago, but the types also have a bunch of custom logic and such. Currently, to work with them properly, one would have to pull in sp_arithmetic and convert the decoded parts into the proper types manually.
Perhaps we could either:
- Pull in
sp-arithmeticand just substitute for the "proper" types. (sp-arithmetic doesn't look like it depends on much, so I think this would be fairly doable), or - Make some concise implementations of the types ourselves in Subxt if pulling in the above is a pain for some reason. (I think we'd rather not do this)
- Leave things as they are and people will have to manually convert the types to use them.
Types are defined here: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/primitives/arithmetic/src/per_things.rs#L1864
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the referenced per_things.rs definitions and comparing them with Subxt's generated Permill and Perbill decoding. Determine whether the intended outcome is adopting sp-arithmetic or maintaining concise Subxt implementations; done means the chosen types expose the needed custom logic without manual conversion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100