TronRequestCreateAssetIssue.fromContract constructor

TronRequestCreateAssetIssue.fromContract(
  1. AssetIssueContract contract, {
  2. bool visible = true,
})

Implementation

factory TronRequestCreateAssetIssue.fromContract(AssetIssueContract contract,
    {bool visible = true}) {
  return TronRequestCreateAssetIssue(
      ownerAddress: contract.ownerAddress,
      name: StringUtils.decode(contract.name),
      abbr: StringUtils.decode(contract.abbr),
      totalSupply: contract.totalSupply,
      trxNum: contract.trxNum,
      num: contract.num,
      startTime: contract.startTime,
      endTime: contract.endTime,
      description: StringUtils.tryDecode(contract.description),
      url: StringUtils.tryDecode(contract.url),
      freeAssetNetLimit: contract.freeAssetNetLimit,
      publicFreeAssetNetLimit: contract.publicFreeAssetNetLimit,
      frozenSupply: (contract.frozenSupply)
          ?.map((e) => Map<String, BigInt>.from(
              {"frozen_amount": e.frozenAmount, "frozen_days": e.frozenDays}))
          .toList(),
      precision: contract.precision,
      visible: visible,
      publicFreeAssetNetUsage: contract.publicFreeAssetNetUsage,
      publicLatestFreeNetTime: contract.publicLatestFreeNetTime);
}