Hii
Can anyone tell me how interface mechanism and approve function work when I make interface of one token contract in another to transfer it in 2nd contract...
Mar 23, 2021, 4:35 AM
The interface is basically used to tell the calling contract what functionality the other contract supports. So you create a reference to the other contract based on the interface. In your case, the interface should probably contain at least the approve function
Mar 23, 2021, 4:38 AM
Actually I successfully made interface and also made object in 2nd contract too
But I unable to get transfer functionality in my 2nd contract via interface as I done approve manually too
But I unable to get transfer functionality in my 2nd contract via interface as I done approve manually too
?
Mar 23, 2021, 4:44 AM
That's not a real question. You're not saying anything what is wrong or what you have tried and so on
Mar 23, 2021, 4:45 AM
What I tried is I made one token contract and one others contract
So token contract is 1 and other contract is 2
So now I made code to transfer 1st token via interface in 2nd contract but I unable to do that
So now I made code to transfer 1st token via interface in 2nd contract but I unable to do that
I done approve mechanism manually also
?
Mar 23, 2021, 4:51 AM
You are using transferFrom right?
Mar 23, 2021, 5:40 AM
Yes
Mar 23, 2021, 5:41 AM
Any specific errors
Mar 23, 2021, 5:42 AM
Whenever I do transaction it get fail
I approved 2nd contract and owner of 2nd contract via 1st contract
Still transaction get fail
Mar 23, 2021, 6:30 AM