Reputation: 35
Following is my substrate code:
pub type ItemId = u8;
#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug)]
pub enum PoolId {
TX(ItemId),
}
How to configure enum type in the json file? https://polkadot.js.org/apps
This is not working:
{
"PoolId": {
"_enum": [
"TX"
]
},
}
Upvotes: 0
Views: 694
Reputation: 2865
{
"PoolId": {
"_enum": [
"TX"
]
},
"TX": "u8"
// or
// "TX": { "_": "u8" }
// or
// "TX": "ItemId",
// "ItemId": "u8"
// or
// "TX": { "_": "ItemId" },
// "ItemId": "u8"
}
Also here's a real world example:
Upvotes: 1