Function transfer_lamports_checked

Source
pub fn transfer_lamports_checked<'info, 'b>(
    from: &'b AccountInfo<'info>,
    to: &'b AccountInfo<'info>,
    lamports: u64,
) -> Result<()>
Expand description

Transfers lamports, skipping the transfer if the to account would not be rent exempt.

This is useful when transferring lamports to a new account that may not have been created yet and the transfer amount is less than the rent exemption.