FreezeBalanceContract.deserialize constructor

FreezeBalanceContract.deserialize(
  1. List<int> bytes
)

Implementation

factory FreezeBalanceContract.deserialize(List<int> bytes) {
  final decode = TronProtocolBufferImpl.decode(bytes);
  return FreezeBalanceContract(
    ownerAddress: TronAddress.fromBytes(decode.getField(1)),
    frozenBalance: decode.getField(2),
    frozenDuration: decode.getField(3),
    resource: ResourceCode.fromValue(decode.getField(10),
        orElse: ResourceCode.bandWidth),
    receiverAddress: decode
        .getResult(15)
        ?.castTo<TronAddress, List<int>>((e) => TronAddress.fromBytes(e)),
  );
}