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

[EASY] Update most_recent_cip_20_data #2997

Merged
merged 7 commits into from
Sep 24, 2024
Merged

Conversation

sunce86
Copy link
Contributor

@sunce86 sunce86 commented Sep 16, 2024

Description

Fixes #2992

settlement_scores::fetch will be updated once the #2980 is merged.

How to test

Existing univ2 e2e test.

@sunce86 sunce86 added the E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details label Sep 16, 2024
@sunce86 sunce86 self-assigned this Sep 16, 2024
@sunce86 sunce86 requested a review from a team as a code owner September 16, 2024 14:12
crates/e2e/tests/e2e/database.rs Show resolved Hide resolved
crates/e2e/tests/e2e/database.rs Show resolved Hide resolved
crates/e2e/tests/e2e/database.rs Outdated Show resolved Hide resolved
const QUERY: &str = r#"
SELECT *
FROM settlement_observations so
JOIN settlements s ON s.log_index = so.log_index AND s.block_number = so.block_number
WHERE s.tx_hash = $1
WHERE s.tx_hash = ANY($1)
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably avoid using Postgres-specific syntax.

Comment on lines 32 to +35
pub async fn fetch(
ex: &mut PgConnection,
tx_hash: &TransactionHash,
) -> Result<Option<Observation>, sqlx::Error> {
tx_hashes: &[TransactionHash],
) -> Result<Vec<Observation>, sqlx::Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like the table is used only for debugging and never queried outside the e2e tests, right? How about specifying this right in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you mean in the database readme or?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, in the readme.

@sunce86 sunce86 enabled auto-merge (squash) September 24, 2024 13:12
@sunce86 sunce86 merged commit 4b985bb into main Sep 24, 2024
11 checks passed
@sunce86 sunce86 deleted the update_most_recent_cip_20_data branch September 24, 2024 13:26
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
E:6.2 Time to Happy Moo See https://github.com/cowprotocol/pm/issues/77 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Update E2e::tests::database::most_recent_cip_20_data
4 participants