SPLTokenBurnLayout.fromBuffer constructor

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

Constructs an SPLTokenBurnLayout instance from buffer.

Implementation

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