Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 7a63e72

Browse files
authored
Merge pull request #431 from BitCannaGlobal/430-feat-v4-prepare-default-security-params-for-wasm-uploadinstanciate
Set WASM upload/instantiate params
2 parents 0bb2e15 + 52e79de commit 7a63e72

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

app/upgrades.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ func (app *App) StickyFingers(_ upgradetypes.Plan) {
6565
app.Logger().Error("Error setting the params into the Consensus params keeper...")
6666
return nil, err
6767
}
68+
// Set CosmWasm params
69+
wasmParams := wasmtypes.DefaultParams()
70+
wasmParams.CodeUploadAccess = wasmtypes.AllowEverybody //AllowNobody for MainNET
71+
wasmParams.InstantiateDefaultPermission = wasmtypes.AccessTypeAnyOfAddresses
72+
err = app.WasmKeeper.SetParams(ctx, wasmParams)
73+
app.Logger().Info("Setting the params into the Wasm params keeper...")
74+
if err != nil {
75+
app.Logger().Error("Error setting the params into the Wasm params keeper...")
76+
return nil, err
77+
}
6878
versionMap, err := app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)
6979
app.Logger().Info(fmt.Sprintf("post migrate version map: %v", versionMap))
7080
// return app.ModuleManager.RunMigrations(ctx, app.Configurator(), fromVM)

docs/static/openapi.yml

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)