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
1
vote
1 answer

What is the use of ValueQuery in FRAME2 storage?

FRAME2 storage get defined using following syntax: #[pallet::storage] type SomePrivateValue = StorageValue<_, u32, ValueQuery>; #[pallet::storage] #[pallet::getter(fn some_primitive_value)] pub(super) type SomePrimitiveValue = StorageValue<_,…
Amiya Behera
  • 2,210
  • 19
  • 32
1
vote
2 answers

How to withdraw rewards from Substrate private node?

I run 2 private nodes follow this tutorial of Substrate. When I send funds from one account to another or execute a contract function. Transactions include a fee. However, I don't know who will receive these fees and how to withdraw these rewards.
Linh Tran
  • 21
  • 1
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
0 answers

(node:21899) UnhandledPromiseRejectionWarning

I am building a blockchain project in Substrate. I have created a pallet named carpooling and defined some dispatch functions in the pallet. Now I want to call the dispatch function named book-ride from a polkadot js API. Can anyone suggest to me…
Aman Verma
  • 133
  • 8
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

What is the diff b/w signed txns with no fees and unsigned txns with signed payloads?

Reading the documentation about off-chain workers in Substrate recipes, it is stated that we can generally make three types of transactions to include non-deterministic data from outside the chain into the blockchain. The three types being: Signed…
Jdawg287
  • 117
  • 5
1
vote
1 answer

What is meant or being referenced by the DOLLARS, CENTS and MILLICENTS terminology in substrate?

Many substrate cryptocurrencies contain code referencing DOLLARS, CENTS and MILLICENTS, eg: pub const UNITS: Balance = 10_000_000_000; pub const DOLLARS: Balance = UNITS; // 10_000_000_000 pub const CENTS: Balance = DOLLARS / 100; …
grenade
  • 31,451
  • 23
  • 97
  • 126
1
vote
2 answers

web3.js client library for PolkaDot

web3.js is 1 of 2 client libraries for connecting to Ethereum-compatible blockchain. https://github.com/ChainSafe/web3.js. (Other is ether.js) The author ChainSafe https://chainsafe.io/ says: The only blockchain R&D firm with a multi-chain…
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
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

Polkadot node --dev mode speed up block creation

I am running the Polkadot node in --dev mode for the purpose of running some automated tests of a system that moves DOT between different accounts and check balances. The logic of the system considers a transaction to be "confirmed" when 3 more…
messyshed
  • 11
  • 1
1
vote
1 answer

Genesus Config - Substrate node template - no account balances

I am learning substrate and just upgraded to the latest version 3.0. I have a fresh instance of the Substrate node template - using Substrate 3.0 and Frame 2.0 from GitHub. I have built the library I am starting the node template…
GloryDev
  • 670
  • 5
  • 8
1
vote
0 answers

How to integrate a 3rd party consensus pallet library compiled to WASM into substrate

I was playing around Substrate and I was wondering whether it is possible to integrate a 3rd party consensus library which I have compiled to WASM (Web Assembly) as a Pallet in substrate. I know it is possible to integrate smart contracts already…
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
0 answers

How to convert AccountId to Vec or vice versa

I have a function which takes in T::AccountId type Citizen get(fn candidate_name): map hasher(blake2_128_concat) T::AccountId => Option>; e.g. fn add_count(origin, account:T::AccountId, phrase: Vec) { // I need to…
Amiya Behera
  • 2,210
  • 19
  • 32
1
vote
1 answer

Substrate - finalized is zero

2021-04-11 00:57:24 ✨ Imported #21 (0x5294…9b0d) 2021-04-11 00:57:25 Idle (0 peers), best: #21 (0x5294…9b0d), finalized #0 (0xd6bc…1466), ⬇ 0 ⬆ 0 2021-04-11 00:57:30 Starting consensus session on top of parent…