SHARE
TWEET

ssssss

a guest Jun 24th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  *Submitted for verification at Etherscan.io on 2019-04-01
  3. */
  4.  
  5. pragma solidity ^0.4.24;
  6.  
  7. /**
  8.  * Libraries
  9.  */
  10.  
  11. library SafeMath {
  12.  
  13.   /**
  14.   * @dev Multiplies two numbers, throws on overflow.
  15.   */
  16.   function mul(uint256 a, uint256 b) internal pure returns (uint256) {
  17.     if (a == 0) {
  18.       return 0;
  19.     }
  20.     uint256 c = a * b;
  21.     assert(c / a == b);
  22.     return c;
  23.   }
  24.  
  25.   /**
  26.   * @dev Integer division of two numbers, truncating the quotient.
  27.   */
  28.   function div(uint256 a, uint256 b) internal pure returns (uint256) {
  29.     // assert(b > 0); // Solidity automatically throws when dividing by 0
  30.     uint256 c = a / b;
  31.     // assert(a == b * c + a % b); // There is no case in which this doesn't hold
  32.     return c;
  33.   }
  34.  
  35.   /**
  36.   * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  37.   */
  38.   function sub(uint256 a, uint256 b) internal pure returns (uint256) {
  39.     assert(b <= a);
  40.     return a - b;
  41.   }
  42.  
  43.   /**
  44.   * @dev Adds two numbers, throws on overflow.
  45.   */
  46.   function add(uint256 a, uint256 b) internal pure returns (uint256) {
  47.     uint256 c = a + b;
  48.     assert(c >= a);
  49.     return c;
  50.   }
  51. }
  52.  
  53. /**
  54.  * Helper contracts
  55.  */
  56.  
  57.  
  58. contract Ownable {
  59.   address public owner;
  60.  
  61.  
  62.   event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  63.  
  64.   /**
  65.    * @dev The Ownable constructor sets the original `owner` of the contract to the sender
  66.    * account.
  67.    */
  68.   constructor() public {
  69.     owner = msg.sender;
  70.   }
  71.  
  72.   /**
  73.    * @dev Throws if called by any account other than the owner.
  74.    */
  75.   modifier onlyOwner() {
  76.     require(msg.sender == owner);
  77.     _;
  78.   }
  79.  
  80.   /**
  81.    * @dev Allows the current owner to transfer control of the contract to a newOwner.
  82.    * @param newOwner The address to transfer ownership to.
  83.    */
  84.   function transferOwnership(address newOwner) public onlyOwner {
  85.     require(newOwner != address(0));
  86.     emit OwnershipTransferred(owner, newOwner);
  87.     owner = newOwner;
  88.   }
  89. }
  90.  
  91. contract Pausable is Ownable {
  92.   event Pause();
  93.   event Unpause();
  94.  
  95.   bool public paused = false;
  96.  
  97.  
  98.   /**
  99.    * @dev Modifier to make a function callable only when the contract is not paused.
  100.    */
  101.   modifier whenNotPaused() {
  102.     require(!paused);
  103.     _;
  104.   }
  105.  
  106.   /**
  107.    * @dev Modifier to make a function callable only when the contract is paused.
  108.    */
  109.   modifier whenPaused() {
  110.     require(paused);
  111.     _;
  112.   }
  113.  
  114.   /**
  115.    * @dev called by the owner to pause, triggers stopped state
  116.    */
  117.   function pause() onlyOwner whenNotPaused public {
  118.     paused = true;
  119.     emit Pause();
  120.   }
  121.  
  122.   /**
  123.    * @dev called by the owner to unpause, returns to normal state
  124.    */
  125.   function unpause() onlyOwner whenPaused public {
  126.     paused = false;
  127.     emit Unpause();
  128.   }
  129. }
  130.  
  131.  
  132. contract ERC20Basic {
  133.   function totalSupply() public view returns (uint256);
  134.   function balanceOf(address who) public view returns (uint256);
  135.   function transfer(address to, uint256 value) public returns (bool);
  136.   event Transfer(address indexed from, address indexed to, uint256 value);
  137. }
  138.  
  139. contract ERC20 is ERC20Basic {
  140.   function allowance(address owner, address spender) public view returns (uint256);
  141.   function transferFrom(address from, address to, uint256 value) public returns (bool);
  142.   function approve(address spender, uint256 value) public returns (bool);
  143.   event Approval(address indexed owner, address indexed spender, uint256 value);
  144. }
  145.  
  146. contract HUBRISTOKEN is ERC20 {
  147.   string public name;
  148.   string public symbol;
  149.   uint8 public decimals;
  150.  
  151.  constructor(string _name, string _symbol, uint8 _decimals) public {
  152.     name = _name;
  153.     symbol = _symbol;
  154.     decimals = _decimals;
  155.   }
  156. }
  157.  
  158. contract BasicToken is ERC20Basic {
  159.   using SafeMath for uint256;
  160.  
  161.   mapping(address => uint256) balances;
  162.  
  163.   uint256 totalSupply_;
  164.  
  165.   /**
  166.   * @dev total number of tokens in existence
  167.   */
  168.   function totalSupply() public view returns (uint256) {
  169.     return totalSupply_;
  170.   }
  171.  
  172.   /**
  173.   * @dev transfer token for a specified address
  174.   * @param _to The address to transfer to.
  175.   * @param _value The amount to be transferred.
  176.   */
  177.   function transfer(address _to, uint256 _value) public returns (bool) {
  178.     require(_to != address(0));
  179.     require(_value <= balances[msg.sender]);
  180.  
  181.     // SafeMath.sub will throw if there is not enough balance.
  182.     balances[msg.sender] = balances[msg.sender].sub(_value);
  183.     balances[_to] = balances[_to].add(_value);
  184.     emit Transfer(msg.sender, _to, _value);
  185.     return true;
  186.   }
  187.  
  188.   /**
  189.   * @dev Gets the balance of the specified address.
  190.   * @param _owner The address to query the the balance of.
  191.   * @return An uint256 representing the amount owned by the passed address.
  192.   */
  193.   function balanceOf(address _owner) public view returns (uint256 balance) {
  194.     return balances[_owner];
  195.   }
  196.  
  197. }
  198.  
  199. contract Standard is ERC20, BasicToken {
  200.  
  201.   mapping (address => mapping (address => uint256)) internal allowed;
  202.  
  203.  
  204.   function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
  205.     require(_to != address(0));
  206.     require(_value <= balances[_from]);
  207.     require(_value <= allowed[_from][msg.sender]);
  208.  
  209.     balances[_from] = balances[_from].sub(_value);
  210.     balances[_to] = balances[_to].add(_value);
  211.     allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
  212.     emit Transfer(_from, _to, _value);
  213.     return true;
  214.   }
  215.  
  216.  
  217.   function approve(address _spender, uint256 _value) public returns (bool) {
  218.     allowed[msg.sender][_spender] = _value;
  219.     emit Approval(msg.sender, _spender, _value);
  220.     return true;
  221.   }
  222.  
  223.  
  224.   function allowance(address _owner, address _spender) public view returns (uint256) {
  225.     return allowed[_owner][_spender];
  226.   }
  227.  
  228.  
  229.   function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
  230.     allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
  231.     emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  232.     return true;
  233.   }
  234.  
  235.  
  236.   function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
  237.     uint oldValue = allowed[msg.sender][_spender];
  238.     if (_subtractedValue > oldValue) {
  239.       allowed[msg.sender][_spender] = 0;
  240.     } else {
  241.       allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  242.     }
  243.     emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  244.     return true;
  245.   }
  246.  
  247. }
  248.  
  249. contract BurnableToken is BasicToken {
  250.  
  251.   event Burn(address indexed burner, uint256 value);
  252.  
  253.   /**
  254.    * @dev Burns a specific amount of tokens.
  255.    * @param _value The amount of token to be burned.
  256.    */
  257.   function burn(uint256 _value) public {
  258.     _burn(msg.sender, _value);
  259.   }
  260.  
  261.   function _burn(address _who, uint256 _value) internal {
  262.     require(_value <= balances[_who]);
  263.     // no need to require value <= totalSupply, since that would imply the
  264.     // sender's balance is greater than the totalSupply, which *should* be an assertion failure
  265.  
  266.     balances[_who] = balances[_who].sub(_value);
  267.     totalSupply_ = totalSupply_.sub(_value);
  268.     emit Burn(_who, _value);
  269.     emit Transfer(_who, address(0), _value);
  270.   }
  271. }
  272.  
  273. /**
  274.  * HUBRIS Token
  275.  */
  276.  
  277. contract HUBRIS is Ownable, Pausable, Standard, BurnableToken, HUBRISTOKEN {
  278.     using SafeMath for uint256;
  279.  
  280.     string name = "HUBRIS";
  281.     string symbol = "HBRS";
  282.     uint8 decimals = 18;
  283.  
  284.     //token allocation addresses
  285.     address TOKEN_SALE = 0xdff99ef7ed50f9EB06183d0DfeD9CD5DB051878B;
  286.     address EQUITY_SHARE = 0xb2aA0f5c0e2e7f94A26022C076240509C85eDab1;
  287.     address TEAM = 0x922E97d03bEeA115Ab95CC638765d2BebEb04f20;
  288.     address ADVISORS = 0x6FB54a06f94591EAF330c4BdD644c4Ab753eb105;
  289.     address CUSTOMERS = 0x382C33946B73A3B8B7F3E70A553b6965d6F28a48;
  290.     address BOUNTY = 0x1d1390c9d5e08aCEC31991EA7Be7443ad2EEA6e6;
  291.     address RESERVE = 0x79641ae5D204C45038a9cF07c32E39d2EeC23C5c;
  292.     address LEGAL = 0xe49941b4B66D61d98d4766c8EEB3004c0961075B;
  293.    
  294.     bool tokensAllocated = false;
  295.  
  296.     constructor() HUBRISTOKEN(name, symbol, decimals) public {
  297.         totalSupply_ = 1000000000E18;
  298.         balances[this] = totalSupply_;
  299.     }
  300.  
  301.     function envokeTokenAllocation() public onlyOwner {
  302.         require(!tokensAllocated);
  303.         tokensAllocated = true;
  304.         this.transfer(TOKEN_SALE, 300000000E18); //30% of totalSupply_
  305.         this.transfer(EQUITY_SHARE, 300000000E18); //30% of totalSupply_
  306.         this.transfer(TEAM, 150000000E18); //15% of totalSupply_
  307.         this.transfer(ADVISORS, 30000000E18); //3% of totalSupply_
  308.         this.transfer(CUSTOMERS, 100000000E18); //10% of totalSupply_
  309.         this.transfer(msg.sender, 50000000E18); //5% of totalSupply_
  310.         this.transfer(BOUNTY, 40000000E18); //4% of totalSupply_
  311.         this.transfer(RESERVE, 20000000E18); //2% of totalSupply_
  312.         this.transfer(LEGAL, 10000000E18); //1% of totalSupply_
  313.     }
  314.  
  315. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top