Questions tagged [json]
The json tag has no usage guidance.
9 questions
6
votes
2
answers
449
views
How to overwrite endowed account balances using additional accounts and balances from a JSON file for genesis block inclusion?
My goal is to allocate a balance in the genesis block to both:
A list of endowed accounts already included in the chain specification
chain_spec.rs
A list of further accounts and balances included in ...
4
votes
1
answer
47
views
Facing difficulty in fetching data through lite_json
Api data
{
"student": [
{
"listing": {
"price": 54,
},
},
]
}
I’m using below code for fetching data till listing:
let student = match val....
2
votes
1
answer
64
views
Tool to generate human readable JSON of Substrate node metadata from a file?
The cli tool subwasm can get the metadata from a live node (url) and output JSON that is human readable. However, to troubleshoot various issues, I need a tool that generates human readable JSON from ...
2
votes
1
answer
84
views
Substrate - Change logging library
Is there some way to change the logging library or at least the logging format? I need a way of having the logs output in JSON format.
What I tried:
Installed the tracing-subscriber pallet with json ...
1
vote
1
answer
171
views
js polkadot/api reading objects from the chain
Could you please tell me how convert a queryResult from Substrate storage into js object?
i use these two functions to get the object from chain into js object
queryResult.toHuman() function, but it ...
1
vote
1
answer
42
views
tokenDecimals = 10 Causes Astronomical Fees - How To Change tokenDecimals On A Running Chain?
We have started a test chain with tokenDecimals = 10 in the chain spec JSON. The chain is running beautifully BUT fees are astronomical. For example, it takes 2.6 Billion to run for council. We are ...
1
vote
1
answer
40
views
Using Valico JSON validator in my pallet [closed]
Currently I have problem that Valico is using std based packages like serde and serde_json. Is there any workaround to use this package?
UPDATE1:
I managed to fork repo and fix some dependencies but ...
0
votes
1
answer
166
views
How can I read JSON files in substrate
I am trying to modify the kitties pallet(https://docs.substrate.io/tutorials/v3/kitties/pt1/) in order to read some json data from an already existing file.
So, I need to read the contents of the file ...
0
votes
1
answer
107
views
How to use code written in `std` in `no_std` during runtime?
I have a piece of code written in std, and it is bypassing/not-included in runtime as it should work but I want to use it in runtime environment, is there a way to use it. As the code written in std ...