Skip to content

Commit

Permalink
bump to latest sdk so we can begin testing for full compatiblity in t…
Browse files Browse the repository at this point in the history
…he 47 series before jumping to 50
  • Loading branch information
faddat committed Dec 20, 2023
1 parent c31f02a commit c5a24f9
Show file tree
Hide file tree
Showing 31 changed files with 332 additions and 353 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,4 @@ bin/*
!.vscode/settings.json
.vendor
vendor
go.work
go.work.sum
4 changes: 2 additions & 2 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ante
import (
tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
txboundaryante "github.com/notional-labs/composable/v6/x/tx-boundary/ante"
txBoundaryKeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper"
txboundarykeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper"

"github.com/cosmos/cosmos-sdk/codec"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
Expand All @@ -28,7 +28,7 @@ func NewAnteHandler(
signModeHandler signing.SignModeHandler,
channelKeeper *ibckeeper.Keeper,
tfmwKeeper tfmwkeeper.Keeper,
txBoundaryKeeper txBoundaryKeeper.Keeper,
txBoundaryKeeper txboundarykeeper.Keeper,
codec codec.BinaryCodec,
) sdk.AnteHandler {
return sdk.ChainAnteDecorators(
Expand Down
6 changes: 3 additions & 3 deletions app/ante/ibc_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ante
import (
"fmt"

tfmwKeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
tfmwkeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"

errorsmod "cosmossdk.io/errors"

Expand All @@ -16,10 +16,10 @@ import (

type IBCPermissionDecorator struct {
cdc codec.BinaryCodec
tfmwKeeper tfmwKeeper.Keeper
tfmwKeeper tfmwkeeper.Keeper
}

func NewIBCPermissionDecorator(cdc codec.BinaryCodec, keeper tfmwKeeper.Keeper) IBCPermissionDecorator {
func NewIBCPermissionDecorator(cdc codec.BinaryCodec, keeper tfmwkeeper.Keeper) IBCPermissionDecorator {
return IBCPermissionDecorator{
cdc: cdc,
tfmwKeeper: keeper,
Expand Down
28 changes: 15 additions & 13 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ import (
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
"github.com/notional-labs/composable/v6/app/ante"
"github.com/notional-labs/composable/v6/app/keepers"
upgrades "github.com/notional-labs/composable/v6/app/upgrades"
"github.com/notional-labs/composable/v6/app/upgrades"
v4 "github.com/notional-labs/composable/v6/app/upgrades/v4"
v5 "github.com/notional-labs/composable/v6/app/upgrades/v5"
v6 "github.com/notional-labs/composable/v6/app/upgrades/v6"
custombankmodule "github.com/notional-labs/composable/v6/custom/bank"
ibc_hooks "github.com/notional-labs/composable/v6/x/ibc-hooks"
ibchooks "github.com/notional-labs/composable/v6/x/ibc-hooks"
ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types"
"github.com/notional-labs/composable/v6/x/mint"
minttypes "github.com/notional-labs/composable/v6/x/mint/types"
ratelimitmodule "github.com/notional-labs/composable/v6/x/ratelimit"
ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types"
transfermiddleware "github.com/notional-labs/composable/v6/x/transfermiddleware"
"github.com/notional-labs/composable/v6/x/transfermiddleware"
transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types"
txBoundary "github.com/notional-labs/composable/v6/x/tx-boundary"
txBoundaryTypes "github.com/notional-labs/composable/v6/x/tx-boundary/types"
txboundarytypes "github.com/notional-labs/composable/v6/x/tx-boundary/types"
"github.com/spf13/cast"
icq "github.com/strangelove-ventures/async-icq/v7"
icqtypes "github.com/strangelove-ventures/async-icq/v7/types"
Expand Down Expand Up @@ -201,7 +201,7 @@ var (
wasm.AppModuleBasic{},
router.AppModuleBasic{},
ica.AppModuleBasic{},
ibc_hooks.AppModuleBasic{},
ibchooks.AppModuleBasic{},
transfermiddleware.AppModuleBasic{},
txBoundary.AppModuleBasic{},
ratelimitmodule.AppModuleBasic{},
Expand Down Expand Up @@ -321,7 +321,7 @@ func NewComposableApp(
txBoundaryModule := txBoundary.NewAppModule(appCodec, app.TxBoundaryKeepper)

Check failure on line 321 in app/app.go

View workflow job for this annotation

GitHub Actions / lint

app.TxBoundaryKeepper undefined (type *ComposableApp has no field or method TxBoundaryKeepper) (typecheck)
ratelimitModule := ratelimitmodule.NewAppModule(&app.RatelimitKeeper)
icqModule := icq.NewAppModule(app.ICQKeeper)
ibcHooksModule := ibc_hooks.NewAppModule()
ibcHooksModule := ibchooks.NewAppModule()
icaModule := ica.NewAppModule(nil, &app.ICAHostKeeper) // Only ICA Host
// **** Module Options ****/

