PERMIT2 #96
-
I am stuck for a few days and do not understand what my mistake is: amount, expiration, nonce = codec.fetch_permit2_allowance(wallet=acc.address, deadline = int(time.time()) + 600 data, signable_message = codec.create_permit2_signable_message( signed_message = acc.sign_message(signable_message) # where acc is your LocalAccount trx_params['data'] = encoded_data amount, expiration, nonce = codec.fetch_permit2_allowance(acc.address, usdc_address) # where acc is your LocalAccount |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
Hello @johann75sch !
Thanks |
Beta Was this translation helpful? Give feedback.
-
Di not expect you to reply sir. I might just not understand something and waste your time with it. With my earlier code without the library, what I understood, you need to permit the permit and then permit the router. That worked for me. |
Beta Was this translation helpful? Give feedback.
-
Have you followed precisely this tutorial? |
Beta Was this translation helpful? Give feedback.
-
No, I am using v3 without swap, just permit and live on Base. |
Beta Was this translation helpful? Give feedback.
-
You use Permit2 with the UR the same way for V2/V3/V4. If you don't swap, just remove the swap part from the tutorial. I can see 2 issues:
Can you try after fixing these points? |
Beta Was this translation helpful? Give feedback.
-
Waw, all perfectly works!!!! Thank you. Not only a grate librady, but also support +++++ |
Beta Was this translation helpful? Give feedback.
You use Permit2 with the UR the same way for V2/V3/V4. If you don't swap, just remove the swap part from the tutorial.
I can see 2 issues:
'to': None
), hence the EVM tried to create a contract at address0x265e0113ceea51664a8682d500d359023d101c12
and failed. You must send it to the UR.value=10000000
wei in your transaction on Base. If you just call thePERMIT2_PERMIT
function, you should send 0 ETH.Can you try after fixing these points?