88 "path"
99 "testing"
1010
11- sdktypes "github.com/cosmos/cosmos-sdk/types"
11+ sdk "github.com/cosmos/cosmos-sdk/types"
1212 paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils"
1313 transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
1414 "github.com/strangelove-ventures/interchaintest/v7/chain/cosmos"
@@ -38,7 +38,7 @@ func TestQueryOsmosisTwap(t *testing.T) {
3838 require .NoError (t , err )
3939 _ = crossChainRegistryContractID
4040 // // Instatiate
41- owner := sdktypes .MustBech32ifyAddressBytes (osmosis .Config ().Bech32Prefix , osmosisUser .Address ())
41+ owner := sdk .MustBech32ifyAddressBytes (osmosis .Config ().Bech32Prefix , osmosisUser .Address ())
4242 initMsg := fmt .Sprintf ("{\" owner\" :\" %s\" }" , owner )
4343 registryContractAddress , err := osmosis .InstantiateContract (ctx , osmosisUser .KeyName (), crossChainRegistryContractID , initMsg , true )
4444 require .NoError (t , err )
@@ -69,13 +69,14 @@ func TestQueryOsmosisTwap(t *testing.T) {
6969
7070 // Create pool Osmosis(stake)/uosmo on Osmosis
7171 stakeOnOsmosis := GetStakeOnOsmosis (channOsmosisFeeabs , feeabs .Config ().Denom )
72- osmosisUserBalance , err := osmosis .GetBalance (ctx , sdktypes .MustBech32ifyAddressBytes (osmosis .Config ().Bech32Prefix , osmosisUser .Address ()), stakeOnOsmosis )
72+ osmosisUserBalance , err := osmosis .GetBalance (ctx , sdk .MustBech32ifyAddressBytes (osmosis .Config ().Bech32Prefix , osmosisUser .Address ()), stakeOnOsmosis )
7373 require .NoError (t , err )
7474 require .Equal (t , amountToSend , osmosisUserBalance )
7575
76+ initAmount := amountToSend .Int64 () / 10
7677 poolID , err := feeabsCli .CreatePool (osmosis , ctx , osmosisUser .KeyName (), cosmos.OsmosisPoolParams {
7778 Weights : fmt .Sprintf ("5%s,5%s" , stakeOnOsmosis , osmosis .Config ().Denom ),
78- InitialDeposit : fmt .Sprintf ("95000000%s,950000000% s" , stakeOnOsmosis , osmosis .Config ().Denom ),
79+ InitialDeposit : fmt .Sprintf ("%d%s,%d% s" , initAmount , stakeOnOsmosis , initAmount , osmosis .Config ().Denom ),
7980 SwapFee : "0.01" ,
8081 ExitFee : "0" ,
8182 FutureGovernor : "" ,
@@ -98,7 +99,7 @@ func TestQueryOsmosisTwap(t *testing.T) {
9899 err = osmosis .QueryContract (ctx , registryContractAddress , queryMsg , & res )
99100 require .NoError (t , err )
100101
101- ParamChangeProposal (t , ctx , feeabs , feeabsUser , & channFeeabsOsmosis , & channFeeabsOsmosisICQ , stakeOnOsmosis )
102+ ParamChangeProposal (t , ctx , feeabs , feeabsUser , channFeeabsOsmosis . ChannelID , channFeeabsOsmosisICQ . ChannelID , stakeOnOsmosis )
102103 AddHostZoneProposal (t , ctx , feeabs , feeabsUser )
103104
104105 // ensure that the host zone is added
@@ -120,7 +121,14 @@ func TestQueryOsmosisTwap(t *testing.T) {
120121 require .NoError (t , err )
121122}
122123
123- func ParamChangeProposal (t * testing.T , ctx context.Context , feeabs * cosmos.CosmosChain , feeabsUser ibc.Wallet , channFeeabsOsmosis , channFeeabsOsmosisFeeabs * ibc.ChannelOutput , stakeOnOsmosis string ) {
124+ func ParamChangeProposal (
125+ t * testing.T ,
126+ ctx context.Context ,
127+ feeabs * cosmos.CosmosChain ,
128+ feeabsUser ibc.Wallet ,
129+ channFeeabsOsmosis , channFeeabsOsmosisFeeabs string ,
130+ stakeOnOsmosis string ,
131+ ) {
124132 t .Helper ()
125133 // propose to change feeabs parameters accordingly to the ibcdenom
126134 curDir , _ := os .Getwd ()
@@ -133,12 +141,12 @@ func ParamChangeProposal(t *testing.T, ctx context.Context, feeabs *cosmos.Cosmo
133141 for i := range changeParamProposal .Changes {
134142 change := & changeParamProposal .Changes [i ]
135143 if change .Subspace == "feeabs" && change .Key == "IbcTransferChannel" {
136- fmt .Println ("ibc transfer channel changed" , channFeeabsOsmosis . ChannelID )
137- change .Value = json .RawMessage (fmt .Sprintf ("\" %s\" " , channFeeabsOsmosis . ChannelID ))
144+ fmt .Println ("ibc transfer channel changed" , channFeeabsOsmosis )
145+ change .Value = json .RawMessage (fmt .Sprintf ("\" %s\" " , channFeeabsOsmosis ))
138146 }
139147 if change .Subspace == "feeabs" && change .Key == "IbcQueryIcqChannel" {
140- fmt .Println ("ibc query icq channel changed" , channFeeabsOsmosisFeeabs . ChannelID )
141- change .Value = json .RawMessage (fmt .Sprintf ("\" %s\" " , channFeeabsOsmosisFeeabs . ChannelID ))
148+ fmt .Println ("ibc query icq channel changed" , channFeeabsOsmosisFeeabs )
149+ change .Value = json .RawMessage (fmt .Sprintf ("\" %s\" " , channFeeabsOsmosisFeeabs ))
142150 }
143151 if change .Subspace == "feeabs" && change .Key == "NativeIbcedInOsmosis" {
144152 fmt .Println ("NativeIbcedInOsmosis changed" , stakeOnOsmosis )
0 commit comments