substrate
substrate copied to clipboard
Nfts: Fix Auto-Increment
Fixes #11796
The Idea
As mentioned in the discussion in the previous PR that tried to implement this issue we cannot assume that the CollectionId is an integer hence parachains that support XCM will have CollectionId defined as Multilocation. To solve this in this PR I have added a new trait Incrementable that needs to be implemented for the CollectionId type. This way the incrementing functionality needs to be defined in the runtime so that we don't make any assumptions here on substrate.
WIP
@KiChjang @jsidorenko Could you review this?
Removed the try_increment_id function, not sure why the CI checks are getting errored now :/
The CI checks are failing because the Event and Call got renamed, I will open a small PR to fix that in this branch.
@Szegoo No need, I'm merging master and fixing them along the way. It should work with the latest push now.
@KiChjang You should also rename the Event inside the runtime implementation of the nfts pallet.
bot merge