Skip to content

Commit

Permalink
remove denom owners since not implemented in osmosis
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jan 31, 2024
1 parent fc23c2e commit ffac0a2
Showing 1 changed file with 48 additions and 47 deletions.
95 changes: 48 additions & 47 deletions tests/integration/bank/keeper/deterministic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,50 +403,51 @@ func (suite *DeterministicTestSuite) TestGRPCSendEnabled() {
testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.SendEnabled, 4063, false)
}

func (suite *DeterministicTestSuite) TestGRPCDenomOwners() {
rapid.Check(suite.T(), func(t *rapid.T) {
denom := rapid.StringMatching(denomRegex).Draw(t, "denom")
numAddr := rapid.IntRange(1, 10).Draw(t, "number-address")
for i := 0; i < numAddr; i++ {
addr := testdata.AddressGenerator(t).Draw(t, "address")

coin := sdk.NewCoin(
denom,
sdk.NewInt(rapid.Int64Min(1).Draw(t, "amount")),
)

err := banktestutil.FundAccount(suite.bankKeeper, suite.ctx, addr, sdk.NewCoins(coin))
suite.Require().NoError(err)
}

req := &banktypes.QueryDenomOwnersRequest{
Denom: denom,
Pagination: testdata.PaginationGenerator(t, uint64(numAddr)).Draw(t, "pagination"),
}
testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 0, true)
})

denomOwners := []*banktypes.DenomOwner{
{
Address: "cosmos1qg65a9q6k2sqq7l3ycp428sqqpmqcucgzze299",
Balance: coin1,
},
{
Address: "cosmos1qglnsqgpq48l7qqzgs8qdshr6fh3gqq9ej3qut",
Balance: coin1,
},
}

for i := 0; i < len(denomOwners); i++ {
addr, err := sdk.AccAddressFromBech32(denomOwners[i].Address)
suite.Require().NoError(err)

err = banktestutil.FundAccount(suite.bankKeeper, suite.ctx, addr, sdk.NewCoins(coin1))
suite.Require().NoError(err)
}

req := &banktypes.QueryDenomOwnersRequest{
Denom: coin1.GetDenom(),
}
testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 2525, false)
}
// Not implemented in Osmosis
// func (suite *DeterministicTestSuite) TestGRPCDenomOwners() {
// rapid.Check(suite.T(), func(t *rapid.T) {
// denom := rapid.StringMatching(denomRegex).Draw(t, "denom")
// numAddr := rapid.IntRange(1, 10).Draw(t, "number-address")
// for i := 0; i < numAddr; i++ {
// addr := testdata.AddressGenerator(t).Draw(t, "address")

// coin := sdk.NewCoin(
// denom,
// sdk.NewInt(rapid.Int64Min(1).Draw(t, "amount")),
// )

// err := banktestutil.FundAccount(suite.bankKeeper, suite.ctx, addr, sdk.NewCoins(coin))
// suite.Require().NoError(err)
// }

// req := &banktypes.QueryDenomOwnersRequest{
// Denom: denom,
// Pagination: testdata.PaginationGenerator(t, uint64(numAddr)).Draw(t, "pagination"),
// }
// testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 0, true)
// })

// denomOwners := []*banktypes.DenomOwner{
// {
// Address: "cosmos1qg65a9q6k2sqq7l3ycp428sqqpmqcucgzze299",
// Balance: coin1,
// },
// {
// Address: "cosmos1qglnsqgpq48l7qqzgs8qdshr6fh3gqq9ej3qut",
// Balance: coin1,
// },
// }

// for i := 0; i < len(denomOwners); i++ {
// addr, err := sdk.AccAddressFromBech32(denomOwners[i].Address)
// suite.Require().NoError(err)

// err = banktestutil.FundAccount(suite.bankKeeper, suite.ctx, addr, sdk.NewCoins(coin1))
// suite.Require().NoError(err)
// }

// req := &banktypes.QueryDenomOwnersRequest{
// Denom: coin1.GetDenom(),
// }
// testdata.DeterministicIterations(suite.ctx, suite.Require(), req, suite.queryClient.DenomOwners, 2525, false)
// }

0 comments on commit ffac0a2

Please sign in to comment.