Update TBTC token to use new modifier
pragma solidity ^0.5.10;
-import "./ERC20Detailed.sol";
-import "./ERC20.sol";
+import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
+import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";
import "./MinterAuthority.sol";
contract TBTCToken is ERC20Detailed, ERC20, MinterAuthority {
@@ -18,7 +18,7 @@ contract TBTCToken is ERC20Detailed, ERC20, MinterAuthority {
/// Uses the internal _mint function
/// @param _account The account that will receive the created tokens.
/// @param _amount The amount of tokens that will be created.
- function mint(address _account, uint256 _amount) public onlySystem returns (bool){
+ function mint(address _account, uint256 _amount) public isApproved returns (bool){
// NOTE: this is a public function with unchecked minting.
// TODO: enforce calling authority.
_mint(_account, _amount);
@@ -30,7 +30,7 @@ contract TBTCToken is ERC20Detailed, ERC20, MinterAuthority {
/// Uses the internal _burn function.
/// @param _account The account whose tokens will be burnt.
/// @param _amount The amount of tokens that will be burnt.
- function burnFrom(address _account, uint256 _amount) public onlySystem {
+ function burnFrom(address _account, uint256 _amount) public isApproved {
// NOTE: this uses internal function _burn instead of _burnFrom.
// This will bypass allowance check for now.
// TODO: enforce calling authority.
@@ -42,7 +42,7 @@ contract TBTCToken is ERC20Detailed, ERC20, MinterAuthority {
/// @param _from The address to send tokens from
/// @param _to The address to transfer tokens to
/// @param _value The amount of tokens to be transferred
- function transferFrom(address _from, address _to, uint256 _value) public onlySystem returns (bool) {
+ function transferFrom(address _from, address _to, uint256 _value) public isApproved returns (bool) {
// NOTE: this overrides transferFrom in openZeppelin ERC20.sol
// in order to bypass allowance check for now.
// TODO: enforce calling authority.
