Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. string public name;
  2. string public symbol;
  3. uint8 public decimals;
  4. uint256 public totalSupply;
  5. address extraToken;
  6.  
  7.  
  8. mapping (address => uint256) public balanceOf;
  9.  
  10. event Transfer(address indexed from, address indexed to, uint256 value);
  11.  
  12.  
  13. function Token(
  14. uint256 initialSupply,
  15. string tokenName,
  16. uint8 decimalUnits,
  17. string tokenSymbol
  18. ) {
  19. balanceOf[msg.sender] = initialSupply;
  20. totalSupply = initialSupply;
  21. name = tokenName;
  22. symbol = tokenSymbol;
  23. decimals = decimalUnits;
  24. }
  25.  
  26. function transfer(address _to, uint256 _value) {
  27. if (_to == 0x0) throw;
  28. if (balanceOf[msg.sender] < _value) throw;
  29. if (balanceOf[_to] + _value < balanceOf[_to]) throw;
  30. balanceOf[msg.sender] -= _value;
  31. balanceOf[_to] += _value;
  32. Transfer(msg.sender, _to, _value);
  33. }
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41. function setExtraToken (address newToken) onlyGeens {
  42. extraToken = newGeeToken;
  43. }
  44.  
  45. uint256 public buyPrice;
  46. address extraToken;
  47.  
  48.  
  49. event Transfer(address indexed from, address indexed to, uint256 value);
  50.  
  51. function BuyingToken(uint256 buyingPrice){
  52. buyPrice = buyingPrice;
  53. }
  54.  
  55. function setCoinPrice (uint256 newBuyPrice) onlyGeens {
  56. buyPrice = newBuyPrice;
  57.  
  58. }
  59. function setExtraToken (address newToken) onlyGeens {
  60. extraToken = newToken;
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement