ExchangeInjectContract.fromJson constructor

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

Create a new ExchangeInjectContract instance by parsing a JSON map.

Implementation

factory ExchangeInjectContract.fromJson(Map<String, dynamic> json) {
  return ExchangeInjectContract(
    ownerAddress: OnChainUtils.parseTronAddress(
        value: json['owner_address'], name: 'owner_address'),
    exchangeId: OnChainUtils.parseBigInt(
        value: json['exchange_id'], name: 'exchange_id'),
    tokenId:
        OnChainUtils.parseBytes(value: json['token_id'], name: 'token_id'),
    quant: OnChainUtils.parseBigInt(value: json['quant'], name: 'quant'),
  );
}