UnDelegateResourceContract.deserialize constructor

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

Implementation

factory UnDelegateResourceContract.deserialize(List<int> bytes) {
  final decode = TronProtocolBufferImpl.decode(bytes);
  return UnDelegateResourceContract(
      ownerAddress: TronAddress.fromBytes(decode.getField(1)),
      balance: decode.getField(3),
      resource: decode
          .getResult(2)
          ?.castTo<ResourceCode, int>((e) => ResourceCode.fromValue(e)),
      receiverAddress: TronAddress.fromBytes(decode.getField(4)));
}