Skip to content

Commit

Permalink
use string query for wasm ibc test
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Oct 4, 2023
1 parent d325853 commit ee763ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions examples/ibc/wasm/wasm_ibc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ func TestWasmIbc(t *testing.T) {
require.NoError(t, err)
juno1ChannelID := juno1ChannelInfo[len(juno1ChannelInfo)-1].ChannelID

queryMsg := fmt.Sprintf(`{"account":{"channel_id":"%s"}}`, juno1ChannelID)

// Query ibc_reflect_send contract on Juno1 for remote address (populated via ibc)
queryMsg := ReflectSendQueryMsg{Account: &AccountQuery{ChannelID: juno1ChannelID}}
var ibcReflectSendResponse IbcReflectSendResponseData
err = juno1Chain.QueryContract(ctx, ibcReflectSendContractAddr, queryMsg, &ibcReflectSendResponse)
require.NoError(t, err)
Expand All @@ -183,16 +184,6 @@ func TestWasmIbc(t *testing.T) {
require.Equal(t, ibcReflectSendResponse.Data.RemoteAddr, ibcReflectResponse.Data.Account)
}

type ReflectSendQueryMsg struct {
Admin *struct{} `json:"admin,omitempty"`
ListAccounts *struct{} `json:"list_accounts,omitempty"`
Account *AccountQuery `json:"account,omitempty"`
}

type AccountQuery struct {
ChannelID string `json:"channel_id"`
}

type Coin struct {
Denom string `json:"denom"` // type, eg. "ATOM"
Amount string `json:"amount"` // string encoing of decimal value, eg. "12.3456"
Expand Down
2 changes: 1 addition & 1 deletion examples/ibc/wasm/wasm_icq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func TestInterchainQueriesWASM(t *testing.T) {
r := interchaintest.NewBuiltinRelayerFactory(
ibc.CosmosRly,
logger,
relayer.RelayerOptionExtraStartFlags{Flags: []string{"-p", "events", "-b", "100"}},
relayer.StartupFlags("-p", "events", "-b", "100"),
).Build(t, client, network)

// Build the network; spin up the chains and configure the relayer
Expand Down

0 comments on commit ee763ac

Please sign in to comment.