Conversation
|
|
||
| @CacheToDb | ||
| async getProtocolTokens(): Promise<ProtocolToken[]> { | ||
| async getProtocolTokens(): Promise<[ProtocolToken]> { |
There was a problem hiding this comment.
Handy trick.
It is compatible with the interface signature of ProtocolToken[] whilst, at the same time, and when it is used internally, it clearly specifies that it's an array with only one item.
With this, there's no need to do assertions to check if the item is undefined.
|
| topics: [topic0, topic1, topic2], | ||
| fromBlock: '0x', | ||
| toBlock: 'latest', | ||
| }) |
There was a problem hiding this comment.
If we have to use getLogs here it defeats the purpose. No other adapter is doing this internally.
| { | ||
| "blockNumber": 264107941, | ||
| "latency": "Latency: 1.547 seconds", | ||
| "latency": "Latency: 3.174 seconds", |
There was a problem hiding this comment.
Not very reliable.
We are doing the same rpc calls minus the getLogs.
| await filterMapAsync(Object.values(EvmChain), async (chainId) => { | ||
| if (filterChainIds && !filterChainIds.includes(chainId)) { | ||
| if ( | ||
| filterProtocolTokens || |
There was a problem hiding this comment.
If a list of protocol tokens is passed, we don't need the user events as they won't be used.



No description provided.