VoteProgramWithdrawLayout.fromBuffer constructor

VoteProgramWithdrawLayout.fromBuffer(
  1. List<int> data
)

Implementation

factory VoteProgramWithdrawLayout.fromBuffer(List<int> data) {
  final decode = ProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction: VoteProgramInstruction.withdraw.insturction);
  return VoteProgramWithdrawLayout(lamports: decode["lamports"]);
}