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

Define and implement the Incrementable trait for uints #840

Closed
wants to merge 2 commits into from

Conversation

Moliholy
Copy link

@Moliholy Moliholy commented Apr 2, 2024

Currently the Incrementable trait is defined in frame-support and only used in asset-conversion and nfts. This prevents types like U256 to be used in such pallets, which is particularly inconvenient when facing Ethereum compatibility.

This PR redefines the Incrementable trait and implements it for uints, with the intention remove it from frame-support and use this one instead.

@bkchr
Copy link
Member

bkchr commented Apr 3, 2024

That will not work. You basically just create a different trait here. To achieve what you want to achieve, you need to implement the trait for these types in the crate where the trait is declared. It is also done for the other fundamental types there: https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/support/src/traits/storage.rs#L282

@bkchr bkchr closed this Apr 3, 2024
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.

None yet

2 participants