Another PERMIT2 Mystery #23
Replies: 7 comments
-
After approving manually (as part of a swap), when I come back to get permit2_contract.functions().allowance(), it correctly updates permit2_allowance, permit2_expiration and permit2_nonce (which is now 1). My script still fails. |
Beta Was this translation helpful? Give feedback.
-
Hello @takabinance ! That's a tough one indeed, thank you for sharing! 🤣 Your code looks good to me. But the same code runs fine on a local Ethereum fork.
I can't figure out what could be the Metis specificity that leads to this EVM Error. If you, or anyone, find the root cause, please share it here as that tickles my curiosity! :) |
Beta Was this translation helpful? Give feedback.
-
Thanks for looking at this. I'm going to try to dig into it today but have pretty basic evm skills. Is there any particular path you might recommend for me to find cause. |
Beta Was this translation helpful? Give feedback.
-
I'm not familiar with Metis, but maybe its community can give you a clue or two. Maybe someone got the same issue with the JS SDK. Thank you for your interest in this lib! :) |
Beta Was this translation helpful? Give feedback.
-
Hello @takabinance ! |
Beta Was this translation helpful? Give feedback.
-
I'm looking for a Dex with support for Permit2, Pancakeswap removed it... Which one dex has this Permit2 support? this not give quotes: |
Beta Was this translation helpful? Give feedback.
-
Hello @ronaldoguedess |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Have been struggling to figure out how to get permit2 to give allowance to universal router. I have confirmed that permit2 has a max allowance to the token (WETH) I am trying to swap. When I execute the following code (running on Metis L2, Unimaia V3), the contract always reverts.
If I manually approve WETH in the UI, then everything else works fine (e.g., swaps). But am hoping it's just some simple thing I'm overlooking. I've also tried combining this with a v3 swap and has same error.
Things of note:
the permit2_contract.functions.allowance() returns [0, 0, 0]
Here is a failed tx that I submitted:
https://andromeda-explorer.metis.io/tx/0x1d8d7793f0c0e515dcb9b32eb2f56bd8d58674422964b3828c019c0915009fc1
Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions