SPLToken2022InitializeTransferFeeConfigLayout.fromBuffer constructor

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

Implementation

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