pub fn transfer_lamports(
from_account: &AccountInfo<'_>,
to_account: &AccountInfo<'_>,
amount_of_lamports: u64,
) -> ProgramResultExpand description
Transfers lamports from one account to another.
§Arguments
from_account- The account to transfer lamports from.to_account- The account to transfer lamports to.amount_of_lamports- The amount of lamports to transfer.
§Errors
Returns ProgramError::InsufficientFunds if the from_account does not
have enough lamports.