MetaplexAuctioneerBuyLayout.fromBuffer constructor

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

Constructs the layout from raw bytes.

Implementation

factory MetaplexAuctioneerBuyLayout.fromBuffer(List<int> data) {
  final decode = MetaplexAuctioneerProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction: MetaplexAuctioneerProgramInstruction.buy.insturction);
  return MetaplexAuctioneerBuyLayout(
      tradeStateBump: decode["tradeStateBump"],
      escrowPaymentBump: decode["escrowPaymentBump"],
      auctioneerAuthorityBump: decode["auctioneerAuthorityBump"],
      buyerPrice: decode["buyerPrice"],
      tokenSize: decode["tokenSize"]);
}