SystemAllocateWithSeedLayout.fromBuffer constructor

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

Implementation

factory SystemAllocateWithSeedLayout.fromBuffer(List<int> data) {
  final decode = ProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction: SystemProgramInstruction.allocateWithSeed.insturction);
  return SystemAllocateWithSeedLayout(
      base: decode["base"],
      seed: decode["seed"],
      space: decode["space"],
      programId: decode["programId"]);
}