0

I would like to customize POS by staking the asset balance instead of currency balance. After switching the consensus from PoA to PoS by changing AURA to BABE, I need to change the configuration of pallet_staking. there are 2 fields in pallet_staking::Config need to be defined

impl pallet_staking::Config for Runtime {
    type Currency = Balances;// -> pallet_pts::Config::Kitty;
    type CurrencyBalance = (); -> pallet_potw::Kitty::Balance;
}

Kitty is defined in runtime : type Kitty = Assets; and type KittyBalance = AssetBalance; However the trait of Currency and Asset is different, what should I do to able use this asset for staking?

1 Answer 1

1

In pallet-staking you can see that type Currency has to implement the LockableCurrency trait which is implemented for pallet-balances.

Unfortunately this isn't implemented for pallet-assets. You could make your own pallet-lockable-assets by implementing the trait (if that is possible, didn't check) and use that for your Kitty pallet.

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.