ExchangeCreateContract.fromJson constructor

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

Create a new ExchangeCreateContract instance by parsing a JSON map.

Implementation

factory ExchangeCreateContract.fromJson(Map<String, dynamic> json) {
  return ExchangeCreateContract(
    ownerAddress: TronAddress(json["owner_address"]),
    firstTokenId: BytesUtils.tryFromHexString(json["first_token_id"]),
    firstTokenBalance: BigintUtils.tryParse(json["first_token_balance"]),
    secondTokenId: BytesUtils.tryFromHexString(json["second_token_id"]),
    secondTokenBalance: BigintUtils.tryParse(json["second_token_balance"]),
  );
}