ERC20Capped now capps _all_ minting, even internal calls. (#1443)
This commit is contained in:
@ -24,22 +24,8 @@ contract ERC20Capped is ERC20Mintable {
|
|||||||
return _cap;
|
return _cap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
function _mint(address account, uint256 value) internal {
|
||||||
* @dev Function to mint tokens
|
|
||||||
* @param to The address that will receive the minted tokens.
|
|
||||||
* @param value The amount of tokens to mint.
|
|
||||||
* @return A boolean that indicates if the operation was successful.
|
|
||||||
*/
|
|
||||||
function mint(
|
|
||||||
address to,
|
|
||||||
uint256 value
|
|
||||||
)
|
|
||||||
public
|
|
||||||
returns (bool)
|
|
||||||
{
|
|
||||||
require(totalSupply().add(value) <= _cap);
|
require(totalSupply().add(value) <= _cap);
|
||||||
|
super._mint(account, value);
|
||||||
return super.mint(to, value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user