File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
basics/pda-rent-payer/poseidon/pda-rent-payer/programs/pda-rent-payer/src Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 11use anchor_lang:: prelude:: * ;
2- use anchor_lang:: system_program:: { Transfer , transfer } ;
2+ use anchor_lang:: system_program:: { transfer , Transfer } ;
33declare_id ! ( "Db6bufzTcWMDhiCUAuCv3AqCyeZKV4BSGG9ooCibQjrJ" ) ;
44#[ program]
55pub mod pda_rent_payer {
66 use super :: * ;
7- pub fn init_rent_vault (
8- ctx : Context < InitRentVaultContext > ,
9- fund_lamports : u64 ,
10- ) -> Result < ( ) > {
7+ pub fn init_rent_vault ( ctx : Context < InitRentVaultContext > , fund_lamports : u64 ) -> Result < ( ) > {
118 let transfer_accounts = Transfer {
129 from : ctx. accounts . payer . to_account_info ( ) ,
1310 to : ctx. accounts . rent_vault . to_account_info ( ) ,
@@ -19,10 +16,7 @@ pub mod pda_rent_payer {
1916 transfer ( cpi_ctx, fund_lamports) ?;
2017 Ok ( ( ) )
2118 }
22- pub fn create_new_account (
23- ctx : Context < CreateNewAccountContext > ,
24- amount : u64 ,
25- ) -> Result < ( ) > {
19+ pub fn create_new_account ( ctx : Context < CreateNewAccountContext > , amount : u64 ) -> Result < ( ) > {
2620 let transfer_accounts = Transfer {
2721 from : ctx. accounts . rent_vault . to_account_info ( ) ,
2822 to : ctx. accounts . new_account . to_account_info ( ) ,
You can’t perform that action at this time.
0 commit comments