From ffce20d0e7e8f2e8265da95ac815ca48704839ca Mon Sep 17 00:00:00 2001 From: Alex Lynham Date: Thu, 28 Jul 2022 11:38:21 +0100 Subject: [PATCH 1/2] Move to wasmd fork with sec patch --- go.mod | 7 ++++--- go.sum | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 9c58a3313..3afaf1e2d 100644 --- a/go.mod +++ b/go.mod @@ -11,10 +11,10 @@ require ( github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ignite-hq/cli v0.22.1 - github.com/prometheus/client_golang v1.12.1 - github.com/spf13/cast v1.4.1 + github.com/prometheus/client_golang v1.12.2 + github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.4.0 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.8.0 github.com/tendermint/tendermint v0.34.19 github.com/tendermint/tm-db v0.6.7 google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd @@ -176,6 +176,7 @@ require ( ) replace ( + github.com/CosmWasm/wasmd => github.com/CosmosContracts/wasmd v0.27.0-patch.1 github.com/cosmos/iavl => github.com/cosmos/iavl v0.17.3 github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 google.golang.org/grpc => google.golang.org/grpc v1.33.2 diff --git a/go.sum b/go.sum index 868ecbcc0..6f993a843 100644 --- a/go.sum +++ b/go.sum @@ -89,10 +89,10 @@ github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmd v0.27.0 h1:GYctl+sqCa8zpDTTUhX0/nf/4ej9J7x/88UmKH9V6Nc= -github.com/CosmWasm/wasmd v0.27.0/go.mod h1:iiHoIuoCjR7kV4cS7PPt4NmyOXv+V9kohRQBsFIreMU= github.com/CosmWasm/wasmvm v1.0.0 h1:NRmnHe3xXsKn2uEcB1F5Ha323JVAhON+BI6L177dlKc= github.com/CosmWasm/wasmvm v1.0.0/go.mod h1:ei0xpvomwSdONsxDuONzV7bL1jSET1M8brEx0FCXc+A= +github.com/CosmosContracts/wasmd v0.27.0-patch.1 h1:ituLr4/na6aGGBmW89WwzmBsSjzxDvKd1/BK5E9byXs= +github.com/CosmosContracts/wasmd v0.27.0-patch.1/go.mod h1:+YFMYloXHkrMKYoIGKMzmbEtH0is99ZWl2xgh/U2Dic= github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= @@ -509,6 +509,7 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= @@ -880,6 +881,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -1143,8 +1145,9 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1200,6 +1203,7 @@ github.com/rjeczalik/notify v0.9.1/go.mod h1:rKwnCoCGeuQnwBtTSPL9Dad03Vh2n40ePRr github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rs/cors v0.0.0-20160617231935-a62a804a8a00/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= @@ -1252,8 +1256,9 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= @@ -1289,8 +1294,9 @@ github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5J github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1298,8 +1304,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= From 2b6d053a3bd0313a8bbf9ccee70a8313955530e3 Mon Sep 17 00:00:00 2001 From: Alex Lynham Date: Thu, 28 Jul 2022 12:11:50 +0100 Subject: [PATCH 2/2] v8 -> v9, tidy up old upgrade handlers --- Makefile | 1 - app/app.go | 56 +++------------------------ app/test_helpers.go | 2 +- app/upgrade/constants.go | 4 -- app/upgrade/upgrade_handler.go | 47 ---------------------- cmd/junod/genwasm.go | 2 +- cmd/junod/main.go | 2 +- go.mod | 2 +- testutil/network/network.go | 2 +- testutil/simapp/simapp.go | 2 +- x/mint/abci.go | 4 +- x/mint/client/cli/query.go | 2 +- x/mint/client/rest/grpc_query_test.go | 4 +- x/mint/client/rest/query.go | 2 +- x/mint/client/testutil/cli_test.go | 2 +- x/mint/client/testutil/suite.go | 6 +-- x/mint/genesis.go | 4 +- x/mint/keeper/grpc_query.go | 2 +- x/mint/keeper/grpc_query_test.go | 4 +- x/mint/keeper/integration_test.go | 4 +- x/mint/keeper/keeper.go | 2 +- x/mint/keeper/querier.go | 2 +- x/mint/keeper/querier_test.go | 4 +- x/mint/module.go | 10 ++--- x/mint/module_test.go | 2 +- x/mint/simulation/decoder.go | 2 +- x/mint/simulation/decoder_test.go | 6 +-- x/mint/simulation/genesis.go | 2 +- x/mint/simulation/genesis_test.go | 4 +- x/mint/simulation/params.go | 2 +- x/mint/simulation/params_test.go | 2 +- 31 files changed, 47 insertions(+), 145 deletions(-) delete mode 100644 app/upgrade/constants.go delete mode 100644 app/upgrade/upgrade_handler.go diff --git a/Makefile b/Makefile index 707a45fc7..9601386c8 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,6 @@ SDK_PACK := $(shell go list -m github.com/cosmos/cosmos-sdk | sed 's/ /\@/g') TM_VERSION := $(shell go list -m github.com/tendermint/tendermint | sed 's:.* ::') # grab everything after the space in "github.com/tendermint/tendermint v0.34.7" DOCKER := $(shell which docker) BUILDDIR ?= $(CURDIR)/build -TEST_DOCKER_REPO=jackzampolin/junotest export GO111MODULE = on diff --git a/app/app.go b/app/app.go index 345f375ab..d6bcb7e5f 100644 --- a/app/app.go +++ b/app/app.go @@ -16,10 +16,10 @@ import ( tmos "github.com/tendermint/tendermint/libs/os" dbm "github.com/tendermint/tm-db" - "github.com/CosmosContracts/juno/v8/docs" - "github.com/CosmosContracts/juno/v8/x/mint" - mintkeeper "github.com/CosmosContracts/juno/v8/x/mint/keeper" - minttypes "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/docs" + "github.com/CosmosContracts/juno/v9/x/mint" + mintkeeper "github.com/CosmosContracts/juno/v9/x/mint/keeper" + minttypes "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/grpc/tmservice" "github.com/cosmos/cosmos-sdk/client/rpc" @@ -97,7 +97,6 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmclient "github.com/CosmWasm/wasmd/x/wasm/client" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" - wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/prometheus/client_golang/prometheus" ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts" @@ -795,52 +794,7 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) { } // RegisterUpgradeHandlers returns upgrade handlers -func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) { - // left here for hysterical raisins - we should probably remove - // bankBaseKeeper, _ := app.BankKeeper.(bankkeeper.BaseKeeper) - // app.UpgradeKeeper.SetUpgradeHandler(veritas.UpgradeName, veritas.CreateUpgradeHandler(app.mm, cfg, &app.StakingKeeper, &bankBaseKeeper)) - app.UpgradeKeeper.SetUpgradeHandler("multiverse", func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - - vm[icatypes.ModuleName] = app.mm.Modules[icatypes.ModuleName].ConsensusVersion() - - // create ICS27 Controller submodule params, controller module not enabled. - controllerParams := icacontrollertypes.Params{} - - // create ICS27 Host submodule params - hostParams := icahosttypes.Params{ - HostEnabled: true, - AllowMessages: []string{ - sdk.MsgTypeURL(&banktypes.MsgSend{}), - sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}), - sdk.MsgTypeURL(&stakingtypes.MsgCreateValidator{}), - sdk.MsgTypeURL(&stakingtypes.MsgEditValidator{}), - sdk.MsgTypeURL(&distrtypes.MsgWithdrawDelegatorReward{}), - sdk.MsgTypeURL(&distrtypes.MsgSetWithdrawAddress{}), - sdk.MsgTypeURL(&distrtypes.MsgWithdrawValidatorCommission{}), - sdk.MsgTypeURL(&distrtypes.MsgFundCommunityPool{}), - sdk.MsgTypeURL(&govtypes.MsgVote{}), - sdk.MsgTypeURL(&authz.MsgExec{}), - sdk.MsgTypeURL(&authz.MsgGrant{}), - sdk.MsgTypeURL(&authz.MsgRevoke{}), - // wasm msgs here - // note we only support these three for now - sdk.MsgTypeURL(&wasmtypes.MsgStoreCode{}), - sdk.MsgTypeURL(&wasmtypes.MsgInstantiateContract{}), - sdk.MsgTypeURL(&wasmtypes.MsgExecuteContract{}), - }, - } - - // initialize ICS27 module - icamodule, correctTypecast := app.mm.Modules[icatypes.ModuleName].(ica.AppModule) - if !correctTypecast { - panic("mm.Modules[icatypes.ModuleName] is not of type ica.AppModule") - } - icamodule.InitModule(ctx, controllerParams, hostParams) - - return app.mm.RunMigrations(ctx, cfg, vm) - }) -} +func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {} // GetMaccPerms returns a copy of the module account permissions func GetMaccPerms() map[string][]string { diff --git a/app/test_helpers.go b/app/test_helpers.go index 6604bea70..5cd76349b 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -9,7 +9,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - // junoapp "github.com/CosmosContracts/juno/v8/app" + // junoapp "github.com/CosmosContracts/juno/v9/app" "github.com/cosmos/cosmos-sdk/simapp" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/app/upgrade/constants.go b/app/upgrade/constants.go deleted file mode 100644 index 818ccf2fd..000000000 --- a/app/upgrade/constants.go +++ /dev/null @@ -1,4 +0,0 @@ -package veritas - -// UpgradeName is upgrade name in proposal -const UpgradeName = "veritas" diff --git a/app/upgrade/upgrade_handler.go b/app/upgrade/upgrade_handler.go deleted file mode 100644 index 5978f80fd..000000000 --- a/app/upgrade/upgrade_handler.go +++ /dev/null @@ -1,47 +0,0 @@ -package veritas - -import ( - sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/module" - stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" - upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - - bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" -) - -// UnityContractAddress is the address of the Unity contract -const UnityContractAddress = "juno1nz96hjc926e6a74gyvkwvtt0qhu22wx049c6ph6f4q8kp3ffm9xq5938mr" - -// UnityContractPlaceHolderAddress is the address where the funds were sent in prop 20 -const UnityContractPlaceHolderAddress = "juno1t0heu5cca4n3dgg308rskpn9d60mj8fyrgw9jne5fve9mygsm9xqkcrpl2" - -// CreateUpgradeHandler make upgrade handler -func CreateUpgradeHandler(mm *module.Manager, configurator module.Configurator, staking *stakingkeeper.Keeper, bank *bankkeeper.BaseKeeper) upgradetypes.UpgradeHandler { - return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) { - bondDenom := staking.BondDenom(ctx) - - accAddr, _ := sdk.AccAddressFromBech32(UnityContractPlaceHolderAddress) - accCoin := bank.GetBalance(ctx, accAddr, bondDenom) - - // get Unity Contract Address and send coin to this address - destAcc, _ := sdk.AccAddressFromBech32(UnityContractAddress) - err := bank.SendCoins(ctx, accAddr, destAcc, sdk.NewCoins(accCoin)) - if err != nil { - panic(err) - } - - // Set wasm old version to 1 if we want to call wasm's InitGenesis ourselves - // in this upgrade logic ourselves - // vm[wasm.ModuleName] = wasm.ConsensusVersion - - // otherwise we run this, which will run wasm.InitGenesis(wasm.DefaultGenesis()) - // and then override it after - newVM, err := mm.RunMigrations(ctx, configurator, vm) - if err != nil { - return newVM, err - } - - // override here - return newVM, err - } -} diff --git a/cmd/junod/genwasm.go b/cmd/junod/genwasm.go index 5727881b6..c34403f5c 100644 --- a/cmd/junod/genwasm.go +++ b/cmd/junod/genwasm.go @@ -1,7 +1,7 @@ package main import ( - "github.com/CosmosContracts/juno/v8/app" + "github.com/CosmosContracts/juno/v9/app" "github.com/cosmos/cosmos-sdk/client" "github.com/spf13/cobra" "github.com/ignite-hq/cli/ignite/pkg/cosmoscmd" diff --git a/cmd/junod/main.go b/cmd/junod/main.go index 2abfa9051..1c91b143a 100644 --- a/cmd/junod/main.go +++ b/cmd/junod/main.go @@ -3,7 +3,7 @@ package main import ( "os" - "github.com/CosmosContracts/juno/v8/app" + "github.com/CosmosContracts/juno/v9/app" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" "github.com/ignite-hq/cli/ignite/pkg/cosmoscmd" ) diff --git a/go.mod b/go.mod index 3afaf1e2d..16c6d9a9d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/CosmosContracts/juno/v8 +module github.com/CosmosContracts/juno/v9 go 1.18 diff --git a/testutil/network/network.go b/testutil/network/network.go index 363bd2c8c..9c96eb20c 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -18,7 +18,7 @@ import ( tmrand "github.com/tendermint/tendermint/libs/rand" tmdb "github.com/tendermint/tm-db" - "github.com/CosmosContracts/juno/v8/app" + "github.com/CosmosContracts/juno/v9/app" ) type ( diff --git a/testutil/simapp/simapp.go b/testutil/simapp/simapp.go index cb4b78099..75b6086ee 100644 --- a/testutil/simapp/simapp.go +++ b/testutil/simapp/simapp.go @@ -11,7 +11,7 @@ import ( tmtypes "github.com/tendermint/tendermint/types" tmdb "github.com/tendermint/tm-db" - "github.com/CosmosContracts/juno/v8/app" + "github.com/CosmosContracts/juno/v9/app" ) // New creates application instance with in-memory database and disabled logging. diff --git a/x/mint/abci.go b/x/mint/abci.go index 9171694f0..0a6c3dd24 100644 --- a/x/mint/abci.go +++ b/x/mint/abci.go @@ -3,8 +3,8 @@ package mint import ( "time" - "github.com/CosmosContracts/juno/v8/x/mint/keeper" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/keeper" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index d971d3335..672231bbf 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -5,7 +5,7 @@ import ( "github.com/spf13/cobra" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" ) diff --git a/x/mint/client/rest/grpc_query_test.go b/x/mint/client/rest/grpc_query_test.go index dd83fd169..e949115c9 100644 --- a/x/mint/client/rest/grpc_query_test.go +++ b/x/mint/client/rest/grpc_query_test.go @@ -14,8 +14,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - "github.com/CosmosContracts/juno/v8/testutil/network" - minttypes "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/testutil/network" + minttypes "github.com/CosmosContracts/juno/v9/x/mint/types" ) type IntegrationTestSuite struct { diff --git a/x/mint/client/rest/query.go b/x/mint/client/rest/query.go index 19c6b970e..53df6411e 100644 --- a/x/mint/client/rest/query.go +++ b/x/mint/client/rest/query.go @@ -6,7 +6,7 @@ import ( "github.com/gorilla/mux" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/types/rest" ) diff --git a/x/mint/client/testutil/cli_test.go b/x/mint/client/testutil/cli_test.go index 9daad6ce8..821cb7de7 100644 --- a/x/mint/client/testutil/cli_test.go +++ b/x/mint/client/testutil/cli_test.go @@ -6,7 +6,7 @@ package testutil import ( "testing" - "github.com/CosmosContracts/juno/v8/testutil/network" + "github.com/CosmosContracts/juno/v9/testutil/network" "github.com/stretchr/testify/suite" ) diff --git a/x/mint/client/testutil/suite.go b/x/mint/client/testutil/suite.go index d50ef548d..71a360747 100644 --- a/x/mint/client/testutil/suite.go +++ b/x/mint/client/testutil/suite.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/suite" tmcli "github.com/tendermint/tendermint/libs/cli" - "github.com/CosmosContracts/juno/v8/testutil/network" - "github.com/CosmosContracts/juno/v8/x/mint/client/cli" - minttypes "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/testutil/network" + "github.com/CosmosContracts/juno/v9/x/mint/client/cli" + minttypes "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/client/flags" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/mint/genesis.go b/x/mint/genesis.go index 4302dc001..ca14a66eb 100644 --- a/x/mint/genesis.go +++ b/x/mint/genesis.go @@ -1,8 +1,8 @@ package mint import ( - "github.com/CosmosContracts/juno/v8/x/mint/keeper" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/keeper" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/keeper/grpc_query.go b/x/mint/keeper/grpc_query.go index bf5bda617..98899112d 100644 --- a/x/mint/keeper/grpc_query.go +++ b/x/mint/keeper/grpc_query.go @@ -3,7 +3,7 @@ package keeper import ( "context" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/keeper/grpc_query_test.go b/x/mint/keeper/grpc_query_test.go index 33cd7ef06..c3bf1a544 100644 --- a/x/mint/keeper/grpc_query_test.go +++ b/x/mint/keeper/grpc_query_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/CosmosContracts/juno/v8/app" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/app" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/keeper/integration_test.go b/x/mint/keeper/integration_test.go index 3daa54e1d..174d4b85f 100644 --- a/x/mint/keeper/integration_test.go +++ b/x/mint/keeper/integration_test.go @@ -9,10 +9,10 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - junoapp "github.com/CosmosContracts/juno/v8/app" + junoapp "github.com/CosmosContracts/juno/v9/app" "github.com/cosmos/cosmos-sdk/simapp" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index bd62a7693..cb4dd62be 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "github.com/tendermint/tendermint/libs/log" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" diff --git a/x/mint/keeper/querier.go b/x/mint/keeper/querier.go index bc316506c..5a38e440b 100644 --- a/x/mint/keeper/querier.go +++ b/x/mint/keeper/querier.go @@ -3,7 +3,7 @@ package keeper import ( abci "github.com/tendermint/tendermint/abci/types" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" diff --git a/x/mint/keeper/querier_test.go b/x/mint/keeper/querier_test.go index 030944ad3..d1bf2eb5c 100644 --- a/x/mint/keeper/querier_test.go +++ b/x/mint/keeper/querier_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - keep "github.com/CosmosContracts/juno/v8/x/mint/keeper" - "github.com/CosmosContracts/juno/v8/x/mint/types" + keep "github.com/CosmosContracts/juno/v9/x/mint/keeper" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" abci "github.com/tendermint/tendermint/abci/types" diff --git a/x/mint/module.go b/x/mint/module.go index e713fcc7f..489a4e25f 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -11,11 +11,11 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - "github.com/CosmosContracts/juno/v8/x/mint/client/cli" - "github.com/CosmosContracts/juno/v8/x/mint/client/rest" - "github.com/CosmosContracts/juno/v8/x/mint/keeper" - "github.com/CosmosContracts/juno/v8/x/mint/simulation" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/client/cli" + "github.com/CosmosContracts/juno/v9/x/mint/client/rest" + "github.com/CosmosContracts/juno/v9/x/mint/keeper" + "github.com/CosmosContracts/juno/v9/x/mint/simulation" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" cdctypes "github.com/cosmos/cosmos-sdk/codec/types" diff --git a/x/mint/module_test.go b/x/mint/module_test.go index 673432945..069a95033 100644 --- a/x/mint/module_test.go +++ b/x/mint/module_test.go @@ -7,7 +7,7 @@ import ( abcitypes "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/simapp" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" ) diff --git a/x/mint/simulation/decoder.go b/x/mint/simulation/decoder.go index e22e66479..5fe3086ad 100644 --- a/x/mint/simulation/decoder.go +++ b/x/mint/simulation/decoder.go @@ -4,7 +4,7 @@ import ( "bytes" "fmt" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/kv" ) diff --git a/x/mint/simulation/decoder_test.go b/x/mint/simulation/decoder_test.go index 5c9e0d6ad..a256ec64e 100644 --- a/x/mint/simulation/decoder_test.go +++ b/x/mint/simulation/decoder_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/require" "github.com/ignite-hq/cli/ignite/pkg/cosmoscmd" - "github.com/CosmosContracts/juno/v8/app" - "github.com/CosmosContracts/juno/v8/x/mint/simulation" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/app" + "github.com/CosmosContracts/juno/v9/x/mint/simulation" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/kv" ) diff --git a/x/mint/simulation/genesis.go b/x/mint/simulation/genesis.go index b217ebb5e..43b3f294a 100644 --- a/x/mint/simulation/genesis.go +++ b/x/mint/simulation/genesis.go @@ -7,7 +7,7 @@ import ( "fmt" "math/rand" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" ) diff --git a/x/mint/simulation/genesis_test.go b/x/mint/simulation/genesis_test.go index aaec1c8c0..b952baa97 100644 --- a/x/mint/simulation/genesis_test.go +++ b/x/mint/simulation/genesis_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/CosmosContracts/juno/v8/x/mint/simulation" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/simulation" + "github.com/CosmosContracts/juno/v9/x/mint/types" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/mint/simulation/params.go b/x/mint/simulation/params.go index c327a12cb..a48cdb6a4 100644 --- a/x/mint/simulation/params.go +++ b/x/mint/simulation/params.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/simulation" - "github.com/CosmosContracts/juno/v8/x/mint/types" + "github.com/CosmosContracts/juno/v9/x/mint/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" ) diff --git a/x/mint/simulation/params_test.go b/x/mint/simulation/params_test.go index dc3d04ff9..989fd7236 100644 --- a/x/mint/simulation/params_test.go +++ b/x/mint/simulation/params_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/CosmosContracts/juno/v8/x/mint/simulation" + "github.com/CosmosContracts/juno/v9/x/mint/simulation" ) func TestParamChangest(t *testing.T) {