Skip to content

Commit 155e2fb

Browse files
authored
Merge branch 'main' into update/vue-query-tree-shaking-use-query
2 parents fb66d25 + 4f61eb6 commit 155e2fb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+817
-616
lines changed

LICENSE-Apache

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ APPENDIX: How to apply the Apache License to your work.
187187
identification within third-party archives.
188188

189189
Copyright 2024 The Telescope AUTHORS
190-
Copyright 2024 Interweb, Inc. <developers@cosmology.zone>
190+
Copyright 2024 Interweb, Inc. <developers@hyperweb.io>
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

LICENSE-MIT

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
MIT License
22

33
Copyright (c) 2024 The Telescope AUTHORS
4-
Copyright (c) 2024 Interweb, Inc. <developers@cosmology.zone>
4+
Copyright (c) 2024 Interweb, Inc. <developers@hyperweb.io>
55

66
Permission is hereby granted, free of charge, to any person obtaining a copy
77
of this software and associated documentation files (the "Software"), to deal

README.md

+24-22
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
</p>
66

77
<p align="center" width="100%">
8-
<a href="https://github.com/cosmology-tech/telescope/actions/workflows/run-tests.yaml">
9-
<img height="20" src="https://github.com/cosmology-tech/telescope/actions/workflows/run-tests.yaml/badge.svg" />
8+
<a href="https://github.com/hyperweb-io/telescope/actions/workflows/run-tests.yaml">
9+
<img height="20" src="https://github.com/hyperweb-io/telescope/actions/workflows/run-tests.yaml/badge.svg" />
1010
</a>
11-
<a href="https://github.com/cosmology-tech/lib-count">
12-
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcosmology-tech%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Ftelescope%2Ftotal.json"/>
11+
<a href="https://github.com/hyperweb-io/lib-count">
12+
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyperweb-io%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Ftelescope%2Ftotal.json"/>
1313
</a>
14-
<a href="https://github.com/cosmology-tech/lib-count">
15-
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fcosmology-tech%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Ftelescope%2Fmonthly.json"/>
14+
<a href="https://github.com/hyperweb-io/lib-count">
15+
<img height="20" src="https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fhyperweb-io%2Flib-count%2Fmain%2Foutput%2Fbadges%2Fproducts%2Ftelescope%2Fmonthly.json"/>
1616
</a>
1717
<br />
18-
<a href="https://github.com/cosmology-tech/telescope/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
19-
<a href="https://github.com/cosmology-tech/telescope/blob/main/LICENSE-Apache"><img height="20" src="https://img.shields.io/badge/license-Apache-blue.svg"/></a>
20-
<a href="https://www.npmjs.com/package/@cosmology/telescope"><img height="20" src="https://img.shields.io/github/package-json/v/cosmology-tech/telescope?filename=packages%2Ftelescope%2Fpackage.json"/></a>
18+
<a href="https://github.com/hyperweb-io/telescope/blob/main/LICENSE-MIT"><img height="20" src="https://img.shields.io/badge/license-MIT-blue.svg"/></a>
19+
<a href="https://github.com/hyperweb-io/telescope/blob/main/LICENSE-Apache"><img height="20" src="https://img.shields.io/badge/license-Apache-blue.svg"/></a>
20+
<a href="https://www.npmjs.com/package/@cosmology/telescope"><img height="20" src="https://img.shields.io/github/package-json/v/hyperweb-io/telescope?filename=packages%2Ftelescope%2Fpackage.json"/></a>
2121
</p>
2222

2323
<p align="center">
@@ -119,7 +119,7 @@ npm install -g @cosmology/telescope create-cosmos-app
119119

120120
### Generate
121121

