Hoping someone can help answer a couple questions about the Open Zep's ERC20 standard token ccontract....
1.)Regarding the approve function.... What happens if you I approve someone to spend say 2 Eth of my own funds. They do not spend the funds. Now I want to increase the funds they are allowed to spend to 3 ETH. Can i call the approve function again with 3 ETH and it will update the allowance from 2 ETH to 3 ETH? In summary, the function can be called over and over again and the amount will always update to the most recent amount inputed?
*I realize there is in an increaseAllowance and decreaseAllowance function that can be used in place of calling the "approve" function again but for arguments sake please ignore those for now. I am only interested what will happen if the approve function is called multiple times and how this affects the allowance amount.
2.)I notice a few of the functions have "unchecked" in them. Whats this mean?
3.)I realize beforeTokenTransfer and afterTokenTransfer are helpful in ensuring tokens are never sent from a zero address to another zero address. The 3 scenarios should be either sending from a non-zero address to a non-zero address (transfering), a zero address to non-zero address (minting), or a non-zero address to a zero address (burning). But still whats the actual point or how is this helpful? Is it more of a safe gaurd, kinda like a require statement? Am i correct the functions that use the beforeTokenTransfer and afterTokenTransfer functions would work just as well without them?