I want to be able to call makerDao’s Dai contract’s transfer method from my own contract. Does anyone know how I can get this done?
May 26, 2021, 2:36 PM
Import contract interface
Make a reference to actual dai contract using that interface
Call whichever method you want by using reference_variable.method()
Make a reference to actual dai contract using that interface
Call whichever method you want by using reference_variable.method()
May 26, 2021, 3:29 PM
Like Dai.trasferFrom()?
May 26, 2021, 3:43 PM
Yes
Assuming dai is a reference to actual contract
May 26, 2021, 3:44 PM
It should work with importing the Dai.sol file from GitHub right?
May 26, 2021, 3:49 PM
Theoretically, haven't worked with dai so don't know for sure
May 26, 2021, 4:14 PM
yes but you will have import problems when you will verify.
Anyway you should be able to use an IERC20 interface like this
IERC20 public token = token address
and then to use toke.transfer....
Anyway you should be able to use an IERC20 interface like this
IERC20 public token = token address
and then to use toke.transfer....
I suggest to add as welcome message lol
guys is there a way to charge BNB fees?
I think no because you can't control BNB balance right?
May 26, 2021, 5:42 PM