Skip to content
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

Improve interchaintest #207

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 38 additions & 9 deletions tests/interchaintest/host_zone_proposal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
16 changes: 8 additions & 8 deletions tests/interchaintest/ibc_transfer_customfee_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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: "",
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
17 changes: 8 additions & 9 deletions tests/interchaintest/ibc_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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{})
Expand All @@ -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)
Expand Down
13 changes: 7 additions & 6 deletions tests/interchaintest/packet_foward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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: "",
Expand Down
28 changes: 18 additions & 10 deletions tests/interchaintest/query_osmosis_twap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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: "",
Expand All @@ -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
Expand All @@ -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()
Expand All @@ -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)
Expand Down
11 changes: 6 additions & 5 deletions tests/interchaintest/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -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)
Expand Down
Loading