2

The AccountID of a pallet is generated using the PalletID. (See the example from Treasury pallet)

I know is possible to query this pallet ID because is a constant, but my question is:

Is there a way to query the AccountID of a pallet using PolkadotJS app?

1 Answer 1

2

It cannot be "queried", but it can be generated using the queried Pallet ID.

You can see an example of that here: https://github.com/shawntabrizi/substrate-js-utilities/blob/master/utilities.js#L218

For example using: https://www.shawntabrizi.com/substrate-js-utilities/

You will get:

py/trsry -> 5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z

https://polkadot.subscan.io/account/5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.