Skip to main content

Questions tagged [json]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
Luke Schoen's user avatar
  • 2,376
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....
Ajit's user avatar
  • 827
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 ...
Robert La Ferla's user avatar
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 ...
Branimir Malesevic's user avatar
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 ...
cocokick's user avatar
  • 165
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 ...
KathrynColleen's user avatar
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 ...
Brano Hozza's user avatar
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 ...
John Stephan's user avatar
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 ...
Shubham Gupta's user avatar