122-
Use the [`create-cosmos-app`](https://github.com/cosmology-tech/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
122+
Use the [`create-cosmos-app`](https://github.com/hyperweb-io/create-cosmos-app/) command to create a new package from the `telescope` boilerplate.
123123

124124
```sh
125125
cca --boilerplate telescope
@@ -153,15 +153,15 @@ Examples:
153153

154154
```sh
155155
# Telescope will do the download according to .json file of --config
156-
# Telescope will put proto into location specified by --out
156+
# Telescope will put proto into location specified by --out
157157
telescope download --config ./protod.config.json --out ./git-modules
158158
```
159159

160160
```sh
161161
# Telescope download from target repo according to --git-repo
162162
# in format of (i.e. <owner>/<repository> or <owner>/<repository>/<branch>)
163163
# <branch> can be empty, it will use main as default
164-
# Also --targets is required to specify the targets to download
164+
# Also --targets is required to specify the targets to download
165165
# in format like cosmos/auth/v1beta1/auth.proto
166166
telescope download --git-repo target-repo --targets target-proto
167167
```
@@ -185,7 +185,7 @@ telescope download --config ./protod.config.json --out ./git-modules --ssh true
185185
//
186186
// `outDir` is where the output proto will be put
187187
//
188-
// `targets` are the target proto to download
188+
// `targets` are the target proto to download
189189
// `targets` can be patterns like:
190190
// "cosmos/bank/v1beta1/tx.proto",
191191
// "cosmos/gov/**/*.proto",
@@ -443,6 +443,8 @@ See [LCD Clients](#lcd-clients) for more info.
443443
| `rpcClients.scopedIsExclusive` | will allow both scoped bundles and all RPC Clients | `true` |
444444
| `rpcClients.enabledServices` | which services to enable | [`Msg`,`Query`,`Service`] |
445445
| `rpcClients.instantOps` | will generate instant rpc operations in the file `service-ops.ts` under root folder, which contains customized classes having selected rpc methods | `undefined` |
446+
| `rpcClients.useConnectComet` | will use connectComet function to get a tendermint client | `undefined` |
447+
| `rpcClients.useMakeClient` | allow user to pass a query client resolver to create query client in createRPCQueryClient function | `undefined` |
446448
| `rpcClients.serviceImplement` | assign implement type of rpc methods, `Query` or `Tx`, by setting patterns under service types. | `undefined` |
447449
`rpcClients.clientStyle.useUpdatedClientStyle` | The default value is `false`, which sets the generated client to use the legacy style. Setting it to `true` applies the updated style and activates the remaining options in clientStyle. | `false`
448450
| `rpcClients.clientStyle.type` | A string array containing possible values: `all-client`, `sdk-module-client`, and `custom-client`. The value `all-client` generates an all-module-client file. The value `sdk-module-client` generates a client for the module specified by the `sdkModuleClientOption`. The value `custom-client` generates a customized client as specified by `customClientOption` | `undefined`
@@ -1107,7 +1109,7 @@ There'll be client files (`all-module-client.ts`, `akash-sdk-module-client.ts`,
11071109
The `all-module-client.ts` file consolidates all proto imports into one file and exports them as a single client.<br>
11081110
All sdk module client files will be identical to the legacy `client.ts` files generated in each module directory, except they will be located in the root directory. <br>
11091111
The custom client imports proto files based on `include.patterns`, allowing protos to originate from different modules.<br>
1110-
For example the custom-client.ts will be like:
1112+
For example the custom-client.ts will be like:
11111113
```ts
11121114
export const cosmosIbcAminoConverters = {
11131115
...cosmosGovV1TxAmino.AminoConverter,
@@ -1350,7 +1352,7 @@ This should not be an issue, but if you experience problems with syntax or are n
13501352
13511353
## Developing
13521354
1353-
See our [documentation](https://github.com/cosmology-tech/telescope/blob/main/docs/README.md) for how to contribute and develop Telescope.
1355+
See our [documentation](https://github.com/hyperweb-io/telescope/blob/main/docs/README.md) for how to contribute and develop Telescope.
13541356
13551357
## Sponsors
13561358
@@ -1362,17 +1364,17 @@ Kudos to our sponsors:
13621364
13631365
Checkout these related projects:
13641366
1365-
* [@cosmology/telescope](https://github.com/cosmology-tech/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules.
1367+
* [telescope](https://github.com/hyperweb-io/telescope) Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules.
13661368
* [@cosmwasm/ts-codegen](https://github.com/CosmWasm/ts-codegen) Convert your CosmWasm smart contracts into dev-friendly TypeScript classes.
1367-
* [chain-registry](https://github.com/cosmology-tech/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application.
1368-
* [cosmos-kit](https://github.com/cosmology-tech/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface.
1369-
* [create-cosmos-app](https://github.com/cosmology-tech/create-cosmos-app) Set up a modern Cosmos app by running one command.
1370-
* [interchain-ui](https://github.com/cosmology-tech/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit.
1371-
* [starship](https://github.com/cosmology-tech/starship) Unified Testing and Development for the Interchain.
1369+
* [chain-registry](https://github.com/hyperweb-io/chain-registry) Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application.
1370+
* [cosmos-kit](https://github.com/hyperweb-io/cosmos-kit) Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface.
1371+
* [create-cosmos-app](https://github.com/hyperweb-io/create-cosmos-app) Set up a modern Cosmos app by running one command.
1372+
* [interchain-ui](https://github.com/hyperweb-io/interchain-ui) The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit.
1373+
* [starship](https://github.com/hyperweb-io/starship) Unified Testing and Development for the Interchain.
13721374
13731375
## Credits
13741376
1375-
🛠 Built by Cosmologyif you like our tools, please consider delegating to [our validator ⚛️](https://cosmology.zone/validator)
1377+
🛠 Built by Hyperweb (formerly Cosmology) — if you like our tools, please checkout and contribute to [our github ⚛️](https://github.com/hyperweb-io)
13761378
13771379
Thanks to these engineers, teams and projects for inspiring Telescope:
13781380

__fixtures__/v-next/outputhelperfunc/helper-func-types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
4343

4444
export interface ITxArgs<TMsg> {
4545
signerAddress: string;
46-
message: TMsg;
46+
message: TMsg | TMsg[];
4747
fee: StdFee | 'auto';
4848
memo: string;
4949
}
@@ -86,7 +86,7 @@ export function buildTx<TMsg>(opts: TxBuilderOptions) {
8686

8787
return async (
8888
signerAddress: string,
89-
message: TMsg,
89+
message: TMsg | TMsg[],
9090
fee: StdFee | 'auto',
9191
memo: string
9292
): Promise<DeliverTxResponse> => {

__fixtures__/v-next/outputhelperfunc/react-query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export interface ReactMutationParams<TData, TError, TVariables, TContext = unkno
175175
export interface UseMutationBuilderOptions<TMsg> {
176176
builderMutationFn: (clientResolver?: SigningClientResolver) => (
177177
signerAddress: string,
178-
message: TMsg,
178+
message: TMsg | TMsg[],
179179
fee: StdFee | 'auto',
180180
memo: string
181181
) => Promise<DeliverTxResponse>,

__fixtures__/v-next/outputicjs/helper-func-types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function buildQuery<TReq, TRes>(opts: QueryBuilderOptions<TReq, TRes>) {
3838

3939
export interface ITxArgs<TMsg> {
4040
signerAddress: string;
41-
message: TMsg;
41+
message: TMsg | TMsg[];
4242
fee: StdFee | 'auto';
4343
memo: string;
4444
}
@@ -78,7 +78,7 @@ export interface TxBuilderOptions {
7878
export function buildTx<TMsg>(opts: TxBuilderOptions) {
7979
return async (
8080
signerAddress: string,
81-
message: TMsg,
81+
message: TMsg | TMsg[],
8282
fee: StdFee | 'auto',
8383
memo: string
8484
): Promise<DeliverTxResponse> => {

__fixtures__/v-next/outputicjs/react-query.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export interface ReactMutationParams<TData, TError, TVariables, TContext = unkno
147147
export interface UseMutationBuilderOptions<TMsg> {
148148
builderMutationFn: (clientResolver?: SigningClientResolver) => (
149149
signerAddress: string,
150-
message: TMsg,
150+
message: TMsg | TMsg[],
151151
fee: StdFee | 'auto',
152152
memo: string
153153
) => Promise<DeliverTxResponse>,

__fixtures__/v-next/outputinstantrpc/extern.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate'
8-
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
8+
import { connectComet, Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc";
99

1010
const _rpcClients: Record<string, ProtobufRpcClient> = {};
1111

@@ -40,3 +40,15 @@ export const createRpcClient = async (rpcEndpoint: string | HttpEndpoint) => {
4040

4141
return rpc;
4242
}
43+
44+
export const createTm34QueryClient = async (rpcEndpoint: string | HttpEndpoint) => {
45+
const tmClient = await Tendermint34Client.connect(rpcEndpoint);
46+
//@ts-ignore
47+
return new QueryClient(tmClient);
48+
}
49+
50+
export const createConnectCometQueryClient = async (rpcEndpoint: string | HttpEndpoint) => {
51+
const cometClient = await connectComet(rpcEndpoint);
52+
//@ts-ignore
53+
return new QueryClient(cometClient);
54+
}

__fixtures__/v-next/outputv4/akash/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
akash: {
1316
audit: {

__fixtures__/v-next/outputv4/cosmos/cosmos-rpc-client.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createCosmicRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
bank: {

__fixtures__/v-next/outputv4/cosmos/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
app: {

__fixtures__/v-next/outputv4/cosmwasm/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
app: {

__fixtures__/v-next/outputv4/evmos/evmos-rpc-client.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createEvmosRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
bank: {

__fixtures__/v-next/outputv4/evmos/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
app: {

__fixtures__/v-next/outputv4/extern.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import { QueryClient, createProtobufRpcClient, ProtobufRpcClient } from '@cosmjs/stargate'
8-
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
8+
import { connectComet, Tendermint34Client, HttpEndpoint } from "@cosmjs/tendermint-rpc";
99

1010
const _rpcClients: Record<string, ProtobufRpcClient> = {};
1111

@@ -40,3 +40,15 @@ export const createRpcClient = async (rpcEndpoint: string | HttpEndpoint) => {
4040

4141
return rpc;
4242
}
43+
44+
export const createTm34QueryClient = async (rpcEndpoint: string | HttpEndpoint) => {
45+
const tmClient = await Tendermint34Client.connect(rpcEndpoint);
46+
//@ts-ignore
47+
return new QueryClient(tmClient);
48+
}
49+
50+
export const createConnectCometQueryClient = async (rpcEndpoint: string | HttpEndpoint) => {
51+
const cometClient = await connectComet(rpcEndpoint);
52+
//@ts-ignore
53+
return new QueryClient(cometClient);
54+
}

__fixtures__/v-next/outputv4/ibc/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
app: {

__fixtures__/v-next/outputv4/osmosis/rpc.query.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import { Rpc } from "../helpers.js";
22
import { connectComet, HttpEndpoint } from "@cosmjs/tendermint-rpc";
33
import { QueryClient } from "@cosmjs/stargate";
4+
import { createConnectCometQueryClient } from "../extern.js";
45
export const createRPCQueryClient = async ({
5-
rpcEndpoint
6+
rpcEndpoint,
7+
makeClient
68
}: {
79
rpcEndpoint: string | HttpEndpoint;
10+
makeClient?: (rpcEndpoint: string | HttpEndpoint) => Promise<QueryClient>;
811
}) => {
9-
const tmClient = await connectComet(rpcEndpoint);
10-
const client = new QueryClient(tmClient);
12+
const make = makeClient || createConnectCometQueryClient;
13+
const client = await make(rpcEndpoint);
1114
return {
1215
cosmos: {
1316
app: {

0 commit comments

Comments
 (0)