• API
• FAQ
• Tools
• Archive
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 {
60.
61.
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 {
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);
137. }
138.
139. contract ERC20 is ERC20Basic {
142.   function approve(address spender, uint256 value) public returns (bool);
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.
162.
163.   uint256 totalSupply_;
164.
165.   /**
166.   * @dev total number of tokens in existence
167.   */
168.   function totalSupply() public view returns (uint256) {
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) {
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);
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.
202.
203.
204.   function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
206.     require(_value <= balances[_from]);
207.     require(_value <= allowed[_from][msg.sender]);
208.
209.     balances[_from] = balances[_from].sub(_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.
225.     return allowed[_owner][_spender];
226.   }
227.
228.
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);
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.
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.
Not a member of Pastebin yet?