github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/keeper/grpc_query.go (about) 1 package keeper 2 3 import ( 4 "context" 5 6 porttypes "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/05-port/types" 7 8 sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 9 clienttypes "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/02-client/types" 10 connectiontypes "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/03-connection/types" 11 channeltypes "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/04-channel/types" 12 "github.com/fibonacci-chain/fbc/libs/ibc-go/modules/core/types" 13 ) 14 15 // ClientState implements the IBC QueryServer interface 16 func (q Keeper) ClientState(c context.Context, req *clienttypes.QueryClientStateRequest) (*clienttypes.QueryClientStateResponse, error) { 17 return q.ClientKeeper.ClientState(c, req) 18 } 19 20 // ClientStates implements the IBC QueryServer interface 21 func (q Keeper) ClientStates(c context.Context, req *clienttypes.QueryClientStatesRequest) (*clienttypes.QueryClientStatesResponse, error) { 22 return q.ClientKeeper.ClientStates(c, req) 23 } 24 25 // ConsensusState implements the IBC QueryServer interface 26 func (q Keeper) ConsensusState(c context.Context, req *clienttypes.QueryConsensusStateRequest) (*clienttypes.QueryConsensusStateResponse, error) { 27 return q.ClientKeeper.ConsensusState(c, req) 28 } 29 30 // ConsensusStates implements the IBC QueryServer interface 31 func (q Keeper) ConsensusStates(c context.Context, req *clienttypes.QueryConsensusStatesRequest) (*clienttypes.QueryConsensusStatesResponse, error) { 32 return q.ClientKeeper.ConsensusStates(c, req) 33 } 34 35 // ConsensusStateHeights implements the IBC QueryServer interface 36 func (q Keeper) ConsensusStateHeights(c context.Context, req *clienttypes.QueryConsensusStateHeightsRequest) (*clienttypes.QueryConsensusStateHeightsResponse, error) { 37 return q.ClientKeeper.ConsensusStateHeights(c, req) 38 } 39 40 // ClientStatus implements the IBC QueryServer interface 41 func (q Keeper) ClientStatus(c context.Context, req *clienttypes.QueryClientStatusRequest) (*clienttypes.QueryClientStatusResponse, error) { 42 return q.ClientKeeper.ClientStatus(c, req) 43 } 44 45 // ClientParams implements the IBC QueryServer interface 46 func (q Keeper) ClientParams(c context.Context, req *clienttypes.QueryClientParamsRequest) (*clienttypes.QueryClientParamsResponse, error) { 47 return q.ClientKeeper.ClientParams(c, req) 48 } 49 50 // UpgradedClientState implements the IBC QueryServer interface 51 func (q Keeper) UpgradedClientState(c context.Context, req *clienttypes.QueryUpgradedClientStateRequest) (*clienttypes.QueryUpgradedClientStateResponse, error) { 52 return q.ClientKeeper.UpgradedClientState(c, req) 53 } 54 55 // Connection implements the IBC QueryServer interface 56 func (q Keeper) Connection(c context.Context, req *connectiontypes.QueryConnectionRequest) (*connectiontypes.QueryConnectionResponse, error) { 57 return q.ConnectionKeeper.Connection(c, req) 58 } 59 60 // Connections implements the IBC QueryServer interface 61 func (q Keeper) Connections(c context.Context, req *connectiontypes.QueryConnectionsRequest) (*connectiontypes.QueryConnectionsResponse, error) { 62 return q.ConnectionKeeper.Connections(c, req) 63 } 64 65 // ClientConnections implements the IBC QueryServer interface 66 func (q Keeper) ClientConnections(c context.Context, req *connectiontypes.QueryClientConnectionsRequest) (*connectiontypes.QueryClientConnectionsResponse, error) { 67 return q.ConnectionKeeper.ClientConnections(c, req) 68 } 69 70 // ConnectionClientState implements the IBC QueryServer interface 71 func (q Keeper) ConnectionClientState(c context.Context, req *connectiontypes.QueryConnectionClientStateRequest) (*connectiontypes.QueryConnectionClientStateResponse, error) { 72 return q.ConnectionKeeper.ConnectionClientState(c, req) 73 } 74 75 // ConnectionConsensusState implements the IBC QueryServer interface 76 func (q Keeper) ConnectionConsensusState(c context.Context, req *connectiontypes.QueryConnectionConsensusStateRequest) (*connectiontypes.QueryConnectionConsensusStateResponse, error) { 77 return q.ConnectionKeeper.ConnectionConsensusState(c, req) 78 } 79 80 // Channel implements the IBC QueryServer interface 81 func (q Keeper) Channel(c context.Context, req *channeltypes.QueryChannelRequest) (*channeltypes.QueryChannelResponse, error) { 82 return q.ChannelKeeper.Channel(c, req) 83 } 84 85 // Channels implements the IBC QueryServer interface 86 func (q Keeper) Channels(c context.Context, req *channeltypes.QueryChannelsRequest) (*channeltypes.QueryChannelsResponse, error) { 87 return q.ChannelKeeper.Channels(c, req) 88 } 89 90 // ConnectionChannels implements the IBC QueryServer interface 91 func (q Keeper) ConnectionChannels(c context.Context, req *channeltypes.QueryConnectionChannelsRequest) (*channeltypes.QueryConnectionChannelsResponse, error) { 92 return q.ChannelKeeper.ConnectionChannels(c, req) 93 } 94 95 // ChannelClientState implements the IBC QueryServer interface 96 func (q Keeper) ChannelClientState(c context.Context, req *channeltypes.QueryChannelClientStateRequest) (*channeltypes.QueryChannelClientStateResponse, error) { 97 return q.ChannelKeeper.ChannelClientState(c, req) 98 } 99 100 // ChannelConsensusState implements the IBC QueryServer interface 101 func (q Keeper) ChannelConsensusState(c context.Context, req *channeltypes.QueryChannelConsensusStateRequest) (*channeltypes.QueryChannelConsensusStateResponse, error) { 102 return q.ChannelKeeper.ChannelConsensusState(c, req) 103 } 104 105 // PacketCommitment implements the IBC QueryServer interface 106 func (q Keeper) PacketCommitment(c context.Context, req *channeltypes.QueryPacketCommitmentRequest) (*channeltypes.QueryPacketCommitmentResponse, error) { 107 return q.ChannelKeeper.PacketCommitment(c, req) 108 } 109 110 // PacketCommitments implements the IBC QueryServer interface 111 func (q Keeper) PacketCommitments(c context.Context, req *channeltypes.QueryPacketCommitmentsRequest) (*channeltypes.QueryPacketCommitmentsResponse, error) { 112 return q.ChannelKeeper.PacketCommitments(c, req) 113 } 114 115 // PacketReceipt implements the IBC QueryServer interface 116 func (q Keeper) PacketReceipt(c context.Context, req *channeltypes.QueryPacketReceiptRequest) (*channeltypes.QueryPacketReceiptResponse, error) { 117 return q.ChannelKeeper.PacketReceipt(c, req) 118 } 119 120 // PacketAcknowledgement implements the IBC QueryServer interface 121 func (q Keeper) PacketAcknowledgement(c context.Context, req *channeltypes.QueryPacketAcknowledgementRequest) (*channeltypes.QueryPacketAcknowledgementResponse, error) { 122 return q.ChannelKeeper.PacketAcknowledgement(c, req) 123 } 124 125 // PacketAcknowledgements implements the IBC QueryServer interface 126 func (q Keeper) PacketAcknowledgements(c context.Context, req *channeltypes.QueryPacketAcknowledgementsRequest) (*channeltypes.QueryPacketAcknowledgementsResponse, error) { 127 return q.ChannelKeeper.PacketAcknowledgements(c, req) 128 } 129 130 // UnreceivedPackets implements the IBC QueryServer interface 131 func (q Keeper) UnreceivedPackets(c context.Context, req *channeltypes.QueryUnreceivedPacketsRequest) (*channeltypes.QueryUnreceivedPacketsResponse, error) { 132 return q.ChannelKeeper.UnreceivedPackets(c, req) 133 } 134 135 // UnreceivedAcks implements the IBC QueryServer interface 136 func (q Keeper) UnreceivedAcks(c context.Context, req *channeltypes.QueryUnreceivedAcksRequest) (*channeltypes.QueryUnreceivedAcksResponse, error) { 137 return q.ChannelKeeper.UnreceivedAcks(c, req) 138 } 139 140 // NextSequenceReceive implements the IBC QueryServer interface 141 func (q Keeper) NextSequenceReceive(c context.Context, req *channeltypes.QueryNextSequenceReceiveRequest) (*channeltypes.QueryNextSequenceReceiveResponse, error) { 142 return q.ChannelKeeper.NextSequenceReceive(c, req) 143 } 144 145 // AppVersion implements the IBC QueryServer interface 146 func (q Keeper) AppVersion(c context.Context, req *porttypes.QueryAppVersionRequest) (*porttypes.QueryAppVersionResponse, error) { 147 return q.PortKeeper.AppVersion(c, req) 148 } 149 150 func (q Keeper) IbcParams(c context.Context, req *types.QueryIbcParamsRequest) (*types.QueryIbcParamsResponse, error) { 151 ctx := sdk.UnwrapSDKContext(c) 152 params := q.GetParams(ctx) 153 154 return &types.QueryIbcParamsResponse{ 155 Params: ¶ms, 156 }, nil 157 } 158 159 func (q Keeper) UpgradedConsensusState(c context.Context, req *clienttypes.QueryUpgradedConsensusStateRequest) (*clienttypes.QueryUpgradedConsensusStateResponse, error) { 160 return q.ClientKeeper.UpgradedConsensusState(c, req) 161 }