Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add specName and chainName to Artifacts #69

Merged
merged 3 commits into from
Jun 6, 2020
Merged

Conversation

joepetrowski
Copy link
Collaborator

@joepetrowski joepetrowski commented Jun 6, 2020

specName comes from an RPC call but AFAICT, nothing returns the chainName for the registry. Used a switch/case block here but I could see many possible approaches to this:

  1. Leave as is. The reason I did this is because TxWrapper's registry will only accept 'Polkadot' | 'Kusama' | 'Westend', so I explicitly filter for them here.
  2. Remove the switch/case and just do the default block now, which capitalizes the first letter of specName. This assumes that all chains and the Polkadot JS API type registry will follow this specName/chainName pattern.
  3. Just remove chainName from the return entirely and let people deal with this specName -> chainName conversion on the outside.
  4. Some RPC endpoint actually does return chainName and this is all pointless.

To release only after paritytech/txwrapper#161 is in a txwrapper release.

@amaury1093
Copy link
Contributor

Some RPC endpoint actually does return chainName and this is all pointless

ahah, actually yeah: https://polkadot.js.org/api/substrate/rpc.html#chain-text

@joepetrowski joepetrowski merged commit dc59662 into master Jun 6, 2020
@joepetrowski joepetrowski deleted the joe-add-specname branch June 6, 2020 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants