Add HoldReason to the NIS pallet#13823
Conversation
| #[pallet::composite_enum] | ||
| pub enum HoldReason { | ||
| /// The NIS Pallet has reserved it for a non-fungible receipt. | ||
| #[codec(index = 0)] |
There was a problem hiding this comment.
Not necessary, but it's there to ensure that the codec index remains unchanged by being explicit.
| } | ||
|
|
||
| quote! { | ||
| /// A reason for placing a freeze on funds. |
There was a problem hiding this comment.
I think it would be better to forward the real docs put on top of the type?
There was a problem hiding this comment.
Isn't that what this is already doing? It's documenting a type that is expanded by the proc macro.
There was a problem hiding this comment.
This isn't forwarding the docs that I as a user put onto the type?
There was a problem hiding this comment.
Ah okay, so the problem is that RuntimeFreezeReason is never exposed to the user -- it's generated by construct_runtime. The only way that this would make sense is if we forward the doc comments on the pallet's FreezeReason, which I think is already what we do.
There was a problem hiding this comment.
Ahh okay, missed that this is the runtime level declaration.
|
bot merge |
* Add HoldReason to the NIS pallet * Rename composable_enum to composite_enum * Add encoding test * Add more doc comments
* Add HoldReason to the NIS pallet * Rename composable_enum to composite_enum * Add encoding test * Add more doc comments
Partial paritytech/polkadot-sdk#236.
Adds the
HoldReasonas acomposite_enumto the NIS pallet. Also fixes a couple of naming bugs and adds more tests.