Skip to content

Commit

Permalink
fix: allow value with slashes in URL template (backport #3045) (#4866)
Browse files Browse the repository at this point in the history
* fix: allow value with slashes in URL template (#3045)

(cherry picked from commit 002b266)

# Conflicts:
#	modules/apps/transfer/types/query.pb.go
#	modules/apps/transfer/types/query.pb.gw.go

* fix conflicts in pb files

* fix markdown links

* add changelog

---------

Co-authored-by: Carlos Rodriguez <[email protected]>
  • Loading branch information
mergify[bot] and crodriguezvega authored Oct 17, 2023
1 parent 665cc3d commit 9bd6d28
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 53 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ All notable changes to this project will be documented in this file.

### Bug Fixes

* (apps/transfer) [\#3045](https://github.com/cosmos/ibc-go/pull/3045) allow value with slashes in URL template for `denom_traces` and `denom_hashes` queries.

## [v4.5.0](https://github.com/cosmos/ibc-go/releases/tag/v4.5.0) - 2023-10-03

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/apps/interchain-accounts/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ Transactions are executed via the ICS27 [`SendTx` API](./auth-modules.md#trysend

## Atomicity

As the Interchain Accounts module supports the execution of multiple transactions using the Cosmos SDK `Msg` interface, it provides the same atomicity guarantees as Cosmos SDK-based applications, leveraging the [`CacheMultiStore`](https://docs.cosmos.network/main/core/store.html#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/main/core/context.html) type.
As the Interchain Accounts module supports the execution of multiple transactions using the Cosmos SDK `Msg` interface, it provides the same atomicity guarantees as Cosmos SDK-based applications, leveraging the [`CacheMultiStore`](https://docs.cosmos.network/main/learn/advanced/store#cachemultistore) architecture provided by the [`Context`](https://docs.cosmos.network/main/learn/advanced/context.html) type.

This provides atomic execution of transactions when using Interchain Accounts, where state changes are only committed if all `Msg`s succeed.
4 changes: 2 additions & 2 deletions docs/ibc/proto-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2112,10 +2112,10 @@ Query provides defines the gRPC querier service.

| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint |
| ----------- | ------------ | ------------- | ------------| ------- | -------- |
| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/apps/transfer/v1/denom_traces/{hash}|
| `DenomTrace` | [QueryDenomTraceRequest](#ibc.applications.transfer.v1.QueryDenomTraceRequest) | [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse) | DenomTrace queries a denomination trace information. | GET|/ibc/apps/transfer/v1/denom_traces/{hash=**}|
| `DenomTraces` | [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest) | [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse) | DenomTraces queries all denomination traces. | GET|/ibc/apps/transfer/v1/denom_traces|
| `Params` | [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest) | [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse) | Params queries all parameters of the ibc-transfer module. | GET|/ibc/apps/transfer/v1/params|
| `DenomHash` | [QueryDenomHashRequest](#ibc.applications.transfer.v1.QueryDenomHashRequest) | [QueryDenomHashResponse](#ibc.applications.transfer.v1.QueryDenomHashResponse) | DenomHash queries a denomination hash information. | GET|/ibc/apps/transfer/v1/denom_hashes/{trace}|
| `DenomHash` | [QueryDenomHashRequest](#ibc.applications.transfer.v1.QueryDenomHashRequest) | [QueryDenomHashResponse](#ibc.applications.transfer.v1.QueryDenomHashResponse) | DenomHash queries a denomination hash information. | GET|/ibc/apps/transfer/v1/denom_hashes/{trace=**}|
| `EscrowAddress` | [QueryEscrowAddressRequest](#ibc.applications.transfer.v1.QueryEscrowAddressRequest) | [QueryEscrowAddressResponse](#ibc.applications.transfer.v1.QueryEscrowAddressResponse) | EscrowAddress returns the escrow address for a particular port and channel id. | GET|/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address|

<!-- end services -->
Expand Down
92 changes: 46 additions & 46 deletions modules/apps/transfer/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions modules/apps/transfer/types/query.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions proto/ibc/applications/transfer/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ option go_package = "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types";
service Query {
// DenomTrace queries a denomination trace information.
rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) {
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}";
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash=**}";
}

// DenomTraces queries all denomination traces.
Expand All @@ -28,7 +28,7 @@ service Query {

// DenomHash queries a denomination hash information.
rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) {
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}";
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace=**}";
}

// EscrowAddress returns the escrow address for a particular port and channel id.
Expand Down

0 comments on commit 9bd6d28

Please sign in to comment.