WitnessCreateContract.fromJson constructor

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

Create a new WitnessCreateContract instance by parsing a JSON map.

Implementation

factory WitnessCreateContract.fromJson(Map<String, dynamic> json) {
  final ownerAddress = TronAddress(json['owner_address']);
  final url = StringUtils.tryEncode(json['url']);

  return WitnessCreateContract(
    ownerAddress: ownerAddress,
    url: url,
  );
}