Contract 0xcf7a7ca6dad71bffba6693fcb994e99012f63bed

 

TxHash Block Age From To Value [TxFee]
0xceeac3376baf08614880b719a3ee37e2ef7ad065fd13cc01fe4a6264e44b9a7a5731584291 days 12 hrs ago0x92568fa5c2bf4fe158df0b772837ee04055d4d08 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000855972
0x146a69fa7bc286b106a39e2544624eb9d47b40620bc9f3759ca8bedee6c0ca935636982308 days 7 hrs ago0x92568fa5c2bf4fe158df0b772837ee04055d4d08 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000719824
0xcec577252277d42a11ef338e2d10f718881bbd91105334f1fb12a1ffe49a94995060575406 days 9 hrs ago0x4238498bea0c72e56c617ed8d61e723d1f568214 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.0005322
0xd53328ab64c0efc041cf8c2bd45679a8b04fd0f17b3be642f7f93ddfcf4319da5018773413 days 9 hrs ago0x00638f8e490148b241514cce07d4401fea52d319 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.0009136
0xb6a60cc5dedf64512355beddd465606f853d1ebec5d995f862535bca7ea3a3444790072453 days 9 hrs ago0x4238498bea0c72e56c617ed8d61e723d1f568214 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.0009123
0x4a3d1ddc33cac6e09859aaa031dfe42e91b99a30612945ab2d13b57dccce06734161433584 days 12 hrs ago0x4238498bea0c72e56c617ed8d61e723d1f568214 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.00105
0x541c560125757fa62039c37463711c625b7781097a86af8727925f49343609a04160324584 days 19 hrs ago0x00638f8e490148b241514cce07d4401fea52d319 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000764736
0x0500793dbb2325275c5d30b1d077e6f678e814a9869a526a620797ac7035493c4160276584 days 19 hrs ago0x00638f8e490148b241514cce07d4401fea52d319 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.001078392
0x9ba0cd7c2aee9dcbce2be9f947ab836b34b4623203073fcd7d8fdc6aa5933fc54160198584 days 20 hrs ago0x00638f8e490148b241514cce07d4401fea52d319 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000762048
0xe4a37688ae4f8bc23fd271013bed16f74100ad99195a133d0e898f3fd4cd11084160183584 days 20 hrs ago0x4238498bea0c72e56c617ed8d61e723d1f568214 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000760704
0x599581fedd04ae91b03a79562742aa4c9aabbbf08205df90a033bf93baac70dc4160179584 days 20 hrs ago0x4238498bea0c72e56c617ed8d61e723d1f568214 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.000760704
0x326406ac28c1c224058a174fa2cb83059cd6bab6b556905bd7f5e3a8200fcb274159209585 days 2 hrs ago0x00638f8e490148b241514cce07d4401fea52d319 IN  0xcf7a7ca6dad71bffba6693fcb994e99012f63bed0 Ether0.001077048
[ Download CSV Export 

Latest 1 internal transaction Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
0xf03802def7fdcf681e3092989d0202d9d94638d26a8914a72fb48d7060eabdf34159154585 days 2 hrs ago0x9b8eb09a59a180e7798fbe7e099c8c351ac56af0  Contract Creation0 Ether
[ Download CSV Export 

Contract Source Code Verified (Similar Match)
Note: This contract matches the deployed ByteCode of the Verified Source Code for Contract 0xde8faf11e8cabcfeea67270cdec67489383f38ee

Contract Name:
BasicCoin

Compiler Version
v0.4.2+commit.af6afb04

Optimization Enabled:
Yes

Runs (Optimizer):
200

Contract Source Code

//! BasicCoin ECR20-compliant token contract
//! By Parity Team (Ethcore), 2016.
//! Released under the Apache Licence 2.

pragma solidity ^0.4.1;

// ECR20 standard token interface
contract Token {
  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);

  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);
}

// Owner-specific contract interface
contract Owned {
  event NewOwner(address indexed old, address indexed current);

  modifier only_owner {
    if (msg.sender != owner) throw;
    _;
  }

  address public owner = msg.sender;

  function setOwner(address _new) only_owner {
    NewOwner(owner, _new);
    owner = _new;
  }
}

// TokenReg interface
contract TokenReg {
  function register(address _addr, string _tla, uint _base, string _name) payable returns (bool);
  function registerAs(address _addr, string _tla, uint _base, string _name, address _owner) payable returns (bool);
  function unregister(uint _id);
  function setFee(uint _fee);
  function tokenCount() constant returns (uint);
  function token(uint _id) constant returns (address addr, string tla, uint base, string name, address owner);
  function fromAddress(address _addr) constant returns (uint id, string tla, uint base, string name, address owner);
  function fromTLA(string _tla) constant returns (uint id, address addr, uint base, string name, address owner);
  function meta(uint _id, bytes32 _key) constant returns (bytes32);
  function setMeta(uint _id, bytes32 _key, bytes32 _value);
  function transferTLA(string _tla, address _to) returns (bool success);
  function drain();
  uint public fee;
}

// BasicCoin, ECR20 tokens that all belong to the owner for sending around
contract BasicCoin is Owned, Token {
  // this is as basic as can be, only the associated balance & allowances
  struct Account {
    uint balance;
    mapping (address => uint) allowanceOf;
  }

  // the balance should be available
  modifier when_owns(address _owner, uint _amount) {
    if (accounts[_owner].balance < _amount) throw;
    _;
  }

  // an allowance should be available
  modifier when_has_allowance(address _owner, address _spender, uint _amount) {
    if (accounts[_owner].allowanceOf[_spender] < _amount) throw;
    _;
  }

  // no ETH should be sent with the transaction
  modifier when_no_eth {
    if (msg.value > 0) throw;
    _;
  }

  // a value should be > 0
  modifier when_non_zero(uint _value) {
    if (_value == 0) throw;
    _;
  }

  // the base, tokens denoted in micros
  uint constant public base = 1000000;

  // available token supply
  uint public totalSupply;

  // storage and mapping of all balances & allowances
  mapping (address => Account) accounts;

  // constructor sets the parameters of execution, _totalSupply is all units
  function BasicCoin(uint _totalSupply, address _owner) when_no_eth when_non_zero(_totalSupply) {
    totalSupply = _totalSupply;
    owner = _owner;
    accounts[_owner].balance = totalSupply;
  }

  // balance of a specific address
  function balanceOf(address _who) constant returns (uint256) {
    return accounts[_who].balance;
  }

  // transfer
  function transfer(address _to, uint256 _value) when_no_eth when_owns(msg.sender, _value) returns (bool) {
    Transfer(msg.sender, _to, _value);
    accounts[msg.sender].balance -= _value;
    accounts[_to].balance += _value;

    return true;
  }

  // transfer via allowance
  function transferFrom(address _from, address _to, uint256 _value) when_no_eth when_owns(_from, _value) when_has_allowance(_from, msg.sender, _value) returns (bool) {
    Transfer(_from, _to, _value);
    accounts[_from].allowanceOf[msg.sender] -= _value;
    accounts[_from].balance -= _value;
    accounts[_to].balance += _value;

    return true;
  }

  // approve allowances
  function approve(address _spender, uint256 _value) when_no_eth returns (bool) {
    Approval(msg.sender, _spender, _value);
    accounts[msg.sender].allowanceOf[_spender] += _value;

    return true;
  }

  // available allowance
  function allowance(address _owner, address _spender) constant returns (uint256) {
    return accounts[_owner].allowanceOf[_spender];
  }

  // no default function, simple contract only, entry-level users
  function() {
    throw;
  }
}

// Manages BasicCoin instances, including the deployment & registration
contract BasicCoinManager is Owned {
  // a structure wrapping a deployed BasicCoin
  struct Coin {
    address coin;
    address owner;
    address tokenreg;
  }

  // a new BasicCoin has been deployed
  event Created(address indexed owner, address indexed tokenreg, address indexed coin);

  // a list of all the deployed BasicCoins
  Coin[] coins;

  // all BasicCoins for a specific owner
  mapping (address => uint[]) ownedCoins;

  // the base, tokens denoted in micros (matches up with BasicCoin interface above)
  uint constant public base = 1000000;

  // return the number of deployed
  function count() constant returns (uint) {
    return coins.length;
  }

  // get a specific deployment
  function get(uint _index) constant returns (address coin, address owner, address tokenreg) {
    Coin c = coins[_index];

    coin = c.coin;
    owner = c.owner;
    tokenreg = c.tokenreg;
  }

  // returns the number of coins for a specific owner
  function countByOwner(address _owner) constant returns (uint) {
    return ownedCoins[_owner].length;
  }

  // returns a specific index by owner
  function getByOwner(address _owner, uint _index) constant returns (address coin, address owner, address tokenreg) {
    return get(ownedCoins[_owner][_index]);
  }

  // deploy a new BasicCoin on the blockchain
  function deploy(uint _totalSupply, string _tla, string _name, address _tokenreg) payable returns (bool) {
    TokenReg tokenreg = TokenReg(_tokenreg);
    BasicCoin coin = new BasicCoin(_totalSupply, msg.sender);

    uint ownerCount = countByOwner(msg.sender);
    uint fee = tokenreg.fee();

    ownedCoins[msg.sender].length = ownerCount + 1;
    ownedCoins[msg.sender][ownerCount] = coins.length;
    coins.push(Coin(coin, msg.sender, tokenreg));
    tokenreg.registerAs.value(fee)(coin, _tla, base, _name, msg.sender);

    Created(msg.sender, tokenreg, coin);

    return true;
  }

  // owner can withdraw all collected funds
  function drain() only_owner {
    if (!msg.sender.send(this.balance)) {
      throw;
    }
  }
}

Contract ABI

[{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"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,"type":"function"},{"constant":true,"inputs":[],"name":"base","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_who","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"_totalSupply","type":"uint256"},{"name":"_owner","type":"address"}],"type":"constructor"},{"payable":false,"type":"fallback"},{"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"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}]

Contract Creation Code

6060604081815260008054600160a060020a0319163317905580610523833960a09052516080516000341115609d576002565b8260016000508190555081600060006101000a815481600160a060020a03021916908302179055506001600050546002600050600084600160a060020a0316815260200190815260200160002060005060000160005081905550505050610479806100aa6000396000f35b818060001415603257600256606060405236156100775760e060020a6000350463095ea7b3811461008457806313af4035146100a257806318160ddd146100c957806323b872dd146100d75780635001f3b5146100f857806370a08231146101075780638da5cb5b1461013a578063a9059cbb14610151578063dd62ed3e1461016f575b34610002576101ae610002565b34610002576101b0600435602435600060003411156101e157610002565b34610002576101ae600435600054600160a060020a03908116339091161461026457610002565b346100025761012860015481565b34610002576101b0600435602435604435600060003411156102bf57610002565b3461000257610128620f424081565b3461000257600160a060020a03600435166000908152600260205260409020545b60408051918252519081900360200190f35b34610002576101c4600054600160a060020a031681565b34610002576101b0600435602435600060003411156103cb57610002565b3461000257610128600435602435600160a060020a03828116600090815260026020908152604080832093851683526001909301905220545b92915050565b005b604080519115158252519081900360200190f35b60408051600160a060020a03929092168252519081900360200190f35b82600160a060020a031633600160a060020a03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a35033600160a060020a0390811660009081526002602090815260408083209386168352600193840190915290208054830190556101a8565b60008054604051600160a060020a03848116939216917f70aea8d848e8a90fb7661b227dc522eb6395c3dac71b63cb59edd5c9899b236491a36000805473ffffffffffffffffffffffffffffffffffffffff19168217905550565b600160a060020a03841660009081526002602052604090205484908390819010156102e957610002565b600160a060020a03868116600090815260026020908152604080832033948516845260010190915290205487919086908190101561032657610002565b87600160a060020a031689600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef896040518082815260200191505060405180910390a3600160a060020a03898116600090815260026020818152604080842033861685526001818101845282862080548f900390559390925281548c9003909155928b168252919020805489019055955050505050509392505050565b33600160a060020a0381166000908152600260205260409020548390819010156103f457610002565b84600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a333600160a060020a039081166000908152600260205260408082208054889003905591871681522080548501905560019250505092915050560000000000000000000000000000000000000000000000000000b5e620f4800000000000000000000000000000438a827b29e346879dc81404e296182d9b2b20

Block Age Transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.