pallet_timegraph::pallet::dispatchables

Function withdraw

Source
pub fn withdraw<T: Config>(amount: BalanceOf<T>)
Expand description

The extrinsic from timegraph allows account to refund the token to the user

§Flow

  1. Ensure the origin is a signed account.
  2. Validate the amount is greater than zero.
  3. Ensure the sender and receiver are not the same.
  4. Validate the withdrawal sequence number.
  5. Transfer the funds.
  6. Increment the withdrawal sequence number.
  7. Emit a Event::Withdrawal event.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::withdraw.