Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seperate quicknode geth vs. reth metrics via different provider naming #781

Merged
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
14 changes: 13 additions & 1 deletion lib/handlers/evm/provider/ProviderName.ts
Original file line number Diff line number Diff line change
@@ -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',
Expand All @@ -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]
}
}
}

Expand Down
Loading