1

hello I am trying to add the bounties pallet to the substrate node-template. the version I am using is "release-polkadot-v1.7.0". I keep getting the following error:

the traitframe\_support::traits::fungibles::Mutate\<AccountId32> is not implemented for pallet\_balances::Pallet\<Runtime> , which is required by sp\_runtime::generic::Block\<sp\_runtime::generic::Header\<u32, sp\_runtime::traits::BlakeTwo256>, sp\_runtime::generic::UncheckedExtrinsic\<MultiAddress\<AccountId32, ()>, RuntimeCall, MultiSignature, (CheckNonZeroSender\<Runtime>, CheckSpecVersion\<Runtime>, CheckTxVersion\<Runtime>, CheckGenesis\<Runtime>, CheckEra\<Runtime>, CheckNonce\<Runtime>, CheckWeight\<Runtime>, ChargeTransactionPayment\<Runtime>)>>: sp\_runtime::traits::Block\

I really don't understand, as I don't change the implementation of frame_system and pallet-balances, I only add pallet-treasury and pallet-bounties in the runtime.

I also started from a clean updated substrate node-template, and the error clearly appears after adding pallet-treasury & pallet-bounties. I first added pallet-collective, and this one works fine. the following line seems to be responsible:

 #[derive_impl(frame_system::config_preludes::SolochainDefaultConfig as frame_system::DefaultConfig)]

Also, in pallet-treasury implementation, the following line gives me a type mismatch error. However, I see it used in several other runtimes:

type Paymaster = PayFromAccount<Balances, TreasuryAccount>;

Thanks in advance for your help, Kazu

1
  • Hey, could you please provide a repo with the code that's failing to compile?
    – liamaharon
    Commented Mar 18 at 22:41

1 Answer 1

1

I had something similar today:

  error[E0277]: the trait bound `pallet_treasury::Pallet<Runtime>: frame_support::traits::fungibles::Mutate<AccountId32>` is not satisfied
      |
  60  |     type RuntimeEvent = RuntimeEvent;
      |                         ^^^^^^^^^^^^ the trait `frame_support::traits::fungibles::Mutate<AccountId32>` is not implemented for `pallet_treasury::Pallet<Runtime>`
      |
      = help: the following other types implement trait `frame_support::traits::fungibles::Mutate<AccountId>`:
                <Combiner<AccountId, TestKey, A, B> as frame_support::traits::fungibles::Mutate<AccountId>>
                <orml_tokens::Pallet<T> as frame_support::traits::fungibles::Mutate<<T as frame_system::Config>::AccountId>>
                <frame_support::traits::fungible::UnionOf<Left, Right, Criterion, AssetKind, AccountId> as frame_support::traits::fungibles::Mutate<AccountId>>
                <frame_support::traits::fungibles::UnionOf<Left, Right, Criterion, AssetKind, AccountId> as frame_support::traits::fungibles::Mutate<AccountId>>
      = note: required for `PayAssetFromAccount<pallet_treasury::Pallet<Runtime>, TreasuryAccount>` to implement `Pay`

important part for my case was in the last line:

PayAssetFromAccount<pallet_treasury::Pallet<Runtime>, TreasuryAccount>` to implement `Pay`

I had Config impl for treasury as following:

impl pallet_treasury::Config for Runtime {
    type AssetKind = u32;
    type Paymaster = PayAssetFromAccount<Balances, TreasuryAccount>;
}

In order to make pure setup using only pallet_balances, I made following setup that works for me:

impl pallet_treasury::Config for Runtime {
    type AssetKind = ();
    type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
}

If you will be interested in setup for pallet assets as well, take a look here

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.