Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-bears-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink-deployments-framework": patch
---

fix: handle ports in regexp used to identify public rpc urls
2 changes: 1 addition & 1 deletion engine/cld/environment/anvil.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func selectPublicRPC(
return fmt.Errorf("no public RPCs found for chain %d", chainSelector)
}

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

func isPublicRPC(url string) bool {
return !privateRpcRegexp.MatchString(url)
Expand Down
2 changes: 2 additions & 0 deletions engine/cld/environment/anvil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ func Test_isPublicRPC(t *testing.T) {
{"https://gap-grpc-job-distributor.public.main.stage.cldev.sh/", false},
{"https://gap-ws-job-distributor.public.main.stage.cldev.sh/", false},
{"https://gap-grpc-chainlink-catalog.public.main.stage.cldev.sh/", false},
{"https://gap-rpc-proxy.public.main.prod.cldev.sh:4443/ethereum/sepolia/archive", false},
{"https://gap-rpc-proxy.public.main.prod.cldev.sh:9443/ethereum/sepolia/archive", false},
{"", true},
{"http://", true},
{"https://", true},
Expand Down
Loading