Skip to content

Commit 2077cd6

Browse files
fix: handle ports in regexp used to identify public rpc urls (#574)
1 parent 9f913d5 commit 2077cd6

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.changeset/purple-bears-peel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"chainlink-deployments-framework": patch
3+
---
4+
5+
fix: handle ports in regexp used to identify public rpc urls

engine/cld/environment/anvil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ func selectPublicRPC(
322322
return fmt.Errorf("no public RPCs found for chain %d", chainSelector)
323323
}
324324

325-
var privateRpcRegexp = regexp.MustCompile(`^https?://(rpcs|gap\-.*\.(prod|stage))\.cldev\.sh/`)
325+
var privateRpcRegexp = regexp.MustCompile(`^https?://(rpcs|gap\-.*\.(prod|stage))\.cldev\.sh(?::\d+)?/`)
326326

327327
func isPublicRPC(url string) bool {
328328
return !privateRpcRegexp.MatchString(url)

engine/cld/environment/anvil_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ func Test_isPublicRPC(t *testing.T) {
150150
{"https://gap-grpc-job-distributor.public.main.stage.cldev.sh/", false},
151151
{"https://gap-ws-job-distributor.public.main.stage.cldev.sh/", false},
152152
{"https://gap-grpc-chainlink-catalog.public.main.stage.cldev.sh/", false},
153+
{"https://gap-rpc-proxy.public.main.prod.cldev.sh:4443/ethereum/sepolia/archive", false},
154+
{"https://gap-rpc-proxy.public.main.prod.cldev.sh:9443/ethereum/sepolia/archive", false},
153155
{"", true},
154156
{"http://", true},
155157
{"https://", true},

0 commit comments

Comments
 (0)