Questions tagged [polkadot]

Use this tag for questions about the Polkadot blockchain network platform. General questions about Polkadot should be asked at https://substrate.stackexchange.com

203 questions
2
votes
2 answers

How to generate types.json in substrate

In polkadot-js has provided for developer to define custom types in the pallet, so that polkadot-ui can understand those types (it means can use some underlying API polkadot-js). These types are defined using the json format. This is example { …
CocDap
  • 180
  • 4
2
votes
2 answers

Why can't I send an extrinsic from py-substrate-interface?

Hello guys I am working on submitting an extrinsic via the py-substrate-interface, but for some reason I keep getting an error while following the sample mentioned here. My code is as follows: def send_funds(self, destination, amount): …
Jdawg287
  • 117
  • 5
2
votes
1 answer

how to query all current polkadot accounts with polkadot js?

I'm looking to query all Polkadot accounts and so I can sort them by balance. which javascript api should I use? I'm not just looking for accounts with identities. I'm looking for all accounts thank you very much
jhon alino
  • 85
  • 1
  • 9
2
votes
1 answer

build substrate ink contract

I trying to create a substrate smart contract by following the tutorial as described in https://substrate.dev/substrate-contracts-workshop/#/0/setup. I have installed all the dependencies on Windows 10 OS. However, the process fails after completing…
2
votes
1 answer

Is there way to adjust block interval in substrate?

I know the default block interval in a substrate-based chain is 6s. My question is whether it can be customized or not. If could, how can I do it? It must be set before the chain start, or you can dynamically change it over the node running.
2
votes
1 answer

How to get the Polkadot address from the polkadot public key? Polkadot.js

I tried @polkadot/util-crypto lib and @polkadot/keyring to convert, public key to polkadot address but no help. Is there any method provided by the polkadot.js? Steps on how to get the address will also work great. Thank you
Shubham Chadokar
  • 2,520
  • 1
  • 24
  • 45
2
votes
1 answer

Substrate transaction per second performance

Hey guys I have a performance related question. I am running 2 aws instance (t2.2xlarge) with 30GB storage. I am running a v2.0 node (branched from master a few days ago) on each with the default setup and i am testing how many transactions per…
Nahu
  • 143
  • 10
2
votes
1 answer

How does the fork choice in Polkadot work?

Polkadot has GRANDPA for finalizing and BABE for block production. BABE is said to be able to keep producing blocks even without GRANDPA and even without a majority of the validators online. How does BABE know which chain to keep building on?
Swader
  • 11,387
  • 14
  • 50
  • 84
1
vote
0 answers

running substrate benchmaks errors at setjmp file not found

Working on substare node-template , When I run benchmark I get the below error. It says 'setjmp.h' file not found. I am working on Macbook pro $cargo build --release --features runtime-benchmarks error: failed to run custom build command for…
Neo
  • 717
  • 2
  • 11
  • 26
1
vote
0 answers

How to interact with Polkadot network using .Net

I need to interact with Polkadot network using .Net. More specifically, I need to estimate a transaction fee for simple DOT transfer transactions. I found only one .Net wrapper for Polkadot api https://github.com/usetech-llc/polkadot_api_dotnet But…
1
vote
1 answer

Get relay chain blocknumber from parachain in substrate pallet

The title is quite self-explanatory, how can i get the blocknumber of the relay chain I'm connected to (Kusama) instead of my local blocknumber ? All of this in a substrate/cumulus environment
Nathan
  • 493
  • 1
  • 3
  • 13
1
vote
0 answers

Is there a way to cancel or override a jsonrpc call?

I'm using Polkadot.js in my project, and I have a function where user click to filter assets by categories. The issue is if the user click very fast, two rpc calls will be dispatched, instead of the later call overriding the first call, this will…
cfx_p
  • 26
  • 1
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
1 answer

yarn add installs multiple versions, [how to] ensure that there is only one installed?

I am trying to run this tutorial and I am getting a slew of warnings about conflicting packages (please see below). When I run yarn dedupe I get a frustrating message error The dedupe command isn't necessary. yarn install will already dedupe. …
Roger J Bos CFA
  • 474
  • 4
  • 16
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