[Nara] add freeze pallet proposal#4946
Conversation
6f6d629 to
16f6d89
Compare
mnaamani
left a comment
There was a problem hiding this comment.
Great work, left a few comments and shared in freakstatic#1 howto fix the build failure seen in the CI checks related to modified runtime types
runtime-modules/common/src/lib.rs
Outdated
| #[derive( | ||
| Encode, Decode, Clone, PartialEq, Eq, Copy, Debug, PartialOrd, Ord, TypeInfo, MaxEncodedLen, | ||
| )] | ||
| pub enum FrezablePallet { |
There was a problem hiding this comment.
small typo:
| pub enum FrezablePallet { | |
| pub enum FreezablePallet { |
Also I don't know if it needs to be enumerable?
Patch to fix query-node and integration tests build
37f550b to
4748382
Compare
mnaamani
left a comment
There was a problem hiding this comment.
enum.type was wrong choice on my part, should be enum.toString()
I believe you need to generate types one last time :)
Finally I was surprised to see query-node/chain-metadata/1001.json and 2001.json modified then realized that was result of running yarn format in query-node workspace.
I think we should add a query-node/.prettierignore with content:
chain-metadata/
query-node/mappings/src/proposals.ts
Outdated
| const details = new UpdatePalletFrozenStatusProposalDetails() | ||
| const specificDetails = (proposalDetails as RuntimeProposalDetails_V2002).asSetPalletFozenStatus | ||
| details.frozen = specificDetails[0].isTrue | ||
| details.pallet = specificDetails[1].type |
There was a problem hiding this comment.
I realized I made a mistake in original PR, although this kind of works because there is a single enum variant.
The correct way would be (assuming the variants have no encapsulated data) would be:
| details.pallet = specificDetails[1].type | |
| details.pallet = specificDetails[1].toString() |
@mnaamani yeah I also thought it was a bit strange but I assumed that it was ok to commit them formatted, should I revert that? |
Yes please. It just makes it easier to detect if they are truly modified when we fetch the metadata with |
Implements the proposal part of #4897