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

chore(api)!: add missing/remove unnecessary gogoproto directive #3856

Merged
merged 13 commits into from
Jun 22, 2023
2 changes: 1 addition & 1 deletion docs/migrations/v7-to-v8.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TODO: https://github.com/cosmos/ibc-go/pull/3303

## Relayers

- No relevant changes were made in this release.
- Getter functions in `MsgChannelOpenInitResponse`, `MsgChannelOpenTryResponse`, `MsgTransferResponse`, `MsgRegisterInterchainAccountResponse` and `MsgSendTxResponse` have been removed. The fields can be accessed directly.

## IBC Light Clients

Expand Down
38 changes: 19 additions & 19 deletions e2e/tests/interchain_accounts/localhost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
msgChanOpenTry := channeltypes.NewMsgChannelOpenTry(
icatypes.HostPortID, icatypes.Version,
channeltypes.ORDERED, []string{exported.LocalhostConnectionID},
controllerPortID, msgChanOpenInitRes.GetChannelId(),
controllerPortID, msgChanOpenInitRes.ChannelId,
version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -83,8 +83,8 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(

t.Run("channel open ack localhost", func(t *testing.T) {
msgChanOpenAck := channeltypes.NewMsgChannelOpenAck(
controllerPortID, msgChanOpenInitRes.GetChannelId(),
msgChanOpenTryRes.GetChannelId(), msgChanOpenTryRes.GetVersion(),
controllerPortID, msgChanOpenInitRes.ChannelId,
msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -94,7 +94,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(

t.Run("channel open confirm localhost", func(t *testing.T) {
msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm(
icatypes.HostPortID, msgChanOpenTryRes.GetChannelId(),
icatypes.HostPortID, msgChanOpenTryRes.ChannelId,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -103,11 +103,11 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_Localhost(
})

t.Run("query localhost interchain accounts channel ends", func(t *testing.T) {
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.GetChannelId())
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndA)

channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.GetChannelId())
channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndB)

Expand Down Expand Up @@ -228,7 +228,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
msgChanOpenTry := channeltypes.NewMsgChannelOpenTry(
icatypes.HostPortID, icatypes.Version,
channeltypes.ORDERED, []string{exported.LocalhostConnectionID},
controllerPortID, msgChanOpenInitRes.GetChannelId(),
controllerPortID, msgChanOpenInitRes.ChannelId,
version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -240,8 +240,8 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan

t.Run("channel open ack localhost", func(t *testing.T) {
msgChanOpenAck := channeltypes.NewMsgChannelOpenAck(
controllerPortID, msgChanOpenInitRes.GetChannelId(),
msgChanOpenTryRes.GetChannelId(), msgChanOpenTryRes.GetVersion(),
controllerPortID, msgChanOpenInitRes.ChannelId,
msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -251,7 +251,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan

t.Run("channel open confirm localhost", func(t *testing.T) {
msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm(
icatypes.HostPortID, msgChanOpenTryRes.GetChannelId(),
icatypes.HostPortID, msgChanOpenTryRes.ChannelId,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -260,11 +260,11 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
})

t.Run("query localhost interchain accounts channel ends", func(t *testing.T) {
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.GetChannelId())
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndA)

channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.GetChannelId())
channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndB)

Expand Down Expand Up @@ -357,7 +357,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
msgChanOpenTry := channeltypes.NewMsgChannelOpenTry(
icatypes.HostPortID, icatypes.Version,
channeltypes.ORDERED, []string{exported.LocalhostConnectionID},
controllerPortID, msgChanOpenInitRes.GetChannelId(),
controllerPortID, msgChanOpenInitRes.ChannelId,
version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -370,8 +370,8 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan

t.Run("channel open ack localhost", func(t *testing.T) {
msgChanOpenAck := channeltypes.NewMsgChannelOpenAck(
controllerPortID, msgChanOpenInitRes.GetChannelId(),
msgChanOpenTryRes.GetChannelId(), msgChanOpenTryRes.GetVersion(),
controllerPortID, msgChanOpenInitRes.ChannelId,
msgChanOpenTryRes.ChannelId, msgChanOpenTryRes.Version,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -381,7 +381,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan

t.Run("channel open confirm localhost", func(t *testing.T) {
msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm(
icatypes.HostPortID, msgChanOpenTryRes.GetChannelId(),
icatypes.HostPortID, msgChanOpenTryRes.ChannelId,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -390,11 +390,11 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
})

t.Run("query localhost interchain accounts channel ends", func(t *testing.T) {
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.GetChannelId())
channelEndA, err := s.QueryChannel(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndA)

channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.GetChannelId())
channelEndB, err := s.QueryChannel(ctx, chainA, icatypes.HostPortID, msgChanOpenTryRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndB)

Expand Down Expand Up @@ -465,7 +465,7 @@ func (s *LocalhostInterchainAccountsTestSuite) TestInterchainAccounts_ReopenChan
})

t.Run("verify tokens transferred", func(t *testing.T) {
s.AssertPacketRelayed(ctx, chainA, controllerPortID, msgChanOpenInitRes.GetChannelId(), 1)
s.AssertPacketRelayed(ctx, chainA, controllerPortID, msgChanOpenInitRes.ChannelId, 1)

balance, err := chainA.GetBalance(ctx, userBWallet.FormattedAddress(), chainADenom)
s.Require().NoError(err)
Expand Down
18 changes: 9 additions & 9 deletions e2e/tests/transfer/localhost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {
msgChanOpenTry := channeltypes.NewMsgChannelOpenTry(
transfertypes.PortID, transfertypes.Version,
channeltypes.UNORDERED, []string{exported.LocalhostConnectionID},
transfertypes.PortID, msgChanOpenInitRes.GetChannelId(),
transfertypes.PortID, msgChanOpenInitRes.ChannelId,
transfertypes.Version, localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -82,8 +82,8 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {

t.Run("channel open ack localhost", func(t *testing.T) {
msgChanOpenAck := channeltypes.NewMsgChannelOpenAck(
transfertypes.PortID, msgChanOpenInitRes.GetChannelId(),
msgChanOpenTryRes.GetChannelId(), transfertypes.Version,
transfertypes.PortID, msgChanOpenInitRes.ChannelId,
msgChanOpenTryRes.ChannelId, transfertypes.Version,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -93,7 +93,7 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {

t.Run("channel open confirm localhost", func(t *testing.T) {
msgChanOpenConfirm := channeltypes.NewMsgChannelOpenConfirm(
transfertypes.PortID, msgChanOpenTryRes.GetChannelId(),
transfertypes.PortID, msgChanOpenTryRes.ChannelId,
localhost.SentinelProof, clienttypes.ZeroHeight(), rlyWallet.FormattedAddress(),
)

Expand All @@ -102,11 +102,11 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {
})

t.Run("query localhost transfer channel ends", func(t *testing.T) {
channelEndA, err := s.QueryChannel(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.GetChannelId())
channelEndA, err := s.QueryChannel(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndA)

channelEndB, err := s.QueryChannel(ctx, chainA, transfertypes.PortID, msgChanOpenTryRes.GetChannelId())
channelEndB, err := s.QueryChannel(ctx, chainA, transfertypes.PortID, msgChanOpenTryRes.ChannelId)
s.Require().NoError(err)
s.Require().NotNil(channelEndB)

Expand All @@ -115,7 +115,7 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {

t.Run("send packet localhost ibc transfer", func(t *testing.T) {
var err error
txResp := s.Transfer(ctx, chainA, userAWallet, transfertypes.PortID, msgChanOpenInitRes.GetChannelId(), testvalues.DefaultTransferAmount(chainADenom), userAWallet.FormattedAddress(), userBWallet.FormattedAddress(), clienttypes.NewHeight(1, 100), 0, "")
txResp := s.Transfer(ctx, chainA, userAWallet, transfertypes.PortID, msgChanOpenInitRes.ChannelId, testvalues.DefaultTransferAmount(chainADenom), userAWallet.FormattedAddress(), userBWallet.FormattedAddress(), clienttypes.NewHeight(1, 100), 0, "")
s.AssertTxSuccess(txResp)

events := testsuite.ABCIToSDKEvents(txResp.Events)
Expand Down Expand Up @@ -153,9 +153,9 @@ func (s *LocalhostTransferTestSuite) TestMsgTransfer_Localhost() {
})

t.Run("verify tokens transferred", func(t *testing.T) {
s.AssertPacketRelayed(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.GetChannelId(), 1)
s.AssertPacketRelayed(ctx, chainA, transfertypes.PortID, msgChanOpenInitRes.ChannelId, 1)

ibcToken := testsuite.GetIBCToken(chainADenom, transfertypes.PortID, msgChanOpenTryRes.GetChannelId())
ibcToken := testsuite.GetIBCToken(chainADenom, transfertypes.PortID, msgChanOpenTryRes.ChannelId)
actualBalance, err := chainA.GetBalance(ctx, userBWallet.FormattedAddress(), ibcToken.IBCDenom())
s.Require().NoError(err)

Expand Down
Loading