Skip to content

Commit 0c31374

Browse files
committed
updated PFM
1 parent a7f635f commit 0c31374

File tree

15 files changed

+2059
-467
lines changed

15 files changed

+2059
-467
lines changed

middleware/packet-forward-middleware/e2e/go.mod

Lines changed: 107 additions & 99 deletions
Large diffs are not rendered by default.

middleware/packet-forward-middleware/e2e/go.sum

Lines changed: 807 additions & 0 deletions
Large diffs are not rendered by default.

middleware/packet-forward-middleware/e2e/upgrade_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"time"
1010

1111
"cosmossdk.io/math"
12-
upgradetypes "cosmossdk.io/x/upgrade/types"
1312
govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
13+
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
1414
transfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
1515
"github.com/docker/docker/client"
1616
"github.com/strangelove-ventures/interchaintest/v8"

middleware/packet-forward-middleware/go.mod

Lines changed: 136 additions & 107 deletions
Large diffs are not rendered by default.

middleware/packet-forward-middleware/go.sum

Lines changed: 984 additions & 235 deletions
Large diffs are not rendered by default.

middleware/packet-forward-middleware/packetforward/keeper/keeper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ func (k *Keeper) ForwardTransferPacket(
321321
k.Logger(ctx).Error("packetForwardMiddleware error marshaling next as JSON",
322322
"error", err,
323323
)
324-
return errorsmod.Wrapf(sdkerrors.ErrJSONMarshal, err.Error())
324+
return errorsmod.Wrapf(sdkerrors.ErrJSONMarshal, "%s", err.Error())
325325
}
326326
memo = string(memoBz)
327327
}
@@ -355,7 +355,7 @@ func (k *Keeper) ForwardTransferPacket(
355355
"amount", token.Amount.String(), "denom", token.Denom,
356356
"error", err,
357357
)
358-
return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error())
358+
return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, "%s", err.Error())
359359
}
360360

361361
// Store the following information in keeper:

middleware/packet-forward-middleware/packetforward/migrations/v3/migrate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
channeltypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types"
1414
"github.com/stretchr/testify/require"
1515

16-
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
16+
tmproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
1717
dbm "github.com/cosmos/cosmos-db"
1818
sdk "github.com/cosmos/cosmos-sdk/types"
1919
)

middleware/packet-forward-middleware/packetforward/module.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"github.com/cosmos/cosmos-sdk/types/module"
1818
simtypes "github.com/cosmos/cosmos-sdk/types/simulation"
1919

20-
abci "github.com/cometbft/cometbft/abci/types"
20+
abci "github.com/cometbft/cometbft/v2/abci/types"
2121
)
2222

