ExchangeTransactionContract.fromJson constructor

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

Create a new ExchangeTransactionContract instance by parsing a JSON map.

Implementation

factory ExchangeTransactionContract.fromJson(Map<String, dynamic> json) {
  return ExchangeTransactionContract(
    ownerAddress: TronAddress(json["owner_address"]),
    exchangeId: BigintUtils.tryParse(json["exchange_id"]),
    tokenId: BytesUtils.fromHexString(json["token_id"]),
    quant: BigintUtils.tryParse(json["quant"]),
    expected: BigintUtils.tryParse(json["expected"]),
  );
}