Skip to main content

Questions tagged [polkadot-js]

Questions about the Polkadot-JS API used to interact with Substrate-based chains using JavaScript.

Filter by
Sorted by
Tagged with
1 vote
1 answer
22 views

How to check the ordering of extrinsic payload for SCALE encoding in polkadot-sdk?

Below is something which I found in the polkadot-js api code describe('ExtrinsicPayload', (): void => { it('has a sane inspect', (): void => { // we don't expect this to fail, however it ...
muddlebee's user avatar
0 votes
1 answer
14 views

Polkadot js api not working properly causing issues after the recent upgrade

RPC-CORE: submitAndWatchExtrinsic(extrinsic: Extrinsic): ExtrinsicStatus:: 1002: Verification Error: Runtime error: Execution failed: Execution aborted due to trap: wasm trap: wasm `unreachable` ...
Ashutosh singh's user avatar
1 vote
0 answers
20 views

Is there a way to increase Requests per second (RPS)?

Is there a way to increase the requests per second (RPS) on chain after its deployment. I want to fetch the transactions and block details faster than the default value on an application that I am ...
Shubham Gupta's user avatar
0 votes
0 answers
23 views

how can i decode api.call.metadata.metadata so that its parsable?

I am trying to get the runtime calls from the runtime metadata... async function fetchRuntimeMetadata(api: ApiPromise) { const metadata = await api.call.metadata.metadata(); // i naively ...
Ramsey - Decentration's user avatar
1 vote
1 answer
64 views

Paying fees with custom asset fails

I have a runtime that allows fee payment in different assets since it implements the pallet_asset_tx_payment pallet. This works perfectly fine when the transaction is not submitted with the PolkadotJS ...
Szegoo's user avatar
  • 642
0 votes
0 answers
13 views

How to create type for AccountId32 using Polkadot-JS api

I am writing integration test using Polkadot-JS api. On the Substrate chain side, I have this structure: pub type NodeKey = AccountId32; #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, ...
Boleng's user avatar
  • 535
0 votes
0 answers
24 views

Unable to query transactions on ink contracts using !@Polkadot/api-contract

I am having troubles querying my smart contract transaction using the @polkadot/api-contract. I have a NextJS application setup and I have a private key that can be used to sign transactions. I have ...
Ahmad Bolaji's user avatar
0 votes
1 answer
41 views

Force bonding withdrawal period to 0 days

I run a local testnode using chopsticks and I want to unbond funds right after I bond them. What configuration I could use in chopsticks or RPC call I could make to make sure I can withdraw my funds ...
lvndry's user avatar
  • 101
0 votes
0 answers
14 views

i want to send XCM message from my own react app

Can anyone help on Xcm Message I want to send message from my parachain. It work when I use Polkadot.js/app.But its not working with my own frontend tool. It says incorrect format. Can anyone tell ...
manish singh's user avatar
0 votes
0 answers
14 views

Cant' verify sign with go-schnorrkel [duplicate]

I'm trying sign raw message from polkadot.js.org and verifing it from golang code. I've tried the following: signature, err := schnorrkel.NewSignatureFromHex(signatureHex) transcript := schnorrkel....
Alexander's user avatar
0 votes
0 answers
15 views

javascript api and storage pagination

I have been looking for documentation on how to retrieve storage whith pagination. for example api.query.staking.erasStakersPaged Takes an era, validator, and optional page number (I guess). As far as ...
rvalle's user avatar
  • 45
0 votes
1 answer
31 views

Show block author

I have created a new substrate blockchain using the frontier node template. https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Falice.ekratos.cat#/explorer Everything works, but in the Polkadot portal, the ...
Víctor Muñoz's user avatar
0 votes
2 answers
34 views

Get crowdloan contributors at specific block

I'm using polkadot-js to get all the contributors for a crowdloan: const contributors = await api.derive.crowdloan.contributions(paraId); However, I need to get them at a specific block. I have seen ...
magecnion's user avatar
  • 344
0 votes
0 answers
41 views

RpcError: 1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low

I created this script to set the validator keys via a CLI using an environment variable file and Polkadot.js Tools without having to change its CLI to load the seed from a file instead of just a ...
Luke Schoen's user avatar
  • 2,346
0 votes
0 answers
13 views

How do I check collators intent in polkadotjs/api like we check for validators?

I want to monitor the intent of my collators using @polkadotjs/api like I am monitoring for my validators using the below codes : async function checkValidatorIntent(url, validatorAddress) { try { ...
Salisu Bako's user avatar
1 vote
1 answer
32 views

Initiating a multisig tx from javascript

How can a multisig transaction be initiated, validated and completed, all using polkadotjs from javascript code? The info I have currently is : https://wiki.polkadot.network/docs/learn-guides-...
ytresza's user avatar
  • 63
1 vote
1 answer
45 views

connecting to local substrate-contracts-node with polkadotjs api

I'm running the substrate-contracts-node 0.40.0-17065f31ac4 with the command ./artifacts/substrate-contracts-node-linux/substrate-contracts-node --log info,runtime::contracts=debug , and am trying to ...
ytresza's user avatar
  • 63
0 votes
0 answers
27 views

Keyring-ui Error: Unable to initialise options more than once

GM! Im trying to initialice keyring, but for some reason its already inicialized. This is my code: "use client" import React, { useState, useEffect, createContext, useContext } from "...
lawyerWario's user avatar
1 vote
1 answer
41 views

Unable to sign from polkadot-js console using Talisman

When submitting a script through polkadot-js console and trying to sign using Talisman wallet, I got the error Cannot sign with a locked key pair: The script is one of the examples, where SENDER is ...
magecnion's user avatar
  • 344
3 votes
1 answer
59 views

Substrate node not propagating transactions

So we have a very strange bug that is happening when sending transaction to a substrate (crust node in this instance). We are sending signed transaction to a crust node via polkadot.js as such: const ...
Tadej Vengust's user avatar
0 votes
0 answers
16 views

Polkadot.js never connects to local instance of Chopsticks

I'm trying to test extrinsics on HydraDX chain. Chopsticks UI never returns for the types of errors I'm running into, so I'm trying to use command line. You can run a local fork with Chopsticks and ...
spazcoin's user avatar
2 votes
2 answers
51 views

Light Client (Smoldot) Connecting But Unable To Send Transactions

Implementing smoldot (substrate-connect) on a fork of the polkadot-JS. Connecting to a light node boot node works most of the time, but is intermittent. When we are able to connect via light client, ...
KathrynColleen's user avatar
0 votes
0 answers
34 views

Wallet Selector for Polkadot.js Apps UI

Are the maintainers of Polkadot.js Apps UI receptive to integrating with a wallet selector? Is there a reason why Polkadot.js Apps UI is not integrated with the Talisman Connect wallet selector?
Dan Forbes's user avatar
0 votes
0 answers
16 views

I gave an unnecessary approval, how to withdraw it using polkadot.js?

Good afternoon! Faced with the problem that I'm being stealing monthly deployments of MANTA tokens on the manta Atlantic network, I think that somewhere I gave an unnecessary approval, how to withdraw ...
Halo's user avatar
  • 1
0 votes
1 answer
40 views

How to create a same polkadot wallet from mnemonic like trustwallet using @polkadot/keyring?

I have to create a wallet of polkadot like trustwallet. I tried to create a wallet with "type: ed25519" but it also return different address. Here is the trust wallet configuration { &...
Divyang Khatri's user avatar
1 vote
0 answers
9 views

GOV1 referendum voting giving error on 0.1x voting balance

I was making a small service for calling the aye and nye and it is not working for 0.1x voting balance but working fine for every other option it is giving error propsExtrinsic.signAndSend is not a ...
Shubham Gupta's user avatar
0 votes
2 answers
24 views

Unable to connect to polkadot node running on wsl to polkadot js app

I am running polkadot-sdk on wsl I start the node: ./target/release/polkadot --dev and then when I try connecting it to polkadotjs app on browser in windows it doesn't connect It just says - "...
Rishi's user avatar
  • 1
0 votes
1 answer
16 views

How to transfer assets from parachain to relay chain

As I'm new to substrate and polkadot I don't know how to transfer assets from parachain to relay chain using xcm can anyone please help me to do this.
Preethi M's user avatar
0 votes
1 answer
33 views

How to create custom URL for my RPC node?

When I run node then I can access chain from polkadotjs/apps using 127.0.0.1:8845 (ws://127.0.0.1:8845 ) endpoints. But I want something like wss://paseo.api.integritee.network to be my endpoints. Can ...
go11li's user avatar
  • 1,241
0 votes
0 answers
22 views

SCALE Encode Tx Bytes using Polkadt.js SDK

I'm using Polkadot.js API and I have some bytes that represent a call (similar to what you get from tx.method.toHex(), that don't have the encoding details embedded into it: 0x00071054657374 I found a ...
AlbertoV19's user avatar
0 votes
1 answer
35 views

I want to Send data to relaychain from parachain?

I want to send JSON or normal String Message from Parachain to relay chain but i new in the substrate and I am finding it difficult. I am using the Polkadot-sdk template for relaychain and substrate-...
manish singh's user avatar
0 votes
0 answers
34 views

Rpc methods not decorated

Goal I'm trying to decorate the rpc methods to be able to interact with api.tx. If anyone has faced this issue, what has helped you out? Issue I'm not able to access tx method inside of api, which I ...
Peter Kim's user avatar
0 votes
0 answers
44 views

Polkadot.js extension detected but "no accounts has been injected" message

I am using chrome browser (ver. 122.0.6261.129) with polkadot.js extension. Been able to access my account without issues for over 2.5 years to view my daily increases from staking polkadot. For ...
user5236's user avatar
0 votes
0 answers
17 views

Get lock details from convictionVoting (even after deleting votes)

How can we see the lock duration for Referenda (convictionVoting) if the votes are deleted? On Polkadot and Kusama, if you delete your Referenda Votes it's not possible to see the details of the ...
DerekC's user avatar
  • 1
0 votes
0 answers
9 views

Checking 'PermissionlessAll' Settings

How to check if a stash account set the claim permissions to PermissionlessAll?
coderdraw's user avatar
1 vote
0 answers
29 views

Facing problem in fetching all Preimages using rpc

At certain time, it shows this error.
Shiv Kumar ATR646's user avatar
0 votes
1 answer
39 views

i need to find a faster way to load/show all my assets on Polakdot testnet Westend

I use Polakdot.js library to show all of my assets on the Westend testnet in my dapp. It takes around 5 seconds to load/show all my assets. For now it seems to me that this library doesn't have the ...
Nikola Grujičić's user avatar
2 votes
1 answer
100 views

Facing issue in connecting polkadot UI with nodes running on gcp [updated]

I'm running 3 validator nodes on different vm instances on gcp but I'm not able to connect these node with the polkadot UI. Here are the commands which I'm using to run the nodes: ./target/release/...
Deepak Chaudhary's user avatar
0 votes
1 answer
72 views

transaction failed Error: createType(SignerPayload):: Struct: failed on assetId: Option<AssetId>:: Unable to construct number from multi-key object

Does anyone know how to solve this error? I am trying to pay transaction fees with sufficient tokens on Westend Asset Hub by passing an asset MultiLocation to the options in the signAndSend function. ...
jameshih's user avatar
1 vote
0 answers
48 views

How to decode contract storage returned data

How do i decode this Hex string to String. It is storage data returned from a contract, using Polkadot-JS. { Ok: { flags: [], data: '...
Woodfish's user avatar
  • 121
2 votes
1 answer
85 views

How do I get a Used Fee?

I see this answer and recognize that partialFee + tip = Used Fee. Estimated fee and Used fee But actually it is not. When I get the Extrinsic partialFee below, I get the Estimated Fee, not the Used ...
Koichi Tsujino's user avatar
0 votes
1 answer
31 views

move Astr EVM from Metamask to Polkadt.js

I have Astar(Astr) on as an EVM on Metamask and want to eventually take profit on some of it and move that portion to USDT. My plan is to swap it for DOT first on Polkadot.js wallet. The problem is ...
Sal's user avatar
  • 1
1 vote
1 answer
44 views

Property 'isError' does not exist on type 'Codec', when showing sudo events

I try to implement How do I get the Result of a Sudo event? in a function shown below. It's mostly an exact copy from the cookbook with some boilerplate. export const sudo = async ( api: ...
Zabuxx's user avatar
  • 125
1 vote
1 answer
57 views

How can i update polkadot js metadata from inside my app?

i need to check in my dapp when the metadata of my wallet is expired and show a popup telling the user that he needs to update his metadata by clicking an update button on that popup. i need to do ...
Nikola Grujičić's user avatar
2 votes
0 answers
34 views

how can we add external links on the proposal?

I have created a custom chain using Substrate version 0.9.36, and I've been using the governance module. When adding a proposal, there's a default column for external links set to "none." I ...
Gagandeep Dogra ATR594's user avatar
0 votes
1 answer
21 views

how to find bonded and free funds in a nomination pool account using Polkadot JS API?

how to find bonded and free funds in a nomination pool account using Polkadot JS API? from https://staking.polkadot.network/#/pools
muddlebee's user avatar
1 vote
2 answers
96 views

FATAL: Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure

I am trying to access my polkadot.js wallet, but keep recieving this messagge:FATAL: Unable to initialize the API: disconnected from wss://1rpc.io/dot: 1006:: Abnormal Closure I cannot connect wallet ...
Miguel's user avatar
  • 11
1 vote
1 answer
64 views

Getting NFT metadata in polkadotjs with typescript

I'm trying to call api.query.nfts.itemMetaDataOf<type>(collection_id, token_id); via typescript and polkadotjs. It's not clear which type I'm supposed to use for the response. At least I can't ...
Arjan van Eersel's user avatar
3 votes
1 answer
93 views

Subsrate Node Build error: cannot find macro `thread_local` in this scope

Whole error: error: cannot find macro `thread_local` in this scope --> /home/hardeep/.cargo/git/checkouts/substrate-7e08433d4c370a21/948fbd2/primitives/externalities/src/scope_limited.rs:22:1 ...
Gurtej Singh's user avatar
2 votes
1 answer
93 views

How to interact with EVM contracts using polkadotJS

Is there a tutorial explaining how to interact with EVM smart contracts using PolkadotJS?.
ChristianArg's user avatar

1
2 3 4 5
12