Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix imports and code snippets for x/wasm and ibcwasm app wiring #5920

Merged
merged 3 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading