diff --git a/app/app.go b/app/app.go index bdc93aae0..0ba76158c 100644 --- a/app/app.go +++ b/app/app.go @@ -374,7 +374,7 @@ func NewComposableApp( consensusparamtypes.ModuleName, wasm08types.ModuleName, icatypes.ModuleName, - wasm.ModuleName, + wasmtypes.ModuleName, alliancemoduletypes.ModuleName, // this line is used by starport scaffolding # stargate/app/beginBlockers ) diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 8a1c6a765..49f902368 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -6,7 +6,6 @@ import ( "testing" "time" - "github.com/CosmWasm/wasmd/x/wasm" composable "github.com/notional-labs/composable/v6/app" "github.com/stretchr/testify/require" @@ -29,6 +28,7 @@ import ( tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/cosmos/ibc-go/v7/testing/mock" ) @@ -89,7 +89,7 @@ func Setup(t *testing.T, isCheckTx bool, invCheckPeriod uint) *composable.Compos return app } -func setup(withGenesis bool, invCheckPeriod uint, opts ...wasm.Option) (*composable.ComposableApp, composable.GenesisState) { +func setup(withGenesis bool, invCheckPeriod uint, opts ...wasmkeeper.Option) (*composable.ComposableApp, composable.GenesisState) { db := dbm.NewMemDB() encCdc := composable.MakeEncodingConfig() app := composable.NewComposableApp( diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 3bcee55e4..75aa91229 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -210,6 +210,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.BankKeeper, appKeepers.StakingKeeper, appKeepers.DistrKeeper, + authtypes.FeeCollectorName, ) appKeepers.BankKeeper.RegisterKeepers(appKeepers.AllianceKeeper, appKeepers.StakingKeeper) @@ -228,7 +229,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( govModuleAuthority := authtypes.NewModuleAddress(govtypes.ModuleName).String() - appKeepers.Wasm08Keeper = wasmclientkeeper.NewKeeperWithVM(appCodec, appKeepers.keys[wasm08types.StoreKey], govModuleAuthority, homePath, &appKeepers.IBCKeeper.ClientKeeper) + appKeepers.Wasm08Keeper = wasmclientkeeper.NewKeeperWithVM(appCodec, appKeepers.keys[wasm08types.StoreKey], &appKeepers.IBCKeeper.ClientKeeper, govModuleAuthority, vm, bApp.GRPCQueryRouter()) // ICA Host keeper appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper( diff --git a/app/test_helpers.go b/app/test_helpers.go index 653023004..40bc673c2 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/CosmWasm/wasmd/x/wasm" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" minttypes "github.com/notional-labs/composable/v6/x/mint/types" "github.com/stretchr/testify/require" @@ -71,7 +71,7 @@ func setup(tb testing.TB, withGenesis bool, invCheckPeriod uint) (*ComposableApp baseAppOpts := []func(*baseapp.BaseApp){baseapp.SetSnapshot(snapshotStore, types.SnapshotOptions{ KeepRecent: 2, })} - var wasmOpts []wasm.Option + var wasmOpts []wasmkeeper.Option db := dbm.NewMemDB() app := NewComposableApp( log.NewNopLogger(), diff --git a/cmd/centaurid/cmd/root.go b/cmd/centaurid/cmd/root.go index 110350cdc..a65011c19 100644 --- a/cmd/centaurid/cmd/root.go +++ b/cmd/centaurid/cmd/root.go @@ -5,11 +5,15 @@ import ( "io" "os" - "github.com/CosmWasm/wasmd/x/wasm" "github.com/notional-labs/composable/v6/app" "github.com/spf13/cast" "github.com/spf13/cobra" + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + dbm "github.com/cometbft/cometbft-db" + tmcfg "github.com/cometbft/cometbft/config" + tmcli "github.com/cometbft/cometbft/libs/cli" + "github.com/cometbft/cometbft/libs/log" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" "github.com/cosmos/cosmos-sdk/client/debug" @@ -28,11 +32,6 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - - dbm "github.com/cometbft/cometbft-db" - tmcfg "github.com/cometbft/cometbft/config" - tmcli "github.com/cometbft/cometbft/libs/cli" - "github.com/cometbft/cometbft/libs/log" ) var ChainID string @@ -266,7 +265,7 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseappOptions := server.DefaultBaseappOptions(appOpts) - var emptyWasmOpts []wasm.Option + var emptyWasmOpts []wasmkeeper.Option newApp := app.NewComposableApp( logger, db, traceStore, true, skipUpgradeHeights, @@ -293,7 +292,7 @@ func (a appCreator) appExport( if !ok || homePath == "" { return servertypes.ExportedApp{}, errors.New("application home not set") } - var emptyWasmOpts []wasm.Option + var emptyWasmOpts []wasmkeeper.Option if height != -1 { anApp = app.NewComposableApp( diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..3e0f1eb2d --- /dev/null +++ b/flake.lock @@ -0,0 +1,63 @@ +{ + "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1703438236, + "narHash": "sha256-aqVBq1u09yFhL7bj1/xyUeJjzr92fXVvQSSEx6AdB1M=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5f64a12a728902226210bf01d25ec6cbb9d9265b", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..25a80213d --- /dev/null +++ b/flake.nix @@ -0,0 +1,19 @@ +{ + description = "composable-cosmos"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + outputs = inputs@{ flake-parts, ... }: + flake-parts.lib.mkFlake { inherit inputs; } { + imports = [ + ]; + systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aaarch64-darwin" ]; + perSystem = { config, self', inputs', pkgs, system, ... }: { + devShells = { + default = pkgs.mkShell { + buildInputs = with pkgs; [ pkgs.go pkgs.gnumake ]; + }; + }; + }; + }; +}