Skip to content

Commit 3b2e8ed

Browse files
committed
apply ChatGPT for improving writing style and fixing grammar
1 parent 50d6f64 commit 3b2e8ed

File tree

5 files changed

+266
-170
lines changed

5 files changed

+266
-170
lines changed

docs/neutron/modules/interchain-queries/api.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# API
22

3-
This page contains the `interchainqueries` module's interface description: the endpoints the module exposes and the `sudo` messages the module issues. Each endpoint is explained in a dedicated section with links to request and response models, and an example of interaction with the module via the endpoint. The links to the request and response models also provide more information about request parameters and response values.
3+
This page describes the interface of the `interchainqueries` module, including the endpoints it provides and the `sudo` messages it issues. Each endpoint is detailed in its own section, with links to the request and response models, as well as examples of how to interact with the module using the endpoint. The request and response model links also offer more details about the request parameters and response values.
44

5-
Please be aware that the examples do not necessarily reflect the current state on the chain; they are listed here only to visualize the request formation and response payload in a user-friendly way.
5+
Please note that the examples are for demonstration purposes only and may not reflect the current state of the chain. They are included to help visualize how requests are formed and what the response payloads look like.
66

77
**Endpoints**
88

9-
This section lists piblic RPC API of the `interchainqueries` module.
9+
This section lists the public RPC API of the `interchainqueries` module.
1010

1111
Queries:
1212
- [Params](#params);
@@ -24,7 +24,7 @@ Messages:
2424

2525
**Sudo**
2626

27-
This section lists `sudo` messages issued by the `interchainqueries` module to smart contracts owning Interchain Queries.
27+
This section lists the `sudo` messages that the `interchainqueries` module sends to smart contracts that own Interchain Queries.
2828

2929
- [MessageTxQueryResult](#messagetxqueryresult)
3030
- [MessageKvQueryResult](#messagekvqueryresult)
@@ -33,7 +33,7 @@ This section lists `sudo` messages issued by the `interchainqueries` module to s
3333

3434
### Params
3535

36-
Queries the current parameters of the module.
36+
Fetches the current parameters of the `interchainqueries` module.
3737

3838
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryParamsRequest)
3939
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryParamsResponse)
@@ -67,7 +67,7 @@ curl -X 'GET' \
6767

6868
### RegisteredQueries
6969

70-
Queries all the registered Interchain Queries in the module with filtration by owner and/or connection ID.
70+
Retrieves all registered Interchain Queries in the module, with optional filtering by owner and/or connection ID.
7171

7272
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryRegisteredQueriesRequest)
7373
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryRegisteredQueriesResponse)
@@ -145,7 +145,7 @@ curl -X 'GET' \
145145

146146
### RegisteredQuery
147147

148-
Queries a registered Interchain Query by ID.
148+
Fetches details of a registered Interchain Query using its ID.
149149

150150
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryRegisteredQueryRequest)
151151
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryRegisteredQueryResponse)
@@ -198,7 +198,7 @@ curl -X 'GET' \
198198

199199
### QueryResult
200200

201-
Queries the last successfully submitted result of an Interchain Query.
201+
Retrieves the most recent successfully submitted result of an Interchain Query. This is only applicable for KV Interchain Queries.
202202

203203
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryQueryResultRequest)
204204
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryQueryResultResponse)
@@ -238,7 +238,7 @@ curl -X 'GET' \
238238

239239
### LastRemoteHeight
240240

241-
Queries the last height of a remote chain known to the IBC client behind a given connection ID.
241+
Retrieves the most recent height of a remote chain as known by the IBC client associated with a given connection ID.
242242

243243
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryLastRemoteHeightRequest)
244244
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#QueryLastRemoteHeightResponse)
@@ -266,9 +266,9 @@ curl -X 'GET' \
266266

267267
### RegisterInterchainQuery
268268

269-
Registers a new Interchain Query in the `interchainqueries` module. This message is supposed to be issues only by a smart contract. The caller contract is charged a query registration deposit automatically in the amount defined as the module's query deposit parameter. The deposit is paid back on the query removal. Make sure to have enough assets on the contract's account at the time of the message execution.
269+
Registers a new Interchain Query in the `interchainqueries` module. This message should only be issued by a smart contract. The calling contract is automatically charged a query registration deposit, based on the module's query deposit parameter. The deposit is refunded when the query is removed. Ensure the contract's account has sufficient assets at the time of message execution.
270270

271-
Returns an ID assigned to the registered query. Handle this message response via a reply handler in order to make use of the ID.
271+
The response includes the ID assigned to the registered query. Use a reply handler to process this response and utilize the query ID.
272272

