Hi everyone, I am currently trying to add a blockchain node to the explorer without adding types in the developer settings.
I tried replicating what was done by other node's (Eg Dock), and added the following definition in spec and imported it
{
PeerId: 'Vec<u8>',
PublicSigningKey: 'Hash',
identifier: 'Vec<u8>',
public_key: 'Hash',
metadata: 'Vec<u8>',
DidStruct: {
identifier: 'Vec<u8>',
public_key: 'Hash',
metadata: 'Vec<u8>'
}
}
But then I faced the following error when I start the explorer with the node-testnet selected.
polkadot.02.865fd16e.js:20051 2020-11-19 15:38:58 REGISTRY: Unable to resolve type PeerId, it will fail on construction
polkadot.02.865fd16e.js:20051 2020-11-19 15:38:58 METADATA: Unknown types found, no types for DidStruct, PeerId, PublicSigningKey
polkadot.02.865fd16e.js:20051 2020-11-19 15:38:58 REGISTRY: Error: Cannot construct unknown type PeerId
It only works when we add the types in the developer settings.
I would really appreciate if anyone can give any pointers that may help in solving this issue.
Ensure it maps to the actual proper spec name in the definitions once added. (i.e. it is not the node name, rather as defined in the runtime. When in doubt, make a query to state.getRuntimeVersion)
@jacogr Thank you for the quick response. It was an issue with incorrect spec name mapping to the definitions just as you said.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
Most helpful comment
Ensure it maps to the actual proper spec name in the definitions once added. (i.e. it is not the node name, rather as defined in the runtime. When in doubt, make a query to state.getRuntimeVersion)