ComputeBudgetSetComputeUnitPriceLayout.fromBuffer constructor

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

Constructs the layout from raw bytes.

Implementation

factory ComputeBudgetSetComputeUnitPriceLayout.fromBuffer(List<int> data) {
  final decode = ProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction:
          ComputeBudgetProgramInstruction.setComputeUnitPrice.insturction);
  return ComputeBudgetSetComputeUnitPriceLayout(
      microLamports: decode["microLamports"]);
}