Sponsored Link:   Color - Revolutionizing the Dapp Ecosystem, Bounty & Airdrop, Get 240,000 COL NOW!
Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 3 txns
Token Contract: BTC20 (BTC20)
Misc
Address Watch: Add To Watch List
Contract Creator: 0xf26c7cd79aa1ed2466e7e81a0e0541709ddd050bat txn 0x5ed67c1a4233a103c69edadfb147af7b986c8e42a8df746b6a81bd753bcde3f2
Token Balances:
 Latest 3 txns

TxHash Age From To Value [TxFee]
0x3f7ab0fb75a1a3e6bf68a3d20eb63cebf1eba62f11ab1f7ae5fa1d66bb5c92aa175 days 2 hrs ago0x58ae31670a7db87a117eef6bbc347b764e1a162e  IN  0xe24dc2c17da55d290b273c84ad0447ba33b8d5260 Ether0.00023564
0xf6756366f681a7edcd4a000d42d9f2fa904f0f4b06fa71449e27f48d0238519b175 days 2 hrs ago0x58ae31670a7db87a117eef6bbc347b764e1a162e  IN  0xe24dc2c17da55d290b273c84ad0447ba33b8d5260 Ether0.000094256
0x31c4ded2d05a22a46f007941578c0b61c47fd4ac706aa51ba928ac9fb29b780d175 days 2 hrs ago0x58ae31670a7db87a117eef6bbc347b764e1a162e  IN  0xe24dc2c17da55d290b273c84ad0447ba33b8d5260 Ether0.000094512
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 1 Internal Transaction

ParentTxHash Block Age From To Value
0x5ed67c1a4233a103c69edadfb147af7b986c8e42a8df746b6a81bd753bcde3f24889748190 days 10 hrs ago0xf26c7cd79aa1ed2466e7e81a0e0541709ddd050b  Contract Creation0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact match)
Contract Name: BTC20Token
Compiler Version: v0.4.19+commit.c4cbbb05
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.11;

/**
 * @title Crowdsale
 * @dev Crowdsale is a base contract for managing a token crowdsale.
 * Crowdsales have a start and end timestamps, where investors can make
 * token purchases and the crowdsale will assign them tokens based
 * on a token per ETH rate. Funds collected are forwarded to a wallet
 * as they arrive.
 */
 
 
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

 function div(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 sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

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

contract Ownable {
  address public owner;


  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);


  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  function Ownable() public {
    owner = msg.sender;
  }


  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }


  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  uint256 public totalSupply;
  function balanceOf(address who) constant public returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}

/**
 * @title Basic token
 * @dev Basic version of StandardToken, with no allowances.
 */
contract BasicToken is ERC20Basic {
  using SafeMath for uint256;

  mapping(address => uint256) tokenBalances;

  /**
  * @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(tokenBalances[msg.sender]>=_value);
    tokenBalances[msg.sender] = tokenBalances[msg.sender].sub(_value);
    tokenBalances[_to] = tokenBalances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

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

}

contract BTC20Token is BasicToken,Ownable {

   using SafeMath for uint256;
   
   //TODO: Change the name and the symbol
   string public constant name = "BTC20";
   string public constant symbol = "BTC20";
   uint256 public constant decimals = 18;

   uint256 public constant INITIAL_SUPPLY = 21000000;
   event Debug(string message, address addr, uint256 number);
  /**
   * @dev Contructor that gives msg.sender all of existing tokens.
   */
    function BTC20Token(address wallet) public {
        owner = msg.sender;
        totalSupply = INITIAL_SUPPLY * 10 ** 18;
        tokenBalances[wallet] = totalSupply;   //Since we divided the token into 10^18 parts
    }

    function mint(address wallet, address buyer, uint256 tokenAmount) public onlyOwner {
      require(tokenBalances[wallet] >= tokenAmount);               // checks if it has enough to sell
      tokenBalances[buyer] = tokenBalances[buyer].add(tokenAmount);                  // adds the amount to buyer's balance
      tokenBalances[wallet] = tokenBalances[wallet].sub(tokenAmount);                        // subtracts amount from seller's balance
      Transfer(wallet, buyer, tokenAmount); 
    }
  function showMyTokenBalance(address addr) public view returns (uint tokenBalance) {
        tokenBalance = tokenBalances[addr];
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"showMyTokenBalance","outputs":[{"name":"tokenBalance","type":"uint256"}],"payable":false,"stateMutability":"view","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"wallet","type":"address"},{"name":"buyer","type":"address"},{"name":"tokenAmount","type":"uint256"}],"name":"mint","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"wallet","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"message","type":"string"},{"indexed":false,"name":"addr","type":"address"},{"indexed":false,"name":"number","type":"uint256"}],"name":"Debug","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b6040516020806106118339810160405280805160028054600160a060020a03338116600160a060020a031992831681179092169091179091556a115eec47f6cf7e3500000060008181559190921681526001602052604090205550506105978061007a6000396000f3006060604052600436106100ae5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100b357806318160ddd1461013d5780632ff2e9dc14610162578063313ce5671461017557806370a08231146101885780638da5cb5b146101a75780638fe476251461018857806395d89b41146100b3578063a9059cbb146101d6578063c6c3bbe61461020c578063f2fde38b14610236575b600080fd5b34156100be57600080fd5b6100c6610255565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101025780820151838201526020016100ea565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b61015061028c565b60405190815260200160405180910390f35b341561016d57600080fd5b610150610292565b341561018057600080fd5b61015061029a565b341561019357600080fd5b610150600160a060020a036004351661029f565b34156101b257600080fd5b6101ba6102ba565b604051600160a060020a03909116815260200160405180910390f35b34156101e157600080fd5b6101f8600160a060020a03600435166024356102c9565b604051901515815260200160405180910390f35b341561021757600080fd5b610234600160a060020a03600435811690602435166044356103ae565b005b341561024157600080fd5b610234600160a060020a03600435166104a8565b60408051908101604052600581527f4254433230000000000000000000000000000000000000000000000000000000602082015281565b60005481565b6301406f4081565b601281565b600160a060020a031660009081526001602052604090205490565b600254600160a060020a031681565b600160a060020a033316600090815260016020526040812054829010156102ef57600080fd5b600160a060020a033316600090815260016020526040902054610318908363ffffffff61054316565b600160a060020a03338116600090815260016020526040808220939093559085168152205461034d908363ffffffff61055516565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b60025433600160a060020a039081169116146103c957600080fd5b600160a060020a038316600090815260016020526040902054819010156103ef57600080fd5b600160a060020a038216600090815260016020526040902054610418908263ffffffff61055516565b600160a060020a03808416600090815260016020526040808220939093559085168152205461044d908263ffffffff61054316565b600160a060020a038085166000818152600160205260409081902093909355908416917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60025433600160a060020a039081169116146104c357600080fd5b600160a060020a03811615156104d857600080fd5b600254600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60008282111561054f57fe5b50900390565b60008282018381101561056457fe5b93925050505600a165627a7a72305820b3e28fd25f40b3512df9c1e7741fdc555294597090d168abf498ab4190b6ecb7002900000000000000000000000058ae31670a7db87a117eef6bbc347b764e1a162e

    Constructor Arguments (ABI-encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000058ae31670a7db87a117eef6bbc347b764e1a162e

-----Decoded View---------------
Found 1 constructor arguments :
Arg [0] : 00000000000000000000000058ae31670a7db87a117eef6bbc347b764e1a162e


   Swarm Source:
bzzr://b3e28fd25f40b3512df9c1e7741fdc555294597090d168abf498ab4190b6ecb7

 

View All
Block Age txn Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "downvote" button for any spammy posts, and the "upvote" for interesting conversations.