Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Root to Spend Treasury Funds #841

Open
asiniscalchi opened this issue Oct 23, 2024 · 2 comments · May be fixed by #850
Open

Enable Root to Spend Treasury Funds #841

asiniscalchi opened this issue Oct 23, 2024 · 2 comments · May be fixed by #850

Comments

@asiniscalchi
Copy link
Member

asiniscalchi commented Oct 23, 2024

As a developer, I want to configure the treasury pallet to allow root to spend funds, ensuring that governance has full control over the treasury pot.

"Funds can never be spent. It would be wise to allow root to spend them, since anyway root has access to the treasury's pot account and can force-transfer funds from it."

@asiniscalchi
Copy link
Member Author

Not sure if it's something we want: in polkadot-sdk is set to the pallet Bounties in some examples ...

@asiniscalchi
Copy link
Member Author

asiniscalchi commented Oct 24, 2024

we got an error :

error[E0277]: the trait bound `EnsureRoot<fp_account::AccountId20>: SpendFunds<Runtime>` is not satisfied
     --> /home/asini/workspace/laos/runtime/laos/src/configs/treasury.rs:48:20
      |
  48  |     type SpendFunds = EnsureRoot<AccountId>;
      |                       ^^^^^^^^^^^^^^^^^^^^^ the trait `SpendFunds<Runtime>` is not implemented for `EnsureRoot<fp_account::AccountId20>`
      |
      = help: the following other types implement trait `SpendFunds<T, I>`:
                ()
                (TupleElement0,)
                (TupleElement0, TupleElement1)
                (TupleElement0, TupleElement1, TupleElement2)
                (TupleElement0, TupleElement1, TupleElement2, TupleElement3)
                (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)
                (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)
                (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)
              and 23 others
  note: required by a bound in `pallet_treasury::Config::SpendFunds`
     --> /home/asini/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/47155f8/substrate/frame/treasury/src/lib.rs:236:20
      |
  236 |         type SpendFunds: SpendFunds<Self, I>;
      |                          ^^^^^^^^^^^^^^^^^^^ required by this bound in `Config::SpendFunds`

it seems the type Account20 do not implement that trait so the feature can't be implemented easily

@asiniscalchi asiniscalchi linked a pull request Oct 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA
Development

Successfully merging a pull request may close this issue.

1 participant