You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement lock_tokens and unlock_tokens functions to restrict token transferability inside contracts/contrib/.
Location
All work must be inside contracts/contrib/src/tokenization.rs.
Acceptance Criteria
lock_tokens(env, asset_id, owner, amount) — admin or token owner only; moves amount from transferable to locked_balance in OwnershipRecord; panics if insufficient transferable balance
unlock_tokens(env, asset_id, owner, amount) — admin or token owner only; moves amount from locked_balance back to transferable; panics if insufficient locked balance
Overview
Implement
lock_tokensandunlock_tokensfunctions to restrict token transferability insidecontracts/contrib/.Location
All work must be inside
contracts/contrib/src/tokenization.rs.Acceptance Criteria
lock_tokens(env, asset_id, owner, amount)— admin or token owner only; movesamountfrom transferable tolocked_balanceinOwnershipRecord; panics if insufficient transferable balanceunlock_tokens(env, asset_id, owner, amount)— admin or token owner only; movesamountfromlocked_balanceback to transferable; panics if insufficient locked balanceget_locked_balance(env, asset_id, owner) -> i128— returns locked amount