ChainSafe / ChainSafe/gossamer

Implement missing PSP-6 functions

Open
#2,531 0 comments 0 reactions 1 assignee Claimed by @P1sar View on GitHub
Epic
Dominant language
Go
Stars
454
Forks
144
PR merge metrics
No merged PRs in 30d

Description

## Task summary

- Issue #2028 uncovered a number of polkadot-js functions that generate "xxx is not a function" errors when called. This was found using a test javascript file that used the polkadot/api javascript library version 8.3.1, calling a gossamer node running gossamer runtime version 9.19 (based on dev-spec-raw_gssmr9190.json genesis spec).
- Calls were made to the functions, for example:
```
const epochAuthorship = api.rpc.babe.epochAuthorship();
console.log(`epochAuthorship: ${epochAuthorship}`);
```
- Generated errors, for example:
```
TypeError: api.rpc.babe.epochAuthorship is not a function
```

- This happened for the following functions:

- api.rpc.system.dryRun
- api.rpc.babe.epochAuthorship
- api.rpc.grandpa.subscribeJustifications
- api.rpc.grandpa.unsubscribeJustifications
- api.rpc.author.author_unwatchExtrinsic
- api.rpc.chain.subscribeAllHeads
- api.rpc.chain.unsubscribeAllHeads
- api.rpc.engine.createBlock
- api.rpc.engine.finalizeBlock
- api.rpc.contracts.call
- api.rpc.contracts.getStorage
- api.rpc.contracts.rentProjection
- api.rpc.syncstate.getSyncSpec

## Specification reference

- The functions tested were based on functions listed in [psp-6 JSON-RPC Interfaces for Polkadot Nodes](https://github.com/w3f/PSPs/blob/master/PSPs/drafts/psp-6.md)

## Other information and links

- Example javascript used for testing is in tests/polkkadotjs_test/test_copy.js in ChainSafe/gossamer branch ed/interop_js_681.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.