question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

api.query.nicks.nameOf() method is broken

See original GitHub issue
const provider = new WsProvider('wss://kusama-rpc.polkadot.io/');
const api = await ApiPromise.create({ provider });

const value = await api.query.nicks.nameOf(
   'HeCK315sYXruJvZKB5uXtEBnpWwYHFaKfNNZ54G76Qr7Nkn' //Validator stash ID
);

on calling namesOf() method results in the below error Error: FATAL: Unable to initialize the API: createType(Percent):: Unable to find plain type for {"info":6,"type":"Percent"}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jacogrcommented, Jan 12, 2020

The API supports anything on the metadata - so some chains, when they have the module included, will have nicks support. Kusama is not one of those. The API will never have chain-specific details in the CHANGELOG or anything specific. It is decorated by the chain metadata.

If you want chain-specific details, follow the specific chain, for Kusama that is the https://github.com/paritytech/polkadot repo.

TL;DR This is nothing JS or API related, the chain does not have the module.

1reaction
jam10o-newcommented, Jan 12, 2020

@bhaskarSingh nicks were removed on Kusama in favor of the identity module

Read more comments on GitHub >

github_iconTop Results From Across the Web

The name 'nameof' does not exist in the current context
I'm using VS2015, update 2, and I just started seeing this issue today. It used to work. EDIT: Turns out there was a...
Read more >
The nameof expression - evaluate the text name of a symbol
A nameof expression produces the name of a variable, type, or member as the string constant. A nameof expression is evaluated at compile ......
Read more >
Build queries easily using Refinitiv's Search API with Python ...
The execute() method returns the # of hits resulting from the request and the number of properties found in the first hit, respectively....
Read more >
GraphQL API style guide - GitLab Docs
GraphQL API style guide. This document outlines the style guide for the GitLab GraphQL API. How GitLab implements GraphQL. We use the GraphQL...
Read more >
Rust: Structuring and handling errors in 2020 - Nick Groenen
API boundaries; The library error type; Returning library errors ... This error is the result of File::open() returning an error in main() ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found