Skip to content

Commit

Permalink
SmartContract for CACR
Browse files Browse the repository at this point in the history
  • Loading branch information
SEr committed May 7, 2018
1 parent 9681219 commit 3de2043
Show file tree
Hide file tree
Showing 12 changed files with 221 additions and 309 deletions.
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/.idea/
/build/
/node_modules/
/index.js
.idea
.gitignore
build
node_modules
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# GalacticCredits
Galactic Credits (GAC)
Galactic Credits (GACR)
www.cryptohit.io
22 changes: 22 additions & 0 deletions contracts/GACR.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pragma solidity ^0.4.21;
import "zeppelin-solidity/contracts/token/ERC20/CappedToken.sol";

contract GACR is CappedToken {

/**
* Constant fields
*/
string public name = "Galactic Credits";
string public symbol = "GACR";
uint public decimals = 18;

uint256 private constant unit = 10 ** uint256(decimals);
uint256 public constant cap = 50000000 * unit;

//uint256 public constant bounties_supply = 1500000 * unit; // 3%
//uint256 public constant advisors_supply = 3000000 * unit; // 6%
//uint256 public constant reserve_supply = 8000000 * unit; // 16%
//uint256 public constant team_supply = 9000000 * unit; // 18%

function GACR() public CappedToken(cap) {}
}
23 changes: 23 additions & 0 deletions contracts/Migrations.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
pragma solidity ^0.4.17;

contract Migrations {
address public owner;
uint public last_completed_migration;

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

function Migrations() public {
owner = msg.sender;
}

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);
}
}
304 changes: 0 additions & 304 deletions contracts/StandardToken.sol

This file was deleted.

5 changes: 5 additions & 0 deletions migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var Migrations = artifacts.require("./Migrations.sol");

module.exports = function(deployer) {
deployer.deploy(Migrations);
};
5 changes: 5 additions & 0 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
var GACR = artifacts.require("./GACR.sol");

module.exports = function(deployer) {
deployer.deploy(GACR);
};
18 changes: 18 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3de2043

Please sign in to comment.