How to use the ERC20Wrapper?

Am trying to create an ERC-20 wrapping DAI contract on the Goerli network. Only am not succeeding to properly use the ERC20Wrapper.sol. The goal is to send DAI to the contract and to receive Wrapped DAI back in the sender address.

When I use the depositFor function, I get a stack limit reached 1024 error. And when I include the overlyingToken address in the contract (address underlyingToken = "0x11fe4b6ae13d2a6055c8d9cf65c55bac32b5d844";) I receive errors as well.

:1234: Code to reproduce

// contracts/GLDToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Wrapper.sol";

contract AfriToken is ERC20 {

    constructor(uint256 initialSupply) ERC20("Wrapped DAI", "wDAI") {
        _mint(msg.sender, initialSupply);
    }
    
    function burn(uint256 amount) public {
        _burn(msg.sender, amount);
    }

    function burnFrom(address account, uint256 amount) public {
        _burn(account, amount);
    }

    function _mint(uint256 amount) public {
        _mint(msg.sender, amount);
    }

    function depositFor(address account, uint256 amount) public {
        depositFor(account, amount);
    }
}

:computer: Environment

I am using Remix 0.8.10

Stack limit is because you have infinite recursion here where the function calls itself:

In order to use ERC20Wrapper you would have to inherit ERC20Wrapper and initialize it with the DAI address. It doesn't make sense to mint initial supply in this context because the token would not be pegged to the underlying token in that case.

Something like this:

contract AfriToken is ERC20, ERC20Wrapper {
    constructor()
      ERC20("Wrapped DAI", "wDAI")
      ERC20Wrapper(IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F))
    {}
}

Thanks @frangio, this worked!

Had to add this function still: depositFor(account, amount);