-
Notifications
You must be signed in to change notification settings - Fork 39
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
CIP [0014]: Add new exchange function to allow buying fixed amount of tokens for maximum price #26
Conversation
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.
This seems like a great idea and should be pretty straightforward to implement!
Wdyt of the following function signatures, and deprecating the
cc @tkporter |
This works, and it should cover all the use cases that I mentioned in the CIP. |
@asaj PR will be out soon Shouldn't
edit: ah I see now the CIP says this too |
PR is up at celo-org/celo-monorepo#4580 |
…#4580) ### Description * Adds `function buy(uint256 buyAmount, uint256 maxSellAmount, bool buyGold)` * Adds `function sell(uint256 sellAmount, uint256 minBuyAmount, bool sellGold)` * Deprecates `function exchange(uint256 sellAmount, uint256 minBuyAmount, bool sellGold)` which has the same functionality as `sell` * Runs same suite of tests for `sell` and `exchange` * Adds tests for `buy` ### Other changes n/a ### Tested Ran tests ### Related issues Related CIP: celo-org/celo-proposals#26 ### Backwards compatibility Fully compatible
Shall we close as celo-org/celo-monorepo#4580 got merged? |
Agreed @tkporter ? |
Closing as obsolete |
Whoops didn't see this-- is there a reason why we'd close instead of merge? |
hey @tkporter trying to clean up stale PRs a bit. I asked Nam's opinion but probably ought to have pinged you as well. If this accurately documents current behavior we should clean it up and include it |
Yeah this was implemented in celo-org/celo-monorepo#4580. For cleaning up, would that involve making some changes to fit the template https://github.com/celo-org/celo-proposals/blob/master/CIPs/cip-template.md? |
Yes, assuming it's already implemented, this should be
|
No description provided.