273273
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgRegisterInterchainQuery)
274274
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgRegisterInterchainQueryResponse)
@@ -289,7 +289,7 @@ Events emission on success:
289289

290290
### SubmitQueryResult
291291

292-
Submits a result of an Interchain Query execution to the chain. This message handling may include passing of the result to the query's owner smart contract for processing which might be a pretty gas-consumable operation.
292+
Submits the result of an Interchain Query execution to the chain. Handling this message may involve forwarding the result to the smart contract that owns the query for processing, which could require significant gas usage.
293293

294294
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgSubmitQueryResult)
295295
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgSubmitQueryResultResponse)
@@ -302,7 +302,7 @@ Submits a result of an Interchain Query execution to the chain. This message han
302302

303303
### RemoveInterchainQuery
304304

305-
Removes a given Interchain Query and its results from the module. Can be removed only by the owner of the query during the query's submit timeout, and by anyone after the query has been timed out. The query deposit is returned to the caller on a success call.
305+
Removes a specific Interchain Query and its results from the module. The query can only be removed by its owner during the query's submit timeout. After the timeout, anyone can remove it. Upon successful removal, the query deposit is refunded to the caller.
306306

307307
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgRemoveInterchainQuery)
308308
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgRemoveInterchainQueryResponse)
@@ -319,7 +319,7 @@ Events emission on success:
319319

320320
### UpdateInterchainQuery
321321

322-
Updates parameters of a registered Interchain Query. Only callable by the owner of the query.
322+
Updates the parameters of a registered Interchain Query. This action can only be performed by the query's owner.
323323

324324
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgUpdateInterchainQuery)
325325
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgUpdateInterchainQueryResponse)
@@ -332,7 +332,7 @@ Events emission on success:
332332

333333
### UpdateParams
334334

335-
Updates params of the interchainqueries module. Only callable by the module's authority.
335+
Updates the parameters of the `interchainqueries` module. This action can only be performed by the module's authority.
336336

337337
- [Request model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgUpdateParams)
338338
- [Response model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/interchainqueries/types#MsgUpdateParamsResponse)
@@ -341,7 +341,7 @@ Updates params of the interchainqueries module. Only callable by the module's au
341341

342342
### MessageTxQueryResult
343343

344-
MessageTxQueryResult is the model of the `sudo` message sent to a smart contract on a TX Interchain Query result submission. The owner of a TX Interchain Query must define a `sudo` entry_point for handling `tx_query_result` messages and place the needed logic there. The `tx_query_result` handler is treated by the `interchainqueries` module as a callback that is called each time a TX query result is submitted.
344+
MessageTxQueryResult is the model of the `sudo` message sent to a smart contract when a TX Interchain Query result is submitted. The owner of a TX Interchain Query must implement a `sudo` entry point to handle `tx_query_result` messages and include the necessary logic in it. The `tx_query_result` handler functions as a callback, triggered by the `interchainqueries` module each time a TX query result is submitted.
345345

346346
- [Message model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/contractmanager/types#MessageTxQueryResult)
347347
- [Message model in neutron-sdk](https://docs.rs/neutron-sdk/0.11.0/neutron_sdk/sudo/msg/enum.SudoMsg.html#variant.TxQueryResult)
@@ -359,9 +359,9 @@ Events emission on failure:
359359

360360
### MessageKvQueryResult
361361

362-
MessageKVQueryResult is the model of the `sudo` message sent to a smart contract on a KV Interchain Query result submission. If the owner of a KV Interchain Query wants to handle the query updates, it must define a `sudo` entry_point for handling `kv_query_result` messages and place the needed logic there. The `kv_query_result` handler is treated by the `interchainqueries` module as a callback that is called each time a KV query result is submitted.
362+
MessageKvQueryResult is the model of the `sudo` message sent to a smart contract when a KV Interchain Query result is submitted. If the owner of a KV Interchain Query wants to handle updates, they must implement a `sudo` entry point to process `kv_query_result` messages and include the necessary logic in it. The `kv_query_result` handler acts as a callback, triggered by the `interchainqueries` module whenever a KV query result is submitted.
363363

364-
Note that there is no query result sent, only the query ID. In order to access the actual result, use the Query/QueryResult RPC of the `interchainqueries` module.
364+
Note that the message does not include the actual query result, only the query ID. To access the result data, use the `Query/QueryResult` RPC of the `interchainqueries` module.
365365

366366
- [Message model](https://pkg.go.dev/github.com/neutron-org/neutron/v4@v4.0.1/x/contractmanager/types#MessageKVQueryResult)
367367
- [Message model in neutron-sdk](https://docs.rs/neutron-sdk/0.11.0/neutron_sdk/sudo/msg/enum.SudoMsg.html#variant.KVQueryResult)

0 commit comments

Comments
 (0)