a bit new to the Solana development, I am trying to create a program that can send a certain amount of Solana from my wallet to a particular address. I found some code but am not really understanding how it works. I am also having trouble understanding how I can switch from devnet to mainnet. I tried switching to mainnet beta but it wasn't really working. Any help would be helpful.
Thanking you in advance.