Rise In Logo



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!

Stay in the know

Never miss updates on new programs and opportunities.

Rise In Logo

Rise together in web3!

Disclaimer: The information /programs / events provided on https://patika.dev and https://risein.com are strictly for upskilling and networking purposes related to the technical infrastructure of blockchain platforms. We do not provide financial or investment advice and do not make any representations regarding the value, profitability, or future price of any blockchain or cryptocurrency. Users are encouraged to conduct their own research and consult with licensed financial professionals before engaging in any investment activities. https://patika.dev and https://risein.com disclaim any responsibility for financial decisions made by users based on information provided here.