Focus mode
You've almost done with your third week! Let's put everything you've learned to good use by building out the staking program associated with the NFT project you're working on (buildoors project).
We want you to build out everything for the staking program except the actual token functionality. What that means is anywhere that you would expect to interact with the token program, we’re just going to log a message or skip it and revisit next week.
For now, the main goal is to write a program that tracks the state of each user’s staking. Here are some broad steps:
There should be 4 instructions:
This is challenging. Take a stab at architecting some of this on your own before referencing the solution or watching the video walkthrough. It’s okay if you don’t get it perfect. The struggle is part of the learning. Hint: You can get time using solana_program::clock::Clock. Take a look at the docs if you need. Once you’ve tried all you can, feel free to look at the solution code. If you want to keep going, you’re welcome to get started on the UI for staking and interacting with this program.
Programs to Accelerate Your Progress in a Software Career
Join our 4-8 month intensive Patika+ bootcamps, start with the fundamentals and gain comprehensive knowledge to kickstart your software career!
You need to enroll in the course to be able to comment!