As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [polkadot-js]

Questions about the Polakdot JS API used to interact with Substrate based chains via JavaScript.

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Property 'x' does not exist on type 'DecoratedRpc<"promise", RpcInterface>'

I have decorated custom RPC types for methods for polkadot-js-apps. I added them in ./packages/apps-config/src/api/spec/<chain-name>.ts, (then i also needed to add it into typesBundle.js, and ...
Decentration's user avatar
  • 1,156
2 votes
1 answer
30 views

Ongoing error closing council motions in Polkadot JS (No execution details available for this proposal)

Ongoing problem with closing council motions related to treasury proposals. Here is what we have tried so far. (1) At first, running an August 2022 version of the substrate kitchen sink node, the ...
KathrynColleen's user avatar
1 vote
1 answer
85 views

Query AccountID of a pallet

The AccountID of a pallet is generated using the PalletID. (See the example from Treasury pallet) I know is possible to query this pallet ID because is a constant, but my question is: Is there a way ...
Alex Bean's user avatar
  • 3,557
2 votes
2 answers
87 views

List of assets on Statemint

How do I get the list of all the assets that are present and their supply in Statemint? Ideally either with Polkadot-JS api or py-substrate-interface.
Pranay's user avatar
  • 121
0 votes
1 answer
34 views

Polkadot JS Apps UI - Treasury Proposals - Threshold met but proposals not listed as approved, unable to close

We are running a test chain based on the Substrate kitchen-sink node (code here: https://github.com/SparticleConcepts/Geode-Substrate) and using the https://polkadot.js.org/apps/ UI. We can submit a ...
KathrynColleen's user avatar
0 votes
1 answer
64 views

Verifying that this extracts the public key from my address, and not the private key

I'm using this code sample from here to extract my public key from my Dot address. I just want to verify that this is in fact converting my address to the public key. const { decodeAddress } = require(...
ZeroPhase's user avatar
  • 123
2 votes
1 answer
93 views

How i convert Raw seed to Private Key in Substrate

I have a toy example : My keypair is ed25519 const seed = [ 40, 246, 184, 64, 69, 145, 132, 131, 231, 66, 112, 159, 162, 36, 79, 197, 62, 54, 222, 103, 122, 190, 7, 143, 94, 190, ...
CocDap's user avatar
  • 496
1 vote
1 answer
71 views

Question for api.call.transactionPaymentApi.queryInfo state call

I'm replacing api.rpc.payment.queryInfo with api.call.transactionPaymentApi.queryInfo in the crawler code of Polkastats block explorer but I want to ask about the second parameter len: is that the ...
Mario Pino Uceda's user avatar
1 vote
2 answers
74 views

Cant get extrinsic error from balances.sendTransfer extrinsic in polkadotJSAPI

I am doing error handling in an app using polkadotJSAPI 7.13.1 There are two ways to fetch info if an extrinsic suceeds or fails, the first one is via dispatchError in signAndSend like so ...
Dorian Jakov Stern Vukotic's user avatar
0 votes
0 answers
37 views

Get block number range for selected era in polkadot.js/api [duplicate]

I want to get block number range for selected era. So, I want to get start, end block number for specific era. How can I get them using polkadot.js/api? I can know from explorer, I need to get from ...
Heindrick's user avatar
  • 173
2 votes
1 answer
35 views

How to use polkadot{.js} substrate methods in itraction with kusama's gov2

Until now, to follow the referendums through the polkadot.js api, I was using storage methods that are part of the default Substrate runtime (located here: https://polkadot.js.org/docs/substrate/...
user3612's user avatar
1 vote
1 answer
31 views

How to produce empty paramter in an Option?

In the screenshot below the OptionSelect is disabled, which produces info of an array of accounts rather than just one single. How do you replicate this option when curating a call? Using api.query....
Decentration's user avatar
  • 1,156
1 vote
2 answers
39 views

Get all validators on the network, not just the active ones

I want to be able to get all the validators on the network, not just the active ones. api.query.session.validators() only gets validators in the active set, how can I get every validator in existence?
James's user avatar
  • 143
1 vote
1 answer
66 views

How to get a list of all the smart contract account ids and WASM blobs on a parachain

I would like to figure out how to get a list of all the smart contracts account ids and WASM blobs that have been uploaded to a specific parachain, ideally into python using the substrate interface. ...
Roger J Bos CFA's user avatar
1 vote
1 answer
42 views

List of WSS endpoints for parachains (OR Is there a way to parse typescript code into JSON or other python readable object?)

I would like to programmatically get a list of all the WSS urls for parachains. I don't know if this is available anywhere, but I have not seen it. This source code has what I want, but it is in the ...
Roger J Bos CFA's user avatar
0 votes
1 answer
88 views

How do we work with polkadot-js enums in TypeScript?

I used typegen to generate my types from definitions. Definition Person: { status: 'Status', balance: 'u128', }, Status: { _enum: ['Active',...
forgetso's user avatar
  • 1,217
0 votes
2 answers
46 views

Ink Message must not be generic Warning

on writing to: &mut AccountId, it throws warning to use explicit lifetime name needed here. #[ink(message)] pub fn delegate(&mut self, to: &mut AccountId) { let caller = ...
Ganesh11's user avatar
  • 672
2 votes
1 answer
2k views

Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)

Prior to cloning the substrate-front-end-template repo with tag "monthly-2022-02" I installed the following since I was building it from a Dockerfile using pre-built Docker image node:...
Luke Schoen's user avatar
  • 1,856
0 votes
1 answer
93 views

Extracting error from system.ExtrinsicFailed

I have a call to an extrinsic (in a Typescript/RxJS client) that is failing but I want to be able to catch the error that the extrinsic is throwing and not just that it failed. const chainEvents: ...
Robert La Ferla's user avatar
0 votes
0 answers
55 views

StakerStatus is not updating on my custom explorer

I have made a custom explorer of a substrate based blockchain, and when i am chilling the staker, its status is not updating to inactive on the custom explorer, is there any RPC call or any other way ...
Gagandeep Kaur's user avatar
2 votes
1 answer
85 views

@polkadot/api suppress output messages

I have an issue regarding displaying errors. For errors, the logger @polkadot/api uses will write to console even when the error is caught and handled. I am handling and displaying the messages a ...
Dario Tsvetanoff's user avatar
0 votes
0 answers
28 views

Problem in PolkadotJS when trying createType("Call")

Hello i'm facing problem when creating new type for Call const call = api.createType("Call", { callIndex: "staking.nominate", args: ["ADDRESS_1", "...
Rizaldi Arif Fiqri's user avatar
1 vote
1 answer
119 views

What is Contract Terminate?

Is contract terminate means stop the currently executed smart contract or delete it from Blockchain?. If terminate means stop, then will it be resume later and If terminate means delete from ...
Ganesh11's user avatar
  • 672
1 vote
1 answer
41 views

polkadot.js | SignAndSend SuccessResponse does NOT contain all events emitted in tx

SignAndSend SuccessResponse that is a result of a contract call does NOT contain all events that are emitted during tx execution. The Object contains only events emitted from the contract that is ...
Yrefef's user avatar
  • 63
1 vote
1 answer
104 views

unable to upload ink! contract in polkadot-JS

I add pallet-contract into substrate-node-template, and use polkadot-JS to upload ink! contracts. But I get something wrong when I upload a contract. logs like this: createType(Call):: Call: failed ...
Briza's user avatar
  • 55
4 votes
2 answers
162 views

How to decorate RPC correctly?

The rpc methods (showing in rpc_methods), are still not showing in their own area, after (attempting to) decorate the rpc. I have custom rpc on a substrate template. Here are the rpc_methods: I have ...
Decentration's user avatar
  • 1,156
11 votes
1 answer
119 views

How to upgrade the client?

I want to do a runtime upgrade but I got the same error as here solution is :- If there are changes not only to the runtime but also to the node, then this issue is normally caused by upgrading the ...
Wakar Seraj Khan's user avatar
0 votes
0 answers
29 views

how can change consensus algorithm in substrate [duplicate]

consensusi wanna to know how can change consensus algorithm in substrate ? i gonna to change consensus to DPOS or NPOS or POS , in this step i want to know how can i change consusnse of substrate . ...
Mr Coder's user avatar
  • 491
2 votes
1 answer
54 views

Retrieve block index after transaction is sent

I am a developer integrating Polkadot JS to my app. I am creating an offline transaction which I am sending via the Polkadot Api RPC. In return I get the txid, but it does not help me to retrieve the ...
Dario Tsvetanoff's user avatar
0 votes
1 answer
24 views

Issuing extrinsics Polkadot.JS/api using collatorSelection

I'm trying to utilize the Polkadot.JS api to query chain parameters and issue transactions under collatorSelection an example of which is: const x = api.query.collatorSelection.candidates(); console....
Paradox - ParaNodes.io's user avatar
1 vote
1 answer
92 views

how to replace api.rpc.payment.queryInfo in polkadotjs now that it is deprecated?

In https://github.com/polkadot-js/api/releases/tag/v9.8.2 api.rpc.payment.queryInfo is marked as deprecated but how can you build a transaction through polkadotjs without using it?
Luker501's user avatar
1 vote
3 answers
122 views

Connecting to a chain on `ws` localhost with polkadot.js app fails when running in brave browser

I know this question is more related to the usage of Brave browser, but the chance of getting a relevant answer would be less in brave forums where the general understanding of polkatot-js is less ...
Simson's user avatar
  • 598
3 votes
0 answers
20 views

Does callback get called when extrinsic is in block/finalized when the transaction is retracted?

In some cases the transaction I am signing and sending gets retracted, but its my impression that they are usually included in a future block. When using polkadot js with the promise api, if the ...
yornaath's user avatar
0 votes
1 answer
37 views

connect Polkadot{js} API correctly

Your API has not been initialized correctly and is not connected to a chain the API is successfully connected and return value, but all ContractPromise cause this error. Anyone know how to solve this?
Steve's user avatar
  • 73
1 vote
1 answer
70 views

Unable to decode contract event: Unable to find event [closed]

Ive got this error on my console although transaction was succeeded. what causes this error..?
Steve's user avatar
  • 73
0 votes
1 answer
102 views

change consensus of substrate

i wanna to change my substrate chain consensus but i dont know how can i do and set my new consensus in substrate . i want to set dops consensus for my substrate chain also please guide my for ...
Kianoush Dortaj's user avatar
0 votes
1 answer
66 views

Get Block hash from transfer in polkadot.js/api

I created kusama transfer function using polkadot.js/api. I followed https://polkadot.js.org/docs/api/examples/promise/make-transfer. I can get extrinsic hash from above. I want to get extrinsic ...
Heindrick's user avatar
  • 173
1 vote
1 answer
72 views

Gov2: list of who is voting on what | Polkadot.js api

I'm building an automation for the Gov2 referenda module, testing right now using wss://governance2-testnet.litentry.io test network with polkadot.js app Differently from what the democracy module we ...
Alessio's user avatar
  • 11
0 votes
0 answers
17 views

Cannot reuse the same RPC definitions for types generation and RPC execution

I have an RPC defined for my own pallet, I use latest metadata from chain and lookup types are made automatically available. I would like to use the same RPC definitions to pass as ApiOptions to ...
digital illusion's user avatar
0 votes
1 answer
60 views

Sudo option is not showing up on PolkadotUI - Substrate

I am running a substrate-permissioned network, we configure the SUDO account using the keys on polkadot UI account and use it to perform node authorization, etc. Since last week, SUDO option is not ...
Anbu 's user avatar
1 vote
1 answer
38 views

how does work offchain in substrate ( pokadot ) [closed]

I Wanna know about off-chain in the substrate ( Polkadot ) how does work? How is it mine from the onchain ( main chain in Polkadot )? maybe somebody wants to hack the off-chain and they do it a ...
Kianoush Dortaj's user avatar
2 votes
1 answer
88 views

Informing polkadot/api about additional signed extensions

Polkadot/api has a way to detail signed extensions and I want to understand (so I can use it for our own custom signed extension) what the extrinsic and payload parameters map to. Here's an example ...
Wil W's user avatar
  • 349
5 votes
2 answers
111 views

Show custom RPCs/RuntimeAPIs in PolkadotJS UI

At the moment I try to figure out why PolkadotJS UI (https://polkadot.js.org/) is not able to show my custom RPC endpoints or runtime APIs. They are available in general and also available in the list ...
Janislav's user avatar
  • 319
0 votes
3 answers
82 views

I can't open a HRMP channel between the parachains

I am testing XCM between parachain 2000 and parachain 2001 while referencing this link, How to open HRMP channels between parachains?. But I couldn't open a new HRMP channel, I faced the "Barrier&...
TinyDev's user avatar
  • 37
0 votes
2 answers
23 views

Use the Polkadot identicon styles for Parachains

the identicon style on Parachains is not aligned with Polkadot, as you can see as below. How can parachain team make the same style or override the default settings? According to the Polkdaot.js/UI ...
Haven's user avatar
  • 103
1 vote
1 answer
34 views

Opt-out of polkadot.js/api system_health calls for wss rpc

We have been spoiled with free, almost unlimited public websocker rpcs in Kusama and Polkadot ecosystem, but this is changing fast, so we are exploring paid RPC API services. But we have noticed that ...
Yuri's user avatar
  • 173
0 votes
0 answers
20 views

polkadot.js library for planck unit conversion to DOT,KSM,WND etc [duplicate]

after querying the extrinsic events using polkadot.js API (https://polkadot.js.org/docs/api/cookbook/blocks), I get response something like below. However the amount is in planck "amount": &...
muddlebee's user avatar
2 votes
1 answer
58 views

is there any method in polakdot.js api to multi-call smart-contract's function?

Is there any method in polakdot-js api to multi-call smart-contract's function similar to https://github.com/makerdao/multicall ? I want to fetch balances of multiples psp22 token's balance. For ...
yasek's user avatar
  • 21
0 votes
1 answer
50 views

I'm getting an error with the gas limit definition when deploying a smart contract using CodePromise

Problem The following program does not work with pallet-contract "polkadot-v0.9.29". "polkadot-v0.9.27" in pallet-contract works as expected. Anyone know how to get around this ...
s.Takahashi's user avatar
0 votes
0 answers
42 views

Some RPC not shown in polkadot explorer

I was checking the rpc methods in polkadot explorer and I see a lot of rpc shown as output when queried rpc-> methods. But I don't see some of them inside the rpc field. for example rpc methods ...
kroos47's user avatar
  • 37

1 2 3
4
5
10