diff --git a/CHANGELOG.md b/CHANGELOG.md
index 465c738b2ee..ad49532bffb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (apps/29-fee) [\#1224](https://github.com/cosmos/ibc-go/pull/1224) Adding Query/CounterpartyAddress and CLI to ICS29 fee middleware
* (apps/29-fee) [\#1225](https://github.com/cosmos/ibc-go/pull/1225) Adding Query/FeeEnabledChannel and Query/FeeEnabledChannels with CLIs to ICS29 fee middleware.
* (modules/apps/29-fee) [\#1230](https://github.com/cosmos/ibc-go/pull/1230) Adding CLI command for getting incentivized packets for a specific channel-id.
+* (modules/apps/transfer) [\#1416](https://github.com/cosmos/ibc-go/pull/1416) Adding gRPC endpoint for getting an escrow account for a given port-id and channel-id.
### Bug Fixes
diff --git a/docs/client/swagger-ui/swagger.yaml b/docs/client/swagger-ui/swagger.yaml
index 7e83bdcd814..3ca3e772583 100644
--- a/docs/client/swagger-ui/swagger.yaml
+++ b/docs/client/swagger-ui/swagger.yaml
@@ -4,6 +4,59 @@ info:
description: A REST interface for state queries
version: 1.0.0
paths:
+ '/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address':
+ get:
+ summary: >-
+ EscrowAddress returns the escrow address for a particular port and
+ channel id.
+ operationId: EscrowAddress
+ responses:
+ '200':
+ description: A successful response.
+ schema:
+ type: object
+ properties:
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: >-
+ QueryEscrowAddressResponse is the response type of the
+ EscrowAddress RPC method.
+ default:
+ description: An unexpected error response
+ schema:
+ type: object
+ properties:
+ error:
+ type: string
+ code:
+ type: integer
+ format: int32
+ message:
+ type: string
+ details:
+ type: array
+ items:
+ type: object
+ properties:
+ type_url:
+ type: string
+ value:
+ type: string
+ format: byte
+ parameters:
+ - name: channel_id
+ description: unique channel identifier
+ in: path
+ required: true
+ type: string
+ - name: port_id
+ description: unique port identifier
+ in: path
+ required: true
+ type: string
+ tags:
+ - Query
'/ibc/apps/transfer/v1/denom_hashes/{trace}':
get:
summary: DenomHash queries a denomination hash information.
@@ -399,24 +452,25 @@ paths:
format: byte
tags:
- Query
- '/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}':
+ '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled':
get:
summary: >-
- CounterpartyAddress returns the registered counterparty address for
- forward relaying
- operationId: CounterpartyAddress
+ FeeEnabledChannel returns true if the provided port and channel
+ identifiers belong to a fee enabled channel
+ operationId: FeeEnabledChannel
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- counterparty_address:
- type: string
- title: the counterparty address used to compensate forward relaying
+ fee_enabled:
+ type: boolean
+ format: boolean
+ title: boolean flag representing the fee enabled channel status
title: >-
- QueryCounterpartyAddressResponse defines the response type for the
- CounterpartyAddress rpc
+ QueryFeeEnabledChannelResponse defines the response type for the
+ FeeEnabledChannel rpc
default:
description: An unexpected error response
schema:
@@ -607,46 +661,138 @@ paths:
"value": "1.212s"
}
parameters:
- - name: relayer_address
- description: the relayer address to which the counterparty is registered
+ - name: channel_id
+ description: unique channel identifier
in: path
required: true
type: string
- - name: channel_id
- description: unique channel identifier
+ - name: port_id
+ description: unique port identifier
in: path
required: true
type: string
tags:
- Query
- /ibc/apps/fee/v1/fee_enabled:
+ '/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets':
get:
- summary: FeeEnabledChannels returns a list of all fee enabled channels
- operationId: FeeEnabledChannels
+ summary: Gets all incentivized packets for a specific channel
+ operationId: IncentivizedPacketsForChannel
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- fee_enabled_channels:
+ incentivized_packets:
type: array
items:
type: object
properties:
- port_id:
- type: string
- title: unique port identifier
- channel_id:
- type: string
- title: unique channel identifier
+ packet_id:
+ title: >-
+ unique packet identifier comprised of the channel ID,
+ port ID and sequence
+ type: object
+ properties:
+ port_id:
+ type: string
+ title: channel port identifier
+ channel_id:
+ type: string
+ title: channel unique identifier
+ sequence:
+ type: string
+ format: uint64
+ title: packet sequence
+ packet_fees:
+ type: array
+ items:
+ type: object
+ properties:
+ fee:
+ title: >-
+ fee encapsulates the recv, ack and timeout fees
+ associated with an IBC packet
+ type: object
+ properties:
+ recv_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
+
+
+ NOTE: The amount field is an Int which
+ implements the custom method
+
+ signatures required by gogoproto.
+ title: the packet receive fee
+ ack_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
+
+
+ NOTE: The amount field is an Int which
+ implements the custom method
+
+ signatures required by gogoproto.
+ title: the packet acknowledgement fee
+ timeout_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
+
+
+ NOTE: The amount field is an Int which
+ implements the custom method
+
+ signatures required by gogoproto.
+ title: the packet timeout fee
+ refund_address:
+ type: string
+ title: the refund address for unspent fees
+ relayers:
+ type: array
+ items:
+ type: string
+ title: >-
+ optional list of relayers permitted to receive
+ fees
+ title: >-
+ PacketFee contains ICS29 relayer fees, refund address
+ and optional list of permitted relayers
+ title: list of packet fees
title: >-
- FeeEnabledChannel contains the PortID & ChannelID for a fee
- enabled channel
- title: list of fee enabled channels
+ IdentifiedPacketFees contains a list of type PacketFee and
+ associated PacketId
+ title: Map of all incentivized_packets
title: >-
- QueryFeeEnabledChannelsResponse defines the response type for the
- FeeEnabledChannels rpc
+ QueryIncentivizedPacketsResponse defines the response type for the
+ incentivized packets RPC
default:
description: An unexpected error response
schema:
@@ -837,6 +983,14 @@ paths:
"value": "1.212s"
}
parameters:
+ - name: channel_id
+ in: path
+ required: true
+ type: string
+ - name: port_id
+ in: path
+ required: true
+ type: string
- name: pagination.key
description: |-
key is a value returned in PageResponse.next_key to begin
@@ -885,32 +1039,31 @@ paths:
type: boolean
format: boolean
- name: query_height
- description: block height at which to query.
+ description: Height to query at.
in: query
required: false
type: string
format: uint64
tags:
- Query
- '/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}':
+ '/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/counterparty_address':
get:
summary: >-
- FeeEnabledChannel returns true if the provided port and channel
- identifiers belong to a fee enabled channel
- operationId: FeeEnabledChannel
+ CounterpartyAddress returns the registered counterparty address for
+ forward relaying
+ operationId: CounterpartyAddress
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- fee_enabled:
- type: boolean
- format: boolean
- title: boolean flag representing the fee enabled channel status
+ counterparty_address:
+ type: string
+ title: the counterparty address used to compensate forward relaying
title: >-
- QueryFeeEnabledChannelResponse defines the response type for the
- FeeEnabledChannel rpc
+ QueryCounterpartyAddressResponse defines the response type for the
+ CounterpartyAddress rpc
default:
description: An unexpected error response
schema:
@@ -1101,19 +1254,19 @@ paths:
"value": "1.212s"
}
parameters:
- - name: port_id
- description: unique port identifier
+ - name: channel_id
+ description: unique channel identifier
in: path
required: true
type: string
- - name: channel_id
- description: unique channel identifier
+ - name: relayer_address
+ description: the relayer address to which the counterparty is registered
in: path
required: true
type: string
tags:
- Query
- '/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}':
+ '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/incentivized_packet':
get:
summary: >-
IncentivizedPacket returns all packet fees for a packet given its
@@ -1126,7 +1279,6 @@ paths:
type: object
properties:
incentivized_packet:
- title: the identified fees for the incentivized packet
type: object
properties:
packet_id:
@@ -1225,6 +1377,9 @@ paths:
PacketFee contains ICS29 relayer fees, refund address
and optional list of permitted relayers
title: list of packet fees
+ title: >-
+ IdentifiedPacketFees contains a list of type PacketFee and
+ associated PacketId
title: >-
QueryIncentivizedPacketsResponse defines the response type for the
IncentivizedPacket rpc
@@ -1418,13 +1573,13 @@ paths:
"value": "1.212s"
}
parameters:
- - name: packet_id.port_id
- description: channel port identifier
+ - name: packet_id.channel_id
+ description: channel unique identifier
in: path
required: true
type: string
- - name: packet_id.channel_id
- description: channel unique identifier
+ - name: packet_id.port_id
+ description: channel port identifier
in: path
required: true
type: string
@@ -1442,128 +1597,39 @@ paths:
format: uint64
tags:
- Query
- /ibc/apps/fee/v1/incentivized_packets:
+ '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_ack_fees':
get:
summary: >-
- IncentivizedPackets returns all incentivized packets and their
- associated fees
- operationId: IncentivizedPackets
+ TotalAckFees returns the total acknowledgement fees for a packet given
+ its identifier
+ operationId: TotalAckFees
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- incentivized_packets:
+ ack_fees:
type: array
items:
type: object
properties:
- packet_id:
- title: >-
- unique packet identifier comprised of the channel ID,
- port ID and sequence
- type: object
- properties:
- port_id:
- type: string
- title: channel port identifier
- channel_id:
- type: string
- title: channel unique identifier
- sequence:
- type: string
- format: uint64
- title: packet sequence
- packet_fees:
- type: array
- items:
- type: object
- properties:
- fee:
- title: >-
- fee encapsulates the recv, ack and timeout fees
- associated with an IBC packet
- type: object
- properties:
- recv_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
-
-
- NOTE: The amount field is an Int which
- implements the custom method
-
- signatures required by gogoproto.
- title: the packet receive fee
- ack_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
-
-
- NOTE: The amount field is an Int which
- implements the custom method
-
- signatures required by gogoproto.
- title: the packet acknowledgement fee
- timeout_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
- NOTE: The amount field is an Int which
- implements the custom method
+ NOTE: The amount field is an Int which implements the custom
+ method
- signatures required by gogoproto.
- title: the packet timeout fee
- refund_address:
- type: string
- title: the refund address for unspent fees
- relayers:
- type: array
- items:
- type: string
- title: >-
- optional list of relayers permitted to receive
- fees
- title: >-
- PacketFee contains ICS29 relayer fees, refund address
- and optional list of permitted relayers
- title: list of packet fees
- title: >-
- IdentifiedPacketFees contains a list of type PacketFee and
- associated PacketId
- title: list of identified fees for incentivized packets
+ signatures required by gogoproto.
+ title: the total packet acknowledgement fees
title: >-
- QueryIncentivizedPacketsResponse defines the response type for the
- IncentivizedPackets rpc
+ QueryTotalAckFeesResponse defines the response type for the
+ TotalAckFees rpc
default:
description: An unexpected error response
schema:
@@ -1754,181 +1820,57 @@ paths:
"value": "1.212s"
}
parameters:
- - name: pagination.key
- description: |-
- key is a value returned in PageResponse.next_key to begin
- querying the next page most efficiently. Only one of offset or key
- should be set.
- in: query
- required: false
- type: string
- format: byte
- - name: pagination.offset
- description: >-
- offset is a numeric offset that can be used when key is unavailable.
-
- It is less efficient than using key. Only one of offset or key
- should
-
- be set.
- in: query
- required: false
+ - name: packet_id.channel_id
+ description: channel unique identifier
+ in: path
+ required: true
type: string
- format: uint64
- - name: pagination.limit
- description: >-
- limit is the total number of results to be returned in the result
- page.
-
- If left empty it will default to a value to be set by each app.
- in: query
- required: false
+ - name: packet_id.port_id
+ description: channel port identifier
+ in: path
+ required: true
type: string
- format: uint64
- - name: pagination.count_total
- description: >-
- count_total is set to true to indicate that the result set should
- include
-
- a count of the total number of items available for pagination in
- UIs.
-
- count_total is only respected when offset is used. It is ignored
- when key
-
- is set.
- in: query
- required: false
- type: boolean
- format: boolean
- - name: query_height
- description: block height at which to query.
- in: query
- required: false
+ - name: packet_id.sequence
+ description: packet sequence
+ in: path
+ required: true
type: string
format: uint64
tags:
- Query
- '/ibc/apps/fee/v1/incentivized_packets/port/{port_id}/channel/{channel_id}':
+ '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_recv_fees':
get:
- summary: Gets all incentivized packets for a specific channel
- operationId: IncentivizedPacketsForChannel
+ summary: >-
+ TotalRecvFees returns the total receive fees for a packet given its
+ identifier
+ operationId: TotalRecvFees
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- incentivized_packets:
+ recv_fees:
type: array
items:
type: object
properties:
- packet_id:
- title: >-
- unique packet identifier comprised of the channel ID,
- port ID and sequence
- type: object
- properties:
- port_id:
- type: string
- title: channel port identifier
- channel_id:
- type: string
- title: channel unique identifier
- sequence:
- type: string
- format: uint64
- title: packet sequence
- packet_fees:
- type: array
- items:
- type: object
- properties:
- fee:
- title: >-
- fee encapsulates the recv, ack and timeout fees
- associated with an IBC packet
- type: object
- properties:
- recv_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
-
-
- NOTE: The amount field is an Int which
- implements the custom method
-
- signatures required by gogoproto.
- title: the packet receive fee
- ack_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
-
-
- NOTE: The amount field is an Int which
- implements the custom method
-
- signatures required by gogoproto.
- title: the packet acknowledgement fee
- timeout_fee:
- type: array
- items:
- type: object
- properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and
- an amount.
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and an amount.
- NOTE: The amount field is an Int which
- implements the custom method
+ NOTE: The amount field is an Int which implements the custom
+ method
- signatures required by gogoproto.
- title: the packet timeout fee
- refund_address:
- type: string
- title: the refund address for unspent fees
- relayers:
- type: array
- items:
- type: string
- title: >-
- optional list of relayers permitted to receive
- fees
- title: >-
- PacketFee contains ICS29 relayer fees, refund address
- and optional list of permitted relayers
- title: list of packet fees
- title: >-
- IdentifiedPacketFees contains a list of type PacketFee and
- associated PacketId
- title: Map of all incentivized_packets
+ signatures required by gogoproto.
+ title: the total packet receive fees
title: >-
- QueryIncentivizedPacketsResponse defines the response type for the
- incentivized packets RPC
+ QueryTotalRecvFeesResponse defines the response type for the
+ TotalRecvFees rpc
default:
description: An unexpected error response
schema:
@@ -2119,82 +2061,37 @@ paths:
"value": "1.212s"
}
parameters:
- - name: port_id
+ - name: packet_id.channel_id
+ description: channel unique identifier
in: path
required: true
type: string
- - name: channel_id
+ - name: packet_id.port_id
+ description: channel port identifier
in: path
required: true
type: string
- - name: pagination.key
- description: |-
- key is a value returned in PageResponse.next_key to begin
- querying the next page most efficiently. Only one of offset or key
- should be set.
- in: query
- required: false
- type: string
- format: byte
- - name: pagination.offset
- description: >-
- offset is a numeric offset that can be used when key is unavailable.
-
- It is less efficient than using key. Only one of offset or key
- should
-
- be set.
- in: query
- required: false
- type: string
- format: uint64
- - name: pagination.limit
- description: >-
- limit is the total number of results to be returned in the result
- page.
-
- If left empty it will default to a value to be set by each app.
- in: query
- required: false
- type: string
- format: uint64
- - name: pagination.count_total
- description: >-
- count_total is set to true to indicate that the result set should
- include
-
- a count of the total number of items available for pagination in
- UIs.
-
- count_total is only respected when offset is used. It is ignored
- when key
-
- is set.
- in: query
- required: false
- type: boolean
- format: boolean
- - name: query_height
- description: Height to query at.
- in: query
- required: false
+ - name: packet_id.sequence
+ description: packet sequence
+ in: path
+ required: true
type: string
format: uint64
tags:
- Query
- '/ibc/apps/fee/v1/total_ack_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}':
+ '/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/{packet_id.sequence}/total_timeout_fees':
get:
summary: >-
- TotalAckFees returns the total acknowledgement fees for a packet given
- its identifier
- operationId: TotalAckFees
+ TotalTimeoutFees returns the total timeout fees for a packet given its
+ identifier
+ operationId: TotalTimeoutFees
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- ack_fees:
+ timeout_fees:
type: array
items:
type: object
@@ -2211,10 +2108,10 @@ paths:
method
signatures required by gogoproto.
- title: the total packet acknowledgement fees
+ title: the total packet timeout fees
title: >-
- QueryTotalAckFeesResponse defines the response type for the
- TotalAckFees rpc
+ QueryTotalTimeoutFeesResponse defines the response type for the
+ TotalTimeoutFees rpc
default:
description: An unexpected error response
schema:
@@ -2405,13 +2302,13 @@ paths:
"value": "1.212s"
}
parameters:
- - name: packet_id.port_id
- description: channel port identifier
+ - name: packet_id.channel_id
+ description: channel unique identifier
in: path
required: true
type: string
- - name: packet_id.channel_id
- description: channel unique identifier
+ - name: packet_id.port_id
+ description: channel port identifier
in: path
required: true
type: string
@@ -2423,39 +2320,34 @@ paths:
format: uint64
tags:
- Query
- '/ibc/apps/fee/v1/total_recv_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}':
+ /ibc/apps/fee/v1/fee_enabled:
get:
- summary: >-
- TotalRecvFees returns the total receive fees for a packet given its
- identifier
- operationId: TotalRecvFees
+ summary: FeeEnabledChannels returns a list of all fee enabled channels
+ operationId: FeeEnabledChannels
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- recv_fees:
+ fee_enabled_channels:
type: array
items:
type: object
properties:
- denom:
+ port_id:
type: string
- amount:
+ title: unique port identifier
+ channel_id:
type: string
- description: >-
- Coin defines a token with a denomination and an amount.
-
-
- NOTE: The amount field is an Int which implements the custom
- method
-
- signatures required by gogoproto.
- title: the total packet receive fees
+ title: unique channel identifier
+ title: >-
+ FeeEnabledChannel contains the PortID & ChannelID for a fee
+ enabled channel
+ title: list of fee enabled channels
title: >-
- QueryTotalRecvFeesResponse defines the response type for the
- TotalRecvFees rpc
+ QueryFeeEnabledChannelsResponse defines the response type for the
+ FeeEnabledChannels rpc
default:
description: An unexpected error response
schema:
@@ -2646,57 +2538,183 @@ paths:
"value": "1.212s"
}
parameters:
- - name: packet_id.port_id
- description: channel port identifier
- in: path
- required: true
+ - name: pagination.key
+ description: |-
+ key is a value returned in PageResponse.next_key to begin
+ querying the next page most efficiently. Only one of offset or key
+ should be set.
+ in: query
+ required: false
type: string
- - name: packet_id.channel_id
- description: channel unique identifier
- in: path
- required: true
+ format: byte
+ - name: pagination.offset
+ description: >-
+ offset is a numeric offset that can be used when key is unavailable.
+
+ It is less efficient than using key. Only one of offset or key
+ should
+
+ be set.
+ in: query
+ required: false
type: string
- - name: packet_id.sequence
- description: packet sequence
- in: path
- required: true
+ format: uint64
+ - name: pagination.limit
+ description: >-
+ limit is the total number of results to be returned in the result
+ page.
+
+ If left empty it will default to a value to be set by each app.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.count_total
+ description: >-
+ count_total is set to true to indicate that the result set should
+ include
+
+ a count of the total number of items available for pagination in
+ UIs.
+
+ count_total is only respected when offset is used. It is ignored
+ when key
+
+ is set.
+ in: query
+ required: false
+ type: boolean
+ format: boolean
+ - name: query_height
+ description: block height at which to query.
+ in: query
+ required: false
type: string
format: uint64
tags:
- Query
- '/ibc/apps/fee/v1/total_timeout_fees/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/{packet_id.sequence}':
+ /ibc/apps/fee/v1/incentivized_packets:
get:
summary: >-
- TotalTimeoutFees returns the total timeout fees for a packet given its
- identifier
- operationId: TotalTimeoutFees
+ IncentivizedPackets returns all incentivized packets and their
+ associated fees
+ operationId: IncentivizedPackets
responses:
'200':
description: A successful response.
schema:
type: object
properties:
- timeout_fees:
+ incentivized_packets:
type: array
items:
type: object
properties:
- denom:
- type: string
- amount:
- type: string
- description: >-
- Coin defines a token with a denomination and an amount.
+ packet_id:
+ title: >-
+ unique packet identifier comprised of the channel ID,
+ port ID and sequence
+ type: object
+ properties:
+ port_id:
+ type: string
+ title: channel port identifier
+ channel_id:
+ type: string
+ title: channel unique identifier
+ sequence:
+ type: string
+ format: uint64
+ title: packet sequence
+ packet_fees:
+ type: array
+ items:
+ type: object
+ properties:
+ fee:
+ title: >-
+ fee encapsulates the recv, ack and timeout fees
+ associated with an IBC packet
+ type: object
+ properties:
+ recv_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
- NOTE: The amount field is an Int which implements the custom
- method
+ NOTE: The amount field is an Int which
+ implements the custom method
- signatures required by gogoproto.
- title: the total packet timeout fees
+ signatures required by gogoproto.
+ title: the packet receive fee
+ ack_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
+
+
+ NOTE: The amount field is an Int which
+ implements the custom method
+
+ signatures required by gogoproto.
+ title: the packet acknowledgement fee
+ timeout_fee:
+ type: array
+ items:
+ type: object
+ properties:
+ denom:
+ type: string
+ amount:
+ type: string
+ description: >-
+ Coin defines a token with a denomination and
+ an amount.
+
+
+ NOTE: The amount field is an Int which
+ implements the custom method
+
+ signatures required by gogoproto.
+ title: the packet timeout fee
+ refund_address:
+ type: string
+ title: the refund address for unspent fees
+ relayers:
+ type: array
+ items:
+ type: string
+ title: >-
+ optional list of relayers permitted to receive
+ fees
+ title: >-
+ PacketFee contains ICS29 relayer fees, refund address
+ and optional list of permitted relayers
+ title: list of packet fees
+ title: >-
+ IdentifiedPacketFees contains a list of type PacketFee and
+ associated PacketId
+ title: list of identified fees for incentivized packets
title: >-
- QueryTotalTimeoutFeesResponse defines the response type for the
- TotalTimeoutFees rpc
+ QueryIncentivizedPacketsResponse defines the response type for the
+ IncentivizedPackets rpc
default:
description: An unexpected error response
schema:
@@ -2887,20 +2905,57 @@ paths:
"value": "1.212s"
}
parameters:
- - name: packet_id.port_id
- description: channel port identifier
- in: path
- required: true
+ - name: pagination.key
+ description: |-
+ key is a value returned in PageResponse.next_key to begin
+ querying the next page most efficiently. Only one of offset or key
+ should be set.
+ in: query
+ required: false
type: string
- - name: packet_id.channel_id
- description: channel unique identifier
- in: path
- required: true
+ format: byte
+ - name: pagination.offset
+ description: >-
+ offset is a numeric offset that can be used when key is unavailable.
+
+ It is less efficient than using key. Only one of offset or key
+ should
+
+ be set.
+ in: query
+ required: false
type: string
- - name: packet_id.sequence
- description: packet sequence
- in: path
- required: true
+ format: uint64
+ - name: pagination.limit
+ description: >-
+ limit is the total number of results to be returned in the result
+ page.
+
+ If left empty it will default to a value to be set by each app.
+ in: query
+ required: false
+ type: string
+ format: uint64
+ - name: pagination.count_total
+ description: >-
+ count_total is set to true to indicate that the result set should
+ include
+
+ a count of the total number of items available for pagination in
+ UIs.
+
+ count_total is only respected when offset is used. It is ignored
+ when key
+
+ is set.
+ in: query
+ required: false
+ type: boolean
+ format: boolean
+ - name: query_height
+ description: block height at which to query.
+ in: query
+ required: false
type: string
format: uint64
tags:
@@ -12582,6 +12637,15 @@ definitions:
QueryConnectionsResponse is the response type for the Query/DenomTraces
RPC
+ method.
+ ibc.applications.transfer.v1.QueryEscrowAddressResponse:
+ type: object
+ properties:
+ escrow_address:
+ type: string
+ title: the escrow account address
+ description: >-
+ QueryEscrowAddressResponse is the response type of the EscrowAddress RPC
method.
ibc.applications.transfer.v1.QueryParamsResponse:
type: object
@@ -12955,7 +13019,6 @@ definitions:
type: object
properties:
incentivized_packet:
- title: the identified fees for the incentivized packet
type: object
properties:
packet_id:
@@ -13054,6 +13117,9 @@ definitions:
PacketFee contains ICS29 relayer fees, refund address and
optional list of permitted relayers
title: list of packet fees
+ title: >-
+ IdentifiedPacketFees contains a list of type PacketFee and associated
+ PacketId
title: >-
QueryIncentivizedPacketsResponse defines the response type for the
IncentivizedPacket rpc
diff --git a/docs/ibc/proto-docs.md b/docs/ibc/proto-docs.md
index db7c27316c4..ecf3ca2aa87 100644
--- a/docs/ibc/proto-docs.md
+++ b/docs/ibc/proto-docs.md
@@ -126,6 +126,8 @@
- [QueryDenomTraceResponse](#ibc.applications.transfer.v1.QueryDenomTraceResponse)
- [QueryDenomTracesRequest](#ibc.applications.transfer.v1.QueryDenomTracesRequest)
- [QueryDenomTracesResponse](#ibc.applications.transfer.v1.QueryDenomTracesResponse)
+ - [QueryEscrowAddressRequest](#ibc.applications.transfer.v1.QueryEscrowAddressRequest)
+ - [QueryEscrowAddressResponse](#ibc.applications.transfer.v1.QueryEscrowAddressResponse)
- [QueryParamsRequest](#ibc.applications.transfer.v1.QueryParamsRequest)
- [QueryParamsResponse](#ibc.applications.transfer.v1.QueryParamsResponse)
@@ -1920,6 +1922,37 @@ method.
+
+
+### QueryEscrowAddressRequest
+QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `port_id` | [string](#string) | | unique port identifier |
+| `channel_id` | [string](#string) | | unique channel identifier |
+
+
+
+
+
+
+
+
+### QueryEscrowAddressResponse
+QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| `escrow_address` | [string](#string) | | the escrow account address |
+
+
+
+
+
+
### QueryParamsRequest
@@ -1962,6 +1995,7 @@ Query provides defines the gRPC querier service.
| `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}|
+| `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|
diff --git a/modules/apps/transfer/client/cli/query.go b/modules/apps/transfer/client/cli/query.go
index 5eb1a1a0c9b..2a6e3161a93 100644
--- a/modules/apps/transfer/client/cli/query.go
+++ b/modules/apps/transfer/client/cli/query.go
@@ -17,7 +17,7 @@ func GetCmdQueryDenomTrace() *cobra.Command {
Use: "denom-trace [hash/denom]",
Short: "Query the denom trace info from a given trace hash or ibc denom",
Long: "Query the denom trace info from a given trace hash or ibc denom",
- Example: fmt.Sprintf("%s query ibc-transfer denom-trace [hash/denom]", version.AppName),
+ Example: fmt.Sprintf("%s query ibc-transfer denom-trace 27A6394C3F9FF9C9DCF5DFFADF9BB5FE9A37C7E92B006199894CF1824DF9AC7C", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
@@ -142,7 +142,7 @@ func GetCmdQueryDenomHash() *cobra.Command {
Use: "denom-hash [trace]",
Short: "Query the denom hash info from a given denom trace",
Long: "Query the denom hash info from a given denom trace",
- Example: fmt.Sprintf("%s query ibc-transfer denom-hash [denom_trace]", version.AppName),
+ Example: fmt.Sprintf("%s query ibc-transfer denom-hash transfer/channel-0/uatom", version.AppName),
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
diff --git a/modules/apps/transfer/keeper/grpc_query.go b/modules/apps/transfer/keeper/grpc_query.go
index 25bbbe3d75b..512e8e58396 100644
--- a/modules/apps/transfer/keeper/grpc_query.go
+++ b/modules/apps/transfer/keeper/grpc_query.go
@@ -108,3 +108,16 @@ func (q Keeper) DenomHash(c context.Context, req *types.QueryDenomHashRequest) (
Hash: denomHash.String(),
}, nil
}
+
+// EscrowAddress implements the EscrowAddress gRPC method
+func (q Keeper) EscrowAddress(c context.Context, req *types.QueryEscrowAddressRequest) (*types.QueryEscrowAddressResponse, error) {
+ if req == nil {
+ return nil, status.Error(codes.InvalidArgument, "empty request")
+ }
+
+ addr := types.GetEscrowAddress(req.PortId, req.ChannelId)
+
+ return &types.QueryEscrowAddressResponse{
+ EscrowAddress: addr.String(),
+ }, nil
+}
diff --git a/modules/apps/transfer/keeper/grpc_query_test.go b/modules/apps/transfer/keeper/grpc_query_test.go
index 085891e265b..c0edaea2a20 100644
--- a/modules/apps/transfer/keeper/grpc_query_test.go
+++ b/modules/apps/transfer/keeper/grpc_query_test.go
@@ -7,6 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/query"
"github.com/cosmos/ibc-go/v3/modules/apps/transfer/types"
+ ibctesting "github.com/cosmos/ibc-go/v3/testing"
)
func (suite *KeeperTestSuite) TestQueryDenomTrace() {
@@ -220,3 +221,45 @@ func (suite *KeeperTestSuite) TestQueryDenomHash() {
})
}
}
+
+func (suite *KeeperTestSuite) TestEscrowAddress() {
+ var (
+ req *types.QueryEscrowAddressRequest
+ )
+
+ testCases := []struct {
+ msg string
+ malleate func()
+ expPass bool
+ }{
+ {
+ "success",
+ func() {
+ req = &types.QueryEscrowAddressRequest{
+ PortId: ibctesting.TransferPort,
+ ChannelId: ibctesting.FirstChannelID,
+ }
+ },
+ true,
+ },
+ }
+
+ for _, tc := range testCases {
+ suite.Run(fmt.Sprintf("Case %s", tc.msg), func() {
+ suite.SetupTest() // reset
+
+ tc.malleate()
+ ctx := sdk.WrapSDKContext(suite.chainA.GetContext())
+
+ res, err := suite.queryClient.EscrowAddress(ctx, req)
+
+ if tc.expPass {
+ suite.Require().NoError(err)
+ expected := types.GetEscrowAddress(ibctesting.TransferPort, ibctesting.FirstChannelID).String()
+ suite.Require().Equal(expected, res.EscrowAddress)
+ } else {
+ suite.Require().Error(err)
+ }
+ })
+ }
+}
diff --git a/modules/apps/transfer/types/query.pb.go b/modules/apps/transfer/types/query.pb.go
index e1206ab0e30..a137649a094 100644
--- a/modules/apps/transfer/types/query.pb.go
+++ b/modules/apps/transfer/types/query.pb.go
@@ -404,6 +404,107 @@ func (m *QueryDenomHashResponse) GetHash() string {
return ""
}
+// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method.
+type QueryEscrowAddressRequest struct {
+ // unique port identifier
+ PortId string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty"`
+ // unique channel identifier
+ ChannelId string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
+}
+
+func (m *QueryEscrowAddressRequest) Reset() { *m = QueryEscrowAddressRequest{} }
+func (m *QueryEscrowAddressRequest) String() string { return proto.CompactTextString(m) }
+func (*QueryEscrowAddressRequest) ProtoMessage() {}
+func (*QueryEscrowAddressRequest) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a638e2800a01538c, []int{8}
+}
+func (m *QueryEscrowAddressRequest) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryEscrowAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryEscrowAddressRequest.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryEscrowAddressRequest) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryEscrowAddressRequest.Merge(m, src)
+}
+func (m *QueryEscrowAddressRequest) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryEscrowAddressRequest) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryEscrowAddressRequest.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryEscrowAddressRequest proto.InternalMessageInfo
+
+func (m *QueryEscrowAddressRequest) GetPortId() string {
+ if m != nil {
+ return m.PortId
+ }
+ return ""
+}
+
+func (m *QueryEscrowAddressRequest) GetChannelId() string {
+ if m != nil {
+ return m.ChannelId
+ }
+ return ""
+}
+
+// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.
+type QueryEscrowAddressResponse struct {
+ // the escrow account address
+ EscrowAddress string `protobuf:"bytes,1,opt,name=escrow_address,json=escrowAddress,proto3" json:"escrow_address,omitempty"`
+}
+
+func (m *QueryEscrowAddressResponse) Reset() { *m = QueryEscrowAddressResponse{} }
+func (m *QueryEscrowAddressResponse) String() string { return proto.CompactTextString(m) }
+func (*QueryEscrowAddressResponse) ProtoMessage() {}
+func (*QueryEscrowAddressResponse) Descriptor() ([]byte, []int) {
+ return fileDescriptor_a638e2800a01538c, []int{9}
+}
+func (m *QueryEscrowAddressResponse) XXX_Unmarshal(b []byte) error {
+ return m.Unmarshal(b)
+}
+func (m *QueryEscrowAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ if deterministic {
+ return xxx_messageInfo_QueryEscrowAddressResponse.Marshal(b, m, deterministic)
+ } else {
+ b = b[:cap(b)]
+ n, err := m.MarshalToSizedBuffer(b)
+ if err != nil {
+ return nil, err
+ }
+ return b[:n], nil
+ }
+}
+func (m *QueryEscrowAddressResponse) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_QueryEscrowAddressResponse.Merge(m, src)
+}
+func (m *QueryEscrowAddressResponse) XXX_Size() int {
+ return m.Size()
+}
+func (m *QueryEscrowAddressResponse) XXX_DiscardUnknown() {
+ xxx_messageInfo_QueryEscrowAddressResponse.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_QueryEscrowAddressResponse proto.InternalMessageInfo
+
+func (m *QueryEscrowAddressResponse) GetEscrowAddress() string {
+ if m != nil {
+ return m.EscrowAddress
+ }
+ return ""
+}
+
func init() {
proto.RegisterType((*QueryDenomTraceRequest)(nil), "ibc.applications.transfer.v1.QueryDenomTraceRequest")
proto.RegisterType((*QueryDenomTraceResponse)(nil), "ibc.applications.transfer.v1.QueryDenomTraceResponse")
@@ -413,6 +514,8 @@ func init() {
proto.RegisterType((*QueryParamsResponse)(nil), "ibc.applications.transfer.v1.QueryParamsResponse")
proto.RegisterType((*QueryDenomHashRequest)(nil), "ibc.applications.transfer.v1.QueryDenomHashRequest")
proto.RegisterType((*QueryDenomHashResponse)(nil), "ibc.applications.transfer.v1.QueryDenomHashResponse")
+ proto.RegisterType((*QueryEscrowAddressRequest)(nil), "ibc.applications.transfer.v1.QueryEscrowAddressRequest")
+ proto.RegisterType((*QueryEscrowAddressResponse)(nil), "ibc.applications.transfer.v1.QueryEscrowAddressResponse")
}
func init() {
@@ -420,45 +523,52 @@ func init() {
}
var fileDescriptor_a638e2800a01538c = []byte{
- // 595 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4f, 0x6f, 0xd3, 0x30,
- 0x1c, 0xad, 0x07, 0xab, 0x34, 0x17, 0x71, 0x30, 0x05, 0xaa, 0xa8, 0xca, 0xa6, 0xa8, 0x82, 0xd2,
- 0x6d, 0x36, 0x69, 0x07, 0x5c, 0x38, 0x4d, 0x88, 0x3f, 0xb7, 0xad, 0x70, 0x82, 0x03, 0x72, 0x52,
- 0x93, 0x46, 0x6a, 0xe3, 0x2c, 0x4e, 0x2b, 0x4d, 0x68, 0x17, 0x3e, 0x01, 0xd2, 0xbe, 0x02, 0x07,
- 0x34, 0xf1, 0x21, 0x38, 0xee, 0x38, 0x89, 0x0b, 0x27, 0x40, 0x2d, 0x1f, 0x04, 0xc5, 0x76, 0xda,
- 0x84, 0x56, 0xdd, 0x72, 0x73, 0xdd, 0xdf, 0xfb, 0xfd, 0xde, 0x7b, 0xbf, 0x17, 0xc3, 0xa6, 0xef,
- 0xb8, 0x84, 0x86, 0xe1, 0xc0, 0x77, 0x69, 0xec, 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- 0x05, 0xb0, 0xac, 0x76, 0x8a, 0x1e, 0x5e, 0x61, 0x5c, 0x2e, 0x52, 0x86, 0x5d, 0x00, 0xa1, 0xb9,
- 0x35, 0x24, 0x37, 0x13, 0xd5, 0x97, 0x73, 0x53, 0xb1, 0x42, 0x67, 0x00, 0x6e, 0xcc, 0x32, 0x82,
- 0x3a, 0x57, 0xf5, 0x21, 0x13, 0x40, 0x63, 0xaf, 0x18, 0x48, 0xd3, 0x6b, 0x4b, 0x7a, 0x3b, 0xa8,
- 0xb5, 0xca, 0xba, 0x64, 0xc9, 0xc9, 0xb2, 0xa5, 0x85, 0x27, 0xfb, 0x87, 0xe7, 0x13, 0x13, 0x5c,
- 0x4c, 0x4c, 0xf0, 0x67, 0x62, 0x82, 0xcf, 0x53, 0xb3, 0x74, 0x31, 0x35, 0x4b, 0x3f, 0xa7, 0x66,
- 0xe9, 0xed, 0x13, 0xcf, 0x8f, 0xfb, 0x23, 0x07, 0xbb, 0x7c, 0x48, 0xf4, 0x23, 0xee, 0x3b, 0xee,
- 0xae, 0xc7, 0xc9, 0xb8, 0x43, 0x86, 0xbc, 0x37, 0x1a, 0x30, 0xf1, 0xdf, 0x90, 0xf8, 0x38, 0x64,
- 0xc2, 0x29, 0xcb, 0x27, 0xb8, 0xf3, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x16, 0x01, 0x88, 0xe2, 0x59,
- 0x06, 0x00, 0x00,
+ // 715 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x4c,
+ 0x14, 0x8d, 0xfb, 0x7d, 0x0d, 0xca, 0x0d, 0xed, 0x62, 0x28, 0xb4, 0x58, 0xc5, 0xad, 0xac, 0x02,
+ 0xa5, 0x3f, 0x1e, 0xd2, 0x16, 0xca, 0x82, 0x0d, 0xe5, 0xb7, 0x88, 0x45, 0x9b, 0xb2, 0x82, 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20, 0xeb, 0x92, 0x26, 0x27, 0xcd,
+ 0x16, 0x16, 0xb6, 0xd1, 0x37, 0x0d, 0xc6, 0x32, 0x73, 0x8e, 0xd6, 0x87, 0xa8, 0xdd, 0x6f, 0xdd,
+ 0xf4, 0x07, 0xf9, 0x81, 0x8a, 0x78, 0x55, 0x10, 0x7f, 0x85, 0x5e, 0xf6, 0x27, 0xae, 0x36, 0x93,
+ 0xe3, 0x83, 0xde, 0xd6, 0xb6, 0x71, 0xb2, 0xcb, 0x1c, 0x1f, 0xa8, 0x0d, 0x6f, 0xe3, 0xec, 0x52,
+ 0x6e, 0x6c, 0x1f, 0x9f, 0x1a, 0xda, 0xc9, 0xa9, 0xa1, 0xfd, 0x3a, 0x35, 0xb4, 0x8f, 0x67, 0x46,
+ 0xe1, 0xe4, 0xcc, 0x28, 0x7c, 0x3f, 0x33, 0x0a, 0x6f, 0xd6, 0x3d, 0x3f, 0xae, 0x35, 0x6d, 0xcb,
+ 0x61, 0x0d, 0xac, 0xfe, 0x9b, 0xbe, 0xed, 0x2c, 0x7b, 0x0c, 0xb7, 0x56, 0x71, 0x83, 0xb9, 0xcd,
+ 0x3a, 0xe5, 0xff, 0x90, 0x88, 0xf7, 0x43, 0xca, 0xed, 0xa2, 0xf8, 0xeb, 0xad, 0xfe, 0x0d, 0x00,
+ 0x00, 0xff, 0xff, 0x32, 0xbb, 0x42, 0xe2, 0xcc, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -481,6 +591,8 @@ type QueryClient interface {
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// DenomHash queries a denomination hash information.
DenomHash(ctx context.Context, in *QueryDenomHashRequest, opts ...grpc.CallOption) (*QueryDenomHashResponse, error)
+ // EscrowAddress returns the escrow address for a particular port and channel id.
+ EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error)
}
type queryClient struct {
@@ -527,6 +639,15 @@ func (c *queryClient) DenomHash(ctx context.Context, in *QueryDenomHashRequest,
return out, nil
}
+func (c *queryClient) EscrowAddress(ctx context.Context, in *QueryEscrowAddressRequest, opts ...grpc.CallOption) (*QueryEscrowAddressResponse, error) {
+ out := new(QueryEscrowAddressResponse)
+ err := c.cc.Invoke(ctx, "/ibc.applications.transfer.v1.Query/EscrowAddress", in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
// QueryServer is the server API for Query service.
type QueryServer interface {
// DenomTrace queries a denomination trace information.
@@ -537,6 +658,8 @@ type QueryServer interface {
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
// DenomHash queries a denomination hash information.
DenomHash(context.Context, *QueryDenomHashRequest) (*QueryDenomHashResponse, error)
+ // EscrowAddress returns the escrow address for a particular port and channel id.
+ EscrowAddress(context.Context, *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error)
}
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
@@ -555,6 +678,9 @@ func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsReq
func (*UnimplementedQueryServer) DenomHash(ctx context.Context, req *QueryDenomHashRequest) (*QueryDenomHashResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DenomHash not implemented")
}
+func (*UnimplementedQueryServer) EscrowAddress(ctx context.Context, req *QueryEscrowAddressRequest) (*QueryEscrowAddressResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method EscrowAddress not implemented")
+}
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
s.RegisterService(&_Query_serviceDesc, srv)
@@ -632,6 +758,24 @@ func _Query_DenomHash_Handler(srv interface{}, ctx context.Context, dec func(int
return interceptor(ctx, in, info, handler)
}
+func _Query_EscrowAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(QueryEscrowAddressRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(QueryServer).EscrowAddress(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: "/ibc.applications.transfer.v1.Query/EscrowAddress",
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(QueryServer).EscrowAddress(ctx, req.(*QueryEscrowAddressRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
var _Query_serviceDesc = grpc.ServiceDesc{
ServiceName: "ibc.applications.transfer.v1.Query",
HandlerType: (*QueryServer)(nil),
@@ -652,6 +796,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
MethodName: "DenomHash",
Handler: _Query_DenomHash_Handler,
},
+ {
+ MethodName: "EscrowAddress",
+ Handler: _Query_EscrowAddress_Handler,
+ },
},
Streams: []grpc.StreamDesc{},
Metadata: "ibc/applications/transfer/v1/query.proto",
@@ -924,6 +1072,73 @@ func (m *QueryDenomHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
return len(dAtA) - i, nil
}
+func (m *QueryEscrowAddressRequest) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QueryEscrowAddressRequest) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryEscrowAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.ChannelId) > 0 {
+ i -= len(m.ChannelId)
+ copy(dAtA[i:], m.ChannelId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.ChannelId)))
+ i--
+ dAtA[i] = 0x12
+ }
+ if len(m.PortId) > 0 {
+ i -= len(m.PortId)
+ copy(dAtA[i:], m.PortId)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.PortId)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
+func (m *QueryEscrowAddressResponse) Marshal() (dAtA []byte, err error) {
+ size := m.Size()
+ dAtA = make([]byte, size)
+ n, err := m.MarshalToSizedBuffer(dAtA[:size])
+ if err != nil {
+ return nil, err
+ }
+ return dAtA[:n], nil
+}
+
+func (m *QueryEscrowAddressResponse) MarshalTo(dAtA []byte) (int, error) {
+ size := m.Size()
+ return m.MarshalToSizedBuffer(dAtA[:size])
+}
+
+func (m *QueryEscrowAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
+ i := len(dAtA)
+ _ = i
+ var l int
+ _ = l
+ if len(m.EscrowAddress) > 0 {
+ i -= len(m.EscrowAddress)
+ copy(dAtA[i:], m.EscrowAddress)
+ i = encodeVarintQuery(dAtA, i, uint64(len(m.EscrowAddress)))
+ i--
+ dAtA[i] = 0xa
+ }
+ return len(dAtA) - i, nil
+}
+
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
offset -= sovQuery(v)
base := offset
@@ -1041,6 +1256,36 @@ func (m *QueryDenomHashResponse) Size() (n int) {
return n
}
+func (m *QueryEscrowAddressRequest) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.PortId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ l = len(m.ChannelId)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
+func (m *QueryEscrowAddressResponse) Size() (n int) {
+ if m == nil {
+ return 0
+ }
+ var l int
+ _ = l
+ l = len(m.EscrowAddress)
+ if l > 0 {
+ n += 1 + l + sovQuery(uint64(l))
+ }
+ return n
+}
+
func sovQuery(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
@@ -1721,6 +1966,202 @@ func (m *QueryDenomHashResponse) Unmarshal(dAtA []byte) error {
}
return nil
}
+func (m *QueryEscrowAddressRequest) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryEscrowAddressRequest: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryEscrowAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field PortId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.PortId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ case 2:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field ChannelId", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.ChannelId = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
+func (m *QueryEscrowAddressResponse) Unmarshal(dAtA []byte) error {
+ l := len(dAtA)
+ iNdEx := 0
+ for iNdEx < l {
+ preIndex := iNdEx
+ var wire uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ wire |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ fieldNum := int32(wire >> 3)
+ wireType := int(wire & 0x7)
+ if wireType == 4 {
+ return fmt.Errorf("proto: QueryEscrowAddressResponse: wiretype end group for non-group")
+ }
+ if fieldNum <= 0 {
+ return fmt.Errorf("proto: QueryEscrowAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
+ }
+ switch fieldNum {
+ case 1:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field EscrowAddress", wireType)
+ }
+ var stringLen uint64
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowQuery
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ stringLen |= uint64(b&0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ intStringLen := int(stringLen)
+ if intStringLen < 0 {
+ return ErrInvalidLengthQuery
+ }
+ postIndex := iNdEx + intStringLen
+ if postIndex < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.EscrowAddress = string(dAtA[iNdEx:postIndex])
+ iNdEx = postIndex
+ default:
+ iNdEx = preIndex
+ skippy, err := skipQuery(dAtA[iNdEx:])
+ if err != nil {
+ return err
+ }
+ if (skippy < 0) || (iNdEx+skippy) < 0 {
+ return ErrInvalidLengthQuery
+ }
+ if (iNdEx + skippy) > l {
+ return io.ErrUnexpectedEOF
+ }
+ iNdEx += skippy
+ }
+ }
+
+ if iNdEx > l {
+ return io.ErrUnexpectedEOF
+ }
+ return nil
+}
func skipQuery(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
diff --git a/modules/apps/transfer/types/query.pb.gw.go b/modules/apps/transfer/types/query.pb.gw.go
index 6f17d4dc055..71474a1b2fc 100644
--- a/modules/apps/transfer/types/query.pb.gw.go
+++ b/modules/apps/transfer/types/query.pb.gw.go
@@ -193,6 +193,82 @@ func local_request_Query_DenomHash_0(ctx context.Context, marshaler runtime.Mars
}
+func request_Query_EscrowAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryEscrowAddressRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["channel_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id")
+ }
+
+ protoReq.ChannelId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err)
+ }
+
+ val, ok = pathParams["port_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
+ }
+
+ protoReq.PortId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
+ }
+
+ msg, err := client.EscrowAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_Query_EscrowAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq QueryEscrowAddressRequest
+ var metadata runtime.ServerMetadata
+
+ var (
+ val string
+ ok bool
+ err error
+ _ = err
+ )
+
+ val, ok = pathParams["channel_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "channel_id")
+ }
+
+ protoReq.ChannelId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "channel_id", err)
+ }
+
+ val, ok = pathParams["port_id"]
+ if !ok {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "port_id")
+ }
+
+ protoReq.PortId, err = runtime.String(val)
+
+ if err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "port_id", err)
+ }
+
+ msg, err := server.EscrowAddress(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
// UnaryRPC :call QueryServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
@@ -279,6 +355,26 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
})
+ mux.Handle("GET", pattern_Query_EscrowAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_Query_EscrowAddress_0(rctx, inboundMarshaler, server, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_EscrowAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -400,6 +496,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
})
+ mux.Handle("GET", pattern_Query_EscrowAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
+ ctx, cancel := context.WithCancel(req.Context())
+ defer cancel()
+ inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
+ rctx, err := runtime.AnnotateContext(ctx, mux, req)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_Query_EscrowAddress_0(rctx, inboundMarshaler, client, req, pathParams)
+ ctx = runtime.NewServerMetadataContext(ctx, md)
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_Query_EscrowAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
return nil
}
@@ -411,6 +527,8 @@ var (
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "transfer", "v1", "params"}, "", runtime.AssumeColonVerbOpt(true)))
pattern_Query_DenomHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_hashes", "trace"}, "", runtime.AssumeColonVerbOpt(true)))
+
+ pattern_Query_EscrowAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "transfer", "v1", "channels", "channel_id", "ports", "port_id", "escrow_address"}, "", runtime.AssumeColonVerbOpt(true)))
)
var (
@@ -421,4 +539,6 @@ var (
forward_Query_Params_0 = runtime.ForwardResponseMessage
forward_Query_DenomHash_0 = runtime.ForwardResponseMessage
+
+ forward_Query_EscrowAddress_0 = runtime.ForwardResponseMessage
)
diff --git a/proto/ibc/applications/fee/v1/query.proto b/proto/ibc/applications/fee/v1/query.proto
index acab12f5161..0e1caa5d0f7 100644
--- a/proto/ibc/applications/fee/v1/query.proto
+++ b/proto/ibc/applications/fee/v1/query.proto
@@ -22,37 +22,37 @@ service Query {
// IncentivizedPacket returns all packet fees for a packet given its identifier
rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) {
option (google.api.http).get =
- "/ibc/apps/fee/v1/incentivized_packet/port/{packet_id.port_id}/channel/{packet_id.channel_id}/sequence/"
- "{packet_id.sequence}";
+ "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/"
+ "{packet_id.sequence}/incentivized_packet";
}
// Gets all incentivized packets for a specific channel
rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest)
returns (QueryIncentivizedPacketsForChannelResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets/port/{port_id}/channel/{channel_id}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets";
}
// TotalRecvFees returns the total receive fees for a packet given its identifier
rpc TotalRecvFees(QueryTotalRecvFeesRequest) returns (QueryTotalRecvFeesResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/total_recv_fees/port/{packet_id.port_id}/channel/"
- "{packet_id.channel_id}/sequence/{packet_id.sequence}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/"
+ "sequences/{packet_id.sequence}/total_recv_fees";
}
// TotalAckFees returns the total acknowledgement fees for a packet given its identifier
rpc TotalAckFees(QueryTotalAckFeesRequest) returns (QueryTotalAckFeesResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/total_ack_fees/port/{packet_id.port_id}/channel/"
- "{packet_id.channel_id}/sequence/{packet_id.sequence}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/"
+ "sequences/{packet_id.sequence}/total_ack_fees";
}
// TotalTimeoutFees returns the total timeout fees for a packet given its identifier
rpc TotalTimeoutFees(QueryTotalTimeoutFeesRequest) returns (QueryTotalTimeoutFeesResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/total_timeout_fees/port/{packet_id.port_id}/channel/"
- "{packet_id.channel_id}/sequence/{packet_id.sequence}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/"
+ "sequences/{packet_id.sequence}/total_timeout_fees";
}
// CounterpartyAddress returns the registered counterparty address for forward relaying
rpc CounterpartyAddress(QueryCounterpartyAddressRequest) returns (QueryCounterpartyAddressResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/counterparty_address/{relayer_address}/channel/{channel_id}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer_address}/counterparty_address";
}
// FeeEnabledChannels returns a list of all fee enabled channels
@@ -62,7 +62,7 @@ service Query {
// FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel
rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) {
- option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled/port/{port_id}/channel/{channel_id}";
+ option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled";
}
}
diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto
index 8491c52139b..5298338c10c 100644
--- a/proto/ibc/applications/transfer/v1/query.proto
+++ b/proto/ibc/applications/transfer/v1/query.proto
@@ -30,6 +30,11 @@ service Query {
rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) {
option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}";
}
+
+ // EscrowAddress returns the escrow address for a particular port and channel id.
+ rpc EscrowAddress(QueryEscrowAddressRequest) returns (QueryEscrowAddressResponse) {
+ option (google.api.http).get = "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address";
+ }
}
// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC
@@ -84,3 +89,17 @@ message QueryDenomHashResponse {
// hash (in hex format) of the denomination trace information.
string hash = 1;
}
+
+// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method.
+message QueryEscrowAddressRequest {
+ // unique port identifier
+ string port_id = 1;
+ // unique channel identifier
+ string channel_id = 2;
+}
+
+// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method.
+message QueryEscrowAddressResponse {
+ // the escrow account address
+ string escrow_address = 1;
+}
\ No newline at end of file