Extract configured capabilities
This commit is contained in:
@@ -583,8 +583,7 @@ func NewWasmApp(
|
|||||||
|
|
||||||
// The last arguments can contain custom message handlers, and custom query handlers,
|
// The last arguments can contain custom message handlers, and custom query handlers,
|
||||||
// if we want to allow any custom callbacks
|
// if we want to allow any custom callbacks
|
||||||
// See https://github.com/CosmWasm/cosmwasm/blob/main/docs/CAPABILITIES-BUILT-IN.md
|
availableCapabilities := strings.Join(AllCapabilities(), ",")
|
||||||
availableCapabilities := "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2"
|
|
||||||
app.WasmKeeper = wasm.NewKeeper(
|
app.WasmKeeper = wasm.NewKeeper(
|
||||||
appCodec,
|
appCodec,
|
||||||
keys[wasm.StoreKey],
|
keys[wasm.StoreKey],
|
||||||
|
|||||||
14
app/wasm.go
Normal file
14
app/wasm.go
Normal file
@@ -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",
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user