Nono
Basically my A contract is ERC20 token smart contract and B contract is normal no token

So I want to use my A smart contract token in B smart contract...

Mar 27, 2021, 3:39 PM
Yep, still works the way I told you
Mar 27, 2021, 3:40 PM
Ohhh okk
Thanks 😊
Mar 27, 2021, 3:40 PM
Your ERC20 B is the address which needs the increased allowance
Then it can spend it
Mar 27, 2021, 3:41 PM
So do I need to create token variable for A Smart Contract or interface in my B smart contract?
Mar 27, 2021, 3:41 PM
But there are like 20 examples on stackoverflow. I’m sure you’ll find your way around
Interface is enough
Mar 27, 2021, 3:41 PM
Ohhh okkk
So something like
If my A contract name is Token so
Token itoken

Itoken.transfer()
Mar 27, 2021, 3:43 PM
No
Interface IERC20{}

Then it is
IERC20(Yourerc20adress).methodname
Mar 27, 2021, 3:44 PM
Ohh okk
Mar 27, 2021, 3:45 PM

© 2024 Draquery.com All rights reserved.