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
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 ||…
0
votes
2 answers

Latest polkodotjs.org does not connects to Pirl Coin (substrate 2) network

Can you inspect and explain the problem not to get error? This is Pirl Source Code https://github.com/pirl/pirl-2_0 (at v0.8.25-ad031f3) This is pirl polkadotjs.org clone at version at (api v2.2.2-2 ,apps v0.62.2-2 check right top at…
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…
0
votes
0 answers

Struct: failed on 'args':: Struct: failed on 'dest'

While trying polkadotjs library it gives error during transfer. This is my code: const { ApiPromise, WsProvider, Keyring } = require("@polkadot/api") ;(async () => { const wsprovider = new WsProvider("ws://127.0.0.1:9944") const api = await…
Amiya Behera
  • 2,210
  • 19
  • 32
0
votes
1 answer

Unknown types found, no types for DepartmentDetails

I am trying to use struct in substrate #[derive(PartialEq, Eq, PartialOrd, Ord, Default, Clone, Encode, Decode, RuntimeDebug)] pub struct DepartmentDetails { pub name: Vec, pub location: Vec, pub details: Vec, pub…
Amiya Behera
  • 2,210
  • 19
  • 32
0
votes
1 answer

Is the following method of insert Vec to hash map efficient?

I have following variable in decl_storage: Candidate get(fn candidate_name): map hasher(blake2_128_concat) T::AccountId => Vec; This is my decl_module function: #[weight = 10_000 + T::DbWeight::get().reads_writes(2,2)] pub fn…
Amiya Behera
  • 2,210
  • 19
  • 32
0
votes
2 answers

How to use build in decl_storage?

In substrate pallets, build is often used in decl_storage. e.g. pub ReferendumCount get(fn referendum_count) build(|_| 0 as ReferendumIndex): ReferendumIndex; What does the build method do, how and when it is used?
Amiya Behera
  • 2,210
  • 19
  • 32
0
votes
1 answer

Polkadot error: could not compile `zeroize` OR file too small to be an archive, could not compile `ring`

I'm going through the "Hacking on Polkadot" section of the read me of Polkadot repo, I try to cargo build --release which didn't work so i tried cargo build here are the respective errors i got: After cargo build --release i get this error: error:…
0
votes
2 answers

Match by call name and parameters, for a call from other pallets

I have a module method that associates fixed fees to Calls from various pallets. So I'm trying to match a Call passed to my method as a parameter by pallet, Call name, and Call parameters. Something similar to this: impl Module { …
Nicolas Marshall
  • 4,186
  • 9
  • 36
  • 54
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…
0
votes
0 answers

Sorting IterableStorageMap

IterableStorageMap doesn't support ordering. How to sort the values of IterableStorageMap in ascending or descending order? https://substrate.dev/rustdocs/v2.0.0/frame_support/storage/trait.IterableStorageMap.html
Amiya Behera
  • 2,210
  • 19
  • 32
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/
0
votes
1 answer

When Set Up my PC in windows and Compiling Substrate, Git Cmd can not execute [make init] and [make build]

Steps can be found at https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/setup I got stuck at CompilingSubstrate / Step2:Initialize your WebAssembly build environment git CMD Output: C:\Users.....>make init 'make' is not…
wyinuk
  • 1
0
votes
1 answer

How to restart a substrate node

I'm confused, how do I restart a substrate node? I use ctrl c in the terminal window where the node is running to stop it and then I write the commands which I used to run the node in the first place, is that the way to restart the nodes?
beqaabu
  • 74
  • 1
  • 8