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

Fetch Permit2 allowance, expiration and nonce #50

Closed
Elnaril opened this issue Mar 30, 2024 · 1 comment
Closed

Fetch Permit2 allowance, expiration and nonce #50

Elnaril opened this issue Mar 30, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Elnaril
Copy link
Owner

Elnaril commented Mar 30, 2024

Add a method RouterCodec.fetch_permit2_allowance() that would request the Permit2 contract and return a tuple (allowance, expiration, nonce) for a given (owner, token, spender).

Must be callable for a specific BlockIdentifier but call the latest block by default.

Constants must be defined in _constants.py.

As a parameter of this new method, the default Permit2 address would be 0x000000000022D473030F116dDEE9F6B43aC78BA3 as a ChecksumAddress, but users could call the method with a custom Permit2 address.

As part of the API exposed by this lib, this new method must have a docstring explaining its purpose, parameters and outputs.

Unit tests must be added to keep coverage at 100%

All integration tests where permit2 allowance is requested must be updated with this new method.

The doc (README.md) must be updated to explain the purpose of this new method and illustrate its usage and results.

@Elnaril Elnaril added the enhancement New feature or request label Mar 30, 2024
@Elnaril
Copy link
Owner Author

Elnaril commented May 17, 2024

Done with PR #62

@Elnaril Elnaril closed this as completed May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant