Currently added one instruction to send from one wallet to another using CPI. The amount that needs to be sent to the instruction in is lamports.
- https://solana.com/docs/programs/examples
- https://github.com/solana-developers/program-examples/blob/main/basics/transfer-sol/anchor/programs/transfer-sol/src/lib.rs
- https://www.quicknode.com/guides/solana-development/anchor/transfer-tokens
- https://www.anchor-lang.com/docs/tokens/basics/transfer-tokens
- https://github.com/solana-developers/program-examples/blob/main/tokens/transfer-tokens/anchor/tests/test.ts
AI was used for debugging build and test errors only.
The docs on the anchor website are outdated, they still use deprecated functions. Referred to solana.stackexchange.com:
To refer how to get Associated Token Account: