The source code of this vest() function from pallet_vesting https://docs.substrate.io/rustdocs/latest/pallet_vesting/pallet/enum.Call.html :
#[pallet::call]
impl<T: Config> Pallet<T> {
//pallet_vesting::pallet::Pallet ... this line is from Rust-Analyzer
pub fn vest(origin: OriginFor<T>) -> DispatchResult {
let who = ensure_signed(origin)?;
Self::do_vest(who)
}
in my own pallet:
use pallet_vesting;
...
pub fn vest(origin: OriginFor<T>) -> DispatchResultWithPostInfo {
let who = ensure_signed(origin)?;
pallet_vesting::Pallet::<T>::vest(origin);
Ok(().into())
}
I am not sure about the T above... what type should I use?
The error message I got:
the function or associated item `vest` exists for
struct `pallet_vesting::Pallet<T>`,
but .. the following trait bounds were not satisfied:
T: pallet_vesting::Config`
Then I replaced the T above, so the function now is...
pallet_vesting::Pallet::<T: Config + pallet_vesting::Config>::vest(origin);
Then I got two errors:
error[E0658]: associated type bounds are unstable
error[E0229]: associated type bindings are not allowed here
and I tried the following for the T above... but couldn't get it to work...
where T::pallet_vesting::Config
T: pallet_vesting::Config
T: Config
Please help!