Skip to content
This repository was archived by the owner on Feb 25, 2023. It is now read-only.

Conversation

@fengtality
Copy link
Contributor

Fixes https://github.com/CoinAlpha/hummingbot/issues/2557

To make these functions non Balancer specific, this PR adds a spenderAddress parameter to /eth/approve and /eth/allowances, so the Balancer connector in the client needs to be changed to pass in the Balancer exchangeProxy address (mainnet: 0x3E66B66Fd1d0b02fDa6C811Da9E0547970DB2f21).

I think the Balancer exchangeProxy address should be a global parameter that we set to the current mainnet address. If users want to test on Kovan, they are responsible for changing it.

@fengtality fengtality changed the base branch from master to development November 13, 2020 02:04
@Nullably
Copy link
Contributor

The ExchangeProxy (or Balancer contract address) is now stored at 2 locations, HB global config and Gateway .env.
I think we should keep it at just one location to avoid confusion.
Would it be better to create an approve endpoint in balancer which redirects to approve in eth and supplies it with spenderAddress? And HB client doesn't need to store the spender address.

@fengtality
Copy link
Contributor Author

OK, that makes sense. I'll make the change tmrw.

@fengtality
Copy link
Contributor Author

@Nullably I added approve and allowances endpoints to the Balancer routes.

I spent a lot of time trying to figure out a more elegant way using redirects or proxy requests to avoid duplicating the code, but failed to make it work.

@fengtality
Copy link
Contributor Author

@vic-en has an alternate method of calling approve and allowances that prevents code duplication in the Balancer routes - he's adding to the Uniswap gateway, and will modify this PR too

@fengtality fengtality merged commit 08f0559 into development Nov 18, 2020
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.

Make the ETH routes non-Balancer specific

4 participants