title: How to send SOL with a solana rust contract
body: <p>I'm a noob Rust/Solana Developer and feel like I'm encountering an issue that would be helpful to most other noobs.</p>
  <p>I want to how to transfer SOL from an account to a program during an instruction, and then be able to send SOL back to the account who called the instruction.</p>
  <p>I read the <a href="https://docs.solana.com/" rel="nofollow noreferrer">https://docs.solana.com/</a> but I could not find anything about SOL transfers via programs.</p>
  <p>Example:</p>
  <p>Acc1 calls the gamble instruction in Program1, which transfers 1 SOL from the caller and then runs a verifiable random function. If Acct1 wins the gamble, Program1 then sends 2 SOL back to Acct1.</p>
  <p>I would really appreciate some help, thanks!</p>