AddressLookupTableProgram.extendLookupTable constructor
AddressLookupTableProgram.extendLookupTable({
- required SolAddress authority,
- required SolAddress lookupTable,
- required AddressExtendLookupTableLayout layout,
- SolAddress? payer,
Creates an instruction to extend a lookup table.
Implementation
factory AddressLookupTableProgram.extendLookupTable({
/// Account which is the current authority.
required SolAddress authority,
/// Address lookup table account to extend.
required SolAddress lookupTable,
required AddressExtendLookupTableLayout layout,
/// Account that will fund the table reallocation.
/// Not required if the reallocation has already been funded.
SolAddress? payer,
}) {
final keys = [
lookupTable.toWritable(),
authority.toSigner(),
];
if (payer != null) {
keys.addAll([
payer.toSignerAndWritable(),
SystemProgramConst.programId.toReadOnly(),
]);
}
return AddressLookupTableProgram(
layout: layout,
keys: keys,
programId: AddressLookupTableProgramConst.programId,
);
}