Skip to content

Commit 2653d37

Browse files
chore!: Bump ibc-go (cosmos#762)
* Bump to latest deps * Fix lints * Update * Tidy systemtests * Fix tests * Bump to latest ibc-go * Point to latest SDK deps * Bump systemtest versions * Remove replace in systemtests --------- Co-authored-by: Alex | Cosmos Labs <[email protected]>
1 parent 8b8a45f commit 2653d37

File tree

33 files changed

+925
-3395
lines changed

33 files changed

+925
-3395
lines changed

evmd/app.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@ import (
44
"encoding/json"
55
"errors"
66
"fmt"
7-
87
"io"
9-
108
"os"
119

10+
1211
"github.com/spf13/cast"
1312

1413
// Force-load the tracer engines to trigger registration due to Go-Ethereum v1.10.15 changes
@@ -246,6 +245,10 @@ func NewExampleApp(
246245
)
247246

248247
tkeys := storetypes.NewTransientStoreKeys(evmtypes.TransientKey, feemarkettypes.TransientKey)
248+
var nonTransientKeys []storetypes.StoreKey
249+
for _, k := range keys {
250+
nonTransientKeys = append(nonTransientKeys, k)
251+
}
249252

250253
// load state streaming if enabled
251254
if err := bApp.RegisterStreamingServices(appOpts, keys); err != nil {
@@ -388,7 +391,6 @@ func NewExampleApp(
388391
app.IBCKeeper = ibckeeper.NewKeeper(
389392
appCodec,
390393
runtime.NewKVStoreService(keys[ibcexported.StoreKey]),
391-
nil,
392394
app.UpgradeKeeper,
393395
authAddr,
394396
)
@@ -444,7 +446,7 @@ func NewExampleApp(
444446
// NOTE: it's required to set up the EVM keeper before the ERC-20 keeper, because it is used in its instantiation.
445447
app.EVMKeeper = evmkeeper.NewKeeper(
446448
// TODO: check why this is not adjusted to use the runtime module methods like SDK native keepers
447-
appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], keys,
449+
appCodec, keys[evmtypes.StoreKey], tkeys[evmtypes.TransientKey], nonTransientKeys,
448450
authtypes.NewModuleAddress(govtypes.ModuleName),
449451
app.AccountKeeper,
450452
app.PreciseBankKeeper,
@@ -482,16 +484,15 @@ func NewExampleApp(
482484
// instantiate IBC transfer keeper AFTER the ERC-20 keeper to use it in the instantiation
483485
app.TransferKeeper = transferkeeper.NewKeeper(
484486
appCodec,
487+
evmaddress.NewEvmCodec(sdk.GetConfig().GetBech32AccountAddrPrefix()),
485488
runtime.NewKVStoreService(keys[ibctransfertypes.StoreKey]),
486489
app.IBCKeeper.ChannelKeeper,
487-
app.IBCKeeper.ChannelKeeper,
488490
app.MsgServiceRouter(),
489491
app.AccountKeeper,
490492
app.BankKeeper,
491493
app.Erc20Keeper, // Add ERC20 Keeper for ERC20 transfers
492494
authAddr,
493495
)
494-
app.TransferKeeper.SetAddressCodec(evmaddress.NewEvmCodec(sdk.GetConfig().GetBech32AccountAddrPrefix()))
495496

496497
/*
497498
Create Transfer Stack
@@ -519,7 +520,10 @@ func NewExampleApp(
519520
app.EVMKeeper,
520521
app.Erc20Keeper,
521522
)
522-
transferStack = ibccallbacks.NewIBCMiddleware(transferStack, app.IBCKeeper.ChannelKeeper, app.CallbackKeeper, maxCallbackGas)
523+
callbacksMiddleware := ibccallbacks.NewIBCMiddleware(app.CallbackKeeper, maxCallbackGas)
524+
callbacksMiddleware.SetICS4Wrapper(app.IBCKeeper.ChannelKeeper)
525+
callbacksMiddleware.SetUnderlyingApplication(transferStack)
526+
transferStack = callbacksMiddleware
523527

524528
var transferStackV2 ibcapi.IBCModule
525529
transferStackV2 = transferv2.NewIBCModule(app.TransferKeeper)

evmd/go.mod

Lines changed: 104 additions & 89 deletions
Large diffs are not rendered by default.

evmd/go.sum

Lines changed: 222 additions & 1487 deletions
Large diffs are not rendered by default.

evmd/tests/ibc/v2_transfer_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ func (suite *TransferTestSuiteV2) TestOnRecvPacket() {
291291
originalCoin, suite.chainB.SenderAccount.GetAddress().String(),
292292
suite.evmChainA.SenderAccount.GetAddress().String(), clienttypes.Height{},
293293
timeoutTimestamp, "", types.EncodingProtobuf,
294+
false,
294295
)
295296
_, err := suite.chainB.SendMsgs(msg)
296297
suite.Require().NoError(err) // message committed
@@ -393,6 +394,7 @@ func (suite *TransferTestSuiteV2) TestOnAckPacket() {
393394
originalCoin, suite.evmChainA.SenderAccount.GetAddress().String(),
394395
suite.chainB.SenderAccount.GetAddress().String(), clienttypes.Height{},
395396
timeoutTimestamp, "", types.EncodingProtobuf,
397+
false,
396398
)
397399
_, err := suite.evmChainA.SendMsgs(msg)
398400
suite.Require().NoError(err) // message committed
@@ -500,6 +502,7 @@ func (suite *TransferTestSuiteV2) TestOnTimeoutPacket() {
500502
originalCoin, suite.evmChainA.SenderAccount.GetAddress().String(),
501503
suite.chainB.SenderAccount.GetAddress().String(), clienttypes.Height{},
502504
timeoutTimestamp, "", types.EncodingProtobuf,
505+
false,
503506
)
504507
_, err := suite.evmChainA.SendMsgs(msg)
505508
suite.Require().NoError(err) // message committed

0 commit comments

Comments
 (0)