Learn everything about Stellar
In this final project, you will be adding a freeze function to the token contract that we learned during the course. This feature allows a given token holder to freeze and later unfreeze their tokens. Frozen tokens cannot be transferred by the holder.
Note: These features must be added to the contract.rs file.
Steps
- Add two new functions to the token contract, freeze_account and unfreeze_account. Both functions must take an account address.
- The freeze_account function should freeze the tokens of the specified account. This temporarily prevents the transfer of tokens for a given account.
- The unfreeze_account function should unfreeze the tokens of the specified account. This re-enables the transfer of tokens of a given account.
- Update the transfer function to reject a transfer if an account's tokens are frozen.
Requirements:
- Submit your project to Stellar testnet and mention your contract address in your readme.md file
- Provide a README file describing how the project works and any new functionality added.
Project
Comments
You need to enroll in the course to be able to comment!