Skip to content

Commit 5d04181

Browse files
autofix-ci[bot]jawoznia
authored andcommitted
[autofix.ci] apply automated fixes
1 parent c8b9fb7 commit 5d04181

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

tests/e2e/ibc2_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77

88
ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
99
channeltypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types"
10-
1110
ibctesting "github.com/cosmos/ibc-go/v10/testing"
1211
mockv2 "github.com/cosmos/ibc-go/v10/testing/mock/v2"
1312
"github.com/stretchr/testify/require"

tests/wasmibctesting/utils.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ func NewWasmTestChain(chain *ibctesting.TestChain) *WasmTestChain {
6666
return &res
6767
}
6868

69-
// TODO: jawoznia
70-
// Waiting for ParsePacketsFromEventsV2 being implemented by ibcv2 team
7169
func (chain *WasmTestChain) CaptureIBCEventsV2(result *abci.ExecTxResult) {
7270
toSend, err := ParsePacketsFromEventsV2(channeltypesv2.EventTypeSendPacket, result.Events)
7371
require.NoError(chain, err)
@@ -77,6 +75,9 @@ func (chain *WasmTestChain) CaptureIBCEventsV2(result *abci.ExecTxResult) {
7775
}
7876
}
7977

78+
// TODO: Remove this once it's implemented in the `ibc-go`.
79+
// https://github.com/cosmos/ibc-go/issues/8284
80+
//
8081
// ParsePacketsFromEventsV2 parses events emitted from a MsgRecvPacket and returns
8182
// all the packets found.
8283
// Returns an error if no packet is found.
@@ -94,7 +95,6 @@ func ParsePacketsFromEventsV2(eventType string, events []abci.Event) ([]channelt
9495
if err != nil {
9596
return ferr(err)
9697
}
97-
// packet, err := DeserializePacketV2(data)
9898
var packet channeltypesv2.Packet
9999
err = proto.Unmarshal(data, &packet)
100100
if err != nil {
@@ -106,12 +106,8 @@ func ParsePacketsFromEventsV2(eventType string, events []abci.Event) ([]channelt
106106
continue
107107
}
108108
}
109-
110109
}
111110
}
112-
// if len(packets) == 0 {
113-
// return ferr(errors.New("acknowledgement event attribute not found"))
114-
// }
115111
return packets, nil
116112
}
117113

@@ -140,9 +136,6 @@ func (chain *WasmTestChain) OverrideSendMsgs(msgs ...sdk.Msg) (*abci.ExecTxResul
140136
result, err := chain.TestChain.SendMsgs(msgs...)
141137
chain.SendMsgsOverride = chain.OverrideSendMsgs
142138
chain.CaptureIBCEvents(result)
143-
// TODO: jawoznia
144-
// Waiting for ParsePacketsFromEventsV2 being implemented by ibcv2 team
145-
//
146139
chain.CaptureIBCEventsV2(result)
147140
return result, err
148141
}

x/wasm/keeper/handler_plugin.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66

77
wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
8+
channeltypesv2 "github.com/cosmos/ibc-go/v10/modules/core/04-channel/v2/types"
89

910
errorsmod "cosmossdk.io/errors"
1011

@@ -14,8 +15,6 @@ import (
1415
sdk "github.com/cosmos/cosmos-sdk/types"
1516
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
1617

17-
channeltypesv2 "github.com/cosmos/ibc-go/v10/modules/core/04-channel/v2/types"
18-
1918
"github.com/CosmWasm/wasmd/x/wasm/types"
2019
)
2120

@@ -276,7 +275,8 @@ func NewIBC2RawPacketHandler(channelKeeperV2 types.ChannelKeeperV2) IBC2RawPacke
276275

277276
// DispatchMsg publishes a raw IBC2 packet onto the channel.
278277
func (h IBC2RawPacketHandler) DispatchMsg(ctx sdk.Context,
279-
contractAddr sdk.AccAddress, contractIBC2PortID string, msg wasmvmtypes.CosmosMsg) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) {
278+
contractAddr sdk.AccAddress, contractIBC2PortID string, msg wasmvmtypes.CosmosMsg,
279+
) ([]sdk.Event, [][]byte, [][]*codectypes.Any, error) {
280280
if msg.IBC2 == nil {
281281
return nil, nil, nil, types.ErrUnknownMsg
282282
}

0 commit comments

Comments
 (0)