From 1dba8a61ebf87a1064870101dc796c6ecbf78563 Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Sun, 9 Jun 2024 17:39:18 +0700 Subject: [PATCH] Improve interchaintest (#207) --- .../interchaintest/host_zone_proposal_test.go | 47 +++++++++++++++---- .../ibc_transfer_customfee_test.go | 16 +++---- tests/interchaintest/ibc_transfer_test.go | 17 ++++--- tests/interchaintest/packet_foward_test.go | 13 ++--- .../interchaintest/query_osmosis_twap_test.go | 28 +++++++---- tests/interchaintest/setup.go | 11 +++-- 6 files changed, 85 insertions(+), 47 deletions(-) diff --git a/tests/interchaintest/host_zone_proposal_test.go b/tests/interchaintest/host_zone_proposal_test.go index 3cab4aeb..58e24aae 100644 --- a/tests/interchaintest/host_zone_proposal_test.go +++ b/tests/interchaintest/host_zone_proposal_test.go @@ -4,28 +4,57 @@ import ( "context" "testing" + "go.uber.org/zap/zaptest" + + "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/stretchr/testify/require" - feeabsCli "github.com/osmosis-labs/fee-abstraction/v7/tests/interchaintest/feeabs" + feeabstest "github.com/osmosis-labs/fee-abstraction/v7/tests/interchaintest/feeabs" ) func TestHostZoneProposal(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } - ctx := context.Background() - chains, users, channels := SetupChain(t, ctx) - feeabs, _, osmosis := chains[0].(*cosmos.CosmosChain), chains[1].(*cosmos.CosmosChain), chains[2].(*cosmos.CosmosChain) - channFeeabsOsmosis, _, channFeeabsOsmosisICQ := channels[0], channels[1], channels[6] + t.Parallel() - feeabsUser, _, _ := users[0], users[1], users[2] - osmoOnFeeabs := GetOsmoOnFeeabs(channFeeabsOsmosis, osmosis.Config().Denom) + numVals, numFullNodes := 1, 1 - ParamChangeProposal(t, ctx, feeabs, feeabsUser, &channFeeabsOsmosis, &channFeeabsOsmosisICQ, osmoOnFeeabs) + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ + { + Name: "feeabs", + ChainConfig: feeabsConfig, + NumValidators: &numVals, + NumFullNodes: &numFullNodes, + }, + }) + + chains, err := cf.Chains(t.Name()) + require.NoError(t, err) + + feeabs := chains[0].(*cosmos.CosmosChain) + + ic := interchaintest.NewInterchain().AddChain(feeabs) + client, network := interchaintest.DockerSetup(t) + ctx := context.Background() + require.NoError(t, ic.Build(ctx, nil, interchaintest.InterchainBuildOptions{ + TestName: t.Name(), + Client: client, + NetworkID: network, + SkipPathCreation: true, + })) + t.Cleanup(func() { + _ = ic.Close() + }) + + users := interchaintest.GetAndFundTestUsers(t, ctx, t.Name(), genesisWalletAmount.Int64(), feeabs) + feeabsUser := users[0] + + ParamChangeProposal(t, ctx, feeabs, feeabsUser, "channel-0", "channel-1", fakeIBCDenom) AddHostZoneProposal(t, ctx, feeabs, feeabsUser) - _, err := feeabsCli.QueryHostZoneConfigWithDenom(feeabs, ctx, osmoOnFeeabs) + _, err = feeabstest.QueryHostZoneConfigWithDenom(feeabs, ctx, fakeIBCDenom) require.NoError(t, err) } diff --git a/tests/interchaintest/ibc_transfer_customfee_test.go b/tests/interchaintest/ibc_transfer_customfee_test.go index 53318a82..58b8fc35 100644 --- a/tests/interchaintest/ibc_transfer_customfee_test.go +++ b/tests/interchaintest/ibc_transfer_customfee_test.go @@ -8,7 +8,6 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - sdktypes "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" feeabsCli "github.com/osmosis-labs/fee-abstraction/v7/tests/interchaintest/feeabs" "github.com/osmosis-labs/fee-abstraction/v7/tests/interchaintest/tendermint" @@ -41,7 +40,7 @@ func TestFeeabsGaiaIBCTransferWithIBCFee(t *testing.T) { require.NoError(t, err) _ = crossChainRegistryContractID // // Instatiate - owner := sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) + owner := sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName(), crossChainRegistryContractID, initMsg, true) require.NoError(t, err) @@ -73,20 +72,21 @@ func TestFeeabsGaiaIBCTransferWithIBCFee(t *testing.T) { // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) uatomOnOsmosis := denomTrace.IBCDenom() - osmosisUserBalance, err := osmosis.GetBalance(ctx, sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), uatomOnOsmosis) + osmosisUserBalance, err := osmosis.GetBalance(ctx, sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), uatomOnOsmosis) require.NoError(t, err) require.Equal(t, amountToSend, osmosisUserBalance) denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisFeeabs.PortID, channOsmosisFeeabs.ChannelID, feeabs.Config().Denom)) stakeOnOsmosis := denomTrace.IBCDenom() - osmosisUserBalance, err = osmosis.GetBalance(ctx, sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) + osmosisUserBalance, err = osmosis.GetBalance(ctx, sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) require.NoError(t, err) require.Equal(t, amountToSend, osmosisUserBalance) // Create pool Osmosis(stake)/uosmo on Osmosis, with 1:1 ratio + initAmount := amountToSend.Int64() / 10 poolID, err := feeabsCli.CreatePool(osmosis, ctx, osmosisUser.KeyName(), cosmos.OsmosisPoolParams{ Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, osmosis.Config().Denom), - InitialDeposit: fmt.Sprintf("95000000%s,95000000%s", stakeOnOsmosis, osmosis.Config().Denom), + InitialDeposit: fmt.Sprintf("%d%s,%d%s", initAmount, stakeOnOsmosis, initAmount, osmosis.Config().Denom), SwapFee: "0.01", ExitFee: "0", FutureGovernor: "", @@ -129,7 +129,7 @@ func TestFeeabsGaiaIBCTransferWithIBCFee(t *testing.T) { // Setup feeabs module & add host zone via proposals //////////////////////////////////////////////////////////////////////////////////////// - ParamChangeProposal(t, ctx, feeabs, feeabsUser, &channFeeabsOsmosis, &channFeeabsOsmosisICQ, stakeOnOsmosis) + ParamChangeProposal(t, ctx, feeabs, feeabsUser, channFeeabsOsmosis.ChannelID, channFeeabsOsmosisICQ.ChannelID, stakeOnOsmosis) AddHostZoneProposal(t, ctx, feeabs, feeabsUser) _, err = feeabsCli.QueryAllHostZoneConfig(feeabs, ctx) require.NoError(t, err) @@ -145,8 +145,8 @@ func TestFeeabsGaiaIBCTransferWithIBCFee(t *testing.T) { // Get our Bech32 encoded user addresses feeabsUser, gaiaUser := users[0], users[1] - feeabsUserAddr := sdktypes.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) - gaiaUserAddr := sdktypes.MustBech32ifyAddressBytes(gaia.Config().Bech32Prefix, gaiaUser.Address()) + feeabsUserAddr := sdk.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) + gaiaUserAddr := sdk.MustBech32ifyAddressBytes(gaia.Config().Bech32Prefix, gaiaUser.Address()) // Compose an IBC transfer and send from Gaia -> Feeabs osmoTokenDenom := transfertypes.GetPrefixedDenom(channFeeabsOsmosis.PortID, channFeeabsOsmosis.ChannelID, osmosis.Config().Denom) diff --git a/tests/interchaintest/ibc_transfer_test.go b/tests/interchaintest/ibc_transfer_test.go index deb76faf..45fe7915 100644 --- a/tests/interchaintest/ibc_transfer_test.go +++ b/tests/interchaintest/ibc_transfer_test.go @@ -6,7 +6,7 @@ import ( "testing" "cosmossdk.io/math" - sdktypes "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/strangelove-ventures/interchaintest/v7" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" @@ -113,8 +113,8 @@ func TestFeeabsGaiaIBCTransfer(t *testing.T) { // Get our Bech32 encoded user addresses feeabsUser, gaiaUser := users[0], users[1] - feeabsUserAddr := sdktypes.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) - gaiaUserAddr := sdktypes.MustBech32ifyAddressBytes(gaia.Config().Bech32Prefix, gaiaUser.Address()) + feeabsUserAddr := sdk.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) + gaiaUserAddr := sdk.MustBech32ifyAddressBytes(gaia.Config().Bech32Prefix, gaiaUser.Address()) // Get original account balances feeabsOrigBal, err := feeabs.GetBalance(ctx, feeabsUserAddr, feeabs.Config().Denom) @@ -126,11 +126,10 @@ func TestFeeabsGaiaIBCTransfer(t *testing.T) { require.Equal(t, genesisWalletAmount, gaiaOrigBal) // Compose an IBC transfer and send from feeabs -> Gaia - transferAmount := math.NewInt(1_000) transfer := ibc.WalletAmount{ Address: gaiaUserAddr, Denom: feeabs.Config().Denom, - Amount: transferAmount, + Amount: amountToSend, } channel, err := ibc.GetTransferChannel(ctx, r, eRep, feeabs.Config().ChainID, gaia.Config().ChainID) @@ -155,17 +154,17 @@ func TestFeeabsGaiaIBCTransfer(t *testing.T) { require.NoError(t, err) // The feeabs account should have the original balance minus the transfer amount and the fee - require.GreaterOrEqual(t, feeabsOrigBal.Sub(transferAmount).Int64(), feeabsUpdateBal.Int64()) + require.GreaterOrEqual(t, feeabsOrigBal.Sub(amountToSend).Int64(), feeabsUpdateBal.Int64()) gaiaUpdateBal, err := gaia.GetBalance(ctx, gaiaUserAddr, feeabsIBCDenom) require.NoError(t, err) - require.Equal(t, transferAmount, gaiaUpdateBal) + require.Equal(t, amountToSend, gaiaUpdateBal) // Compose an IBC transfer and send from Gaia -> Feeabs transfer = ibc.WalletAmount{ Address: feeabsUserAddr, Denom: feeabsIBCDenom, - Amount: transferAmount, + Amount: amountToSend, } transferTx, err = gaia.SendIBCTransfer(ctx, channel.Counterparty.ChannelID, gaiaUserAddr, transfer, ibc.TransferOptions{}) @@ -181,7 +180,7 @@ func TestFeeabsGaiaIBCTransfer(t *testing.T) { // Assert that the funds are now back on feeabs and not on Gaia feeabsBalAfterGettingBackToken, err := feeabs.GetBalance(ctx, feeabsUserAddr, feeabs.Config().Denom) require.NoError(t, err) - require.Equal(t, feeabsUpdateBal.Add(transferAmount).Int64(), feeabsBalAfterGettingBackToken.Int64()) + require.Equal(t, feeabsUpdateBal.Add(amountToSend).Int64(), feeabsBalAfterGettingBackToken.Int64()) gaiaUpdateBal, err = gaia.GetBalance(ctx, gaiaUserAddr, feeabsIBCDenom) require.NoError(t, err) diff --git a/tests/interchaintest/packet_foward_test.go b/tests/interchaintest/packet_foward_test.go index 3640c67c..94459a0a 100644 --- a/tests/interchaintest/packet_foward_test.go +++ b/tests/interchaintest/packet_foward_test.go @@ -5,7 +5,7 @@ import ( "fmt" "testing" - sdktypes "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" "github.com/strangelove-ventures/interchaintest/v7/testutil" @@ -33,7 +33,7 @@ func TestPacketForwardMiddleware(t *testing.T) { require.NoError(t, err) _ = crossChainRegistryContractID // // Instatiate - owner := sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) + owner := sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName(), crossChainRegistryContractID, initMsg, true) require.NoError(t, err) @@ -65,19 +65,20 @@ func TestPacketForwardMiddleware(t *testing.T) { // Create pool Osmosis(uatom)/Osmosis(stake) on Osmosis denomTrace := transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisGaia.PortID, channOsmosisGaia.ChannelID, gaia.Config().Denom)) uatomOnOsmosis := denomTrace.IBCDenom() - osmosisUserBalance, err := osmosis.GetBalance(ctx, sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), uatomOnOsmosis) + osmosisUserBalance, err := osmosis.GetBalance(ctx, sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), uatomOnOsmosis) require.NoError(t, err) require.Equal(t, amountToSend, osmosisUserBalance) denomTrace = transfertypes.ParseDenomTrace(transfertypes.GetPrefixedDenom(channOsmosisFeeabs.PortID, channOsmosisFeeabs.ChannelID, feeabs.Config().Denom)) stakeOnOsmosis := denomTrace.IBCDenom() - osmosisUserBalance, err = osmosis.GetBalance(ctx, sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) + osmosisUserBalance, err = osmosis.GetBalance(ctx, sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) require.NoError(t, err) require.Equal(t, amountToSend, osmosisUserBalance) + initAmount := amountToSend.Int64() / 10 poolID, err := feeabsCli.CreatePool(osmosis, ctx, osmosisUser.KeyName(), cosmos.OsmosisPoolParams{ - Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, uatomOnOsmosis), - InitialDeposit: fmt.Sprintf("95000000%s,950000000%s", stakeOnOsmosis, uatomOnOsmosis), + Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, osmosis.Config().Denom), + InitialDeposit: fmt.Sprintf("%d%s,%d%s", initAmount, stakeOnOsmosis, initAmount, osmosis.Config().Denom), SwapFee: "0.01", ExitFee: "0", FutureGovernor: "", diff --git a/tests/interchaintest/query_osmosis_twap_test.go b/tests/interchaintest/query_osmosis_twap_test.go index cc9ec93c..c1e71550 100644 --- a/tests/interchaintest/query_osmosis_twap_test.go +++ b/tests/interchaintest/query_osmosis_twap_test.go @@ -8,7 +8,7 @@ import ( "path" "testing" - sdktypes "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos" @@ -38,7 +38,7 @@ func TestQueryOsmosisTwap(t *testing.T) { require.NoError(t, err) _ = crossChainRegistryContractID // // Instatiate - owner := sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) + owner := sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) registryContractAddress, err := osmosis.InstantiateContract(ctx, osmosisUser.KeyName(), crossChainRegistryContractID, initMsg, true) require.NoError(t, err) @@ -69,13 +69,14 @@ func TestQueryOsmosisTwap(t *testing.T) { // Create pool Osmosis(stake)/uosmo on Osmosis stakeOnOsmosis := GetStakeOnOsmosis(channOsmosisFeeabs, feeabs.Config().Denom) - osmosisUserBalance, err := osmosis.GetBalance(ctx, sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) + osmosisUserBalance, err := osmosis.GetBalance(ctx, sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()), stakeOnOsmosis) require.NoError(t, err) require.Equal(t, amountToSend, osmosisUserBalance) + initAmount := amountToSend.Int64() / 10 poolID, err := feeabsCli.CreatePool(osmosis, ctx, osmosisUser.KeyName(), cosmos.OsmosisPoolParams{ Weights: fmt.Sprintf("5%s,5%s", stakeOnOsmosis, osmosis.Config().Denom), - InitialDeposit: fmt.Sprintf("95000000%s,950000000%s", stakeOnOsmosis, osmosis.Config().Denom), + InitialDeposit: fmt.Sprintf("%d%s,%d%s", initAmount, stakeOnOsmosis, initAmount, osmosis.Config().Denom), SwapFee: "0.01", ExitFee: "0", FutureGovernor: "", @@ -98,7 +99,7 @@ func TestQueryOsmosisTwap(t *testing.T) { err = osmosis.QueryContract(ctx, registryContractAddress, queryMsg, &res) require.NoError(t, err) - ParamChangeProposal(t, ctx, feeabs, feeabsUser, &channFeeabsOsmosis, &channFeeabsOsmosisICQ, stakeOnOsmosis) + ParamChangeProposal(t, ctx, feeabs, feeabsUser, channFeeabsOsmosis.ChannelID, channFeeabsOsmosisICQ.ChannelID, stakeOnOsmosis) AddHostZoneProposal(t, ctx, feeabs, feeabsUser) // ensure that the host zone is added @@ -120,7 +121,14 @@ func TestQueryOsmosisTwap(t *testing.T) { require.NoError(t, err) } -func ParamChangeProposal(t *testing.T, ctx context.Context, feeabs *cosmos.CosmosChain, feeabsUser ibc.Wallet, channFeeabsOsmosis, channFeeabsOsmosisFeeabs *ibc.ChannelOutput, stakeOnOsmosis string) { +func ParamChangeProposal( + t *testing.T, + ctx context.Context, + feeabs *cosmos.CosmosChain, + feeabsUser ibc.Wallet, + channFeeabsOsmosis, channFeeabsOsmosisFeeabs string, + stakeOnOsmosis string, +) { t.Helper() // propose to change feeabs parameters accordingly to the ibcdenom curDir, _ := os.Getwd() @@ -133,12 +141,12 @@ func ParamChangeProposal(t *testing.T, ctx context.Context, feeabs *cosmos.Cosmo for i := range changeParamProposal.Changes { change := &changeParamProposal.Changes[i] if change.Subspace == "feeabs" && change.Key == "IbcTransferChannel" { - fmt.Println("ibc transfer channel changed", channFeeabsOsmosis.ChannelID) - change.Value = json.RawMessage(fmt.Sprintf("\"%s\"", channFeeabsOsmosis.ChannelID)) + fmt.Println("ibc transfer channel changed", channFeeabsOsmosis) + change.Value = json.RawMessage(fmt.Sprintf("\"%s\"", channFeeabsOsmosis)) } if change.Subspace == "feeabs" && change.Key == "IbcQueryIcqChannel" { - fmt.Println("ibc query icq channel changed", channFeeabsOsmosisFeeabs.ChannelID) - change.Value = json.RawMessage(fmt.Sprintf("\"%s\"", channFeeabsOsmosisFeeabs.ChannelID)) + fmt.Println("ibc query icq channel changed", channFeeabsOsmosisFeeabs) + change.Value = json.RawMessage(fmt.Sprintf("\"%s\"", channFeeabsOsmosisFeeabs)) } if change.Subspace == "feeabs" && change.Key == "NativeIbcedInOsmosis" { fmt.Println("NativeIbcedInOsmosis changed", stakeOnOsmosis) diff --git a/tests/interchaintest/setup.go b/tests/interchaintest/setup.go index 76f50c2b..b39d1f06 100644 --- a/tests/interchaintest/setup.go +++ b/tests/interchaintest/setup.go @@ -9,7 +9,7 @@ import ( "testing" "cosmossdk.io/math" - sdktypes "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/icza/dyno" "github.com/strangelove-ventures/interchaintest/v7" @@ -84,6 +84,7 @@ var ( pathOsmosisGaia = "osmosis-gaia" genesisWalletAmount = math.NewInt(100_000_000_000) amountToSend = math.NewInt(1_000_000_000) + fakeIBCDenom = "ibc/0471F1C4E7AFD3F07702BEF6DC365268D64570F7C1FDC98EA6098DD6DE59817B" ) // feeabsEncoding registers the feeabs specific module codecs so that the associated types and msgs @@ -462,7 +463,7 @@ func SetupChain(t *testing.T, ctx context.Context) ([]ibc.Chain, []ibc.Wallet, [ // Send Gaia uatom to Osmosis gaiaHeight, err := gaia.Height(ctx) require.NoError(t, err) - dstAddress := sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) + dstAddress := sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) transfer := ibc.WalletAmount{ Address: dstAddress, Denom: gaia.Config().Denom, @@ -481,7 +482,7 @@ func SetupChain(t *testing.T, ctx context.Context) ([]ibc.Chain, []ibc.Wallet, [ // Send Feeabs stake to Osmosis feeabsHeight, err := feeabs.Height(ctx) require.NoError(t, err) - dstAddress = sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) + dstAddress = sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, osmosisUser.Address()) transfer = ibc.WalletAmount{ Address: dstAddress, Denom: feeabs.Config().Denom, @@ -500,7 +501,7 @@ func SetupChain(t *testing.T, ctx context.Context) ([]ibc.Chain, []ibc.Wallet, [ // Send Gaia uatom to Feeabs gaiaHeight, err = gaia.Height(ctx) require.NoError(t, err) - dstAddress = sdktypes.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) + dstAddress = sdk.MustBech32ifyAddressBytes(feeabs.Config().Bech32Prefix, feeabsUser.Address()) transfer = ibc.WalletAmount{ Address: dstAddress, Denom: gaia.Config().Denom, @@ -556,7 +557,7 @@ func SetupOsmosisContracts(t *testing.T, // Instantiate contracts // 1. Crosschain Registry Contract - owner := sdktypes.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, user.Address()) + owner := sdk.MustBech32ifyAddressBytes(osmosis.Config().Bech32Prefix, user.Address()) initMsg := fmt.Sprintf("{\"owner\":\"%s\"}", owner) registryContractAddr, err := osmosis.InstantiateContract(ctx, user.KeyName(), registryCodeId, initMsg, true)