0

I want to locked token, how can we do this?

enter image description here

1
  • can you explain a bit more. Commented Dec 14, 2023 at 9:04

1 Answer 1

2

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)

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.