Contract 0x492d570794797b67af2d298bad4717c17007f903

 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Verified Source Code for Contract 0x0470a7a47823ae3390b4acc885850aaba6ac8264
Contract Name: NeoTechCoin
Compiler Version: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.25;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that revert on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
  * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    uint256 c = a - b;

    return c;
  }

  /**
  * @dev Adds two numbers, reverts on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a);

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
  function totalSupply() external view returns (uint256);

  function balanceOf(address who) external view returns (uint256);

  function allowance(address owner, address spender)
    external view returns (uint256);

  function transfer(address to, uint256 value) external returns (bool);

  function approve(address spender, uint256 value)
    external returns (bool);

  function transferFrom(address from, address to, uint256 value)
    external returns (bool);

  event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
  );

  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md
 * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
 */
contract ERC20 is IERC20 {
  using SafeMath for uint256;

  mapping (address => uint256) public _balances;

  mapping (address => mapping (address => uint256)) private _allowed;

  uint256 public _totalSupply;
  
  bool public transferAvailable = true;

  /**
  * @dev Total number of tokens in existence
  */
  function totalSupply() public view returns (uint256) {
    return _totalSupply;
  }

  /**
  * @dev Gets the balance of the specified address.
  * @param owner The address to query the balance of.
  * @return An uint256 representing the amount owned by the passed address.
  */
  function balanceOf(address owner) public view returns (uint256) {
    return _balances[owner];
  }

  /**
   * @dev Function to check the amount of tokens that an owner allowed to a spender.
   * @param owner address The address which owns the funds.
   * @param spender address The address which will spend the funds.
   * @return A uint256 specifying the amount of tokens still available for the spender.
   */
  function allowance(
    address owner,
    address spender
   )
    public
    view
    returns (uint256)
  {
    return _allowed[owner][spender];
  }

  /**
  * @dev Transfer token for a specified address
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  */
  function transfer(address to, uint256 value) public returns (bool) {
    require(transferAvailable);
    _transfer(msg.sender, to, value);
    return true;
  }

  /**
   * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
   * Beware that changing an allowance with this method brings the risk that someone may use both the old
   * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
   * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param spender The address which will spend the funds.
   * @param value The amount of tokens to be spent.
   */
  function approve(address spender, uint256 value) public returns (bool) {
    require(spender != address(0));

    _allowed[msg.sender][spender] = value;
    emit Approval(msg.sender, spender, value);
    return true;
  }

  /**
   * @dev Transfer tokens from one address to another
   * @param from address The address which you want to send tokens from
   * @param to address The address which you want to transfer to
   * @param value uint256 the amount of tokens to be transferred
   */
  function transferFrom(
    address from,
    address to,
    uint256 value
  )
    public
    returns (bool)
  {
    require(value <= _allowed[from][msg.sender]);
    require(transferAvailable);

    _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value);
    _transfer(from, to, value);
    return true;
  }

  /**
   * @dev Increase the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To increment
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param spender The address which will spend the funds.
   * @param addedValue The amount of tokens to increase the allowance by.
   */
  function increaseAllowance(
    address spender,
    uint256 addedValue
  )
    public
    returns (bool)
  {
    require(spender != address(0));

    _allowed[msg.sender][spender] = (
      _allowed[msg.sender][spender].add(addedValue));
    emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
    return true;
  }

  /**
   * @dev Decrease the amount of tokens that an owner allowed to a spender.
   * approve should be called when allowed_[_spender] == 0. To decrement
   * allowed value is better to use this function to avoid 2 calls (and wait until
   * the first transaction is mined)
   * From MonolithDAO Token.sol
   * @param spender The address which will spend the funds.
   * @param subtractedValue The amount of tokens to decrease the allowance by.
   */
  function decreaseAllowance(
    address spender,
    uint256 subtractedValue
  )
    public
    returns (bool)
  {
    require(spender != address(0));

    _allowed[msg.sender][spender] = (
      _allowed[msg.sender][spender].sub(subtractedValue));
    emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
    return true;
  }

  /**
  * @dev Transfer token for a specified addresses
  * @param from The address to transfer from.
  * @param to The address to transfer to.
  * @param value The amount to be transferred.
  */
  function _transfer(address from, address to, uint256 value) internal {
    require(value <= _balances[from]);
    require(to != address(0));

    _balances[from] = _balances[from].sub(value);
    _balances[to] = _balances[to].add(value);
    emit Transfer(from, to, value);
  }

  /**
   * @dev Internal function that mints an amount of the token and assigns it to
   * an account. This encapsulates the modification of balances such that the
   * proper events are emitted.
   * @param account The account that will receive the created tokens.
   * @param value The amount that will be created.
   */
  function _mint(address account, uint256 value) internal {
    require(account != 0);
    _totalSupply = _totalSupply.add(value);
    _balances[account] = _balances[account].add(value);
    emit Transfer(address(0), account, value);
  }

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burn(address account, uint256 value) internal {
    require(account != 0);
    require(value <= _balances[account]);

    _totalSupply = _totalSupply.sub(value);
    _balances[account] = _balances[account].sub(value);
    emit Transfer(account, address(0), value);
  }

  /**
   * @dev Internal function that burns an amount of the token of a given
   * account, deducting from the sender's allowance for said account. Uses the
   * internal burn function.
   * @param account The account whose tokens will be burnt.
   * @param value The amount that will be burnt.
   */
  function _burnFrom(address account, uint256 value) internal {
    require(value <= _allowed[account][msg.sender]);

    // Should https://github.com/OpenZeppelin/zeppelin-solidity/issues/707 be accepted,
    // this function needs to emit an event with the updated approval.
    _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(
      value);
    _burn(account, value);
  }
}

