Pay.fromJson constructor

Pay.fromJson(
  1. dynamic data
)

Implementation

factory Pay.fromJson(dynamic data) {
  final coinsList = (data['coins'] as List).map((e) => SuiObjectRef.fromJson(e)).toList();
  final recipientsList = data['recipients'].cast<String>();
  final amountsList = data['amounts'].cast<int>();
  return Pay(
    coinsList,
    recipientsList,
    amountsList
  );
}