2

I need to use this field when configuring config under runtime. The compiler can jump through ctrl, but an error is reported during the compilation process.

this is my code.

pub NativeTreasuryAccount: AccountId = TreasuryPalletId::get().into_account();

enter image description here

1 Answer 1

3

Did you import the trait as suggested in the error message?

use sp_runtime::traits::AccountIdConversion;

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.