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

integrate 0x v2 #278

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

integrate 0x v2 #278

wants to merge 29 commits into from

Conversation

mintdart
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Jun 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
llamaswap ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 1, 2024 7:57am

Copy link

cloudflare-workers-and-pages bot commented Jun 13, 2024

Deploying llamaswap with  Cloudflare Pages  Cloudflare Pages

Latest commit: fea71bd
Status: ✅  Deploy successful!
Preview URL: https://f5ee2cfb.llamaswap.pages.dev
Branch Preview URL: https://0x-v2.llamaswap.pages.dev

View logs

@mintdart
Copy link
Collaborator Author

Note: Replace api key before merging

src/components/Aggregator/adapters/0xV2.ts Outdated Show resolved Hide resolved
src/components/Aggregator/adapters/0xV2.ts Outdated Show resolved Hide resolved
src/components/Aggregator/adapters/0xV2.ts Show resolved Hide resolved
src/components/Aggregator/adapters/0xV2.ts Show resolved Hide resolved
src/components/Aggregator/list.ts Show resolved Hide resolved
0xngmi
0xngmi previously approved these changes Sep 27, 2024
src/components/Aggregator/adapters/0xV2.ts Outdated Show resolved Hide resolved
// check if permit2 contract approval address matches
if (
permitApiQuote.permit2 !== null &&
permitApiQuote.permit2.eip712.domain.verifyingContract.toLowerCase() !== permit2Address.toLowerCase()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this check seems useless? since verifyingContract is never used

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if user has enough allowance for permit2Address then permit2 will be null

no need for approval signature, but user can sign -> swap via permit2

instead of approving spender from allowanceHolderApiQuote -> swap

example: they approved on matcha.xyz or uniswap.org and trying to swap on llamaswap , we don't need to ask them to approve again

Copy link

@phil-ociraptor phil-ociraptor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good from my perspective!

I tried pulling the repo and testing but wasn't able to get the lambdas working (so in my tests, the lambdas were just pointed at prod). In my testing, it appeared the tx went down the AllowanceHolder flow just fine, which is sufficient to start.

That said, I was unable to test the permit2 flow. Happy to help out with testing if you guys need it

For now, things look good from our side - just requesting a rename from Argon => 'Matcha/0x v2'

src/components/Aggregator/adapters/0xV2.ts Outdated Show resolved Hide resolved
Co-authored-by: phil-ociraptor <[email protected]>
This reverts commit cb53a25.
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

Successfully merging this pull request may close these issues.

3 participants