process_initialize_light_config_checked

Function process_initialize_light_config_checked 

Source
pub fn process_initialize_light_config_checked<'info>(
    config_account: &AccountInfo<'info>,
    update_authority: &AccountInfo<'info>,
    program_data_account: &AccountInfo<'info>,
    rent_sponsor: &Pubkey,
    compression_authority: &Pubkey,
    rent_config: RentConfig,
    write_top_up: u32,
    address_space: Vec<Pubkey>,
    config_bump: u8,
    payer: &AccountInfo<'info>,
    system_program: &AccountInfo<'info>,
    program_id: &Pubkey,
) -> Result<(), ProgramError>
Expand description

Creates a new compressible config PDA.

§Arguments

  • config_account - The config PDA account to initialize
  • update_authority - Must be the program’s upgrade authority
  • program_data_account - The program’s data account for validation
  • rent_sponsor - Account that receives rent from compressed PDAs
  • compression_authority - Authority that can compress/close PDAs
  • rent_config - Rent function parameters
  • write_top_up - Lamports to top up on each write
  • address_space - Address spaces for compressed accounts (exactly 1 allowed)
  • config_bump - Config bump seed (must be 0 for now)
  • payer - Account paying for the PDA creation
  • system_program - System program
  • program_id - The program that owns the config

§Returns

  • Ok(()) if config was created successfully
  • Err(ProgramError) if there was an error or authority validation fails