Skip to content

Commit

Permalink
verified technical requirements and resolved warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ritikbhatt20 committed Nov 26, 2024
1 parent 1576e5f commit db6102f
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
use anchor_lang::prelude::*;
use anchor_lang::system_program::{Transfer, transfer};
use anchor_lang::system_program::{transfer, Transfer};
declare_id!("Db6bufzTcWMDhiCUAuCv3AqCyeZKV4BSGG9ooCibQjrJ");
#[program]
pub mod pda_rent_payer {
use super::*;
pub fn init_rent_vault(
ctx: Context<InitRentVaultContext>,
fund_lamports: u64,
) -> Result<()> {
pub fn init_rent_vault(ctx: Context<InitRentVaultContext>, fund_lamports: u64) -> Result<()> {
let transfer_accounts = Transfer {
from: ctx.accounts.payer.to_account_info(),
to: ctx.accounts.rent_vault.to_account_info(),
Expand All @@ -19,10 +16,7 @@ pub mod pda_rent_payer {
transfer(cpi_ctx, fund_lamports)?;
Ok(())
}
pub fn create_new_account(
ctx: Context<CreateNewAccountContext>,
amount: u64,
) -> Result<()> {
pub fn create_new_account(ctx: Context<CreateNewAccountContext>, amount: u64) -> Result<()> {
let transfer_accounts = Transfer {
from: ctx.accounts.rent_vault.to_account_info(),
to: ctx.accounts.new_account.to_account_info(),
Expand Down

0 comments on commit db6102f

Please sign in to comment.