Closed chaosma closed 4 years ago
Hello @chaosma. Thanks for using the recipes!
The issue is because of your decl_event!{...}
block, and specifically because of the line Timestamp = <T as timestamp::Trait>::Moment
.
Because you've made this type alias, you need to tell Polkadot-js Apps about it as well. Go back to the Apps UI and to the Settings
-> Developer
tab. You will need to add all off the usual super-runtime
types (from recipes/runtimes/super-runtime/types.json
) as well as this new one "Timestamp": "Moment"
.
So the complete set of types you need is:
{
"Address": "AccountId",
"LookupSource": "AccountId",
"ContinuousAccountData": {
"principal": "u64",
"deposit_date": "BlockNumber"
},
"U16F16": "[u8; 4]",
"GroupIndex": "u32",
"TaskId": "Vec<u8>",
"PriorityScore": "u32",
"RoundIndex": "u32",
"Task": {
"id": "TaskId",
"score": "PriorityScore",
"proposed_at": "BlockNumber"
},
"ValueStruct": {
"integer": "i32",
"boolean": "bool"
},
"BufferIndex": "u8",
"AccountIdOf": "AccountId",
"BalanceOf": "Balance",
"FundInfoOf": "FundInfo",
"FundInfo": {
"beneficiary": "AccountId",
"deposit": "Balance",
"raised": "Balance",
"end": "BlockNumber",
"goal": "Balance"
},
"FundIndex": "u32",
"InnerThing": {
"number": "u32",
"hash": "Hash",
"balance": "Balance"
},
"SuperThing": {
"super_number": "u32",
"inner_thing": "InnerThing"
},
"InnerThingOf": "InnerThing",
"Timestamp": "Moment"
}
@JoshOrndorff Cool! It works now. Thanks for your quick answer.
I added a new pallet and inserted that pallet into the super-runtime. The pallet is very simple, it contains two functions, one is to add a record to the blockchain, the other is to remove a record. When I tested the two functions, it works. But the explorer (extrinsic tab) will keep the notification on the explorer; also the block detail tab not showing the event finish. Here are the screenshots:
I added debug information as well as add/remove the same record to make sure the functions work well. I suspect it's some other issue not related to the pallet I added. Here is the code: