-
Notifications
You must be signed in to change notification settings - Fork 579
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
feat: add channel query client to e2e test suite #1985
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package testsuite | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/strangelove-ventures/ibctest/ibc" | ||
|
||
channeltypes "github.com/cosmos/ibc-go/v5/modules/core/04-channel/types" | ||
) | ||
|
||
// QueryPacketCommitment queries the packet commitment on the given chain for the provided channel and sequence. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should add a AssertPacketIsRelayed function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds like a useful assertion to have, we can always add it as we need it though if you don't want to include it in this PR. |
||
func (s *E2ETestSuite) QueryPacketCommitment(ctx context.Context, chain ibc.Chain, portID, channelID string, sequence uint64) ([]byte, error) { | ||
queryClient := s.GetChainGRCPClients(chain).ChannelQueryClient | ||
res, err := queryClient.PacketCommitment(ctx, &channeltypes.QueryPacketCommitmentRequest{ | ||
PortId: portID, | ||
ChannelId: channelID, | ||
Sequence: sequence, | ||
}) | ||
if err != nil { | ||
return nil, err | ||
} | ||
return res.Commitment, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought it might be nice to have a separate file for core queries we support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense 👍