Skip to content

Commit

Permalink
Remove the unnecesary code
Browse files Browse the repository at this point in the history
  • Loading branch information
surbhit14 committed Oct 18, 2024
1 parent 758a85e commit 29d0ef2
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions packages/api/src/routes/operators/operatorController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,45 +636,6 @@ async function calculateOperatorApy(operator: any) {
} catch {}
}

/**
* Return a map of strategy addresses <> token addresses
*
* @param strategies
* @returns
*/
export function tokenToStrategyAddressMap(
strategies: EigenStrategiesContractAddress
): Map<string, string> {
const map = new Map<string, string>()
for (const [key, value] of Object.entries(strategies)) {
if (key !== 'Eigen' && value?.tokenContract && value?.strategyContract) {
map.set(value.tokenContract.toLowerCase(), value.strategyContract.toLowerCase())
}
}
return map
}

/**
* Returns whether a given token address belongs to a list of special tokens
*
* @param tokenAddress
* @returns
*/
export function isSpecialToken(tokenAddress: string): boolean {
const specialTokens =
getNetwork() === holesky
? [
'0x6Cc9397c3B38739daCbfaA68EaD5F5D77Ba5F455', // WETH
'0xbeac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0'
]
: [
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', // WETH
'0xbeac0eeeeeeeeeeeeeeeeeeeeeeeeeeeeeebeac0'
]

return specialTokens.includes(tokenAddress.toLowerCase())
}

/**
* Utility function to fetch and map event records from the database.
*
Expand Down

0 comments on commit 29d0ef2

Please sign in to comment.