Skip to content

Commit fec6f52

Browse files
committed
get 08-wasm compiling
1 parent ad88b3c commit fec6f52

File tree

13 files changed

+185
-258
lines changed

13 files changed

+185
-258
lines changed

modules/apps/27-interchain-accounts/host/keeper/msg_server.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,11 @@ func (m msgServer) ModuleQuerySafe(goCtx context.Context, msg *types.MsgModuleQu
6262
}
6363

6464
// UpdateParams updates the host submodule's params.
65-
func (m msgServer) UpdateParams(goCtx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
65+
func (m msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) {
6666
if m.GetAuthority() != msg.Signer {
6767
return nil, errorsmod.Wrapf(ibcerrors.ErrUnauthorized, "expected %s, got %s", m.GetAuthority(), msg.Signer)
6868
}
6969

70-
ctx := sdk.UnwrapSDKContext(goCtx)
7170
m.SetParams(ctx, msg.Params)
7271

7372
return &types.MsgUpdateParamsResponse{}, nil

modules/apps/29-fee/keeper/msg_server.go

+4-12
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ var _ types.MsgServer = (*Keeper)(nil)
1919
// payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on
2020
// the source chain from which packets originate as this is where fee distribution takes place. This function may be
2121
// called more than once by a relayer, in which case, the latest payee is always used.
22-
func (k Keeper) RegisterPayee(goCtx context.Context, msg *types.MsgRegisterPayee) (*types.MsgRegisterPayeeResponse, error) {
23-
ctx := sdk.UnwrapSDKContext(goCtx)
24-
22+
func (k Keeper) RegisterPayee(ctx context.Context, msg *types.MsgRegisterPayee) (*types.MsgRegisterPayeeResponse, error) {
2523
payee, err := sdk.AccAddressFromBech32(msg.Payee)
2624
if err != nil {
2725
return nil, err
@@ -54,9 +52,7 @@ func (k Keeper) RegisterPayee(goCtx context.Context, msg *types.MsgRegisterPayee
5452
// payee address before relaying. This ensures they will be properly compensated for forward relaying since
5553
// the destination chain must include the registered counterparty payee address in the acknowledgement. This function
5654
// may be called more than once by a relayer, in which case, the latest counterparty payee address is always used.
57-
func (k Keeper) RegisterCounterpartyPayee(goCtx context.Context, msg *types.MsgRegisterCounterpartyPayee) (*types.MsgRegisterCounterpartyPayeeResponse, error) {
58-
ctx := sdk.UnwrapSDKContext(goCtx)
59-
55+
func (k Keeper) RegisterCounterpartyPayee(ctx context.Context, msg *types.MsgRegisterCounterpartyPayee) (*types.MsgRegisterCounterpartyPayeeResponse, error) {
6056
// only register counterparty payee if the channel exists and is fee enabled
6157
if _, found := k.channelKeeper.GetChannel(ctx, msg.PortId, msg.ChannelId); !found {
6258
return nil, channeltypes.ErrChannelNotFound
@@ -77,9 +73,7 @@ func (k Keeper) RegisterCounterpartyPayee(goCtx context.Context, msg *types.MsgR
7773

7874
// PayPacketFee defines a rpc handler method for MsgPayPacketFee
7975
// PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to relay the packet with the next sequence
80-
func (k Keeper) PayPacketFee(goCtx context.Context, msg *types.MsgPayPacketFee) (*types.MsgPayPacketFeeResponse, error) {
81-
ctx := sdk.UnwrapSDKContext(goCtx)
82-
76+
func (k Keeper) PayPacketFee(ctx context.Context, msg *types.MsgPayPacketFee) (*types.MsgPayPacketFeeResponse, error) {
8377
if !k.IsFeeEnabled(ctx, msg.SourcePortId, msg.SourceChannelId) {
8478
// users may not escrow fees on this channel. Must send packets without a fee message
8579
return nil, types.ErrFeeNotEnabled
@@ -122,9 +116,7 @@ func (k Keeper) PayPacketFee(goCtx context.Context, msg *types.MsgPayPacketFee)
122116
// PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to
123117
// incentivize the relaying of a known packet. Only packets which have been sent and have not gone through the
124118
// packet life cycle may be incentivized.
125-
func (k Keeper) PayPacketFeeAsync(goCtx context.Context, msg *types.MsgPayPacketFeeAsync) (*types.MsgPayPacketFeeAsyncResponse, error) {
126-
ctx := sdk.UnwrapSDKContext(goCtx)
127-
119+
func (k Keeper) PayPacketFeeAsync(ctx context.Context, msg *types.MsgPayPacketFeeAsync) (*types.MsgPayPacketFeeAsyncResponse, error) {
128120
if !k.IsFeeEnabled(ctx, msg.PacketId.PortId, msg.PacketId.ChannelId) {
129121
// users may not escrow fees on this channel. Must send packets without a fee message
130122
return nil, types.ErrFeeNotEnabled

modules/core/02-client/keeper/grpc_query.go

+8-21
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewQueryServer(k *Keeper) types.QueryServer {
3939
}
4040

4141
// ClientState implements the Query/ClientState gRPC method
42-
func (q *queryServer) ClientState(c context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error) {
42+
func (q *queryServer) ClientState(ctx context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error) {
4343
if req == nil {
4444
return nil, status.Error(codes.InvalidArgument, "empty request")
4545
}
@@ -48,7 +48,6 @@ func (q *queryServer) ClientState(c context.Context, req *types.QueryClientState
4848
return nil, status.Error(codes.InvalidArgument, err.Error())
4949
}
5050

51-
ctx := sdk.UnwrapSDKContext(c)
5251
clientState, found := q.GetClientState(ctx, req.ClientId)
5352
if !found {
5453
return nil, status.Error(
@@ -70,13 +69,11 @@ func (q *queryServer) ClientState(c context.Context, req *types.QueryClientState
7069
}
7170

7271
// ClientStates implements the Query/ClientStates gRPC method
73-
func (q *queryServer) ClientStates(c context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error) {
72+
func (q *queryServer) ClientStates(ctx context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error) {
7473
if req == nil {
7574
return nil, status.Error(codes.InvalidArgument, "empty request")
7675
}
7776

78-
ctx := sdk.UnwrapSDKContext(c)
79-
8077
var clientStates types.IdentifiedClientStates
8178
store := prefix.NewStore(runtime.KVStoreAdapter(q.storeService.OpenKVStore(ctx)), host.KeyClientStorePrefix)
8279

@@ -114,7 +111,7 @@ func (q *queryServer) ClientStates(c context.Context, req *types.QueryClientStat
114111
}
115112

116113
// ConsensusState implements the Query/ConsensusState gRPC method
117-
func (q *queryServer) ConsensusState(c context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error) {
114+
func (q *queryServer) ConsensusState(ctx context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error) {
118115
if req == nil {
119116
return nil, status.Error(codes.InvalidArgument, "empty request")
120117
}
@@ -123,8 +120,6 @@ func (q *queryServer) ConsensusState(c context.Context, req *types.QueryConsensu
123120
return nil, status.Error(codes.InvalidArgument, err.Error())
124121
}
125122

126-
ctx := sdk.UnwrapSDKContext(c)
127-
128123
var (
129124
consensusState exported.ConsensusState
130125
found bool
@@ -161,7 +156,7 @@ func (q *queryServer) ConsensusState(c context.Context, req *types.QueryConsensu
161156
}
162157

163158
// ConsensusStates implements the Query/ConsensusStates gRPC method
164-
func (q *queryServer) ConsensusStates(c context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error) {
159+
func (q *queryServer) ConsensusStates(ctx context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error) {
165160
if req == nil {
166161
return nil, status.Error(codes.InvalidArgument, "empty request")
167162
}
@@ -170,8 +165,6 @@ func (q *queryServer) ConsensusStates(c context.Context, req *types.QueryConsens
170165
return nil, status.Error(codes.InvalidArgument, err.Error())
171166
}
172167

173-
ctx := sdk.UnwrapSDKContext(c)
174-
175168
var consensusStates []types.ConsensusStateWithHeight
176169
store := prefix.NewStore(runtime.KVStoreAdapter(q.storeService.OpenKVStore(ctx)), host.FullClientKey(req.ClientId, []byte(fmt.Sprintf("%s/", host.KeyConsensusStatePrefix))))
177170

@@ -205,7 +198,7 @@ func (q *queryServer) ConsensusStates(c context.Context, req *types.QueryConsens
205198
}
206199

207200
// ConsensusStateHeights implements the Query/ConsensusStateHeights gRPC method
208-
func (q *queryServer) ConsensusStateHeights(c context.Context, req *types.QueryConsensusStateHeightsRequest) (*types.QueryConsensusStateHeightsResponse, error) {
201+
func (q *queryServer) ConsensusStateHeights(ctx context.Context, req *types.QueryConsensusStateHeightsRequest) (*types.QueryConsensusStateHeightsResponse, error) {
209202
if req == nil {
210203
return nil, status.Error(codes.InvalidArgument, "empty request")
211204
}
@@ -214,8 +207,6 @@ func (q *queryServer) ConsensusStateHeights(c context.Context, req *types.QueryC
214207
return nil, status.Error(codes.InvalidArgument, err.Error())
215208
}
216209

217-
ctx := sdk.UnwrapSDKContext(c)
218-
219210
var consensusStateHeights []types.Height
220211
store := prefix.NewStore(runtime.KVStoreAdapter(q.storeService.OpenKVStore(ctx)), host.FullClientKey(req.ClientId, []byte(fmt.Sprintf("%s/", host.KeyConsensusStatePrefix))))
221212

@@ -244,7 +235,7 @@ func (q *queryServer) ConsensusStateHeights(c context.Context, req *types.QueryC
244235
}
245236

246237
// ClientStatus implements the Query/ClientStatus gRPC method
247-
func (q *queryServer) ClientStatus(c context.Context, req *types.QueryClientStatusRequest) (*types.QueryClientStatusResponse, error) {
238+
func (q *queryServer) ClientStatus(ctx context.Context, req *types.QueryClientStatusRequest) (*types.QueryClientStatusResponse, error) {
248239
if req == nil {
249240
return nil, status.Error(codes.InvalidArgument, "empty request")
250241
}
@@ -253,7 +244,6 @@ func (q *queryServer) ClientStatus(c context.Context, req *types.QueryClientStat
253244
return nil, status.Error(codes.InvalidArgument, err.Error())
254245
}
255246

256-
ctx := sdk.UnwrapSDKContext(c)
257247
clientStatus := q.GetClientStatus(ctx, req.ClientId)
258248

259249
return &types.QueryClientStatusResponse{
@@ -262,8 +252,7 @@ func (q *queryServer) ClientStatus(c context.Context, req *types.QueryClientStat
262252
}
263253

264254
// ClientParams implements the Query/ClientParams gRPC method
265-
func (q *queryServer) ClientParams(c context.Context, _ *types.QueryClientParamsRequest) (*types.QueryClientParamsResponse, error) {
266-
ctx := sdk.UnwrapSDKContext(c)
255+
func (q *queryServer) ClientParams(ctx context.Context, _ *types.QueryClientParamsRequest) (*types.QueryClientParamsResponse, error) {
267256
params := q.GetParams(ctx)
268257

269258
return &types.QueryClientParamsResponse{
@@ -272,13 +261,11 @@ func (q *queryServer) ClientParams(c context.Context, _ *types.QueryClientParams
272261
}
273262

274263
// UpgradedClientState implements the Query/UpgradedClientState gRPC method
275-
func (q *queryServer) UpgradedClientState(c context.Context, req *types.QueryUpgradedClientStateRequest) (*types.QueryUpgradedClientStateResponse, error) {
264+
func (q *queryServer) UpgradedClientState(ctx context.Context, req *types.QueryUpgradedClientStateRequest) (*types.QueryUpgradedClientStateResponse, error) {
276265
if req == nil {
277266
return nil, status.Error(codes.InvalidArgument, "empty request")
278267
}
279268

280-
ctx := sdk.UnwrapSDKContext(c)
281-
282269
plan, err := q.GetUpgradePlan(ctx)
283270
if err != nil {
284271
return nil, status.Error(codes.NotFound, err.Error())

modules/light-clients/08-wasm/go.mod

+4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ require (
1414
cosmossdk.io/math v1.3.0
1515
cosmossdk.io/store v1.1.1-0.20240815194237-858ec2fcb897
1616
cosmossdk.io/tools/confix v0.1.2
17+
cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91
1718
cosmossdk.io/x/authz v0.0.0-00010101000000-000000000000
1819
cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91
1920
cosmossdk.io/x/circuit v0.1.1
@@ -56,8 +57,11 @@ require (
5657
cloud.google.com/go/compute/metadata v0.3.0 // indirect
5758
cloud.google.com/go/iam v1.1.9 // indirect
5859
cloud.google.com/go/storage v1.42.0 // indirect
60+
cosmossdk.io/core/testing v0.0.0-20240906090851-36d9b25e8981 // indirect
5961
cosmossdk.io/depinject v1.0.0 // indirect
6062
cosmossdk.io/schema v0.2.0 // indirect
63+
cosmossdk.io/x/accounts/defaults/lockup v0.0.0-20240417181816-5e7aae0db1f5 // indirect
64+
cosmossdk.io/x/accounts/defaults/multisig v0.0.0-00010101000000-000000000000 // indirect
6165
cosmossdk.io/x/epochs v0.0.0-20240522060652-a1ae4c3e0337 // indirect
6266
cosmossdk.io/x/protocolpool v0.0.0-20230925135524-a1bc045b3190 // indirect
6367
filippo.io/edwards25519 v1.1.0 // indirect

0 commit comments

Comments
 (0)