Sign In / Up

In this homework, you will modify the transfer amount in out existing logic. Currently it is transferring all the balance source account holds. Instead let's change this to a defined amount.

Step 1

Modify this line: let amount = source_account.amount so that it will transfer a hard coded amount.

Step 2

Run cargo test to make sure project is still working

Optional

Instead of hard coding the amount, you can get the amount as input from the user and then transfer that amount of tokens.

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.