I will describe.
I have function openChest,
and I have condition when this function expect to recieve ERC20 token,
and I want to include approve and transfer in one transaction,
cause right now from front-end side I call approve and then I call my main function that transfer funds.
My question - is is possible to unite approve and transfer in my main function?

Jul 5, 2022, 8:18 AM
well ERC20's approve function doesn't use tx.origin instead msg.sender
That means any contract can't approve on behalf of others
Jul 5, 2022, 8:24 AM
thanks
Jul 5, 2022, 8:25 AM

© 2024 Draquery.com All rights reserved.