Skip to main content
5 votes
Accepted

Finding about native token of a parachain

You have this information in the chain-spec of the network, if you want to query it, you can use RPC queries for it. Specifically the system_properties RPC call You can query it using CURL: curl -H &...
Alex Bean's user avatar
  • 5,722
4 votes
Accepted

Is there a way query the denomination information of a substrate token from the runtime?

PolkadotJS offers it. Simple as: import { ApiPromise, WsProvider } from '@polkadot/api'; const wsProvider = new WsProvider('wss://rpc.polkadot.io'); const api = await ApiPromise.create({ provider: ...
Oliver Tale-Yazdi's user avatar
4 votes

How to measure number of XCM messages sent on a relay chain?

Not a direct answer to the question but I think this will be useful: Polkaholic.io just released this block indexer where you can monitor every XCM message sent and received from/in the relay chain. ...
Iker's user avatar
  • 1,356
3 votes
Accepted

How to determine which parameters are required when using substrate.query() to query a storage_function from polkascan's py-substrate-interface?

Update: The storage_function.get_param_info() helper function is introduced, see: https://github.com/polkascan/py-substrate-interface#type-information-about-how-to-format-parameters It is indeed a ...
Arjan's user avatar
  • 151
3 votes
Accepted

Should events be taken into account if their extrinsic fails?

If the System.ExtrinsicFailed event was emitted within a given extrinsic, does it mean that all other events that were also emitted within it can be considered invalid and should not be taken into ...
bkchr's user avatar
  • 11.3k
3 votes

How to determine which account sent an extrinsic from substrate block data?

The example in the py-substrate-interface README shows exactly how to do this. https://github.com/polkascan/py-substrate-interface/tree/v1.3.3#method-1-access-serialized-value # Set block_hash to None ...
joepetrowski's user avatar
  • 2,955
2 votes
Accepted

Missing timestamp(set) extrinsic for older blocks of statemint

Statemint and Statemine were initially running with the shell-runtime. This shell-runtime was the most basic runtime that was possible. This means also that it didn't had the timestamp pallet and thus,...
bkchr's user avatar
  • 11.3k
2 votes

Why do are some events in a block missing an extrinsic_idx?

Only the events in phase ApplyExtrinsic have an extrinsic index attached. Everything that runs before is from on_initialize hooks and everything afterwards from on_finalize. These always run in every ...
Oliver Tale-Yazdi's user avatar
2 votes

Deduce timestamp of block for chains without timestamp pallet

You can see when that block was included in the relay chain as ParachainInclusion CandidateBacked. It must have been created before that and after the prior block from that parachain.
Squirrel's user avatar
  • 3,849
2 votes

Amount of DOT bonded by a validator

First you have to get the list of validators, and for every one of the list you can get his total balance bonded in Staking: const validators = await api.query.session.validators(); validators....
Alex Bean's user avatar
  • 5,722
2 votes

Is there anyway to tell if a transaction was submitted by a light client on a substrate blockchain?

No there is no way to identify the source of a transaction. In general we are trying to make transaction submission as anynomous as possible. Including anything to identify the node type or similar ...
bkchr's user avatar
  • 11.3k
1 vote

Is there a programmatic way to retrieve list of parachain sovereign accounts on Statemint/e?

Yes. There are some tools and examples already available that you can use to do this programmatically. I recommend the following post: how to calculate sovereignAccount for parachain? In your case ...
Bruno's user avatar
  • 8,365
1 vote

Is there anyway to tell if a transaction was submitted by a light client on a substrate blockchain?

As far as Smoldot; a submitted transaction is validated and then send to full nodes. The full nodes will handle this transaction like any other transaction coming from another peer; validating it, and ...
Daan van der Plas's user avatar
1 vote
Accepted

Are proxy accounts part of the accounts in storage and how to identify them

In general, proxy accounts are normal accounts which were delegated certain functionality from the proxied account (staking, non transfer, etc) so indeed, they can be accessed by the system.account ...
Iker's user avatar
  • 1,356
1 vote
Accepted

Get a breakdown of DOT for an account

Using PolkadotJS, this is the code to get the breakdown of a DOT for an account in the current block (change the block hash if you want to query it in an specific block). const ADDR = 'your-...
Alex Bean's user avatar
  • 5,722
1 vote

Finding about native token of a parachain

You can also use Sidecar's endpoint runtime/spec. So you would need to : Install Sidecar locally Add an .env file that points to one of Moonbeam's public endpoints, e.g. wss://moonbeam.api.onfinality....
dominique's user avatar
  • 1,683
1 vote

How to recognise user behaviour data on substrate chains? (Events + Extrinsics)

Generally if the Phase is ApplyExtrisic then it's user activity, but also the user can for example send an xcm message upwards to the relay chain and that will get executed in ParachainSystem ...
Squirrel's user avatar
  • 3,849
1 vote

How to differentiate between a full node and an archive node while querying chain state?

I don't believe there is a specific RPC that exposes this config information as to RPC pruning state.
Werner S's user avatar
  • 629
1 vote

How to calculate Total Value Locked for a Substrate Chain? Should 'Reserved Balances' be included?

It depends entirely on what you want to calculate. TVL is often used as an indicator in the field of defi, and for that you'd probably need to look at attributes beyond merely locks and reserves. For ...
Gav's user avatar
  • 2,681
1 vote

How to calculate Total Value Locked for a Substrate Chain? Should 'Reserved Balances' be included?

The difference between locked and reserve balance is that the former can be overlapping while the latter cannot. Usually reserved balance is used to lock tokens for storage consumed. When exactly ...
Alexander Theißen's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible