From fe30fb623b1992f18f6faf4887c3650724c3bb1f Mon Sep 17 00:00:00 2001 From: Kirill Karpik <46575914+SpekalsG3@users.noreply.github.com> Date: Wed, 20 Nov 2024 20:33:12 +0500 Subject: [PATCH] Feat: verify membership (#598) --- app/app.go | 1 + app/app_upgrades.go | 4 +++- app/upgrades/10_0_0/upgrades.go | 35 +++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 app/upgrades/10_0_0/upgrades.go diff --git a/app/app.go b/app/app.go index 3418126e..039b1905 100644 --- a/app/app.go +++ b/app/app.go @@ -1219,5 +1219,6 @@ func getAcceptedStargateQueries() wasmdKeeper.AcceptedStargateQueries { "/archway.cwerrors.v1.Query/Errors": &cwerrorsTypes.QueryErrorsRequest{}, "/archway.callback.v1.Query/EstimateCallbackFees": &callbackTypes.QueryEstimateCallbackFeesRequest{}, "/archway.callback.v1.Query/Params": &callbackTypes.QueryParamsRequest{}, + "/ibc.core.client.v1.Query/VerifyMembership": &ibcclienttypes.QueryVerifyMembershipResponse{}, } } diff --git a/app/app_upgrades.go b/app/app_upgrades.go index a146e4d7..f65013e3 100644 --- a/app/app_upgrades.go +++ b/app/app_upgrades.go @@ -7,6 +7,7 @@ import ( "github.com/archway-network/archway/app/upgrades" upgrade_0_6 "github.com/archway-network/archway/app/upgrades/06" + upgrade10_0_0 "github.com/archway-network/archway/app/upgrades/10_0_0" upgrade1_0_0_rc_4 "github.com/archway-network/archway/app/upgrades/1_0_0_rc_4" upgrade2_0_0 "github.com/archway-network/archway/app/upgrades/2_0_0" upgrade3_0_0 "github.com/archway-network/archway/app/upgrades/3_0_0" @@ -30,7 +31,8 @@ var Upgrades = []upgrades.Upgrade{ upgrade6_0_0.Upgrade, // v6.0.0 upgrade7_0_0.Upgrade, // v7.0.0 // upgrade8_0_0.Upgrade, // v8.0.0: was reserved for a consensus breaking wasmd upgrade - upgrade9_0_0.Upgrade, // v9.0.0 + upgrade9_0_0.Upgrade, // v9.0.0 + upgrade10_0_0.Upgrade, // v10.0.0 // constantine only constantineupgrades.WASMD_50_Amino_Patch, diff --git a/app/upgrades/10_0_0/upgrades.go b/app/upgrades/10_0_0/upgrades.go new file mode 100644 index 00000000..35f11698 --- /dev/null +++ b/app/upgrades/10_0_0/upgrades.go @@ -0,0 +1,35 @@ +package upgrade8_0_0 + +import ( + "context" + upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/archway-network/archway/app/keepers" + "github.com/archway-network/archway/app/upgrades" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" +) + +const Name = "v10.0.0" +const NameAsciiArt = ` + # ### ### + # # ## # # # # + # # # # # # # + # # # # # # + ### # ### # ### + +` + +var Upgrade = upgrades.Upgrade{ + UpgradeName: Name, + CreateUpgradeHandler: func(mm *module.Manager, cfg module.Configurator, keepers keepers.ArchwayKeepers) upgradetypes.UpgradeHandler { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + migrations, err := mm.RunMigrations(ctx, cfg, fromVM) + if err != nil { + return nil, err + } + + sdk.UnwrapSDKContext(ctx).Logger().Info(upgrades.ArchwayLogo + NameAsciiArt) + return migrations, nil + } + }, +}