0

We have been testing out the WS Provider in POlkadotJS and its working good with our custom pallets. However we just got substrate Connect working with our custom substrate based node. The assets pallet and the Nicks pallet are working with Connect, however when we are trying to query anything in our custom pallets we are getting no data returned when there is data returning from the saem query with the PolkadotJS WS Connect Provider

our query is like this

let res = await api.query.messages.messageHeaders.entries(address)

do those commands work on Connect?

Here is the code for connecting to SC

const customSpec = JSON.stringify(jsonCustomSpec);
const provider = new ScProvider(Sc, customSpec);
await provider.connect();
const api = await ApiPromise.create({provider});

this part works. and we can query the standard frame pallets just fine. Getting the account balance or assets works with Connect.

1 Answer 1

0

Can you please provide more information around the custom pallet? The Substrate Connect, just fires up a light client and returns a wrapped PolkadotJS api, being the idea of seem-less integration of light clients on existing PJS apps;

Can you please provide the code that you use for connecting the ScProvider and some more logs around what is happening when connected with Substrate connect? You can do that by adding the following configuration when connecting the ScProvider

provider.connect({ embeddedNodeConfig: { maxLogLevel: 4 }})

It will be very helpful in order to identify the issue;

1
  • Here is the code for connecting to SC ``` const customSpec = JSON.stringify(jsonCustomSpec); const provider = new ScProvider(Sc, customSpec); await provider.connect(); const api = await ApiPromise.create({provider}); ``` Sep 14 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.