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 helper contract #2820

Merged
merged 2 commits into from
Jul 18, 2024
Merged

[EASY] Update helper contract #2820

merged 2 commits into from
Jul 18, 2024

Conversation

MartinquaXD
Copy link
Contributor

@MartinquaXD MartinquaXD commented Jul 18, 2024

Description

Our implementation of the cow amm helper contract needed to generate rebalancing orders was very slightly different from the agreed upon interface. This difference prevented us from indexing balancer pools correctly. To support the legacy and balancer pools at the same time both factory implementations need to adhere to the exact same interface (actually just the emitted events).
This PR updates the interface and all related deployment info based on cowprotocol/cow-amm#99.

Changes

Also the new helper contract returns a slightly different signature which already includes the signer address (expected by the settlement contract). This should generally be nicer for people using the helper but in our code base we expect the signer address to not already be part of the signature bytes so we needed to introduce a small workaround (with comment explaining why).

Note that the helper contract for the balancer implementation has the same behavior so everything should work out.

I also removed the deployment information for sepolia since the helper contract actually supports 0 pools there so we might as well drop it altogether on sepolia.

How to test

e2e tests still work

@MartinquaXD MartinquaXD requested a review from a team as a code owner July 18, 2024 12:28
@MartinquaXD MartinquaXD changed the title Update helper contract [EASY] Update helper contract Jul 18, 2024
address: addr("0x86f3df416979136cb4fdea2c0886301b911c163b"),
// <https://etherscan.io/tx/0xbeb99ef580b7e91783fe90c5575d107b6c27213a597e3a9393c0b6ddf85ac7e7>
deployment_information: Some(DeploymentInformation::BlockNumber(20188650)),
address: addr("0x3705ceee5eaa561e3157cf92641ce28c45a3999c"),
Copy link
Contributor

Choose a reason for hiding this comment

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

We also need to change this in infrastructure repo right?

Copy link
Contributor Author

@MartinquaXD MartinquaXD Jul 18, 2024

Choose a reason for hiding this comment

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

@MartinquaXD MartinquaXD merged commit 8b66c4c into main Jul 18, 2024
10 checks passed
@MartinquaXD MartinquaXD deleted the update-helper-contract branch July 18, 2024 12:55
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
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.

3 participants