Rollup.fromJson constructor

Rollup.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Rollup.fromJson(Map<String, dynamic> json) {
  var bucketsFromJson = json['buckets'] as List;
  List<Bucket> bucketsList =
      bucketsFromJson.map((i) => Bucket.fromJson(i)).toList();
  return Rollup(
    ethereumBlockNum: json['ethereumBlockNum'],
    forgeL1L2BatchTimeout: json['forgeL1L2BatchTimeout'],
    feeAddToken: json['feeAddToken'],
    withdrawalDelay: json['withdrawalDelay'],
    buckets: bucketsList,
  );
}