Hello, developers!
I have follow questions:
I need to make token transfer in a swap.
For now my transfer includes 2 distinct transactions (approve + transferFrom).
If I am writing both this methods in one function "approve()" method are not changing state of contract and my function reverting a transferFrom revert.
What is the reason of this error? Can I place this methods in one function and make transfer by one tx?
For now I am thinking that it occures because "approve" need to change blockchain state by distinct block.
Am I right?

Dec 22, 2021, 5:32 PM

© 2024 Draquery.com All rights reserved.