pragma solidity ^0.5.17;
library SafeMath
{
function add(uint256 a, uint256 b) internal pure returns (uint256)
{
uint256 c = a + b;
assert(c >= a);
return c;
}
}
contract Variable
{
string public name;
string public symbol;
uint256 public decimals;
uint256 public totalSupply;
address public owner;
address public watchdog;
uint256 internal _decimals;
bool internal transferLock;
mapping (address => bool) public blockedAddress;
mapping (address => uint256) public balanceOf;
address public newWatchdog;
address public newOwner;
constructor() public
{
name = "PURIEVER";
symbol = "PURE";
decimals = 18;
_decimals = 10 ** uint256(decimals);
totalSupply = _decimals * 1200000000;
transferLock = false;
owner = msg.sender;
balanceOf[owner] = totalSupply;
watchdog = 0x1F5Ad54c24635b6c9728078a88142C0467a2FC11;
newWatchdog = address(0);
newOwner = address(0);
}
}
contract Modifiers is Variable
{
modifier isOwner
{
assert(owner == msg.sender);
_;
}
modifier isValidAddress
{
assert(address(0) != msg.sender);
_;
}
modifier isWatchdog
{
assert(watchdog == msg.sender);
_;
}
function transferOwnership(address _newOwner) public isWatchdog
{
newOwner = _newOwner;
}
function transferOwnershipWatchdog(address _newWatchdog) public isOwner
{
newWatchdog = _newWatchdog;
}
function acceptOwnership() public isOwner
{
require(newOwner != address(0));
owner = newOwner;
newOwner = address(0);
}
function acceptOwnershipWatchdog() public isWatchdog
{
require(newWatchdog != address(0));
watchdog = newWatchdog;
newWatchdog = address(0);
}
}
contract Event
{
event Transfer(address indexed from, address indexed to, uint256 value);
event TokenBurn(address indexed from, uint256 value);
}
contract manageAddress is Variable, Modifiers, Event
{
function add_blockedAddress(address _address) public isOwner
{
require(_address != owner);
blockedAddress[_address] = true;
}
function delete_blockedAddress(address _address) public isOwner
{
blockedAddress[_address] = false;
}
}
contract Admin is Variable, Modifiers, Event
{
function admin_tokenBurn(uint256 _value) public isOwner returns(bool success)
{
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] -= _value;
totalSupply -= _value;
emit TokenBurn(msg.sender, _value);
return true;
}
}
contract Get is Variable, Modifiers
{
function get_transferLock() public view returns(bool)
{
return transferLock;
}
function get_blockedAddress(address _address) public view returns(bool)
{
return blockedAddress[_address];
}
}
contract Set is Variable, Modifiers, Event
{
function setTransferLock(bool _transferLock) public isOwner returns(bool success)
{
transferLock = _transferLock;
return true;
}
}
contract PURE is Variable, Event, Get, Set, manageAddress
{
using SafeMath for uint256;
function() external payable
{
revert();
}
function transfer(address _to, uint256 _value) public isValidAddress
{
require(transferLock == false);
require(!blockedAddress[msg.sender] && !blockedAddress[_to]);
require(balanceOf[msg.sender] >= _value && _value > 0);
require((balanceOf[_to].add(_value)) >= balanceOf[_to] );
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
emit Transfer(msg.sender, _to, _value);
}
}
{
"compilationTarget": {
"PURE.sol": "PURE"
},
"evmVersion": "istanbul",
"libraries": {},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenBurn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[],"name":"acceptOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptOwnershipWatchdog","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"add_blockedAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blockedAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"delete_blockedAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"get_blockedAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"get_transferLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"newWatchdog","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bool","name":"_transferLock","type":"bool"}],"name":"setTransferLock","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_newWatchdog","type":"address"}],"name":"transferOwnershipWatchdog","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"watchdog","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"}]