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

merge from develop2 #21

Merged
merged 9 commits into from
Apr 3, 2024
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
authcodec "github.com/cosmos/cosmos-sdk/x/auth/codec"
"github.com/notional-labs/composable/v6/app/upgrades/v6_5_1"
"io"
"os"
"path/filepath"
Expand Down Expand Up @@ -46,7 +47,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank"

"github.com/notional-labs/composable/v6/app/keepers"
"github.com/notional-labs/composable/v6/app/upgrades/v6_5_0"
"github.com/notional-labs/composable/v6/app/upgrades/v7_0_1"

// bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
Expand Down Expand Up @@ -152,7 +152,7 @@ var (
// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
EnableSpecificProposals = ""

Upgrades = []upgrades.Upgrade{v6_5_0.Upgrade, v7_0_1.Upgrade}
Upgrades = []upgrades.Upgrade{v6_5_1.Upgrade, v7_0_1.Upgrade}
Forks = []upgrades.Fork{}
)

Expand Down
23 changes: 12 additions & 11 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,17 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
authorityAddress,
)

appKeepers.RouterKeeper = routerkeeper.NewKeeper(
appCodec,
appKeepers.keys[routertypes.StoreKey],
appKeepers.TransferKeeper.Keeper,
appKeepers.IBCKeeper.ChannelKeeper,
&appKeepers.DistrKeeper,
appKeepers.BankKeeper,
&appKeepers.TransferMiddlewareKeeper,
govModAddress,
)

appKeepers.TransferKeeper = customibctransferkeeper.NewKeeper(
appCodec, appKeepers.keys[ibctransfertypes.StoreKey],
appKeepers.GetSubspace(ibctransfertypes.ModuleName),
Expand All @@ -342,17 +353,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
&appKeepers.IbcTransferMiddlewareKeeper,
govModAddress,
)

appKeepers.RouterKeeper = routerkeeper.NewKeeper(
appCodec,
appKeepers.keys[routertypes.StoreKey],
appKeepers.TransferKeeper.Keeper,
appKeepers.IBCKeeper.ChannelKeeper,
&appKeepers.DistrKeeper,
appKeepers.BankKeeper,
&appKeepers.TransferMiddlewareKeeper,
govModAddress,
)
appKeepers.RouterKeeper.SetTransferKeeper(appKeepers.TransferKeeper)

appKeepers.RatelimitKeeper = *ratelimitmodulekeeper.NewKeeper(
appCodec,
Expand Down
51 changes: 0 additions & 51 deletions app/upgrades/v6_5_0/upgrade.go

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
package v6_5_0
package v6_5_1

import (
store "cosmossdk.io/store/types"
"github.com/notional-labs/composable/v6/app/upgrades"
ibctransfermiddleware "github.com/notional-labs/composable/v6/x/ibctransfermiddleware/types"
)

const (
// UpgradeName defines the on-chain upgrade name for the composable upgrade.
UpgradeName = "v6_5_0"
UpgradeName = "v6_5_1"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{ibctransfermiddleware.StoreKey},
Added: []string{},
Deleted: []string{},
},
}
23 changes: 23 additions & 0 deletions app/upgrades/v6_5_1/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package v6_5_1

import (
"context"
upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/notional-labs/composable/v6/app/keepers"
"github.com/notional-labs/composable/v6/app/upgrades"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
_ upgrades.BaseAppParamManager,
_ codec.Codec,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, vm)
}
}
Loading