From 0c0158ac13d1095e3cc89389ebaa36c3fe2267a9 Mon Sep 17 00:00:00 2001 From: bruce-riley <96066700+bruce-riley@users.noreply.github.com> Date: Thu, 7 Dec 2023 09:42:09 -0600 Subject: [PATCH] Node/SDK: Add neutron support via IBC (#3563) * Node/SDK: Add neutron support via IBC * Set core addresses in SDK --- node/pkg/proto/publicrpc/v1/publicrpc.pb.go | 194 ++++++++++---------- node/pkg/watchers/ibc/watcher.go | 1 + proto/publicrpc/v1/publicrpc.proto | 1 + sdk/js/src/cosmwasm/address.ts | 3 + sdk/js/src/utils/array.ts | 5 + sdk/js/src/utils/consts.ts | 18 ++ sdk/vaa/structs.go | 7 + sdk/vaa/structs_test.go | 3 + 8 files changed, 137 insertions(+), 95 deletions(-) diff --git a/node/pkg/proto/publicrpc/v1/publicrpc.pb.go b/node/pkg/proto/publicrpc/v1/publicrpc.pb.go index 0803c3388..b47cdedac 100644 --- a/node/pkg/proto/publicrpc/v1/publicrpc.pb.go +++ b/node/pkg/proto/publicrpc/v1/publicrpc.pb.go @@ -61,6 +61,7 @@ const ( ChainID_CHAIN_ID_COSMOSHUB ChainID = 4000 ChainID_CHAIN_ID_EVMOS ChainID = 4001 ChainID_CHAIN_ID_KUJIRA ChainID = 4002 + ChainID_CHAIN_ID_NEUTRON ChainID = 4003 ChainID_CHAIN_ID_CELESTIA ChainID = 4004 ChainID_CHAIN_ID_SEPOLIA ChainID = 10002 ) @@ -103,6 +104,7 @@ var ( 4000: "CHAIN_ID_COSMOSHUB", 4001: "CHAIN_ID_EVMOS", 4002: "CHAIN_ID_KUJIRA", + 4003: "CHAIN_ID_NEUTRON", 4004: "CHAIN_ID_CELESTIA", 10002: "CHAIN_ID_SEPOLIA", } @@ -142,6 +144,7 @@ var ( "CHAIN_ID_COSMOSHUB": 4000, "CHAIN_ID_EVMOS": 4001, "CHAIN_ID_KUJIRA": 4002, + "CHAIN_ID_NEUTRON": 4003, "CHAIN_ID_CELESTIA": 4004, "CHAIN_ID_SEPOLIA": 10002, } @@ -1512,7 +1515,7 @@ var file_publicrpc_v1_publicrpc_proto_rawDesc = []byte{ 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x2a, 0x9a, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x2a, 0xb1, 0x06, 0x0a, 0x07, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, @@ -1559,104 +1562,105 @@ var file_publicrpc_v1_publicrpc_proto_rawDesc = []byte{ 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x43, 0x4f, 0x53, 0x4d, 0x4f, 0x53, 0x48, 0x55, 0x42, 0x10, 0xa0, 0x1f, 0x12, 0x13, 0x0a, 0x0e, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x45, 0x56, 0x4d, 0x4f, 0x53, 0x10, 0xa1, 0x1f, 0x12, 0x14, 0x0a, 0x0f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, - 0x49, 0x44, 0x5f, 0x4b, 0x55, 0x4a, 0x49, 0x52, 0x41, 0x10, 0xa2, 0x1f, 0x12, 0x16, 0x0a, 0x11, - 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x43, 0x45, 0x4c, 0x45, 0x53, 0x54, 0x49, - 0x41, 0x10, 0xa4, 0x1f, 0x12, 0x15, 0x0a, 0x10, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, - 0x5f, 0x53, 0x45, 0x50, 0x4f, 0x4c, 0x49, 0x41, 0x10, 0x92, 0x4e, 0x32, 0x86, 0x0b, 0x0a, 0x10, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x50, 0x43, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x7c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, - 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, - 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0xbb, - 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x41, 0x41, 0x12, - 0x21, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x41, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x41, 0x41, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x12, 0x5c, - 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x61, 0x2f, 0x7b, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, - 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, - 0x69, 0x64, 0x2e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0xbd, 0x01, 0x0a, - 0x11, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x56, - 0x41, 0x41, 0x12, 0x26, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x56, 0x41, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x56, 0x41, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x76, 0x31, - 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x61, - 0x61, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, - 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, - 0x68, 0x5f, 0x69, 0x64, 0x2e, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x62, 0x61, 0x74, - 0x63, 0x68, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x91, 0x01, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, - 0x69, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x75, 0x61, 0x72, - 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x75, 0x61, - 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x65, 0x74, 0x2f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, - 0x12, 0xcc, 0x01, 0x0a, 0x23, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, - 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x38, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, - 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x69, - 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, - 0x6e, 0x6f, 0x72, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, - 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, - 0x9a, 0x01, 0x0a, 0x17, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x45, - 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x56, 0x41, 0x41, 0x73, 0x12, 0x2c, 0x2e, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, - 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x56, 0x41, - 0x41, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, - 0x72, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x56, 0x41, 0x41, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, - 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x65, - 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x5f, 0x76, 0x61, 0x61, 0x73, 0x12, 0xe4, 0x01, 0x0a, - 0x15, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x49, 0x73, 0x56, 0x41, 0x41, 0x45, 0x6e, - 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x12, 0x2a, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, - 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x49, 0x73, - 0x56, 0x41, 0x41, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, - 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x49, 0x73, 0x56, 0x41, 0x41, 0x45, - 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6c, 0x12, 0x6a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, - 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x69, 0x73, 0x5f, 0x76, 0x61, 0x61, 0x5f, 0x65, 0x6e, 0x71, - 0x75, 0x65, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, + 0x49, 0x44, 0x5f, 0x4b, 0x55, 0x4a, 0x49, 0x52, 0x41, 0x10, 0xa2, 0x1f, 0x12, 0x15, 0x0a, 0x10, + 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x4e, 0x45, 0x55, 0x54, 0x52, 0x4f, 0x4e, + 0x10, 0xa3, 0x1f, 0x12, 0x16, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, + 0x43, 0x45, 0x4c, 0x45, 0x53, 0x54, 0x49, 0x41, 0x10, 0xa4, 0x1f, 0x12, 0x15, 0x0a, 0x10, 0x43, + 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x5f, 0x53, 0x45, 0x50, 0x4f, 0x4c, 0x49, 0x41, 0x10, + 0x92, 0x4e, 0x32, 0x86, 0x0b, 0x0a, 0x10, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x52, 0x50, 0x43, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4c, 0x61, + 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0x26, 0x2e, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x65, 0x61, 0x72, 0x74, + 0x62, 0x65, 0x61, 0x74, 0x73, 0x12, 0xbb, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x56, 0x41, 0x41, 0x12, 0x21, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, + 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, + 0x41, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x56, 0x41, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x64, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x5e, 0x12, 0x5c, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x5f, 0x76, 0x61, 0x61, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x14, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, - 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, - 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, - 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, - 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, - 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x42, 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x65, 0x72, 0x74, 0x75, 0x73, 0x6f, 0x6e, 0x65, 0x2f, 0x77, 0x6f, 0x72, - 0x6d, 0x68, 0x6f, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2f, 0x76, - 0x31, 0x3b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x7d, 0x12, 0xbd, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x56, 0x41, 0x41, 0x12, 0x26, 0x2e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, + 0x65, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x56, 0x41, 0x41, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x61, 0x74, 0x63, 0x68, 0x56, + 0x41, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x57, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x51, 0x12, 0x4f, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x62, + 0x61, 0x74, 0x63, 0x68, 0x5f, 0x76, 0x61, 0x61, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x7d, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x2e, 0x74, 0x78, 0x5f, 0x69, + 0x64, 0x7d, 0x2f, 0x7b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x69, 0x64, 0x2e, 0x6e, 0x6f, 0x6e, + 0x63, 0x65, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x2a, 0x2e, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x74, 0x47, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x75, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6e, 0x73, 0x65, 0x74, 0x2f, + 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0xcc, 0x01, 0x0a, 0x23, 0x47, 0x6f, 0x76, 0x65, + 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, + 0x38, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, + 0x72, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x6f, 0x74, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x42, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x76, + 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x6f, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x5f, 0x62, 0x79, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x9a, 0x01, 0x0a, 0x17, 0x47, 0x6f, 0x76, 0x65, 0x72, + 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x56, 0x41, + 0x41, 0x73, 0x12, 0x2c, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x71, + 0x75, 0x65, 0x75, 0x65, 0x64, 0x56, 0x41, 0x41, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2d, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x71, 0x75, 0x65, + 0x75, 0x65, 0x64, 0x56, 0x41, 0x41, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, + 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x65, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x5f, 0x76, + 0x61, 0x61, 0x73, 0x12, 0xe4, 0x01, 0x0a, 0x15, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, + 0x49, 0x73, 0x56, 0x41, 0x41, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x12, 0x2a, 0x2e, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, + 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x49, 0x73, 0x56, 0x41, 0x41, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, + 0x72, 0x49, 0x73, 0x56, 0x41, 0x41, 0x45, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x6c, 0x12, 0x6a, + 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x2f, 0x69, 0x73, 0x5f, + 0x76, 0x61, 0x61, 0x5f, 0x65, 0x6e, 0x71, 0x75, 0x65, 0x75, 0x65, 0x64, 0x2f, 0x7b, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, + 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x5f, 0x69, 0x64, 0x2e, 0x65, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x7d, 0x2f, 0x7b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, + 0x2e, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x14, 0x47, + 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, + 0x2e, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x6f, + 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x12, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x6f, 0x76, 0x65, 0x72, 0x6e, 0x6f, 0x72, + 0x2f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x42, 0x47, 0x5a, 0x45, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x65, 0x72, 0x74, 0x75, 0x73, + 0x6f, 0x6e, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6d, 0x68, 0x6f, 0x6c, 0x65, 0x2f, 0x6e, 0x6f, 0x64, + 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x72, 0x70, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x72, + 0x70, 0x63, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/node/pkg/watchers/ibc/watcher.go b/node/pkg/watchers/ibc/watcher.go index f7b991004..efe7cfc5e 100644 --- a/node/pkg/watchers/ibc/watcher.go +++ b/node/pkg/watchers/ibc/watcher.go @@ -69,6 +69,7 @@ var ( vaa.ChainIDCosmoshub, vaa.ChainIDEvmos, vaa.ChainIDKujira, + vaa.ChainIDNeutron, vaa.ChainIDCelestia, } diff --git a/proto/publicrpc/v1/publicrpc.proto b/proto/publicrpc/v1/publicrpc.proto index c2a6552ce..1a4de9325 100644 --- a/proto/publicrpc/v1/publicrpc.proto +++ b/proto/publicrpc/v1/publicrpc.proto @@ -44,6 +44,7 @@ enum ChainID { CHAIN_ID_COSMOSHUB = 4000; CHAIN_ID_EVMOS = 4001; CHAIN_ID_KUJIRA = 4002; + CHAIN_ID_NEUTRON = 4003; CHAIN_ID_CELESTIA = 4004; CHAIN_ID_SEPOLIA = 10002; } diff --git a/sdk/js/src/cosmwasm/address.ts b/sdk/js/src/cosmwasm/address.ts index a270dcb1f..d09cc7869 100644 --- a/sdk/js/src/cosmwasm/address.ts +++ b/sdk/js/src/cosmwasm/address.ts @@ -15,6 +15,7 @@ import { CosmWasmChainName, isTerraChain, CHAIN_ID_KUJIRA, + CHAIN_ID_NEUTRON, CHAIN_ID_OSMOSIS, CHAIN_ID_CELESTIA, } from "../utils"; @@ -28,6 +29,7 @@ export const isNativeDenomCosmosHub = (denom: string) => denom === "uatom"; export const isNativeDenomEvmos = (denom: string) => denom === "aevmos" || denom === "atevmos"; export const isNativeDenomKujira = (denom: string) => denom === "ukuji"; +export const isNativeDenomNeutron = (denom: string) => denom === "untrn"; export const isNativeDenomCelestia = (denom: string) => denom === "utia"; export function isNativeCosmWasmDenom( @@ -44,6 +46,7 @@ export function isNativeCosmWasmDenom( (chainId === CHAIN_ID_COSMOSHUB && isNativeDenomCosmosHub(address)) || (chainId === CHAIN_ID_EVMOS && isNativeDenomEvmos(address)) || (chainId === CHAIN_ID_KUJIRA && isNativeDenomKujira(address)) || + (chainId === CHAIN_ID_NEUTRON && isNativeDenomNeutron(address)) || (chainId === CHAIN_ID_CELESTIA && isNativeDenomCelestia(address)) ); } diff --git a/sdk/js/src/utils/array.ts b/sdk/js/src/utils/array.ts index 222a0bea4..a89929d52 100644 --- a/sdk/js/src/utils/array.ts +++ b/sdk/js/src/utils/array.ts @@ -35,6 +35,7 @@ import { CHAIN_ID_COSMOSHUB, CHAIN_ID_EVMOS, CHAIN_ID_KUJIRA, + CHAIN_ID_NEUTRON, CHAIN_ID_CELESTIA, } from "./consts"; import { hashLookup } from "./near"; @@ -130,6 +131,8 @@ export const tryUint8ArrayToNative = ( throw Error("uint8ArrayToNative: Evmos not supported yet."); } else if (chainId === CHAIN_ID_KUJIRA) { throw Error("uint8ArrayToNative: Kujira not supported yet."); + } else if (chainId === CHAIN_ID_NEUTRON) { + throw Error("uint8ArrayToNative: Neutron not supported yet."); } else if (chainId === CHAIN_ID_CELESTIA) { throw Error("uint8ArrayToNative: Celestia not supported yet."); } else if (chainId === CHAIN_ID_SUI) { @@ -275,6 +278,8 @@ export const tryNativeToHexString = ( throw Error("nativeToHexString: Evmos not supported yet."); } else if (chainId === CHAIN_ID_KUJIRA) { throw Error("nativeToHexString: Kujira not supported yet."); + } else if (chainId === CHAIN_ID_NEUTRON) { + throw Error("nativeToHexString: Neutron not supported yet."); } else if (chainId === CHAIN_ID_CELESTIA) { throw Error("nativeToHexString: Celestia not supported yet."); } else if (chainId === CHAIN_ID_SUI) { diff --git a/sdk/js/src/utils/consts.ts b/sdk/js/src/utils/consts.ts index 29e8551e9..80424900e 100644 --- a/sdk/js/src/utils/consts.ts +++ b/sdk/js/src/utils/consts.ts @@ -36,6 +36,7 @@ export const CHAINS = { cosmoshub: 4000, evmos: 4001, kujira: 4002, + neutron: 4003, celestia: 4004, sepolia: 10002, } as const; @@ -89,6 +90,7 @@ export const CosmWasmChainNames = [ "evmos", "cosmoshub", "kujira", + "neutron", "celestia", ] as const; export type CosmWasmChainName = typeof CosmWasmChainNames[number]; @@ -308,6 +310,11 @@ const MAINNET = { token_bridge: undefined, nft_bridge: undefined, }, + neutron: { + core: "neutron16rerygcpahqcxx5t8vjla46ym8ccn7xz7rtc6ju5ujcd36cmc7zs9zrunh", + token_bridge: undefined, + nft_bridge: undefined, + }, celestia: { core: undefined, token_bridge: undefined, @@ -513,6 +520,11 @@ const TESTNET = { token_bridge: undefined, nft_bridge: undefined, }, + neutron: { + core: "neutron1rhqgnak5z0pla5sgqq7ykqh8glckk4h67fe0hgjfcyulx2nqa0yqaswtnp", + token_bridge: undefined, + nft_bridge: undefined, + }, celestia: { core: undefined, token_bridge: undefined, @@ -716,6 +728,11 @@ const DEVNET = { token_bridge: undefined, nft_bridge: undefined, }, + neutron: { + core: undefined, + token_bridge: undefined, + nft_bridge: undefined, + }, celestia: { core: undefined, token_bridge: undefined, @@ -799,6 +816,7 @@ export const CHAIN_ID_GATEWAY = CHAIN_ID_WORMCHAIN; export const CHAIN_ID_COSMOSHUB = CHAINS["cosmoshub"]; export const CHAIN_ID_EVMOS = CHAINS["evmos"]; export const CHAIN_ID_KUJIRA = CHAINS["kujira"]; +export const CHAIN_ID_NEUTRON = CHAINS["neutron"]; export const CHAIN_ID_CELESTIA = CHAINS["celestia"]; export const CHAIN_ID_SEPOLIA = CHAINS["sepolia"]; diff --git a/sdk/vaa/structs.go b/sdk/vaa/structs.go index 2e5f3586a..14e0e8046 100644 --- a/sdk/vaa/structs.go +++ b/sdk/vaa/structs.go @@ -222,6 +222,8 @@ func (c ChainID) String() string { return "evmos" case ChainIDKujira: return "kujira" + case ChainIDNeutron: + return "neutron" case ChainIDCelestia: return "celestia" case ChainIDSepolia: @@ -303,6 +305,8 @@ func ChainIDFromString(s string) (ChainID, error) { return ChainIDEvmos, nil case "kujira": return ChainIDKujira, nil + case "neutron": + return ChainIDNeutron, nil case "celestia": return ChainIDCelestia, nil case "sepolia": @@ -348,6 +352,7 @@ func GetAllNetworkIDs() []ChainID { ChainIDCosmoshub, ChainIDEvmos, ChainIDKujira, + ChainIDNeutron, ChainIDCelestia, ChainIDSepolia, } @@ -423,6 +428,8 @@ const ( ChainIDEvmos ChainID = 4001 // ChainIDKujira is the ChainID of Kujira ChainIDKujira ChainID = 4002 + // ChainIDNeutron is the ChainID of Neutron + ChainIDNeutron ChainID = 4003 // ChainIDCelestia is the ChainID of Celestia ChainIDCelestia ChainID = 4004 // ChainIDSepolia is the ChainID of Sepolia diff --git a/sdk/vaa/structs_test.go b/sdk/vaa/structs_test.go index 118a88024..73f8cdf24 100644 --- a/sdk/vaa/structs_test.go +++ b/sdk/vaa/structs_test.go @@ -62,6 +62,7 @@ func TestChainIDFromString(t *testing.T) { {input: "cosmoshub", output: ChainIDCosmoshub}, {input: "evmos", output: ChainIDEvmos}, {input: "kujira", output: ChainIDKujira}, + {input: "neutron", output: ChainIDNeutron}, {input: "celestia", output: ChainIDCelestia}, {input: "sepolia", output: ChainIDSepolia}, @@ -98,6 +99,7 @@ func TestChainIDFromString(t *testing.T) { {input: "Cosmoshub", output: ChainIDCosmoshub}, {input: "Evmos", output: ChainIDEvmos}, {input: "Kujira", output: ChainIDKujira}, + {input: "Neutron", output: ChainIDNeutron}, {input: "Celestia", output: ChainIDCelestia}, {input: "Sepolia", output: ChainIDSepolia}, } @@ -274,6 +276,7 @@ func TestChainId_String(t *testing.T) { {input: 4000, output: "cosmoshub"}, {input: 4001, output: "evmos"}, {input: 4002, output: "kujira"}, + {input: 4003, output: "neutron"}, {input: 4004, output: "celestia"}, {input: 10002, output: "sepolia"}, {input: 10000, output: "unknown chain ID: 10000"},