2323
var (

middleware/packet-forward-middleware/packetforward/types/expected_keepers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package types
33
import (
44
"context"
55

6-
cmtbytes "github.com/cometbft/cometbft/libs/bytes"
6+
cmtbytes "github.com/cometbft/cometbft/v2/libs/bytes"
77

88
sdk "github.com/cosmos/cosmos-sdk/types"
99

middleware/packet-forward-middleware/test/mock/transfer_keeper.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

middleware/packet-forward-middleware/test/setup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"github.com/cosmos/cosmos-sdk/runtime"
2323
sdk "github.com/cosmos/cosmos-sdk/types"
2424

25-
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
25+
tmproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
2626

2727
porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
2828
)

middleware/packet-forward-middleware/testing/simapp/app.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,23 @@ import (
2020
"github.com/spf13/cast"
2121
"github.com/stretchr/testify/require"
2222

23+
"github.com/cosmos/cosmos-sdk/x/evidence"
24+
evidencekeeper "github.com/cosmos/cosmos-sdk/x/evidence/keeper"
25+
evidencetypes "github.com/cosmos/cosmos-sdk/x/evidence/types"
26+
"github.com/cosmos/cosmos-sdk/x/feegrant"
27+
feegrantkeeper "github.com/cosmos/cosmos-sdk/x/feegrant/keeper"
28+
feegrantmodule "github.com/cosmos/cosmos-sdk/x/feegrant/module"
29+
"github.com/cosmos/cosmos-sdk/x/upgrade"
30+
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
31+
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
32+
2333
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
2434
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"
2535
"cosmossdk.io/client/v2/autocli"
2636
"cosmossdk.io/core/appmodule"
2737
"cosmossdk.io/log"
2838
storetypes "cosmossdk.io/store/types"
29-
"cosmossdk.io/x/evidence"
30-
evidencekeeper "cosmossdk.io/x/evidence/keeper"
31-
evidencetypes "cosmossdk.io/x/evidence/types"
32-
"cosmossdk.io/x/feegrant"
33-
feegrantkeeper "cosmossdk.io/x/feegrant/keeper"
34-
feegrantmodule "cosmossdk.io/x/feegrant/module"
3539
"cosmossdk.io/x/tx/signing"
36-
"cosmossdk.io/x/upgrade"
37-
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
38-
upgradetypes "cosmossdk.io/x/upgrade/types"
3940

4041
"github.com/cosmos/cosmos-sdk/baseapp"
4142
"github.com/cosmos/cosmos-sdk/client"
@@ -104,8 +105,8 @@ import (
104105
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
105106
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
106107

107-
abci "github.com/cometbft/cometbft/abci/types"
108-
tmos "github.com/cometbft/cometbft/libs/os"
108+
abci "github.com/cometbft/cometbft/v2/abci/types"
109+
tmos "github.com/cometbft/cometbft/v2/libs/os"
109110

110111
"github.com/cosmos/ibc-go/v10/modules/apps/transfer"
111112
ibctransferkeeper "github.com/cosmos/ibc-go/v10/modules/apps/transfer/keeper"
@@ -417,7 +418,6 @@ func NewSimApp(
417418
app.IBCKeeper = ibckeeper.NewKeeper(
418419
appCodec,
419420
runtime.NewKVStoreService(keys[ibcexported.StoreKey]),
420-
app.GetSubspace(ibcexported.ModuleName),
421421
app.UpgradeKeeper,
422422
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
423423
)
@@ -477,7 +477,6 @@ func NewSimApp(
477477
app.TransferKeeper = ibctransferkeeper.NewKeeper(
478478
appCodec,
479479
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
480-
app.GetSubspace(ibctransfertypes.ModuleName),
481480
app.IBCKeeper.ChannelKeeper,
482481
app.IBCKeeper.ChannelKeeper,
483482
app.MsgServiceRouter(),
@@ -721,7 +720,7 @@ func NewSimApp(
721720
func (app *SimApp) Name() string { return app.BaseApp.Name() }
722721

723722
// PreBlocker application updates every pre block
724-
func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.RequestFinalizeBlock) (*sdk.ResponsePreBlock, error) {
723+
func (app *SimApp) PreBlocker(ctx sdk.Context, _ *abci.FinalizeBlockRequest) (*sdk.ResponsePreBlock, error) {
725724
return app.mm.PreBlock(ctx)
726725
}
727726

@@ -736,7 +735,7 @@ func (app *SimApp) EndBlocker(ctx sdk.Context) (sdk.EndBlock, error) {
736735
}
737736

738737
// InitChainer application update at chain initialization
739-
func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.RequestInitChain) (*abci.ResponseInitChain, error) {
738+
func (app *SimApp) InitChainer(ctx sdk.Context, req *abci.InitChainRequest) (*abci.InitChainResponse, error) {
740739
var genesisState GenesisState
741740
if err := json.Unmarshal(req.AppStateBytes, &genesisState); err != nil {
742741
panic(err)

middleware/packet-forward-middleware/testing/simapp/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/cosmos/cosmos-sdk/x/staking"
1414
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
1515

16-
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
16+
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v2"
1717
)
1818

1919
// ExportAppStateAndValidators exports the state of the application for a genesis

middleware/packet-forward-middleware/testing/simapp/simd/commands.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import (
3131
"github.com/cosmos/cosmos-sdk/x/crisis"
3232
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
3333

34-
cmtcfg "github.com/cometbft/cometbft/config"
34+
cmtcfg "github.com/cometbft/cometbft/v2/config"
3535
)
3636

3737
// initCometBFTConfig helps to override default CometBFT Config values.

middleware/packet-forward-middleware/testing/simapp/upgrades/upgrades.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v10/packetforward/keeper"
77

8-
upgradetypes "cosmossdk.io/x/upgrade/types"
8+
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
99

1010
"github.com/cosmos/cosmos-sdk/baseapp"
1111
sdk "github.com/cosmos/cosmos-sdk/types"

0 commit comments

Comments
 (0)