I'm familiar with smart contracts development. Although, every time I developed something, I used traditional ether. For the sake of simplicity, let's assume this contract.
pragma solidity ^0.5.0;
contract Example {
constructor () public {}
function () external payable {}
function getBalance() public view returns (uint256) {
return address(this).balance;
}
function withdraw() public {
msg.sender.transfer(address(this).balance);
}
}
How do I take this exact contract and simply allow it to do exactly the same, but using DAI instead? Please be practical, I read a lot of theory stuff already, I'm just looking to the actual code on how to do this.