From e04cef7b5f55ada64a7a2004a8f84c51fd343745 Mon Sep 17 00:00:00 2001
From: Bruce Riley <bruce@wormholelabs.xyz>
Date: Tue, 17 Dec 2024 10:50:51 -0600
Subject: [PATCH] Node: Add Noble support over IBC

---
 node/pkg/watchers/ibc/watcher.go | 1 +
 sdk/vaa/structs.go               | 7 +++++++
 sdk/vaa/structs_test.go          | 2 ++
 3 files changed, 10 insertions(+)

diff --git a/node/pkg/watchers/ibc/watcher.go b/node/pkg/watchers/ibc/watcher.go
index cbdadc3f28..74ad36b8db 100644
--- a/node/pkg/watchers/ibc/watcher.go
+++ b/node/pkg/watchers/ibc/watcher.go
@@ -75,6 +75,7 @@ var (
 		vaa.ChainIDSeda,
 		vaa.ChainIDDymension,
 		vaa.ChainIDProvenance,
+		vaa.ChainIDNoble,
 	}
 
 	// features is the feature string to be published in the gossip heartbeat messages. It will include all chains that are actually enabled on IBC.
diff --git a/sdk/vaa/structs.go b/sdk/vaa/structs.go
index c23e872f07..4b59d6bacb 100644
--- a/sdk/vaa/structs.go
+++ b/sdk/vaa/structs.go
@@ -235,6 +235,8 @@ func (c ChainID) String() string {
 		return "dymension"
 	case ChainIDProvenance:
 		return "provenance"
+	case ChainIDNoble:
+		return "noble"
 	case ChainIDSepolia:
 		return "sepolia"
 	case ChainIDArbitrumSepolia:
@@ -360,6 +362,8 @@ func ChainIDFromString(s string) (ChainID, error) {
 		return ChainIDDymension, nil
 	case "provenance":
 		return ChainIDProvenance, nil
+	case "noble":
+		return ChainIDNoble, nil
 	case "sepolia":
 		return ChainIDSepolia, nil
 	case "arbitrum_sepolia":
@@ -431,6 +435,7 @@ func GetAllNetworkIDs() []ChainID {
 		ChainIDSeda,
 		ChainIDDymension,
 		ChainIDProvenance,
+		ChainIDNoble,
 		ChainIDSepolia,
 		ChainIDArbitrumSepolia,
 		ChainIDBaseSepolia,
@@ -546,6 +551,8 @@ const (
 	ChainIDDymension ChainID = 4007
 	// ChainIDProvenance is the ChainID of Provenance
 	ChainIDProvenance ChainID = 4008
+	// ChainIDNoble is the ChainID of Noble
+	ChainIDNoble ChainID = 4009
 	// ChainIDSepolia is the ChainID of Sepolia
 	ChainIDSepolia ChainID = 10002
 	// ChainIDArbitrumSepolia is the ChainID of Arbitrum on Sepolia
diff --git a/sdk/vaa/structs_test.go b/sdk/vaa/structs_test.go
index 286cc57516..78bbb2b630 100644
--- a/sdk/vaa/structs_test.go
+++ b/sdk/vaa/structs_test.go
@@ -80,6 +80,7 @@ func TestChainIDFromString(t *testing.T) {
 		{input: "seda", output: ChainIDSeda},
 		{input: "dymension", output: ChainIDDymension},
 		{input: "provenance", output: ChainIDProvenance},
+		{input: "noble", output: ChainIDNoble},
 		{input: "sepolia", output: ChainIDSepolia},
 		{input: "arbitrum_sepolia", output: ChainIDArbitrumSepolia},
 		{input: "base_sepolia", output: ChainIDBaseSepolia},
@@ -139,6 +140,7 @@ func TestChainIDFromString(t *testing.T) {
 		{input: "Seda", output: ChainIDSeda},
 		{input: "Dymension", output: ChainIDDymension},
 		{input: "Provenance", output: ChainIDProvenance},
+		{input: "Noble", output: ChainIDNoble},
 		{input: "Sepolia", output: ChainIDSepolia},
 		{input: "Arbitrum_Sepolia", output: ChainIDArbitrumSepolia},
 		{input: "Base_Sepolia", output: ChainIDBaseSepolia},