AddressLookupTableProgram.createLookupTable constructor
AddressLookupTableProgram.createLookupTable({
- required SolAddress authority,
- required SolAddress payer,
- required SolAddress lookupTableAddress,
- required AddressLookupCreateLookupTableLayout layout,
Creates an instruction to create a lookup table.
Implementation
factory AddressLookupTableProgram.createLookupTable({
/// Account used to derive and control the new address lookup table.
required SolAddress authority,
/// Account that will fund the new address lookup table.
required SolAddress payer,
/// lookupTableAddress derived from recent slot [findAddressLookupTableProgram]
required SolAddress lookupTableAddress,
required AddressLookupCreateLookupTableLayout layout,
}) {
return AddressLookupTableProgram(
layout: layout,
keys: [
lookupTableAddress.toWritable(),
authority.toSigner(),
payer.toSignerAndWritable(),
SystemProgramConst.programId.toReadOnly(),
],
programId: AddressLookupTableProgramConst.programId,
);
}