Skip to content

Commit

Permalink
Merge pull request CosmWasm#1363 from CosmWasm/mergify/bp/releases/v0…
Browse files Browse the repository at this point in the history
….3x/pr-1361

Extract configured capabilities (backport CosmWasm#1361)
  • Loading branch information
alpe authored Apr 24, 2023
2 parents 2249be9 + 8c2ff51 commit 82e3cc7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 1 addition & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,7 @@ func NewWasmApp(

// The last arguments can contain custom message handlers, and custom query handlers,
// if we want to allow any custom callbacks
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2"
availableCapabilities := strings.Join(AllCapabilities(), ",")
app.WasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
Expand Down
14 changes: 14 additions & 0 deletions app/wasm.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package app

// AllCapabilities returns all capabilities available with the current wasmvm
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
// This functionality is going to be moved upstream: https://github.com/CosmWasm/wasmvm/issues/425
func AllCapabilities() []string {
return []string{
"iterator",
"staking",
"stargate",
"cosmwasm_1_1",
"cosmwasm_1_2",
}
}

0 comments on commit 82e3cc7

Please sign in to comment.