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

Refactor shared components in refunder e2e test #808

Merged
merged 5 commits into from
Nov 18, 2022
Merged

Conversation

fedgiac
Copy link
Contributor

@fedgiac fedgiac commented Nov 17, 2022

Refactors a few shared components in preparation fort the eth flow e2e test.

Some minor logic changes are consequence of the refactor but I consider them inconsequential:

  • Instead of using buy_amount = 1, the order is modified to include a slippage tolerance of 99.99%. This should make it clear that extra slippage must be included for the refunder to work (I stumbled on this for longer than I should have).
  • The receiver becomes an arbitrary address.
  • The signature is now empty, as it's ignored by the contract anyway.

Test Plan

CI: e2e test still works.

@fedgiac fedgiac requested a review from a team as a code owner November 17, 2022 19:28
Copy link
Contributor

@nlordell nlordell left a comment

Choose a reason for hiding this comment

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

Looks great! The other tests could also benefit from your deploy_token_with_weth_uniswap_pool function 😄.

crates/e2e/tests/e2e/eth_flow.rs Show resolved Hide resolved
crates/e2e/tests/e2e/eth_flow.rs Outdated Show resolved Hide resolved
crates/e2e/tests/e2e/eth_flow.rs Show resolved Hide resolved
crates/e2e/tests/e2e/local_node.rs Show resolved Hide resolved
Copy link
Contributor

@sistemd sistemd left a comment

Choose a reason for hiding this comment

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

Thank you!

@fedgiac fedgiac enabled auto-merge (squash) November 18, 2022 13:24
@fedgiac fedgiac merged commit 311f9b6 into main Nov 18, 2022
@fedgiac fedgiac deleted the refactor-refunder-e2e branch November 18, 2022 13:27
@github-actions github-actions bot locked and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants