Skip to content

Commit

Permalink
Add grpc bank balance queries withelist
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolacy committed Nov 23, 2024
1 parent b215757 commit f41511f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demo/app/wasm/grpc_whitelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
)

Expand All @@ -23,6 +24,9 @@ func RegisterGrpcQueries(bApp *baseapp.BaseApp, appCodec codec.Codec) []wasmkeep
// WhitelistedGrpcQuery returns the whitelisted Grpc queries
func WhitelistedGrpcQuery() wasmkeeper.AcceptedQueries {
return wasmkeeper.AcceptedQueries{
// bank
"/cosmos.bank.v1beta1.Query/AllBalances": &banktypes.QueryAllBalancesResponse{},
"/cosmos.bank.v1beta1.Query/Balance": &banktypes.QueryBalanceResponse{},
// mint
"/cosmos.mint.v1beta1.Query/Params": &minttypes.QueryParamsResponse{},
}
Expand Down

0 comments on commit f41511f

Please sign in to comment.