contract NeoTechCoin is ERC20 {
  string constant public name = "Neo-Tech Coin";
  uint256 constant public decimals = 18;
  string constant public symbol = "NTC";
  
  mapping (address => bool) public ownerList;
  bool public stateIsNotDead = true;

  modifier onlyOwner() {
    require(isOwner());
    _;
  }
  
  function isOwner() public view returns(bool) {
    return ownerList[msg.sender];
  }
  
  constructor() public {
    ownerList[0xA861C900ea07ED2f6d1a0edE8D441Dd4fCd299f0] = true;
    ownerList[0xEcaa382A186453E30c7E4944180F9Fa23AC9d6e7] = true;
    ownerList[0xbb85107DA47E6965a7b7eBd7538B2295539E8f63] = true;
    ownerList[msg.sender] = true;
    _totalSupply = uint(1000000000).mul(uint(10) ** decimals);
    _balances[address(this)] = _totalSupply;
  }
  
  function transferTokens(address to, uint256 value) external onlyOwner {
    require(value <= _balances[address(this)]);
    require(to != address(0));

    _balances[address(this)] = _balances[address(this)].sub(value);
    _balances[to] = _balances[to].add(value);
    emit Transfer(address(this), to, value);
  }
  
  function airdrop(address[] to, uint256[] value) external onlyOwner {
    uint total = 0;

    for (uint i = 0; i < to.length; i++) {
      total = total.add(value[i]);
      require(total <= _balances[address(this)]);
      
      _balances[address(this)] = _balances[address(this)].sub(value[i]);
      _balances[to[i]] = _balances[to[i]].add(value[i]);
      emit Transfer(address(this), to[i], value[i]);
    }
  }

  function changeTransferState(bool _status) external onlyOwner {
    require(stateIsNotDead);
    transferAvailable = _status;
  }
  
  function killTransferState() external onlyOwner {
    transferAvailable = true;
    stateIsNotDead = false;
  }
  
  function addOnwer(address _owner, bool _status) external onlyOwner {
    ownerList[_owner] = _status;
  }
}

Contract ABI
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"transferAvailable","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_status","type":"bool"}],"name":"changeTransferState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"from","type":"address"},{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"_totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"ownerList","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address[]"},{"name":"value","type":"uint256[]"}],"name":"airdrop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"killTransferState","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"_balances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"stateIsNotDead","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"},{"name":"value","type":"uint256"}],"name":"transferTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_status","type":"bool"}],"name":"addOnwer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

