I want to locked token, how can we do this?
1 Answer
The most common way:
// pallet_x/src/lib.rs
pub trait Config {
Currency: frame_support::traits::LockableCurrency;
}
fn lock<T: Config>() {
T::Currency::set_lock(..);
}
And if you make the lock
as an extrinsic. Then user could call this call to lock their token. (Just an example, you can make more complex logic base on this)