Questions tagged [substrate-front-end]
The substrate-front-end tag has no usage guidance.
52
questions
1
vote
1
answer
18
views
Extrinsic with BalanceOf<T> and UI
Many Substrate pallets extrinsics take a Balance type, for example balances->transfer or bounties->create.
The Polkadot/substrate Development UI somehow detects that it is a Token related field ...
2
votes
2
answers
44
views
How to imagine a real Substrate app?
How to imagine a real Substrate application?
I am trying to make an application, where you can trade your own product. You can advertise product, buy, list, see your earlier purchases, etc...
If I ...
0
votes
0
answers
6
views
How to get Typegen to use the Custom RPC Runtime
We have implemented custom template pallet rpc methods and they are visible when doing a call to the node on rpc.methods
we get
template_sum5
template_sumAndStore
however typegen is not adding them......
0
votes
0
answers
22
views
Build a blockchain
I'm following substrate documentation in that build a blockchain tutorial while following the monitoring node metrics tutorial.
I got stuck while installing prometheus on my ec2 instance is there any ...
1
vote
1
answer
27
views
I got this error while building a blockchain (building a local blockchain)
when i run node template without --ws external its producing blocks but when i run with --ws external its giving me error please help me fix this im new to substrate.
1
vote
1
answer
56
views
How to pass value as a argument in send transactions?
An error occurred: 'Expected 2 arguments for the contract message 'vote', but only 1 was provided.First argument was number type, and the second one was Enum . This error arises when attempting to ...
0
votes
1
answer
27
views
While authorizing specific nodes in building a blockchain i got the following error
I got this error while authorizing specific nodes in building a blockchain.
It gives me error like this.
error: failed to select a version for `bounded-collections`.
... required by package `sp-...
0
votes
1
answer
19
views
how to query in the substrate node?
I want to get collection data using collectionId 1
the collection was created on the on the node already with the id 1. How can I do this is substrate? Any CLI tools?
1
vote
0
answers
52
views
How to make substrate-node-template accessible via wss connection?
I just ran substrate-node-template on dedicated server and connected with substrate-frontend-template. Everything works fine with http(ws), but when I try to connect via https(wss) it's not working(?) ...
1
vote
2
answers
87
views
Reading contract value returns null
Facing an issue while trying to query for a value in my contract. The value keeps getting retuned as null with an error. However, it works fine on substrate Contracts UI
Front end Dapp :
const ...
2
votes
2
answers
117
views
How to start substrate-node-template and substrate-front-end-template remotely?
I want to start my own blockchain. I try to start substrate-node-template and substrate-front-end-template remotely, but there is guide instructions only for local machine. I installed and compiled ...
1
vote
1
answer
104
views
How to interact substrate node with reactjs frontend?
In ink! smart contract, we upload .contract file on chain and get the deployed contract address and use metadata.json file in frontend to interact with contract. Can someone tell me what's the ...
5
votes
1
answer
44
views
How do I get the currently logged address in front end template?
What I´m trying to do is to condition some option/modal to be shown in the screen depending on the logged user/account being the owner or not so to have something similar to:
accountPair.address === ...
2
votes
1
answer
40
views
Output null when using ContractPromise for ink! v4 smart contract
I create a smart contract using ink! v4.2 and deploy it using contracts-ui.substrate.io
Then in my front (which uses @polkadot/api-contract: 10.7.2, @polkadot/api: 10.7.2) I run this code:
await ...
3
votes
1
answer
53
views
Cannot connect to PJS Apps or Substrate front-end template with a custom endpoint
I have set up a Network of two Nodes in a local Network, but I cannot get the Polkadot Block explorer (polkadot.js.org) or the substrate-Front-End-Template to connect to it.
the polkadot app ...
0
votes
1
answer
98
views
how to fix transactionPaymentApi.queryInfo runtime call issue?
api.tx.balances.transfer(recipient, new BN(txAmount)).paymentInfo(sender)
When I call paymentinfo to get a transaction fee, I got this error.
Error: The transactionPaymentApi.queryInfo runtime call is ...
1
vote
1
answer
117
views
why the subxt can not decode metadata
Here is test demo, but always fail to run.
Cargo.toml
[dependencies]
yew = { version = "0.20.0", features = ["csr"] }
gloo = "0.8.0"
wasm-bindgen-futures = "0.4.32&...
2
votes
1
answer
100
views
How to use subxt in yew.rs front-end app
Here is test demo, but always fail to run.
Cargo.toml
[dependencies]
yew = { version = "0.20.0", features = ["csr"] }
gloo = "0.8.0"
wasm-bindgen-futures = "0.4.32&...
2
votes
2
answers
104
views
Decode preimages Bounded Dispatchable Call on a client side
I'm using Bounded trait from preimages frame that allows to store dispatchable calls, e.g. similar to the one that is used in pallet-democracy:
pub type CallOf<T> = <T as frame_system::Config&...
2
votes
2
answers
104
views
Security discussion with mnemonic in polkadot extension
Does the extension save mnemonic in the browser?
If yes, is it safe?
1
vote
1
answer
58
views
I am trying Substrate Kitties Workshop
I am trying substrate kitties Workshop. After setting environment and paste the bare-bone code of kitties pallet , when I run cargo build --release the following error occur after 2-3 minutes when ...
2
votes
1
answer
35
views
How to use polkadot{.js} substrate methods in itraction with kusama's gov2
Until now, to follow the referendums through the polkadot.js api, I was using storage methods that are part of the default Substrate runtime (located here: https://polkadot.js.org/docs/substrate/...
2
votes
1
answer
4k
views
Usage Error: Couldn't find the node_modules state file - running an install might help (findPackageLocation)
Prior to cloning the substrate-front-end-template repo with tag "monthly-2022-02" I installed the following since I was building it from a Dockerfile using pre-built Docker image node:...
4
votes
2
answers
220
views
How to decorate RPC correctly?
The rpc methods (showing in rpc_methods), are still not showing in their own area, after (attempting to) decorate the rpc.
I have custom rpc on a substrate template.
Here are the rpc_methods:
I have ...
0
votes
1
answer
61
views
Add Validators to your substrate node template
I generate key pairs on my first machine and modify the customspec.json and generate customspecRaw.json and distribute my customspecRaw.json to other machines I want to add. Okay My question is that ...
2
votes
1
answer
50
views
Querying StorageMap by Id
Having storage like
#[pallet::storage]
#[pallet::getter(fn account_assets)]
pub type AccountAssets<T: Config> = StorageMap<
_, Twox64Concat,
T::AccountId, OwnedAssets<T>,
...
0
votes
1
answer
36
views
connect custom frontend to my local substrate
I Created custome pallet with substrate in my local system .
I gonna to connect my custome front-end ( Angular ) to my local substrate .
i tryied to do it in angular with these codes :
import { ...
0
votes
2
answers
93
views
How to remove account using polkadotjs? What function should I call to forget an account?
I added a new account using this command in PolkadotJS.
const { pair, json } = keyring.addUri(mnemonic, 'myStr0ngP@ssworD', { name: 'mnemonic acc' });
And now, I want to forget the account.
I used ...
0
votes
0
answers
29
views
Is there a way to create a peer to peer network on top of substrate?
Most of substrate tutorials are based on on-chain logic so there's not much information on this topic. Is there a way to use Substrate's in-built p2p network for other purposes such as constant ...
1
vote
3
answers
274
views
Docker container...-p 9944:9944 running Node Template not working on polkadot js apps
I'm trying to run a substrate node through docker container but i am not able to with this command:
docker run -p 9944:9944 -p 30333:30333 -p 9933:9933 -p 9615:9615 docker.io/decentration/supersig-...
1
vote
1
answer
42
views
Display type alias for primitive types
I have observed few pallets have type alias for primitive types for chain state.
For eg- Grandpa pallet has one storage setIdSession which shows type as SetId even though its primitive type is u64.
...
0
votes
1
answer
56
views
Is there a way to allow temporary negative balances?
I would like to do two things;
On wallet generation, I would like to flag whether the wallet owner is corporate or consumer, AND
If corporate, allow balances to temporarily (~month) be negative
Very ...
1
vote
1
answer
159
views
Integrate @polkadot/api with Vuexy React Template
I try to use PolkadotJs with my website create with Vuexy React but i have this error:
./node_modules/@polkadot/api/packageInfo.js 6:14
Module parse failed: Unexpected token (6:14)
File was processed ...
4
votes
3
answers
703
views
How can I get all items in a storage map?
How can I get all items in a storage map? In polkadot-js, can we choose a storage map and give no id and its return all items? How can I do it like that?
3
votes
1
answer
61
views
How can I send a transaction with vector of tuple from frontend (react)?
How can I send a transaction with a vector of tuples like Option<Vec<(T::AccountId, u8)>> from frontend (react)? What about None and other types js don't have? Is there any site I can look ...
1
vote
1
answer
234
views
Error Connecting to Substrate Connection to websocket 'ws://127.0.0.1:9944/' failed
When running the tutorial for substrate-frontend-template in Chrome/macOS, it doesn't load due to a websocket error. The tutorial says to use "yarn start" which invokes: "react-app-...
0
votes
1
answer
90
views
"system:ExtrinsicFailed" error when submitting transactions
I'm trying to call the setName method of nicks pallet:
However, when I run click "Signed" I get the error on the right, which is:
system:ExtrinsicFailed
[{"Module":{"index&...
1
vote
1
answer
60
views
Create claim not working in "Proof of Existence" tutorial
I'm at the very last stage of this tutorial to make a custom pallet and have tried running Substrate frontend template in my browser. I'm using this code for TemplateModule.js, but when I try to ...
1
vote
0
answers
27
views
Add custom type to the substrate-front-end-template
is it a new approach to add the custom types to the substrate-front-end-template ?
the ones I found in past examples of Kitties seem don't work any more.
I try adding them to the PolkadotJS and to the ...
0
votes
1
answer
180
views
Start the front-end template : error:0308010C:digital envelope routines::unsupported
OS : centos stream 9
Rust : 1.61
substrate : 2022-05 3.0
polkdadot : 0.9.20
substrate-front-end : 2022-02
nvm node nodejs : 16.14.0
success : Start the local Substrate node
when i Start the front-...
1
vote
1
answer
34
views
Recurring Proposal on Substrate Frontend
So from polkadot js (UI) while creating treasury proposal and want to make it recurring per cycle, you do you achieve that? Say set the segment input in the picture attached to any positive integer, ...
5
votes
1
answer
129
views
How to upload contract using a custom made frontend?
I am making a new UI for substrate based blockchain, and found the code here to upload a Smart Contract.
The code allows you to either upload metadata.json && cont.wasm files or a cont....
1
vote
1
answer
68
views
Extending front-end-template with custom RPC
My chain currently has a couple of custom RPC interfaces that I'd like to interact with using substrates front-end-template.
I'm aware that the src/config/common.json file requires modification, which ...
1
vote
1
answer
76
views
substrate-front-end-template, yarn install failure [closed]
tom@tompc:~/Downloads/substrate-front-end-template$ yarn install
00h00m00s 0/0: : ERROR: [Errno 2] No such file or directory: 'install'
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: ...
2
votes
1
answer
111
views
How to write a custom query for storage?
When you declare a storage say
pub type Something<T> = StorageValue<_, u32>;
We get query function "something".
But I want to write some specific functions that reads storage ...
2
votes
1
answer
86
views
substrate-frontend-template and polkadot-js incompatibility
Tests are not working in substrate-frontend-template.
Use template:
https://github.com/substrate-developer-hub/substrate-front-end-template
Uncomment tests in
substrate-front-end/src/tests/App.js
...
8
votes
3
answers
72
views
How can a Dapp know if the node produces blocks automatically or not?
The substrate-contracts-node changed consensus to manual-seal starting v0.11.0, and now produces blocks only when a transaction is submitted.
Because we were relying on the block 1 hash for some logic,...
9
votes
1
answer
413
views
How to get the balance of an account at a particular nonce using Polkadot.js API
I want get the balance of an account address at a particular nonce.
I only know how to get the latest balance of an account address and its latest nonce (total number of transactions sent from that ...
5
votes
1
answer
176
views
Best way to configure Webpack4 and @polkadot dependencies in a webworker?
I am in the process of updating a react-app from polkadot.js api: 6.9.2 -> 7.12.1. Following some advice in the docs: https://polkadot.js.org/docs/usage/FAQ/, I updated my customize-cra application ...
7
votes
1
answer
210
views
Babel loader issues with polkadotjs and create-react-app
We're working to update our dApp to node 16 and update the dev config to point to the latest polkadot dev config.
We are using customize-cra to customize the babel loaders which looks partially as:
...