I have multiple question about treasury pallet.

  1. How to get the account that is behind the treasury?

  2. Can we transfer funds to treasury by transferring some token to that account?

  3. How to find the current balance in the treasury? Since the front end interface does not show the balance of the treasury

  4. What if there are approved spend proposal and there are no funds in the treasury? Will these approved proposal will be carried forwarded to the next sped period?

1 Answer 1

  1. There are multiple ways to get that. I'll give you 2 examples.

1.1. How do treasury accounts compare to end user accounts in FRAME?

1.2. https://github.com/hack-ink/subalfred

subalfred key --type pallet --show-prefix 'py/trsry'
sub-seed PalletId(py/trsry)
public-key 0x6d6f646c70792f74727372790000000000000000000000000000000000000000
Substrate    42 5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z
  1. Yes. Just treat it as a regular account.
  2. Query System::account(5EYCAe5ijiYfyeZ2JJCGq56LmPyNRAKzpG4QkoQkkQNB5e6Z). Just treat it as a regular account.
  3. The transfer will fail due to InsufficientBalance.
  • Thank you very much. @aurevoir Commented Feb 3, 2023 at 14:07

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.