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

[READY_FOR_REVIEW]: Update Bebop dex-aggregator #6035

Merged
merged 8 commits into from
Jun 3, 2024

Conversation

B1boid
Copy link
Contributor

@B1boid B1boid commented May 30, 2024

New chains for existing version
Just copied the existing code and replaced the blockchain name.

  1. Version: "2" (rfq)
    Optimism - bebop_rfq_optimism_trades.sql
  2. Version: "jam"
    Base, Zksync, Scroll, Optimism - bebop_jam_chain_trades.sql

New version
Added new version "blend" which is next version of RFQ(version: "2")
For chains: Ethereum, Base, Arbitrum, Polygon

notes about naming: taker=user, maker=market-maker (since protocol is using market-maker liquidity for swaps)

@dune-eng
Copy link

Workflow run id 9301267333 approved.

@dune-eng
Copy link

Workflow run id 9301267436 approved.

@dune-eng
Copy link

Workflow run id 9304503768 approved.

@dune-eng
Copy link

Workflow run id 9304503850 approved.

@dune-eng
Copy link

Workflow run id 9304567614 approved.

@dune-eng
Copy link

Workflow run id 9304567866 approved.

@dune-eng
Copy link

Workflow run id 9308183401 approved.

@dune-eng
Copy link

Workflow run id 9308183695 approved.

@dune-eng
Copy link

Workflow run id 9317221346 approved.

@dune-eng
Copy link

Workflow run id 9317221513 approved.

@dune-eng
Copy link

Workflow run id 9317588045 approved.

@dune-eng
Copy link

Workflow run id 9317588246 approved.

@dune-eng
Copy link

Workflow run id 9318883908 approved.

@dune-eng
Copy link

Workflow run id 9318884020 approved.

@B1boid B1boid changed the title [WIP] Update Bebop dex-aggregator [READY_FOR_REVIEW]: Update Bebop dex-aggregator May 31, 2024
@jeff-dude jeff-dude added ready-for-review this PR development is complete, please review labels May 31, 2024
Copy link
Collaborator

@Hosuke Hosuke left a comment

Choose a reason for hiding this comment

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

We can use incremental_predicate for incremental filters.
Also there is a new format for the post_hook.

ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
{% if is_incremental() %}
AND evt.evt_block_time >= date_trunc('day', now() - interval '7' Day)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can use incremental_predicate for incremental filters:

Suggested change
AND evt.evt_block_time >= date_trunc('day', now() - interval '7' Day)
AND {{ incremental_predicate('evt.evt_block_time') }}

ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
{% if is_incremental() %}
AND evt.evt_block_time >= date_trunc('day', now() - interval '7' Day)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above.

AND tx.block_time >= TIMESTAMP '{{project_start_date}}'
{% endif %}
{% if is_incremental() %}
AND tx.block_time >= date_trunc('day', now() - interval '7' Day)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above.

Comment on lines 4 to 7
post_hook='{{ expose_spells(\'["base"]\',
"project",
"bebop",
\'["alekss"]\') }}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can use the new format for post_hook here:

Suggested change
post_hook='{{ expose_spells(\'["base"]\',
"project",
"bebop",
\'["alekss"]\') }}'
materialized = 'view',
post_hook='{{ expose_spells(blockchains = \'["base"]\',
spell_type = "project",
spell_name = "bebop",
contributors = \'["alekss"]\') }}'

ON ex.call_tx_hash = evt.evt_tx_hash and ex.row_num = evt.row_num
WHERE ex.call_success = TRUE
{% if is_incremental() %}
AND evt.evt_block_time >= date_trunc('day', now() - interval '7' Day)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as above incremental filters.

@Hosuke Hosuke added in review Assignee is currently reviewing the PR dex and removed ready-for-review this PR development is complete, please review labels Jun 3, 2024
@Hosuke Hosuke self-assigned this Jun 3, 2024
@dune-eng
Copy link

dune-eng commented Jun 3, 2024

Workflow run id 9348948020 approved.

@dune-eng
Copy link

dune-eng commented Jun 3, 2024

Workflow run id 9348948142 approved.

@dune-eng
Copy link

dune-eng commented Jun 3, 2024

Workflow run id 9349307014 approved.

@dune-eng
Copy link

dune-eng commented Jun 3, 2024

Workflow run id 9349307165 approved.

@B1boid
Copy link
Contributor Author

B1boid commented Jun 3, 2024

We can use incremental_predicate for incremental filters. Also there is a new format for the post_hook.

Thanks, fixed

Copy link
Collaborator

@Hosuke Hosuke left a comment

Choose a reason for hiding this comment

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

LGTM.✅
Thank you @B1boid

Sample bebop.trades

@Hosuke Hosuke added ready-for-final-review and removed in review Assignee is currently reviewing the PR labels Jun 3, 2024
@Hosuke Hosuke assigned jeff-dude and unassigned Hosuke Jun 3, 2024
@jeff-dude jeff-dude merged commit bf3d49d into duneanalytics:main Jun 3, 2024
2 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants