SPLTokenTransferLayout.fromBuffer constructor
Constructs an SPLTokenTransferLayout instance from buffer.
Implementation
factory SPLTokenTransferLayout.fromBuffer(List<int> bytes) {
final decode = ProgramLayout.decodeAndValidateStruct(
layout: _layout,
bytes: bytes,
instruction: SPLTokenProgramInstruction.transfer.insturction,
);
return SPLTokenTransferLayout(amount: decode["amount"]);
}