Skip to content

Commit

Permalink
If we can get rid of these, I dance on thier grave
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVF committed Nov 4, 2024
1 parent 9cc8faa commit a2bb64f
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions src/token/OUSD.sol
Original file line number Diff line number Diff line change
Expand Up @@ -349,45 +349,6 @@ contract OUSD is Governable {
return true;
}

/**
* @dev Increase the amount of tokens that an owner has allowed to
* `_spender`.
* This method should be used instead of approve() to avoid the double
* approval vulnerability described above.
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseAllowance(address _spender, uint256 _addedValue)
public
returns (bool)
{
_allowances[msg.sender][_spender] = _allowances[msg.sender][_spender]
+ _addedValue;
emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]);
return true;
}

/**
* @dev Decrease the amount of tokens that an owner has allowed to
`_spender`.
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance
* by.
*/
function decreaseAllowance(address _spender, uint256 _subtractedValue)
public
returns (bool)
{
uint256 oldValue = _allowances[msg.sender][_spender];
if (_subtractedValue >= oldValue) {
_allowances[msg.sender][_spender] = 0;
} else {
_allowances[msg.sender][_spender] = oldValue - _subtractedValue;
}
emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]);
return true;
}

/**
* @dev Mints new tokens, increasing totalSupply.
*/
Expand Down

0 comments on commit a2bb64f

Please sign in to comment.