Expand Down Expand Up @@ -386,7 +386,7 @@ func NewComposableApp(
ibctransfertypes.ModuleName,
routertypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
txboundarytypes.ModuleName,
ratelimitmoduletypes.ModuleName,
ibchookstypes.ModuleName,
icqtypes.ModuleName,
Expand Down Expand Up @@ -428,7 +428,7 @@ func NewComposableApp(
ibchost.ModuleName,
routertypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
txboundarytypes.ModuleName,
ratelimitmoduletypes.ModuleName,
ibchookstypes.ModuleName,
ibctransfertypes.ModuleName,
Expand Down Expand Up @@ -466,7 +466,7 @@ func NewComposableApp(
icqtypes.ModuleName,
routertypes.ModuleName,
transfermiddlewaretypes.ModuleName,
txBoundaryTypes.ModuleName,
txboundarytypes.ModuleName,
ratelimitmoduletypes.ModuleName,
ibchookstypes.ModuleName,
feegrant.ModuleName,
Expand Down Expand Up @@ -580,7 +580,7 @@ func (app *ComposableApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper {
}

// GetTxConfig implements the TestingApp interface.
func (app *ComposableApp) GetTxConfig() client.TxConfig {
func (*ComposableApp) GetTxConfig() client.TxConfig {
cfg := MakeEncodingConfig()
return cfg.TxConfig
}
Expand Down Expand Up @@ -612,7 +612,7 @@ func (app *ComposableApp) LoadHeight(height int64) error {
}

// ModuleAccountAddrs returns all the app's module account addresses.
func (app *ComposableApp) ModuleAccountAddrs() map[string]bool {
func (*ComposableApp) ModuleAccountAddrs() map[string]bool {
modAccAddrs := make(map[string]bool)
// DO NOT REMOVE: StringMapKeys fixes non-deterministic map iteration
for acc := range maccPerms {
Expand Down Expand Up @@ -645,7 +645,7 @@ func (app *ComposableApp) InterfaceRegistry() types.InterfaceRegistry {

// RegisterAPIRoutes registers all application module routes with the provided
// API server.
func (app *ComposableApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) {
func (*ComposableApp) RegisterAPIRoutes(apiSvr *api.Server, _ config.APIConfig) {
clientCtx := apiSvr.ClientCtx
// Register new tx routes from grpc-gateway.
authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter)
Expand Down Expand Up @@ -711,7 +711,9 @@ func (app *ComposableApp) setupUpgradeStoreLoaders() {
}
}

func (app *ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) {
// customPreUpgradeHandler is a placeholder for custom logic that needs to be executed
// do we need this here?
func (*ComposableApp) customPreUpgradeHandler(_ upgradetypes.Plan) {
// switch upgradeInfo.Name {
// default:
// }
Expand Down
4 changes: 2 additions & 2 deletions app/ibctesting/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ func (coord *Coordinator) CommitNBlocks(chain *TestChain, n uint64) {

// ConnOpenInitOnBothChains initializes a connection on both endpoints with the state INIT
// using the OpenInit handshake call.
func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error {
func (*Coordinator) ConnOpenInitOnBothChains(path *Path) error {
err := path.EndpointA.ConnOpenInit()
if err != nil {
return err
Expand All @@ -232,7 +232,7 @@ func (coord *Coordinator) ConnOpenInitOnBothChains(path *Path) error {

// ChanOpenInitOnBothChains initializes a channel on the source chain and counterparty chain
// with the state INIT using the OpenInit handshake call.
func (coord *Coordinator) ChanOpenInitOnBothChains(path *Path) error {
func (*Coordinator) ChanOpenInitOnBothChains(path *Path) error {
// NOTE: only creation of a capability for a transfer or mock port is supported
// Other applications must bind to the port in InitGenesis or modify this code.

Expand Down
2 changes: 1 addition & 1 deletion app/ibctesting/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ func (app *SimApp) LoadHeight(height int64) error {
}

// ModuleAccountAddrs returns all the app's module account addresses.
func (app *SimApp) ModuleAccountAddrs() map[string]bool {
func (*SimApp) ModuleAccountAddrs() map[string]bool {
modAccAddrs := make(map[string]bool)
for acc := range maccPerms {
// do not add the following modules to blocked addresses
Expand Down
24 changes: 12 additions & 12 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ import (
routerkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/keeper"
routertypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7/packetforward/types"
custombankkeeper "github.com/notional-labs/composable/v6/custom/bank/keeper"
ibc_hooks "github.com/notional-labs/composable/v6/x/ibc-hooks"
ibchooks "github.com/notional-labs/composable/v6/x/ibc-hooks"
ibchookskeeper "github.com/notional-labs/composable/v6/x/ibc-hooks/keeper"
ibchookstypes "github.com/notional-labs/composable/v6/x/ibc-hooks/types"
mintkeeper "github.com/notional-labs/composable/v6/x/mint/keeper"
minttypes "github.com/notional-labs/composable/v6/x/mint/types"
ratelimitmodule "github.com/notional-labs/composable/v6/x/ratelimit"
ratelimitmodulekeeper "github.com/notional-labs/composable/v6/x/ratelimit/keeper"
ratelimitmoduletypes "github.com/notional-labs/composable/v6/x/ratelimit/types"
transfermiddleware "github.com/notional-labs/composable/v6/x/transfermiddleware"
"github.com/notional-labs/composable/v6/x/transfermiddleware"
transfermiddlewarekeeper "github.com/notional-labs/composable/v6/x/transfermiddleware/keeper"
transfermiddlewaretypes "github.com/notional-labs/composable/v6/x/transfermiddleware/types"
txBoundaryKeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper"
txBoundaryTypes "github.com/notional-labs/composable/v6/x/tx-boundary/types"
txboundarykeeper "github.com/notional-labs/composable/v6/x/tx-boundary/keeper"
txboundarytypes "github.com/notional-labs/composable/v6/x/tx-boundary/types"
icq "github.com/strangelove-ventures/async-icq/v7"
icqkeeper "github.com/strangelove-ventures/async-icq/v7/keeper"
icqtypes "github.com/strangelove-ventures/async-icq/v7/types"
Expand Down Expand Up @@ -118,8 +118,8 @@ type AppKeepers struct {
Wasm08Keeper wasm08Keeper.Keeper // TODO: use this name ?
WasmKeeper wasm.Keeper
IBCHooksKeeper *ibchookskeeper.Keeper
Ics20WasmHooks *ibc_hooks.WasmHooks
HooksICS4Wrapper ibc_hooks.ICS4Middleware
Ics20WasmHooks *ibchooks.WasmHooks
HooksICS4Wrapper ibchooks.ICS4Middleware
// make scoped keepers public for test purposes
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper
Expand All @@ -129,7 +129,7 @@ type AppKeepers struct {
ConsensusParamsKeeper consensusparamkeeper.Keeper
// this line is used by starport scaffolding # stargate/app/keeperDeclaration
TransferMiddlewareKeeper transfermiddlewarekeeper.Keeper
TxBoundaryKeepper txBoundaryKeeper.Keeper
TxBoundaryKeepper txboundarykeeper.Keeper
RouterKeeper *routerkeeper.Keeper
RatelimitKeeper ratelimitmodulekeeper.Keeper
AllianceKeeper alliancemodulekeeper.Keeper
Expand Down Expand Up @@ -249,9 +249,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appKeepers.IBCHooksKeeper = &hooksKeeper

composablePrefix := sdk.GetConfig().GetBech32AccountAddrPrefix()
wasmHooks := ibc_hooks.NewWasmHooks(&hooksKeeper, nil, composablePrefix) // The contract keeper needs to be set later
wasmHooks := ibchooks.NewWasmHooks(&hooksKeeper, nil, composablePrefix) // The contract keeper needs to be set later
appKeepers.Ics20WasmHooks = &wasmHooks
appKeepers.HooksICS4Wrapper = ibc_hooks.NewICS4Middleware(
appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware(
appKeepers.IBCKeeper.ChannelKeeper,
appKeepers.Ics20WasmHooks,
)
Expand All @@ -266,9 +266,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
authorityAddress,
)

appKeepers.TxBoundaryKeepper = txBoundaryKeeper.NewKeeper(
appKeepers.TxBoundaryKeepper = txboundarykeeper.NewKeeper(
appCodec,
appKeepers.keys[txBoundaryTypes.StoreKey],
appKeepers.keys[txboundarytypes.StoreKey],
authorityAddress,
)

Expand Down Expand Up @@ -330,7 +330,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
routerkeeper.DefaultRefundTransferPacketTimeoutTimestamp,
)
ratelimitMiddlewareStack := ratelimitmodule.NewIBCMiddleware(appKeepers.RatelimitKeeper, ibcMiddlewareStack)
hooksTransferMiddleware := ibc_hooks.NewIBCMiddleware(ratelimitMiddlewareStack, &appKeepers.HooksICS4Wrapper)
hooksTransferMiddleware := ibchooks.NewIBCMiddleware(ratelimitMiddlewareStack, &appKeepers.HooksICS4Wrapper)

// Create evidence Keeper for to register the IBC light client misbehaviour evidence route
evidenceKeeper := evidencekeeper.NewKeeper(
Expand Down
2 changes: 1 addition & 1 deletion cmd/centaurid/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"

"github.com/notional-labs/composable/v6/app"
cmd "github.com/notional-labs/composable/v6/cmd/centaurid/cmd"
"github.com/notional-labs/composable/v6/cmd/centaurid/cmd"
cmdcfg "github.com/notional-labs/composable/v6/cmd/centaurid/config"

svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
Expand Down
Loading

0 comments on commit c5a24f9

Please sign in to comment.