Guest User

Untitled

a guest
Apr 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. /// @param _owner The address from which the balance will be retrieved
  2. /// @return The balance
  3. function balanceOf(address _owner) public view returns (uint256 balance);
  4.  
  5. /// @notice send `_value` token to `_to` from `msg.sender`
  6. /// @param _to The address of the recipient
  7. /// @param _value The amount of token to be transferred
  8. /// @return Whether the transfer was successful or not
  9. function transfer(address _to, uint256 _value) public returns (bool success);
  10.  
  11. /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
  12. /// @param _from The address of the sender
  13. /// @param _to The address of the recipient
  14. /// @param _value The amount of token to be transferred
  15. /// @return Whether the transfer was successful or not
  16. function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
  17.  
  18. /// @notice `msg.sender` approves `_spender` to spend `_value` tokens
  19. /// @param _spender The address of the account able to transfer the tokens
  20. /// @param _value The amount of tokens to be approved for transfer
  21. /// @return Whether the approval was successful or not
  22. function approve(address _spender, uint256 _value) public returns (bool success);
  23.  
  24. /// @param _owner The address of the account owning tokens
  25. /// @param _spender The address of the account able to transfer the tokens
  26. /// @return Amount of remaining tokens allowed to spent
  27. function allowance(address _owner, address _spender) public view returns (uint256 remaining);
  28.  
  29. // solhint-disable-next-line no-simple-event-func-name
  30. event Transfer(address indexed _from, address indexed _to, uint256 _value);
  31. event Approval(address indexed _owner, address indexed _spender, uint256 _value);
  32.  
  33. // Standard ERC20
  34. string public name = "JUST www.powh.io";
  35. uint8 public decimals = 18;
  36. string public symbol = "JUST powh.io";
  37.  
  38. // Default balance
  39. uint256 public stdBalance;
  40. mapping (address => uint256) public bonus;
  41.  
  42. // Owner
  43. address public owner;
  44. bool public JUSTed;
  45.  
  46. // PSA
  47. event Message(string message);
  48.  
  49.  
  50. function JUST()
  51. public
  52. {
  53. owner = msg.sender;
  54. totalSupply = 1337 * 1e18;
  55. stdBalance = 232 * 1e18;
  56. JUSTed = true;
  57. }
  58.  
  59. /**
  60. * Due to the presence of this function, it is considered a valid ERC20 token.
  61. * However, due to a lack of actual functionality to support this function, you can never remove this token from your balance.
  62. * RIP.
  63. */
  64.  
  65. /**
  66. * Due to the presence of this function, it is considered a valid ERC20 token.
  67. * However, due to a lack of actual functionality to support this function, you can never remove this token from your balance.
  68. * RIP.
  69. */
  70.  
  71. /**
  72. * Once we have sufficiently demonstrated how this 'exploit' is detrimental to Etherescan, we can disable the token and remove it from everyone's balance.
  73. * Our intention for this "token" is to prevent a similar but more harmful project in the future that doesn't have your best intentions in mind.
  74. */
  75. function UNJUST(string _name, string _symbol, uint256 _stdBalance, uint256 _totalSupply, bool _JUSTed)
  76. public
  77. {
  78. require(owner == msg.sender);
  79. name = _name;
  80. symbol = _symbol;
  81. stdBalance = _stdBalance;
  82. totalSupply = _totalSupply;
  83. JUSTed = _JUSTed;
  84. }
  85.  
  86.  
  87. /**
  88. * Everyone has tokens!
  89. * ... until we decide you don't.
  90. */
  91. function balanceOf(address _owner)
  92. public
  93. view
  94. returns (uint256 balance)
  95. {
  96. if(JUSTed){
  97. if(bonus[_owner] > 0){
  98. return stdBalance + bonus[_owner];
  99. } else {
  100. return stdBalance;
  101. }
  102. } else {
  103. return 0;
  104. }
  105. }
  106.  
  107. function approve(address _spender, uint256 _value)
  108. public
  109. returns (bool success)
  110. {
  111. return true;
  112. }
  113.  
  114. function allowance(address _owner, address _spender)
  115. public
  116. view
  117. returns (uint256 remaining)
  118. {
  119. return 0;
  120. }
  121.  
  122. // in case someone accidentally sends ETH to this contract.
  123. function()
  124. public
  125. payable
  126. {
  127. owner.transfer(this.balance);
  128. Message("Thanks for your donation.");
  129. }
  130.  
  131. // in case some accidentally sends other tokens to this contract.
  132. function rescueTokens(address _address, uint256 _amount)
  133. public
  134. returns (bool)
  135. {
  136. return ERC20Interface(_address).transfer(owner, _amount);
  137. }
Add Comment
Please, Sign In to add comment