VoteProgram.initializeAccount constructor
VoteProgram.initializeAccount({
- required VoteProgramInitializeAccountLayout layout,
- required SolAddress votePubKey,
- required SolAddress nodePubKey,
Generate an Initialize instruction.
Implementation
factory VoteProgram.initializeAccount(
{required VoteProgramInitializeAccountLayout layout,
required SolAddress votePubKey,
required SolAddress nodePubKey}) {
return VoteProgram(
layout: layout,
keys: [
votePubKey.toWritable(),
SystemProgramConst.sysvarRentPubkey.toReadOnly(),
SystemProgramConst.sysvarClockPubkey.toReadOnly(),
nodePubKey.toSigner(),
],
programId: VoteProgramConst.programId);
}