You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@param _spender The address which will spend the funds.
@param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
Currently, all our smart contracts are save. But at some point, this might change, hence it would make sense to use an increaseApproval from the start.
https://github.com/gnosis/gnosis-contracts/blob/9285b3e12708b921eecba827161b9295894b406f/contracts/Tokens/StandardToken.sol#L61
Some solidity coders propose to use an approvalIncrease function
*/
function approve(address _spender, uint256 _value) public returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
Currently, all our smart contracts are save. But at some point, this might change, hence it would make sense to use an increaseApproval from the start.
An exemplary contract can be found here:
https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/token/StandardToken.sol
I think it should be done, but it is NOT important currently
The text was updated successfully, but these errors were encountered: