Skip to content

Commit

Permalink
fix hostzone test
Browse files Browse the repository at this point in the history
  • Loading branch information
tuantran1702 committed May 27, 2024
1 parent a51b18d commit 6884194
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/interchaintest/host_zone_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ func TestHostZoneProposal(t *testing.T) {
ctx := context.Background()

chains, users, channels := SetupChain(t, ctx)
feeabs, _, _ := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain)
channFeeabsOsmosis, channOsmosisFeeabs, channFeeabsOsmosisICQ := channels[0], channels[1], channels[6]
feeabs, _, osmosis := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain)
channFeeabsOsmosis, _, channFeeabsOsmosisICQ := channels[0], channels[1], channels[6]

feeabsUser, _, _ := users[0], users[1], users[2]
stakeOnOsmosis := GetStakeOnOsmosis(channOsmosisFeeabs, feeabs.Config().Denom)
osmoOnFeeabs := GetOsmoOnFeeabs(channFeeabsOsmosis, osmosis.Config().Denom)

ParamChangeProposal(t, ctx, feeabs, feeabsUser, &channFeeabsOsmosis, &channFeeabsOsmosisICQ, stakeOnOsmosis)
ParamChangeProposal(t, ctx, feeabs, feeabsUser, &channFeeabsOsmosis, &channFeeabsOsmosisICQ, osmoOnFeeabs)
AddHostZoneProposal(t, ctx, feeabs, feeabsUser)

_, err := feeabsCli.QueryHostZoneConfigWithDenom(feeabs, ctx, stakeOnOsmosis)
_, err := feeabsCli.QueryHostZoneConfigWithDenom(feeabs, ctx, osmoOnFeeabs)
require.NoError(t, err)
}
6 changes: 6 additions & 0 deletions tests/interchaintest/query_osmosis_twap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,9 @@ func GetStakeOnOsmosis(channOsmosisFeeabs ibc.ChannelOutput, feeabsDenom string)
stakeOnOsmosis := denomTrace.IBCDenom()
return stakeOnOsmosis
}

func GetOsmoOnFeeabs(channFeeabsOsmosis ibc.ChannelOutput, osmosisDenom string) string {
denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, osmosisDenom))
osmoOnFeeabs := denomTrace.IBCDenom()
return osmoOnFeeabs
}

0 comments on commit 6884194

Please sign in to comment.