-
Notifications
You must be signed in to change notification settings - Fork 103
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
fix: hard code eth-flow contract addresses #3587
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
prod: mapAddressToSupportedNetworks(COWSWAP_ETHFLOW_CONTRACT_PROD), | ||
barn: mapAddressToSupportedNetworks(COWSWAP_ETHFLOW_CONTRACT_BARN), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% sure.
Right now the addresses are the same, but it's not guaranteed.
See what Federico said
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I understand.
For some reason, locally, yarn wrongly resolves @cowprotocol/ethflowcontract
package:
https://cowservices.slack.com/archives/C0361CDG8GP/p1704727878010159
I have no idea why it's happening, but I also faced it before and can't reproduce now.
The only way I see to solve it - hardcoding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it has something to do with yarn.lock?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can see it contains proper data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in the comment, I'm not very found of this solution, but it's blocking.
So, let's get it merged and revisit later when we add new networks.
Sadly, this broke Sepolia eth-flow https://cowservices.slack.com/archives/C0361CDD1FZ/p1704815798996489 I'll revert this change and try to fix the issue some other way. |
Summary
Since eth-flow contract address is static and unlikely will change in the future, to keep the code simple I hardcoded addresses.
There is also an issue with resolving version of
@cowprotocol/ethflowcontract
, sometimes it returns outdated files locally.To Test
Eth-flow should work