Skip to content

Commit

Permalink
docs: fix imports and code snippets for x/wasm and ibcwasm app config…
Browse files Browse the repository at this point in the history
…uration (#5920)
  • Loading branch information
damiannolan committed Mar 5, 2024
1 parent e20b6f8 commit deebc06
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 25 deletions.
16 changes: 10 additions & 6 deletions docs/docs/03-light-clients/04-wasm/03-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ import (
"github.com/cosmos/cosmos-sdk/runtime"

wasmvm "github.com/CosmWasm/wasmvm"
ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)

Expand All @@ -167,15 +171,15 @@ if err != nil {

// create an Option slice (or append to an existing one)
// with the option to use a custom Wasm VM instance
wasmOpts = []ibcwasmkeeper.Option{
ibcwasmkeeper.WithWasmEngine(wasmer),
wasmOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(wasmer),
}

// the keeper will use the provided Wasm VM instance,
// instead of instantiating a new one
app.WasmKeeper = ibcwasmkeeper.NewKeeper(
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[ibcwasmtypes.StoreKey],
keys[wasmtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
Expand Down Expand Up @@ -225,7 +229,7 @@ import (
...
"github.com/cosmos/cosmos-sdk/runtime"

ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ import (
"github.com/cosmos/cosmos-sdk/runtime"

wasmvm "github.com/CosmWasm/wasmvm"
ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)

Expand All @@ -167,15 +171,15 @@ if err != nil {

// create an Option slice (or append to an existing one)
// with the option to use a custom Wasm VM instance
wasmOpts = []ibcwasmkeeper.Option{
ibcwasmkeeper.WithWasmEngine(wasmer),
wasmOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(wasmer),
}

// the keeper will use the provided Wasm VM instance,
// instead of instantiating a new one
app.WasmKeeper = ibcwasmkeeper.NewKeeper(
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[ibcwasmtypes.StoreKey],
keys[wasmtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
Expand All @@ -196,7 +200,7 @@ app.WasmKeeper = ibcwasmkeeper.NewKeeper(

app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM(
appCodec,
keys[wasmtypes.StoreKey],
keys[ibcwasmtypes.StoreKey],
app.IBCKeeper.ClientKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
wasmer, // pass the Wasm VM instance to `08-wasm` keeper constructor
Expand Down Expand Up @@ -225,7 +229,7 @@ import (
...
"github.com/cosmos/cosmos-sdk/runtime"

ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ import (
"github.com/cosmos/cosmos-sdk/runtime"

wasmvm "github.com/CosmWasm/wasmvm"
ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)

Expand All @@ -167,15 +171,15 @@ if err != nil {

// create an Option slice (or append to an existing one)
// with the option to use a custom Wasm VM instance
wasmOpts = []ibcwasmkeeper.Option{
ibcwasmkeeper.WithWasmEngine(wasmer),
wasmOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(wasmer),
}

// the keeper will use the provided Wasm VM instance,
// instead of instantiating a new one
app.WasmKeeper = ibcwasmkeeper.NewKeeper(
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[ibcwasmtypes.StoreKey],
keys[wasmtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
Expand Down Expand Up @@ -225,7 +229,7 @@ import (
...
"github.com/cosmos/cosmos-sdk/runtime"

ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ import (
"github.com/cosmos/cosmos-sdk/runtime"

wasmvm "github.com/CosmWasm/wasmvm"
ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"

ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)

Expand All @@ -167,15 +171,15 @@ if err != nil {

// create an Option slice (or append to an existing one)
// with the option to use a custom Wasm VM instance
wasmOpts = []ibcwasmkeeper.Option{
ibcwasmkeeper.WithWasmEngine(wasmer),
wasmOpts = []wasmkeeper.Option{
wasmkeeper.WithWasmEngine(wasmer),
}

// the keeper will use the provided Wasm VM instance,
// instead of instantiating a new one
app.WasmKeeper = ibcwasmkeeper.NewKeeper(
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[ibcwasmtypes.StoreKey],
keys[wasmtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.StakingKeeper,
Expand Down Expand Up @@ -225,7 +229,7 @@ import (
...
"github.com/cosmos/cosmos-sdk/runtime"

ibcwasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
...
)
Expand Down

0 comments on commit deebc06

Please sign in to comment.