Questions tagged [polkadot-js]

This library provides a clean wrapper around all the methods exposed by a Polkadot/Subtrate network client and defines all the types exposed by a node.

Useful Links

88 questions
1
vote
1 answer

Polkadot.js "signAndSend" function causes "signer" option to compile error

I'm using the next.js framework to create a front-end application for polkadot.js. I'm trying to get an account from extention and implement the "signAndSend" function to call the function of the contract I implemented. I'll paste the code snippet…
s.Takahashi
  • 469
  • 4
  • 15
1
vote
0 answers

Contract call returns error "Found input with 28 bits, expected 8". Polkadot.js and ink contracts

as the title suggest, Im trying to call PSP22 token contract and read balanceOf() function, but i get error that im passing a too big of a input (27 instead of 8) Im trying to invoke balanceOf() PSP22 ink! contract. When i initializing the token it…
1
vote
0 answers

Polkadot.js api how to get the balance of an account at a particular nonce

I am trying to get the balance of a wallet account using the wallet address and it's nonce. For example I can get the latest balance and the total number of nonce of a wallet address with this. const { nonce, data: balance } = await…
Lee
  • 39
  • 7
1
vote
1 answer

How can I query contract info with the latest polkadot-js and substrate contracts node?

I've been unable to query my existing contract recently due to Unable to create Enum via index 128, in Alive, Tombstone when using api.query.contracts.contractInfoOf. I get this error both on the command line and in the polkadot-js apps…
forgetso
  • 2,194
  • 14
  • 33
1
vote
0 answers

How do I get a list of all accounts in a Substrate based Parachain?

I want to get a list of all accounts in a parachain. I am running a full node on the Kusama network. How do I get a list of all accounts in a parachain? I tried reading a few documentation pages but all are focused on making transfers but none…
Aviral Srivastava
  • 4,058
  • 8
  • 29
  • 81
1
vote
1 answer

Why the transferable to smart contract is deducted?

I uploaded and created a new smart contract. I sent 1000 units to this smart contract. However when the contract is deployed the transferable is not equal to 1000. And when I execute any function it also deducts the transferable. Is there any way…
Linh Tran
  • 21
  • 1
1
vote
2 answers

Can we run a substrate full node(where all pallets are implemented) instead of starting with substrate-node-template?

Can we run a substrate full node(where all pallets are implemented) instead of starting with substrate-node-template ?
1
vote
1 answer

How to get the account data of all accounts in Polkadot using py-substrate-interface

I want to do a couple of things. First, get the data of all the accounts to do a wealth distribution analysis. Second, get the data of all the accounts who have attached identity information. I am able to do basic stuff using py-substrate-interface…
1
vote
0 answers

Java offline generation polkadot address

I used SCALE Codec for java offline address generation. but I see that generated address and polkadot.js generated address are not alike. I use bitcoinj 's MnemonicCode generation mnemonic, and I toseed the mnemonic get seed; this is my…
liutianv1
  • 11
  • 2
1
vote
5 answers

When execute Delegator example, I get a "ContractTrapped" error

Build Delegator Contracts... Git clone "https://github.com/paritytech/ink.git". Move "examples/delegator". Build contracts by using "build-all.sh". Deploy & Execute Excecute Substrate-Node-Template with Contract Pallet. Visit Polkadot/Substrate…
s.Takahashi
  • 469
  • 4
  • 15
1
vote
1 answer

polkadot.js: Unable to create Enum

types.json: { "WorkerId": { "_enum": { "Single": "Single", "Double": "Double" } }, "Single": "u8", "Double": "(u8, u8)", } substrate code: #[pallet::storage] #[pallet::getter(fn worker_infos)] pub type WorkerInfos
1
vote
1 answer

Polkadot websocket API doesn't listen for new blocks

Im using the polkadot.js api, running from a shell, and expecting to get multiple "Chain is at block #12345" messages. But i only get 1 of these messages and I do not know why. I'm running a Polkadot node using the following docker command: docker…
John
  • 949
  • 1
  • 9
  • 20
1
vote
1 answer

Polkadot-JS Import BIP44 Address w/Derivation?

SafePal S1 uses the following derivation path according to their website for Polkadot: m/44h/354h/0h SafePal is using BIP39/44 mnemonic phrase standard. I am trying to import my mnemonic phrase into the Polkadot-JS Chrome Extension but have no…
nukalov
  • 1,309
  • 13
  • 18
1
vote
0 answers

How to call Constants Declared in Metadata Of substrate Node

I am using this library https://github.com/centrifuge/go-substrate-rpc-client where we fetch Latest Metadata via this call in my gloang code api.RPC.State.GetMetadataLatest(). This will return me metaData result for the connected substrate node from…
1
vote
2 answers

Could not convert parameter `tx` between node and runtime: No such variant in enum MultiSignature

Hi I am getting the below error in polkadot-js, when I am trying to transfer the balance from Alice to Dave (or any other transfer). Error : balances.transferKeepAlive 1002: Verification Error: Execution: Could not convert parameter tx between node…