The approve function has to be called on the token contract by the owner of the tokens in order to approve your contract to spend the tokens.

The only way around that is to have the owner send your contract the tokens then your contract doesn't need to approve itself because it already has the tokens...in this scenario the owner still needs to call the transfer function from the token contract too.

Jul 7, 2023, 7:10 PM
figured
Jul 7, 2023, 7:11 PM

© 2024 Draquery.com All rights reserved.