Content
@
https://warpcast.com/~/channel/fc-devs
0 reply
0 recast
0 reaction
Angel - Not A Bot
@sayangel
I want to make a simple mint frame that accepts erc20 payments for mints. Aiming for one click. IMO the approval step adds confusion for first timers. Is there an elegant way to transfer an erc20 to a contract and then check that msg.sender has sent the appropriate amount before minting? All roads I've thought through so far lead to the check offchain. I'm ok with that but wondering if someone has done something similar and can help me out!
6 replies
1 recast
11 reactions
Leo Vigna
@proofofleo
Your best bet is probably using Permit2. It's like a central "approval proxy" contract. User has to approve it once (often already the case if using Uniswap) and then can approve your contract using just a signature.
1 reply
0 recast
1 reaction
Leo Vigna
@proofofleo
https://github.com/Uniswap/permit2
0 reply
0 recast
1 reaction