AssetIssueContract.fromJson constructor
Create a new AssetIssueContract instance by parsing a JSON map.
Implementation
factory AssetIssueContract.fromJson(Map<String, dynamic> json) {
return AssetIssueContract(
ownerAddress: TronAddress(json['owner_address']),
name: StringUtils.encode(json['name']),
abbr: StringUtils.encode(json['abbr']),
totalSupply: BigInt.from(json['total_supply']),
frozenSupply: (json['frozen_supply'] as List<dynamic>?)
?.map((frozenSupplyJson) =>
AssetIssueContractFrozenSupply.fromJson(frozenSupplyJson))
.toList(),
trxNum: json['trx_num'],
precision: json['precision'],
num: json['num'],
startTime: BigintUtils.parse(json['start_time']),
endTime: BigintUtils.parse(json['end_time']),
order: BigintUtils.tryParse(json['order']),
voteScore: json['vote_score'],
description: StringUtils.tryEncode(json['description']),
url: StringUtils.tryEncode(json['url']),
freeAssetNetLimit: BigintUtils.tryParse(json['free_asset_netimit']),
publicFreeAssetNetLimit:
BigintUtils.tryParse(json['public_free_asset_netimit']),
publicFreeAssetNetUsage:
BigintUtils.tryParse(json['public_free_asset_net_usage']),
publicLatestFreeNetTime:
BigintUtils.tryParse(json['publicatest_free_net_time']),
id: json['id'],
);
}