Open haydenadams opened 4 years ago
Here’s an example PR of me adding this functionality to the @ourzora ERC20 tokens: https://github.com/ourzora/zora-contracts/pull/5/files
Happy to submit a PR with this extracted + tests. Do you have a preference on the signature (uniswap vs dai)?
@kern I prefer the Uniswap way personally (imo worth considering changing in @ourzora)
@haydenadams Noted, the uniswap approach is a superset of functionality. Will update the @ourzora implementation this weekend sometime.
Two options:
1) Uniswap style (with amount) https://github.com/Uniswap/uniswap-v2-core/blob/10be569bd35c827c3935413b32a40fa5f2b0d8b7/contracts/UniswapV2ERC20.sol#L81
2) DAI style (binary on/off) https://github.com/makerdao/dss/blob/master/src/dai.sol#L118