toJson method

  1. @override
Map<String, dynamic> toJson()
override

Convert the ExchangeCreateContract object to a JSON representation.

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    "owner_address": ownerAddress.toString(),
    "first_token_id": BytesUtils.tryToHexString(firstTokenId),
    "first_token_balance": firstTokenBalance?.toString(),
    "second_token_id": BytesUtils.tryToHexString(secondTokenId),
    "second_token_balance": secondTokenBalance?.toString(),
  };
}