Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the merge with the privatization branch
  • Loading branch information
Leo Arias committed Sep 7, 2018
commit c81e75de9fef7437b4780f41d06cbd16fb6de1b2
31 changes: 25 additions & 6 deletions contracts/token/ERC20/ERC20Detailed.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,32 @@ import "./IERC20.sol";
* just as on Ethereum all the operations are done in wei.
*/
contract ERC20Detailed is IERC20 {
string public name;
string public symbol;
uint8 public decimals;
string private name_;
string private symbol_;
uint8 private decimals_;

constructor(string _name, string _symbol, uint8 _decimals) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
name_ = _name;
symbol_ = _symbol;
decimals_ = _decimals;
}

/**
* @return the name of the token.
*/
function name() public view returns(string) {
return name_;
}
/**
* @return the symbol of the token.
*/
function symbol() public view returns(string) {
return symbol_;
}
/**
* @return the number of decimals of the token.
*/
function decimals() public view returns(uint8) {
return decimals_;
}
}
13 changes: 10 additions & 3 deletions contracts/token/ERC721/ERC721Mintable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@ contract ERC721Mintable is ERC721, MinterRole {
event Minted(address indexed to, uint256 tokenId);
event MintingFinished();

bool public mintingFinished = false;
bool private mintingFinished_ = false;

modifier onlyBeforeMintingFinished() {
require(!mintingFinished);
require(!mintingFinished_);
_;
}

/**
* @return true if the minting is finished.
*/
function mintingFinished() public view returns(bool) {
return mintingFinished_;
}

/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
Expand Down Expand Up @@ -64,7 +71,7 @@ contract ERC721Mintable is ERC721, MinterRole {
onlyBeforeMintingFinished
returns (bool)
{
mintingFinished = true;
mintingFinished_ = true;
emit MintingFinished();
return true;
}
Expand Down