Skip to content

Commit

Permalink
init ERC20 Ares
Browse files Browse the repository at this point in the history
  • Loading branch information
christiangehl committed Jan 18, 2019
0 parents commit 8f13c28
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Ares.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pragma solidity ^0.4.23;

import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/ERC20Detailed.sol";


/**
* @title Ares Token
* @dev tokens are pre-assigned to the creator.
* Note they can later distribute these tokens as they wish using `transfer` and other
* `ERC20` functions.
*/

contract Ares is ERC20, ERC20Detailed {
uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals()));

constructor () public ERC20Detailed("AresToken", "ARES", 18) {
_mint(msg.sender, INITIAL_SUPPLY);
}
}
23 changes: 23 additions & 0 deletions Migrations.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pragma solidity ^0.4.23;

contract Migrations {
address public owner;
uint public last_completed_migration;

constructor() public {
owner = msg.sender;
}

modifier restricted() {
if (msg.sender == owner) _;
}

function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}

function upgrade(address new_address) public restricted {
Migrations upgraded = Migrations(new_address);
upgraded.setCompleted(last_completed_migration);
}
}

0 comments on commit 8f13c28

Please sign in to comment.