Skip to content

Commit

Permalink
add authority param to wasm NewKeeper (#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Jul 16, 2023
1 parent 581a27f commit 5a1a249
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions modules/light-clients/08-wasm/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"

"github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
)
Expand All @@ -32,7 +30,7 @@ type Keeper struct {
}

// NewKeeper creates a new NewKeeper instance
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey) Keeper {
func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey, authority string) Keeper {
// Wasm VM
const wasmDataDir = "ibc_08-wasm_client_data"
wasmSupportedFeatures := strings.Join([]string{"storage", "iterator"}, ",")
Expand All @@ -46,14 +44,11 @@ func NewKeeper(cdc codec.BinaryCodec, key storetypes.StoreKey) Keeper {
}
types.WasmVM = vm

// governance authority
authority := authtypes.NewModuleAddress(govtypes.ModuleName)

return Keeper{
cdc: cdc,
storeKey: key,
wasmVM: vm,
authority: authority.String(),
authority: authority,
}
}

Expand Down
2 changes: 1 addition & 1 deletion testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ func NewSimApp(
),
)

app.WasmClientKeeper = wasmkeeper.NewKeeper(appCodec, keys[wasmtypes.StoreKey])
app.WasmClientKeeper = wasmkeeper.NewKeeper(appCodec, keys[wasmtypes.StoreKey], authtypes.NewModuleAddress(govtypes.ModuleName).String())

// IBC Fee Module keeper
app.IBCFeeKeeper = ibcfeekeeper.NewKeeper(
Expand Down

0 comments on commit 5a1a249

Please sign in to comment.