-
Notifications
You must be signed in to change notification settings - Fork 628
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
E2E Upgrade Part 2 - Human Readable IBC Denom #4649
Changes from all commits
618947d
c1e3359
b41931c
635bc3c
46be834
4455333
7a50bd6
94eb0d5
26841f9
9c13c40
eb1fe98
283f9dd
860fb84
307f28f
f7482c0
df0d044
a4f47ac
9a830a1
1299b98
b883409
f469dc3
6c7d4cf
ecd9a33
882b657
4b4fa7b
591203c
4a8b708
f863354
1b80c4f
20c810f
c0faf67
ed168a3
b76b9c9
d37c0a0
46fd3ba
ef727b6
5785dc6
aace0a1
d0f3b34
240c89c
33dc779
76b007f
043ca76
a5087a6
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 |
---|---|---|
|
@@ -106,12 +106,8 @@ func (s *TransferTestSuite) TestMsgTransfer_Succeeds_Nonincentivized() { | |
}) | ||
|
||
if testvalues.TokenMetadataFeatureReleases.IsSupported(chainBVersion) { | ||
t.Run("metadata for token exists on chainB", func(t *testing.T) { | ||
balances, err := s.QueryAllBalances(ctx, chainB, chainBAddress, true) | ||
s.Require().NoError(err) | ||
|
||
// balance for IBC token returns a human-readable denomination | ||
s.Require().Equal(chainBIBCToken.GetFullDenomPath(), balances[1].Denom) | ||
t.Run("metadata for IBC denomination exists on chainB", func(t *testing.T) { | ||
s.AssertHumanReadableDenom(ctx, chainB, chainADenom, channelA) | ||
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. 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. I put together both assertions (check metadata is stored, check that balance returns the human readable denom). I hope that's ok, @chatton. |
||
}) | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -279,20 +279,6 @@ func (s *E2ETestSuite) QueryCounterPartyPayee(ctx context.Context, chain ibc.Cha | |
return res.CounterpartyPayee, nil | ||
} | ||
|
||
// QueryBalances returns all the balances on the given chain for the provided address. | ||
func (s *E2ETestSuite) QueryAllBalances(ctx context.Context, chain ibc.Chain, address string, resolveDenom bool) (sdk.Coins, error) { | ||
queryClient := s.GetChainGRCPClients(chain).BankQueryClient | ||
res, err := queryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ | ||
Address: address, | ||
ResolveDenom: resolveDenom, | ||
}) | ||
if err != nil { | ||
return sdk.Coins{}, err | ||
} | ||
|
||
return res.Balances, nil | ||
} | ||
|
||
// QueryProposalV1Beta1 queries the governance proposal on the given chain with the given proposal ID. | ||
func (s *E2ETestSuite) QueryProposalV1Beta1(ctx context.Context, chain ibc.Chain, proposalID uint64) (govtypesv1beta1.Proposal, error) { | ||
queryClient := s.GetChainGRCPClients(chain).GovQueryClient | ||
|
@@ -394,3 +380,30 @@ func (s *E2ETestSuite) QueryGranterGrants(ctx context.Context, chain *cosmos.Cos | |
|
||
return grants.Grants, nil | ||
} | ||
|
||
// QueryBalances returns all the balances on the given chain for the provided address. | ||
func (s *E2ETestSuite) QueryAllBalances(ctx context.Context, chain ibc.Chain, address string, resolveDenom bool) (sdk.Coins, error) { | ||
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. I moved this down here to keep both usages of the bank query client together. |
||
queryClient := s.GetChainGRCPClients(chain).BankQueryClient | ||
res, err := queryClient.AllBalances(ctx, &banktypes.QueryAllBalancesRequest{ | ||
Address: address, | ||
ResolveDenom: resolveDenom, | ||
}) | ||
if err != nil { | ||
return sdk.Coins{}, err | ||
} | ||
|
||
return res.Balances, nil | ||
} | ||
|
||
// QueryDenomMetadata queries the metadata for the given denom. | ||
func (s *E2ETestSuite) QueryDenomMetadata(ctx context.Context, chain *cosmos.CosmosChain, denom string) (banktypes.Metadata, error) { | ||
bankClient := s.GetChainGRCPClients(chain).BankQueryClient | ||
queryRequest := &banktypes.QueryDenomMetadataRequest{ | ||
Denom: denom, | ||
} | ||
res, err := bankClient.DenomMetadata(ctx, queryRequest) | ||
if err != nil { | ||
return banktypes.Metadata{}, err | ||
} | ||
return res.Metadata, 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.
I opened #4674.