From 2cdafc0e6d8f75c1de94d95b20cad3fe30c6074c Mon Sep 17 00:00:00 2001 From: BiPhan4 Date: Wed, 31 Jan 2024 14:17:40 -0500 Subject: [PATCH] hard code jkl address and typeURL for filetree msg. Debugging only --- e2e/interchaintest/filetree_post_key_test.go | 7 +++-- e2e/interchaintest/logs/test.log | 28 +++++++++---------- e2e/interchaintest/send_with_protobuf_test.go | 4 +-- e2e/interchaintest/types/helpers.go | 2 ++ 4 files changed, 23 insertions(+), 18 deletions(-) diff --git a/e2e/interchaintest/filetree_post_key_test.go b/e2e/interchaintest/filetree_post_key_test.go index 51a0b4a..af2201c 100644 --- a/e2e/interchaintest/filetree_post_key_test.go +++ b/e2e/interchaintest/filetree_post_key_test.go @@ -41,9 +41,12 @@ func (s *ContractTestSuite) TestIcaContractExecutionTestWithFiletree() { s.Run(fmt.Sprintf("TestSendCustomIcaMesssagesSuccess-%s", encoding), func() { filetreeMsg := &filetreetypes.MsgPostKey{ - Creator: wasmdUser.FormattedAddress(), // This will soon be the contract address + Creator: "jkl1yzajxf83p0zlea6ldn67ncqzs6e7ar85q3452g", // we're just hard coding this temporarily for debugging purposes + + // This will soon be the contract address // This has to be the jkl address that's created by the controller (this contract) - // When the channel is opened + // When the channel is opened. If it's not this address, the transaction should error + // Because the controller account should only be allowed to execute msgs for its host pair Key: "Hey it's Bi from the outpost on another chain. We reached filetree!!! <3", } diff --git a/e2e/interchaintest/logs/test.log b/e2e/interchaintest/logs/test.log index ceb8a80..3009882 100644 --- a/e2e/interchaintest/logs/test.log +++ b/e2e/interchaintest/logs/test.log @@ -1,5 +1,5 @@ -INFO: 2024/01/31 13:40:20 Wasmd First light client is -INFO: 2024/01/31 13:40:20 [ +INFO: 2024/01/31 14:06:00 Wasmd First light client is +INFO: 2024/01/31 14:06:00 [ { "client_id": "07-tendermint-0", "client_state": { @@ -13,10 +13,10 @@ INFO: 2024/01/31 13:40:20 [ } } ] -INFO: 2024/01/31 13:40:20 Wasmd Second light client is -INFO: 2024/01/31 13:40:20 null -INFO: 2024/01/31 13:40:21 jackal first light client is -INFO: 2024/01/31 13:40:21 [ +INFO: 2024/01/31 14:06:00 Wasmd Second light client is +INFO: 2024/01/31 14:06:00 null +INFO: 2024/01/31 14:06:01 jackal first light client is +INFO: 2024/01/31 14:06:01 [ { "client_id": "07-tendermint-0", "client_state": { @@ -24,9 +24,9 @@ INFO: 2024/01/31 13:40:21 [ } } ] -INFO: 2024/01/31 13:40:21 jackal second light client is -INFO: 2024/01/31 13:40:21 null -INFO: 2024/01/31 13:40:49 { +INFO: 2024/01/31 14:06:01 jackal second light client is +INFO: 2024/01/31 14:06:01 null +INFO: 2024/01/31 14:06:25 { "id": "connection-0", "client_id": "07-tendermint-0", "versions": [ @@ -48,7 +48,7 @@ INFO: 2024/01/31 13:40:49 { }, "delay_period": "0" } -INFO: 2024/01/31 13:40:49 { +INFO: 2024/01/31 14:06:25 { "id": "connection-localhost", "client_id": "09-localhost", "versions": [ @@ -70,8 +70,8 @@ INFO: 2024/01/31 13:40:49 { }, "delay_period": "0" } -INFO: 2024/01/31 13:40:49 The first canined connections are: -INFO: 2024/01/31 13:40:49 { +INFO: 2024/01/31 14:06:25 The first canined connections are: +INFO: 2024/01/31 14:06:25 { "id": "connection-0", "client_id": "07-tendermint-0", "versions": [ @@ -93,5 +93,5 @@ INFO: 2024/01/31 13:40:49 { }, "delay_period": "0" } -INFO: 2024/01/31 13:42:03 initial balance is: 1000000000 -INFO: 2024/01/31 13:42:03 Executing custom ICA message now +INFO: 2024/01/31 14:07:39 initial balance is: 1000000000 +INFO: 2024/01/31 14:07:39 Executing custom ICA message now diff --git a/e2e/interchaintest/send_with_protobuf_test.go b/e2e/interchaintest/send_with_protobuf_test.go index ce6b26a..49cdfef 100644 --- a/e2e/interchaintest/send_with_protobuf_test.go +++ b/e2e/interchaintest/send_with_protobuf_test.go @@ -71,8 +71,8 @@ func (s *ContractTestSuite) TestIcaContractExecutionTestWithProtobuf() { logger.LogInfo("Executing custom ICA message now") fmt.Println("Executing custom ICA message now") - // NOTE: Stargate API does not seem to be working for proposalMsg and depositMsg - // Not even the v0.4.2 version is working + // stargate API v0.4.2 works for proposalMsg executing on canined + // still does not work for filetree at this time. sendStargateMsg := testtypes.NewExecuteMsg_SendCosmosMsgs_FromProto( []proto.Message{proposalMsg, depositMsg}, nil, nil, diff --git a/e2e/interchaintest/types/helpers.go b/e2e/interchaintest/types/helpers.go index 392f9c1..5fabd00 100644 --- a/e2e/interchaintest/types/helpers.go +++ b/e2e/interchaintest/types/helpers.go @@ -39,6 +39,8 @@ func NewExecuteMsg_SendCosmosMsgs_FromProto(msgs []proto.Message, memo *string, panic(err) } + protoAny.TypeUrl = "canine_chain.filetree.MsgPostKey" + cosmosMsgs[i] = ContractCosmosMsg{ Stargate: &StargateCosmosMsg{ TypeUrl: protoAny.TypeUrl,