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

Extend main rewards query to all chains #102

Merged
merged 3 commits into from
Dec 23, 2024

Conversation

harisang
Copy link
Contributor

This PR extends the main query that is used to verify the rewards to all chains.

It also slightly restructures a subfolder

Copy link
Contributor

@bram-vdberg bram-vdberg left a comment

Choose a reason for hiding this comment

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

LGTM!

cast(cast(rbr.data.capped_payment as varchar) as int256) as capped_payment -- noqa: RF01
from cowswap.raw_batch_rewards as rbr
select
rbr.solver as winning_solver,
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we need to use the from_hex() and cast() methods anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For the solver, the reason we were using from_hex() was that the solver was stored as a string (and not as varbinary) in the cowswap.raw_batch_rewards table.

As for the different casts for fees, executions costs etc, i think they were just unnecessary, and an overkill. It looks like we wanted to get to an int256 but the queries also work with the decimal(38,0) type that is what we use here anyways.

Definitely this is not very well-thought through, so we could also make the raw order/batch tables return int256 instead.

@harisang harisang merged commit c256f1f into main Dec 23, 2024
2 checks passed
@harisang harisang deleted the extend_main_rewards_query_to_all_chains branch December 23, 2024 16:13
harisang added a commit to cowprotocol/solver-rewards that referenced this pull request Dec 23, 2024
This PR addresses the change proposed here:
cowprotocol/dune-queries#102
that adds a blockchain parameter in the main rewards dashboard.
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.

2 participants