Sign In / Up

In this final project, you will modify the state of our Restaurant Review project. Currently, state holds description, title and a rating. Let's update our project to hold location as well.

Step 1

Add a new string to our AccountState called location.

Step 2

Add the same string(location) to instructions inside ReviewInstruction and also ReviewPayload.

Step 3

In the unpack function, you should also unpack the new location string.

Step 4

For both update and add functions, we have a new variable which should be stored in the account_data along with title, rating and description

Step 5

Please include a comprehensive README.md that:

  • Explain the purpose and functionalities of your contract.
  • Offers a guide on how to deploy and interact with the contract.

You can access the sample README file here.

Bonus 

You can also modify the frontend code to include location string in queries and creating review.

Note: To qualify for graduation, submit your project as open source rather than a closed project. This is better for the open culture of web3 but also allows us to evaluate your project and reach out to you for further career opportunities. Thank you! 🔥

Project

Submit your work to complete this lesson.

Join the project workspace to share your solution and receive feedback.

Lesson discussion

Swap insights and ask questions about “Learn everything about Solana”.

Be the first to start the discussion

Ask a question or share your thoughts about this lesson.