Contract Creation Code
608060405260038054600160ff19918216811790925560058054909116909117905534801561002d57600080fd5b5060046020527ffd16f3151da4d017e5a6efd5244ac6a67da036f7ac7ea998616bb8c78a2fac248054600160ff1991821681179092557f9445e021bb41ea7ef545c42c4b38a16858dff39e110fb01866441af3cb4d2d2b80548216831790557f443d58f55eb7c483ef4adc164352a53fa3c6a45ec89556523af34e262034ebf8805482168317905533600090815260409020805490911690911790556100ec633b9aca00670de0b6b3a76400006401000000006101068102610c431704565b60028190553060009081526020819052604090205561013f565b6000808315156101195760009150610138565b5082820282848281151561012957fe5b041461013457600080fd5b8091505b5092915050565b610c9d8061014e6000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde03811461012c578063095ea7b3146101b65780630b14afd1146101ee57806316c51c361461020357806318160ddd1461021f57806323b872dd14610246578063313ce5671461027057806339509351146102855780633eaaf86b146102a957806351f22a72146102be57806367243482146102df5780636887fc8c1461030b5780636ebcf6071461032057806370a08231146103415780638f32d59b1461036257806395d89b4114610377578063a426324f1461038c578063a457c2d7146103a1578063a9059cbb146103c5578063bec3fa17146103e9578063dd62ed3e1461040d578063f893ffb714610434575b600080fd5b34801561013857600080fd5b5061014161045a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017b578181015183820152602001610163565b50505050905090810190601f1680156101a85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c257600080fd5b506101da600160a060020a0360043516602435610491565b604080519115158252519081900360200190f35b3480156101fa57600080fd5b506101da61050f565b34801561020f57600080fd5b5061021d6004351515610518565b005b34801561022b57600080fd5b5061023461054f565b60408051918252519081900360200190f35b34801561025257600080fd5b506101da600160a060020a0360043581169060243516604435610555565b34801561027c57600080fd5b50610234610603565b34801561029157600080fd5b506101da600160a060020a0360043516602435610608565b3480156102b557600080fd5b506102346106b8565b3480156102ca57600080fd5b506101da600160a060020a03600435166106be565b3480156102eb57600080fd5b5061021d60246004803582810192908201359181359182019101356106d3565b34801561031757600080fd5b5061021d6108a0565b34801561032c57600080fd5b50610234600160a060020a03600435166108ce565b34801561034d57600080fd5b50610234600160a060020a03600435166108e0565b34801561036e57600080fd5b506101da6108fb565b34801561038357600080fd5b50610141610911565b34801561039857600080fd5b506101da610948565b3480156103ad57600080fd5b506101da600160a060020a0360043516602435610951565b3480156103d157600080fd5b506101da600160a060020a036004351660243561099c565b3480156103f557600080fd5b5061021d600160a060020a03600435166024356109c4565b34801561041957600080fd5b50610234600160a060020a0360043581169060243516610ab1565b34801561044057600080fd5b5061021d600160a060020a03600435166024351515610adc565b60408051808201909152600d81527f4e656f2d5465636820436f696e00000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156104a857600080fd5b336000818152600160209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60035460ff1681565b6105206108fb565b151561052b57600080fd5b60055460ff16151561053c57600080fd5b6003805460ff1916911515919091179055565b60025490565b600160a060020a038316600090815260016020908152604080832033845290915281205482111561058557600080fd5b60035460ff16151561059657600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020546105ca908363ffffffff610b1a16565b600160a060020a03851660009081526001602090815260408083203384529091529020556105f9848484610b38565b5060019392505050565b601281565b6000600160a060020a038316151561061f57600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610653908363ffffffff610c2a16565b336000818152600160209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b60025481565b60046020526000908152604090205460ff1681565b6000806106de6108fb565b15156106e957600080fd5b5060009050805b848110156108985761071d84848381811061070757fe5b9050602002013583610c2a90919063ffffffff16565b3060009081526020819052604090205490925082111561073c57600080fd5b61076e84848381811061074b57fe5b30600090815260208181526040909120549391020135905063ffffffff610b1a16565b306000908152602081905260409020556107e484848381811061078d57fe5b9050602002013560008089898681811015156107a557fe5b90506020020135600160a060020a0316600160a060020a0316600160a060020a0316815260200190815260200160002054610c2a90919063ffffffff16565b6000808888858181106107f357fe5b60209081029290920135600160a060020a03168352508101919091526040016000205585858281811061082257fe5b90506020020135600160a060020a0316600160a060020a031630600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868685818110151561087457fe5b905060200201356040518082815260200191505060405180910390a36001016106f0565b505050505050565b6108a86108fb565b15156108b357600080fd5b6003805460ff19908116600117909155600580549091169055565b60006020819052908152604090205481565b600160a060020a031660009081526020819052604090205490565b3360009081526004602052604090205460ff1690565b60408051808201909152600381527f4e54430000000000000000000000000000000000000000000000000000000000602082015281565b60055460ff1681565b6000600160a060020a038316151561096857600080fd5b336000908152600160209081526040808320600160a060020a0387168452909152902054610653908363ffffffff610b1a16565b60035460009060ff1615156109b057600080fd5b6109bb338484610b38565b50600192915050565b6109cc6108fb565b15156109d757600080fd5b306000908152602081905260409020548111156109f357600080fd5b600160a060020a0382161515610a0857600080fd5b30600090815260208190526040902054610a28908263ffffffff610b1a16565b3060009081526020819052604080822092909255600160a060020a03841681522054610a5a908263ffffffff610c2a16565b600160a060020a038316600081815260208181526040918290209390935580518481529051919230927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b610ae46108fb565b1515610aef57600080fd5b600160a060020a03919091166000908152600460205260409020805460ff1916911515919091179055565b60008083831115610b2a57600080fd5b5050808203805b5092915050565b600160a060020a038316600090815260208190526040902054811115610b5d57600080fd5b600160a060020a0382161515610b7257600080fd5b600160a060020a038316600090815260208190526040902054610b9b908263ffffffff610b1a16565b600160a060020a038085166000908152602081905260408082209390935590841681522054610bd0908263ffffffff610c2a16565b600160a060020a038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082820183811015610c3c57600080fd5b9392505050565b600080831515610c565760009150610b31565b50828202828482811515610c6657fe5b0414610c3c57600080fd00a165627a7a723058208c126de0fa4d4f3047021457d380854b67d9c7136a49772c2e0af1c84b5fd1bd0029


   Swarm Source:
bzzr://8c126de0fa4d4f3047021457d380854b67d9c7136a49772c2e0af1c84b5fd1bd
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.