SPLToken2022ExecuteLayout.fromBuffer constructor

SPLToken2022ExecuteLayout.fromBuffer(
  1. List<int> bytes
)

Implementation

factory SPLToken2022ExecuteLayout.fromBuffer(List<int> bytes) {
  final decode = ProgramLayout.decodeAndValidateStruct(
    layout: _layout,
    bytes: bytes,
    instruction: SPLTokenProgramInstruction.transferFeeExtension.insturction,
  );
  return SPLToken2022ExecuteLayout(amount: decode["amount"]);
}