Skip to content

Aave v3 rewards remove getLogs#420

Open
bergarces wants to merge 6 commits intomainfrom
gpg-test
Open

Aave v3 rewards remove getLogs#420
bergarces wants to merge 6 commits intomainfrom
gpg-test

Conversation

@bergarces
Copy link
Collaborator

No description provided.

@bergarces bergarces requested a review from jpsains as a code owner April 8, 2025 09:46
@bergarces bergarces changed the title test: empty commit to verify signing Aave v3 rewards remove getLogs Apr 8, 2025

@CacheToDb
async getProtocolTokens(): Promise<ProtocolToken[]> {
async getProtocolTokens(): Promise<[ProtocolToken]> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 8, 2025

topics: [topic0, topic1, topic2],
fromBlock: '0x',
toBlock: 'latest',
})
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ||
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a list of protocol tokens is passed, we don't need the user events as they won't be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant