Hi everyone,
Long time lurker of the forums. I launched my defi mvp 2 weeks ago, coded with Ethereum payments only.
I am now looking to integrate DAI payments into my contract. The only thing I need is for the user to send DAI to my contract, my contract will do something with the DAI after the transfer is completed.
I googled a lot, looked at this OZ guide, but I’m still not sure on which steps to take.
For now I can only see this as being needed:
- Import ERC20.sol from OZ
- Set the DAI interface:
interface DaiToken { function transfer(address dst, uint wad) external returns (bool); function balanceOf(address guy) external view returns (uint); }
After that, I’m a bit lost on what to do next.
Could anyone guide me a bit, or have a step by step tutorial by any chance (couldn’t find one through Google searching)?
Thanks in advance.