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

Add permit function (meta-transaction approve) #1

Open
haydenadams opened this issue Apr 4, 2020 · 3 comments
Open

Add permit function (meta-transaction approve) #1

haydenadams opened this issue Apr 4, 2020 · 3 comments

Comments

@haydenadams
Copy link

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

@haydenadams haydenadams changed the title Add permit function Add permit function (meta-transaction approve) Apr 4, 2020
@kern
Copy link

kern commented Apr 4, 2020

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)?

@haydenadams
Copy link
Author

@kern I prefer the Uniswap way personally (imo worth considering changing in @ourzora)

@kern
Copy link

kern commented Apr 4, 2020

@haydenadams Noted, the uniswap approach is a superset of functionality. Will update the @ourzora implementation this weekend sometime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants