Sponsored:   Ubex.com - World roadshow: Seoul Sep 17-19, Singapore Sep 19-20, Dubai 18-23. Meet us!.
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
Token Tracker: AiM Coin Token (AiMct)
 Latest 3 txns

TxHash Age From To Value [TxFee]
0xd0c00c5971c168a471f9a90ae93e6589f1fc68afe8d5683c90596804cee66b757 days 7 hrs ago0x2efd906daba53539ae24b811a3e2495a585f2f6c  IN   0x4dd4752da3a665549bba690f54ed6b2d0a8c46a50 Ether0.00014284
0xc63828b2e0ae531e934e56328b53a2cd80cd3be5c93426633acf72bf35de037d7 days 7 hrs ago0x2efd906daba53539ae24b811a3e2495a585f2f6c  IN   0x4dd4752da3a665549bba690f54ed6b2d0a8c46a50 Ether0.000187995
0x4f3d927451dd4b66940a12cb7cf9abb6989631cdae808e9a49a3fe1319839c447 days 7 hrs ago0x2efd906daba53539ae24b811a3e2495a585f2f6c  IN   0x4dd4752da3a665549bba690f54ed6b2d0a8c46a50 Ether0.000326095
0x55c153391d58abed90d55b17a4a2780ec2c90b6dc99d026de8164bb2c0836c8b7 days 7 hrs ago0x2efd906daba53539ae24b811a3e2495a585f2f6c  IN    Contract Creation0 Ether0.004345525
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: AiMctToken
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

/*
 * Creator: AiMct (AiM Coin Token) 
 */

/*
 * Abstract Token Smart Contract
 *
 */

 
 /*
 * Safe Math Smart Contract. 
 * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol
 */

contract SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws 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;
  }

  function safeSub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}




/**
 * ERC-20 standard token interface, as defined
 * <a href="http://github.com/ethereum/EIPs/issues/20">here</a>.
 */
contract Token {
  
  function totalSupply() constant returns (uint256 supply);
  function balanceOf(address _owner) constant returns (uint256 balance);
  function transfer(address _to, uint256 _value) returns (bool success);
  function transferFrom(address _from, address _to, uint256 _value) returns (bool success);
  function approve(address _spender, uint256 _value) returns (bool success);
  function allowance(address _owner, address _spender) constant returns (uint256 remaining);
  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}



/**
 * Abstract Token Smart Contract that could be used as a base contract for
 * ERC-20 token contracts.
 */
contract AbstractToken is Token, SafeMath {
  /**
   * Create new Abstract Token contract.
   */
  function AbstractToken () {
    // Do nothing
  }
  
  /**
   * Get number of tokens currently belonging to given owner.
   *
   * @param _owner address to get number of tokens currently belonging to the
   *        owner of
   * @return number of tokens currently belonging to the owner of given address
   */
  function balanceOf(address _owner) constant returns (uint256 balance) {
    return accounts [_owner];
  }

  /**
   * Transfer given number of tokens from message sender to given recipient.
   *
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer to the owner of given address
   * @return true if tokens were transferred successfully, false otherwise
   * accounts [_to] + _value > accounts [_to] for overflow check
   * which is already in safeMath
   */
  function transfer(address _to, uint256 _value) returns (bool success) {
    require(_to != address(0));
    if (accounts [msg.sender] < _value) return false;
    if (_value > 0 && msg.sender != _to) {
      accounts [msg.sender] = safeSub (accounts [msg.sender], _value);
      accounts [_to] = safeAdd (accounts [_to], _value);
    }
    emit Transfer (msg.sender, _to, _value);
    return true;
  }

  /**
   * Transfer given number of tokens from given owner to given recipient.
   *
   * @param _from address to transfer tokens from the owner of
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer from given owner to given
   *        recipient
   * @return true if tokens were transferred successfully, false otherwise
   * accounts [_to] + _value > accounts [_to] for overflow check
   * which is already in safeMath
   */
  function transferFrom(address _from, address _to, uint256 _value)
  returns (bool success) {
    require(_to != address(0));
    if (allowances [_from][msg.sender] < _value) return false;
    if (accounts [_from] < _value) return false; 

    if (_value > 0 && _from != _to) {
	  allowances [_from][msg.sender] = safeSub (allowances [_from][msg.sender], _value);
      accounts [_from] = safeSub (accounts [_from], _value);
      accounts [_to] = safeAdd (accounts [_to], _value);
    }
    emit Transfer(_from, _to, _value);
    return true;
  }

  /**
   * Allow given spender to transfer given number of tokens from message sender.
   * @param _spender address to allow the owner of to transfer tokens from message sender
   * @param _value number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
   function approve (address _spender, uint256 _value) returns (bool success) {
    allowances [msg.sender][_spender] = _value;
    emit Approval (msg.sender, _spender, _value);
    return true;
  }

  /**
   * Tell how many tokens given spender is currently allowed to transfer from
   * given owner.
   *
   * @param _owner address to get number of tokens allowed to be transferred
   *        from the owner of
   * @param _spender address to get number of tokens allowed to be transferred
   *        by the owner of
   * @return number of tokens given spender is currently allowed to transfer
   *         from given owner
   */
  function allowance(address _owner, address _spender) constant
  returns (uint256 remaining) {
    return allowances [_owner][_spender];
  }

  /**
   * Mapping from addresses of token holders to the numbers of tokens belonging
   * to these token holders.
   */
  mapping (address => uint256) accounts;

  /**
   * Mapping from addresses of token holders to the mapping of addresses of
   * spenders to the allowances set by these token holders to these spenders.
   */
  mapping (address => mapping (address => uint256)) private allowances;
  
}


/**
 * AiM Coin Token smart contract.
 */
contract AiMctToken is AbstractToken {
  /**
   * Maximum allowed number of tokens in circulation.
   * tokenSupply = tokensIActuallyWant * (10 ^ decimals)
   */
   
   
  uint256 constant MAX_TOKEN_COUNT = 1000000000 * (10**2);
   
  /**
   * Address of the owner of this smart contract.
   */
  address private owner;
  
  /**
   * Frozen account list holder
   */
  mapping (address => bool) private frozenAccount;

  /**
   * Current number of tokens in circulation.
   */
  uint256 tokenCount = 0;
  
 
  /**
   * True if tokens transfers are currently frozen, false otherwise.
   */
  bool frozen = false;
  
 
  /**
   * Create new token smart contract and make msg.sender the
   * owner of this smart contract.
   */
  function AiMctToken () {
    owner = msg.sender;
  }

  /**
   * Get total number of tokens in circulation.
   *
   * @return total number of tokens in circulation
   */
  function totalSupply() constant returns (uint256 supply) {
    return tokenCount;
  }

  string constant public name = "AiM Coin Token";
  string constant public symbol = "AiMct";
  uint8 constant public decimals = 2;
  
  /**
   * Transfer given number of tokens from message sender to given recipient.
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer to the owner of given address
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transfer(address _to, uint256 _value) returns (bool success) {
    require(!frozenAccount[msg.sender]);
	if (frozen) return false;
    else return AbstractToken.transfer (_to, _value);
  }

  /**
   * Transfer given number of tokens from given owner to given recipient.
   *
   * @param _from address to transfer tokens from the owner of
   * @param _to address to transfer tokens to the owner of
   * @param _value number of tokens to transfer from given owner to given
   *        recipient
   * @return true if tokens were transferred successfully, false otherwise
   */
  function transferFrom(address _from, address _to, uint256 _value)
    returns (bool success) {
	require(!frozenAccount[_from]);
    if (frozen) return false;
    else return AbstractToken.transferFrom (_from, _to, _value);
  }

   /**
   * Change how many tokens given spender is allowed to transfer from message
   * spender.  In order to prevent double spending of allowance,
   * To change the approve amount you first have to reduce the addresses`
   * allowance to zero by calling `approve(_spender, 0)` if it is not
   * already 0 to mitigate the race condition described here:
   * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
   * @param _spender address to allow the owner of to transfer tokens from
   *        message sender
   * @param _value number of tokens to allow to transfer
   * @return true if token transfer was successfully approved, false otherwise
   */
  function approve (address _spender, uint256 _value)
    returns (bool success) {
	require(allowance (msg.sender, _spender) == 0 || _value == 0);
    return AbstractToken.approve (_spender, _value);
  }

  /**
   * Create _value new tokens and give new created tokens to msg.sender.
   * May only be called by smart contract owner.
   *
   * @param _value number of tokens to create
   * @return true if tokens were created successfully, false otherwise
   */
  function createTokens(uint256 _value)
    returns (bool success) {
    require (msg.sender == owner);

    if (_value > 0) {
      if (_value > safeSub (MAX_TOKEN_COUNT, tokenCount)) return false;
	  
      accounts [msg.sender] = safeAdd (accounts [msg.sender], _value);
      tokenCount = safeAdd (tokenCount, _value);
	  
	  // adding transfer event and _from address as null address
	  emit Transfer(0x0, msg.sender, _value);
	  
	  return true;
    }
	
	  return false;
    
  }
  

  /**
   * Set new owner for the smart contract.
   * May only be called by smart contract owner.
   *
   * @param _newOwner address of new owner of the smart contract
   */
  function setOwner(address _newOwner) {
    require (msg.sender == owner);

    owner = _newOwner;
  }

  /**
   * Freeze ALL token transfers.
   * May only be called by smart contract owner.
   */
  function freezeTransfers () {
    require (msg.sender == owner);

    if (!frozen) {
      frozen = true;
      emit Freeze ();
    }
  }

  /**
   * Unfreeze ALL token transfers.
   * May only be called by smart contract owner.
   */
  function unfreezeTransfers () {
    require (msg.sender == owner);

    if (frozen) {
      frozen = false;
      emit Unfreeze ();
    }
  }
  
  
  /*A user is able to unintentionally send tokens to a contract 
  * and if the contract is not prepared to refund them they will get stuck in the contract. 
  * The same issue used to happen for Ether too but new Solidity versions added the payable modifier to
  * prevent unintended Ether transfers. However, there’s no such mechanism for token transfers.
  * so the below function is created
  */
  
  function refundTokens(address _token, address _refund, uint256 _value) {
    require (msg.sender == owner);
    require(_token != address(this));
    AbstractToken token = AbstractToken(_token);
    token.transfer(_refund, _value);
    emit RefundTokens(_token, _refund, _value);
  }
  
  /**
   * Freeze specific account
   * May only be called by smart contract owner.
   */
  function freezeAccount(address _target, bool freeze) {
      require (msg.sender == owner);
	  require (msg.sender != _target);
      frozenAccount[_target] = freeze;
      emit FrozenFunds(_target, freeze);
 }

  /**
   * Logged when token transfers were frozen.
   */
  event Freeze ();

  /**
   * Logged when token transfers were unfrozen.
   */
  event Unfreeze ();
  
  /**
   * Logged when a particular account is frozen.
   */
  
  event FrozenFunds(address target, bool frozen);


  
  /**
   * when accidentally send other tokens are refunded
   */
  
  event RefundTokens(address _token, address _refund, uint256 _value);
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"freezeTransfers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"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":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"supply","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":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unfreezeTransfers","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"createTokens","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_token","type":"address"},{"name":"_refund","type":"address"},{"name":"_value","type":"uint256"}],"name":"refundTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_target","type":"address"},{"name":"freeze","type":"bool"}],"name":"freezeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[],"name":"Freeze","type":"event"},{"anonymous":false,"inputs":[],"name":"Unfreeze","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"target","type":"address"},{"indexed":false,"name":"frozen","type":"bool"}],"name":"FrozenFunds","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_token","type":"address"},{"indexed":false,"name":"_refund","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"RefundTokens","type":"event"},{"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 Switch To Opcodes View
608060405260006004556005805460ff1916905534801561001f57600080fd5b5060028054600160a060020a03191633179055610b90806100416000396000f3006080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630150246081146100df57806306fdde03146100f6578063095ea7b31461018057806313af4035146101b857806318160ddd146101d957806323b872dd14610200578063313ce5671461022a57806331c420d41461025557806370a082311461026a5780637e1f2bb81461028b57806389519c50146102a357806395d89b41146102cd578063a9059cbb146102e2578063dd62ed3e14610306578063e724529c1461032d575b600080fd5b3480156100eb57600080fd5b506100f4610353565b005b34801561010257600080fd5b5061010b6103af565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014557818101518382015260200161012d565b50505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018c57600080fd5b506101a4600160a060020a03600435166024356103e6565b604080519115158252519081900360200190f35b3480156101c457600080fd5b506100f4600160a060020a036004351661041a565b3480156101e557600080fd5b506101ee610460565b60408051918252519081900360200190f35b34801561020c57600080fd5b506101a4600160a060020a0360043581169060243516604435610466565b34801561023657600080fd5b5061023f6104b4565b6040805160ff9092168252519081900360200190f35b34801561026157600080fd5b506100f46104b9565b34801561027657600080fd5b506101ee600160a060020a0360043516610510565b34801561029757600080fd5b506101a460043561052f565b3480156102af57600080fd5b506100f4600160a060020a03600435811690602435166044356105f4565b3480156102d957600080fd5b5061010b61070d565b3480156102ee57600080fd5b506101a4600160a060020a0360043516602435610744565b34801561031257600080fd5b506101ee600160a060020a0360043581169060243516610785565b34801561033957600080fd5b506100f4600160a060020a036004351660243515156107b0565b600254600160a060020a0316331461036a57600080fd5b60055460ff1615156103ad576005805460ff191660011790556040517f615acbaede366d76a8b8cb2a9ada6a71495f0786513d71aa97aaf0c3910b78de90600090a15b565b60408051808201909152600e81527f41694d20436f696e20546f6b656e000000000000000000000000000000000000602082015281565b60006103f23384610785565b15806103fc575081155b151561040757600080fd5b6104118383610841565b90505b92915050565b600254600160a060020a0316331461043157600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60045490565b600160a060020a03831660009081526003602052604081205460ff161561048c57600080fd5b60055460ff161561049f575060006104ad565b6104aa8484846108a7565b90505b9392505050565b600281565b600254600160a060020a031633146104d057600080fd5b60055460ff16156103ad576005805460ff191690556040517f2f05ba71d0df11bf5fa562a6569d70c4f80da84284badbe015ce1456063d0ded90600090a1565b600160a060020a0381166000908152602081905260409020545b919050565b600254600090600160a060020a0316331461054957600080fd5b60008211156105ec5761056364174876e800600454610a46565b8211156105725750600061052a565b3360009081526020819052604090205461058c9083610a58565b336000908152602081905260409020556004546105a99083610a58565b60045560408051838152905133916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600161052a565b506000919050565b600254600090600160a060020a0316331461060e57600080fd5b600160a060020a03841630141561062457600080fd5b50604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038481166004830152602482018490529151859283169163a9059cbb9160448083019260209291908290030181600087803b15801561069157600080fd5b505af11580156106a5573d6000803e3d6000fd5b505050506040513d60208110156106bb57600080fd5b505060408051600160a060020a0380871682528516602082015280820184905290517ffab5e7a27e02736e52f60776d307340051d8bc15aee0ef211c7a4aa2a8cdc1549181900360600190a150505050565b60408051808201909152600581527f41694d6374000000000000000000000000000000000000000000000000000000602082015281565b3360009081526003602052604081205460ff161561076157600080fd5b60055460ff161561077457506000610414565b61077e8383610a67565b9050610414565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b600254600160a060020a031633146107c757600080fd5b33600160a060020a03831614156107dd57600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a15050565b336000818152600160209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03831615156108be57600080fd5b600160a060020a03841660009081526001602090815260408083203384529091529020548211156108f1575060006104ad565b600160a060020a038416600090815260208190526040902054821115610919575060006104ad565b60008211801561093b575082600160a060020a031684600160a060020a031614155b156109f157600160a060020a038416600090815260016020908152604080832033845290915290205461096e9083610a46565b600160a060020a03851660008181526001602090815260408083203384528252808320949094559181529081905220546109a89083610a46565b600160a060020a0380861660009081526020819052604080822093909355908516815220546109d79083610a58565b600160a060020a0384166000908152602081905260409020555b82600160a060020a031684600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35060019392505050565b600082821115610a5257fe5b50900390565b6000828201838110156104ad57fe5b6000600160a060020a0383161515610a7e57600080fd5b33600090815260208190526040902054821115610a9d57506000610414565b600082118015610ab6575033600160a060020a03841614155b15610b1b5733600090815260208190526040902054610ad59083610a46565b3360009081526020819052604080822092909255600160a060020a03851681522054610b019083610a58565b600160a060020a0384166000908152602081905260409020555b604080518381529051600160a060020a0385169133917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a3506001929150505600a165627a7a723058203a5639e1177b93c49b11a790cfd67af7201e2ff2286fa11e641f5a62c6d5708a0029

   Swarm Source:
bzzr://3a5639e1177b93c49b11a790cfd67af7201e2ff2286fa11e641f5a62c6d5708a

 

View All
Block Age transaction Difficulty Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.