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.
Questions tagged [polkadot-js]
88 questions
0
votes
1 answer
how to query all staking rewards on polkadot.js given an access to archive node
so I'm looking at this api docs on polkadot.js https://polkadot.js.org/docs/substrate/storage#staking
but I could not figure which one to use to actually query all the staking rewards given an account ID / publish address.
I was thinking I would…

jhon alino
- 85
- 1
- 9
0
votes
1 answer
Creation event of simple struct is not emitted
I have a simple struct in a custom pallet:
#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq)]
pub struct Kitty(pub [u8; 16]);
I am able to create a new Kitty from polkadot.js web app and check that the KittyCreated event is emitted…

mastro
- 619
- 1
- 8
- 17
0
votes
1 answer
Trying to deploy a contract with polkadotjs but returns CodeSubmittableResult without much info
I am attempting to deploy a smart contract on my substrate chain through polkadotJS.
const unsub = await code
.tx.new( { gasLimit: 200000, value: 5000 }, true)
.signAndSend(alicePair, (result) => {
if (result.status.isInBlock ||…

Manolo Viso Romero
- 131
- 1
- 13
0
votes
1 answer
how to configure enum in polkadot.js
Following is my substrate code:
pub type ItemId = u8;
#[derive(Encode, Decode, Copy, Clone, PartialEq, Eq, RuntimeDebug)]
pub enum PoolId {
TX(ItemId),
}
How to configure enum type in the json file? https://polkadot.js.org/apps
This is not…

dev-for-fun
- 35
- 6
0
votes
1 answer
Transferring units from ALICE to BOB asking password
I am trying to transfer some units from ALICE to BOB on local network but could not find password for ALICE or any of the pre configured accounts in documentation, also tried with empty password and getting the error as shown in the attached…

Kiran Kumar HM
- 41
- 3
0
votes
1 answer
How to create custom token in substrate
How to create custom token in substrate in compliance with ERC20, for example custom tokens can be named as
Quanta American Dollars
Quanta British Pound.
Quanta Rupees
Quanta Euros
Quanta Yen

starwar1
- 21
- 1
0
votes
1 answer
How to list the nodes created
I followed the below link and successfully create two nodes, but it looks like Alice and Bob is hardcoded!. Is there a way to list down the nodes in the network?
https://substrate.dev/docs/en/tutorials/start-a-private-network/

Kiran Kumar HM
- 41
- 3
0
votes
1 answer
How to update state of reactjs in realtime from an polkadotjs rpc api?
const unsubHeads = await data.rpc.chain.subscribeNewHeads((lastHeader) => {
console.log(`: last block #${lastHeader.number} has hash ${lastHeader.hash}`);
});
I'm using polkadot js rpc api for updating my reactjs…

sachin murali
- 469
- 2
- 7
- 22
0
votes
1 answer
How do I get difficulty over time from Kulupu (polkadotjs)?
// Import
import { ApiPromise, WsProvider } from "@polkadot/api";
// Construct
/*
https://rpc.kulupu.network
https://rpc.kulupu.network/ws
https://rpc.kulupu.corepaper.org
https://rpc.kulupu.corepaper.org/ws
*/
(async () => {
//const wsProvider…

chovy
- 72,281
- 52
- 227
- 295
0
votes
1 answer
Subkey signature cannot be verified with polkadotjs keyring and vice versa
I would like to understand why is it not possible to verify a subkey signature with the polkadotJs keyring.
When it is signed with the keyring everything is good:
const msg = "message to be verified"
const keyring_signature =…

whalelephant
- 59
- 3
0
votes
1 answer
How do I sweep a Polkadot wallet?
I want move all funds from one wallet to another, without leaving any DOT dust behind. How do I do a "send all" with the Polkadot JS UI?

Swader
- 11,387
- 14
- 50
- 84
-1
votes
1 answer
How to open localhost:8000 using VPS Ubuntu
hello I need help how to open http://localhost:8000 from my pc. because my project polkadot substrate installed on a VPS Ubuntu, after I try to open IP:8000 it also doesn't work
Images
-1
votes
1 answer
How to launch a substrate blockchain as a test network?
Please forgive my stupid question here.
To launch my node-template under the TEST NETWORKS category, do I need to host my own polkadot/apps like what GeekCash did?
What is the correct command to perform on substrate-node-template? the examples are…

Jitterbug
- 302
- 1
- 11