Skip to content

Conversation

@g1nt0ki
Copy link
Member

@g1nt0ki g1nt0ki commented Sep 15, 2025

No description provided.

@g1nt0ki g1nt0ki self-assigned this Sep 15, 2025
@llamabutler
Copy link

The pancakeswap-v3.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs pancakeswap-v3.ts

🦙 Running PANCAKESWAP-V3.TS adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 00:00:00 GMT
End Date:	Mon, 15 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Request failed with status code 401
    at _queryDune (/home/runner/work/dimension-adapters/dimension-adapters/helpers/dune.ts:219:22)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async fetch (/home/runner/work/dimension-adapters/dimension-adapters/dexs/pancakeswap-v3.ts:136:29)
    at async getChainResult (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:205:18)
    at async Promise.all (index 1)
    at async _runAdapter (/home/runner/work/dimension-adapters/dimension-adapters/adapters/utils/runAdapter.ts:160:20)
    at async /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:69:24 {
  axiosError: 'Dune API Key is invalid',
  chain: 'bsc'
}

@llamabutler
Copy link

The pancakeswap adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts dexs pancakeswap

🦙 Running PANCAKESWAP adapter 🦙
---------------------------------------------------
GRAPH_API_KEY env variable is not set, using the default api key
Start Date:	Sun, 14 Sep 2025 00:00:00 GMT
End Date:	Mon, 15 Sep 2025 00:00:00 GMT
---------------------------------------------------

Error: Breakdown adapters are deprecated, migrate it to use simple adapter
    at /home/runner/work/dimension-adapters/dimension-adapters/cli/testAdapter.ts:67:53
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

@llamabutler
Copy link

The pumpdotfun.ts adapter exports:

> [email protected] test
> ts-node --transpile-only cli/testAdapter.ts fees pumpdotfun.ts

🦙 Running PUMPDOTFUN.TS adapter 🦙
---------------------------------------------------
Start Date:	Sun, 14 Sep 2025 00:00:00 GMT
End Date:	Mon, 15 Sep 2025 00:00:00 GMT
---------------------------------------------------

SOLANA 👇
Backfill start time: 14/1/2024
Daily fees: 2.28 M
Daily revenue: 2.28 M
Daily protocol revenue: 227.63 k
Daily holders revenue: 2.05 M

Copy link
Member

@treeoflife2 treeoflife2 left a comment

Choose a reason for hiding this comment

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

.

SUM(daily_revenue_sol) as total_sol_revenue
FROM daily_revenue
`
`, { extraUIDKey: 'pump-fees' }
Copy link
Member

Choose a reason for hiding this comment

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

can we directly use the file name instead of passing the extraUIDKey?


export const queryDune = async (queryId: string, query_parameters: any = {}) => {

export function queryDune(queryId: string, query_parameters: any, options: FetchOptions, { extraUIDKey = '' }: { extraUIDKey?: string } = {}) {
Copy link
Member

Choose a reason for hiding this comment

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

if one query fails? other dune queries will also fail with them, and max sql query length limit by dune if any? and while running cron for dimension, all dune query would run at the same time, would this overwhelm the dune query response, and it could take very long time of max 30 minutes, after that time it would time out.

Copy link
Member Author

Choose a reason for hiding this comment

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

the batch needs to be enabled, and it would work only for the same adapter(same query to be exact), so what you have mentioned wont happen.

@treeoflife2
Copy link
Member

@g1nt0ki maybe we could use the existing flag(isExpensiveAdapter) and run it normally, and have max 5 dune query in batch, to solve the timeout and reduce the errors

@g1nt0ki
Copy link
Member Author

g1nt0ki commented Sep 15, 2025

atm, the support is limited to batching only the same adapter calls (different time periods) as union all wont work for varying columns (correct me if I am wrong here)

@g1nt0ki maybe we could use the existing flag(isExpensiveAdapter) and run it normally, and have max 5 dune query in batch, to solve the timeout and reduce the errors

atm, the support is limited to batching only the same adapter calls (different time periods) as union all wont work for varying columns (correct me if I am wrong here)

@treeoflife2
Copy link
Member

atm, the support is limited to batching only the same adapter calls (different time periods) as union all wont work for varying columns (correct me if I am wrong here)

in theory, it could work but would be complicated as too much nesting of CTE and duplicate CTE names conflicts.
but if current solution is only for same adapter then, this is okay i think

@g1nt0ki g1nt0ki merged commit 55215ce into master Sep 15, 2025
2 checks passed
@g1nt0ki g1nt0ki deleted the batch-dune branch September 15, 2025 18:04
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.

3 participants