VersionedBlockResponse.fromJson constructor

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

Implementation

factory VersionedBlockResponse.fromJson(Map<String, dynamic> json) {
  return VersionedBlockResponse(
      blockhash: SolAddress.uncheckCurve(json['blockhash']),
      previousBlockhash: SolAddress.uncheckCurve(json['previousBlockhash']),
      parentSlot: json['parentSlot'],
      transactions: (json['transactions'] as List).map((e) {
        return VersionedTransactionResponse.fromJson(e);
      }).toList(),
      rewards: (json['rewards'] as List?)
          ?.map((e) => RewardResponse.fromJson(e))
          .toList(),
      blockTime: BigintUtils.tryParse(json['blockTime']));
}