ListingConfig.fromBuffer constructor

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

Implementation

factory ListingConfig.fromBuffer(List<int> data) {
  final decode = LayoutSerializable.decode(
      bytes: data,
      layout: _Utils.layout,
      validator: {"discriminator": _Utils.discriminator});
  return ListingConfig(
      bump: decode["bump"],
      startTime: decode["startTime"],
      endTime: decode["endTime"],
      bid: Bid.fromJson(decode["highestBid"]),
      reservePrice: decode["reservePrice"],
      minBidIncrement: decode["minBidIncrement"],
      timeExtPeriod: decode["timeExtPeriod"],
      timeExtDelta: decode["timeExtDelta"],
      allowHighBidCancel: decode["allowHighBidCancel"]);
}