From 2badfecb9a725a6f58b7db58f84fc8a814031191 Mon Sep 17 00:00:00 2001 From: jsy1218 <91580504+jsy1218@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:03:42 +0200 Subject: [PATCH] seperate quicknode geth vs. reth metrics via different provider naming --- lib/handlers/evm/provider/ProviderName.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/handlers/evm/provider/ProviderName.ts b/lib/handlers/evm/provider/ProviderName.ts index 7b6fd93eca..bfcf7614ed 100644 --- a/lib/handlers/evm/provider/ProviderName.ts +++ b/lib/handlers/evm/provider/ProviderName.ts @@ -1,6 +1,8 @@ export enum ProviderName { INFURA = 'INFURA', QUIKNODE = 'QUIKNODE', // quicknode doesn't have letter c in the RPC endpoint + QUIKNODE_GETH = 'QUIKNODE_GETH', + QUIKNODE_RETH = 'QUIKNODE_RETH', FORNO = 'FORNO', ALCHEMY = 'ALCHEMY', NIRVANA = 'NIRVANA', @@ -10,7 +12,17 @@ export enum ProviderName { export function deriveProviderName(url: string): ProviderName { for (const name in ProviderName) { if (url.toUpperCase().includes(name)) { - return ProviderName[name as keyof typeof ProviderName] + if (url.toUpperCase().includes(ProviderName.QUIKNODE)) { + if (url.toLowerCase().includes('solitary')) { + return ProviderName.QUIKNODE_GETH + } else if (url.toLowerCase().includes('ancient')) { + return ProviderName.QUIKNODE_RETH + } else { + return ProviderName.QUIKNODE + } + } else { + return ProviderName[name as keyof typeof ProviderName] + } } }