VoteProgramAuthorizeLayout.fromBuffer constructor

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

Implementation

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