Latest 5 txns

TxHash Age From To Value [TxFee]
0x57da0524a8c64eec39960c106932d3b5988ddcd0a6ac85d2f9dc20ad8f1a1576371 days 15 hrs ago0x1bf0ab0648d0a0dcd325b0acbc12b166ec200824  IN   0xbd5bdf8e83d9c64f96f0a4dfab52d1e74bb8a0100 Ether0.000100411
0x65ed56a4629e5c7b5fe63f825553a4b9e7e9ae5a01b9daeef8d102c0f512b3d2371 days 16 hrs ago0x1bf0ab0648d0a0dcd325b0acbc12b166ec200824  IN   0xbd5bdf8e83d9c64f96f0a4dfab52d1e74bb8a0100 Ether0.000130411
0x0bd83d1d7506bc7ed749e3fba348723e1cc2fb92d8bbfeeff9c08c49b3832f06371 days 16 hrs ago0x1bf0ab0648d0a0dcd325b0acbc12b166ec200824  IN   0xbd5bdf8e83d9c64f96f0a4dfab52d1e74bb8a0100 Ether0.00005
0x799b823cec77203aa15e97e78e9b2ff7dba46be8986d400d8cb2c19fd4315fe1371 days 16 hrs ago0x405f8b059fd1c36d3b0cbeda14523e4b57df8518  IN   0xbd5bdf8e83d9c64f96f0a4dfab52d1e74bb8a0100 Ether0.000023674
0x9687a12d8b9077b52372fd82fa6747292ec4a6d5b2ed19f6523f6cc42393cfa0371 days 23 hrs ago0x1bf0ab0648d0a0dcd325b0acbc12b166ec200824  IN    Contract Creation0 Ether0.00512591
[ 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), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: PoliticianToken
Compiler Version: v0.4.18+commit.9cf6e910
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.18; // solhint-disable-line

/// @title Interface for contracts conforming to ERC-721: Non-Fungible Tokens
/// @author Dieter Shirley <[email protected]> (https://github.com/dete)
contract ERC721 {
  // Required methods
  function approve(address _to, uint256 _tokenId) public;
  function balanceOf(address _owner) public view returns (uint256 balance);
  function implementsERC721() public pure returns (bool);
  function ownerOf(uint256 _tokenId) public view returns (address addr);
  function takeOwnership(uint256 _tokenId) public;
  function totalSupply() public view returns (uint256 total);
  function transferFrom(address _from, address _to, uint256 _tokenId) public;
  function transfer(address _to, uint256 _tokenId) public;

  event Transfer(address indexed from, address indexed to, uint256 tokenId);
  event Approval(address indexed owner, address indexed approved, uint256 tokenId);

  // Optional
  // function name() public view returns (string name);
  // function symbol() public view returns (string symbol);
  // function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 tokenId);
  // function tokenMetadata(uint256 _tokenId) public view returns (string infoUrl);
}


contract PoliticianToken is ERC721 {

  /*** EVENTS ***/

  /// @dev The Birth event is fired whenever a new politician comes into existence.
  event Birth(uint256 tokenId, string name, address owner);

  /// @dev The TokenSold event is fired whenever a token is sold.
  event TokenSold(uint256 tokenId, uint256 oldPrice, uint256 newPrice, address prevOwner, address newOwner, string name);

  /// @dev Transfer event as defined in current draft of ERC721.
  ///  ownership is assigned, including births.
  event Transfer(address from, address to, uint256 tokenId);

  /// @dev Emitted when a bug is found int the contract and the contract is upgraded at a new address.
  /// In the event this happens, the current contract is paused indefinitely
  event ContractUpgrade(address newContract);

  /*** CONSTANTS ***/

  /// @notice Name and symbol of the non fungible token, as defined in ERC721.
  string public constant NAME = "CryptoPoliticians"; // solhint-disable-line
  string public constant SYMBOL = "POLITICIAN"; // solhint-disable-line

  uint256 private startingPrice = 0.001 ether;
  uint256 private constant PROMO_CREATION_LIMIT = 5000;
  uint256 private firstStepLimit =  0.05 ether;
  uint256 private secondStepLimit = 0.5 ether;
  uint256 private thirdStepLimit = 2.0 ether;

  /*** STORAGE ***/

  /// @dev A mapping from politician IDs to the address that owns them. All politicians have
  ///  some valid owner address.
  mapping (uint256 => address) public politicianIndexToOwner;

  // @dev A mapping from owner address to count of tokens that address owns.
  //  Used internally inside balanceOf() to resolve ownership count.
  mapping (address => uint256) private ownershipTokenCount;

  /// @dev A mapping from PoliticianIDs to an address that has been approved to call
  ///  transferFrom(). Each Politician can only have one approved address for transfer
  ///  at any time. A zero value means no approval is outstanding.
  mapping (uint256 => address) public politicianIndexToApproved;

  // @dev A mapping from PoliticianIDs to the price of the token.
  mapping (uint256 => uint256) private politicianIndexToPrice;

  /** Popularity index and approval ratings are handled by external contract **/
  /**
  mapping (uint256 => uint16) public politicianIndexToInitialPopularityIndex;

  mapping (uint256 => uint16) public politicianIndexToInitialApprovalRating;
  **/


  // The addresses of the accounts (or contracts) that can execute actions within each roles.
  address public ceoAddress;
  address public cooAddress;

  uint256 public promoCreatedCount;

  /*** DATATYPES ***/
  struct Politician {

    //name of the politician
    string name;

    /** Popularity Index of the politician
    Handled by another contract with a secret formula.
    ***uint32 popularityIndex;***
    **/

    /**
    Approval Rating of the politician
    Handled by another contract with a secret formula.
    Depends on the popularity index, challenges won and real life political
    events corresponding to the politician.
    For example, the approval rating of President Trump might increase if he does go back to Paris Climate Agreement.
    ***uint32 approvalRating;***
    **/

    /** country of the politician
    Stored in a different metadata contract
    ***string country;***
    **/

    /** designation of the politician
    Stored in a different metadata contract
    ***string designation;***
    **/
  }

  Politician[] private politicians;

  /*** ACCESS MODIFIERS ***/
  /// @dev Access modifier for CEO-only functionality
  modifier onlyCEO() {
    require(msg.sender == ceoAddress);
    _;
  }

  /// @dev Access modifier for COO-only functionality
  modifier onlyCOO() {
    require(msg.sender == cooAddress);
    _;
  }

  /// Access modifier for contract owner only functionality
  modifier onlyCLevel() {
    require(
      msg.sender == ceoAddress ||
      msg.sender == cooAddress
    );
    _;
  }

  /*** CONSTRUCTOR ***/
  function PoliticianToken() public {
    ceoAddress = msg.sender;
    cooAddress = msg.sender;
  }

  /*** PUBLIC FUNCTIONS ***/
  /// @notice Grant another address the right to transfer token via takeOwnership() and transferFrom().
  /// @param _to The address to be granted transfer approval. Pass address(0) to
  ///  clear all approvals.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function approve(
    address _to,
    uint256 _tokenId
  ) public {
    // Caller must own token.
    require(_owns(msg.sender, _tokenId));

    politicianIndexToApproved[_tokenId] = _to;

    Approval(msg.sender, _to, _tokenId);
  }

  /// For querying balance of a particular account
  /// @param _owner The address for balance query
  /// @dev Required for ERC-721 compliance.
  function balanceOf(address _owner) public view returns (uint256 balance) {
    return ownershipTokenCount[_owner];
  }

  /// @dev Creates a new promo Politician with the given name and _price and assignes it to an address.
  function createPromoPolitician(address _owner, string _name, uint256 _price) public onlyCOO {
    require(promoCreatedCount < PROMO_CREATION_LIMIT);

    address politicianOwner = _owner;

    if (politicianOwner == address(0)) {
      politicianOwner = cooAddress;
    }

    if (_price <= 0) {
      _price = startingPrice;
    }

    promoCreatedCount++;
    _createPolitician(_name, politicianOwner, _price);
  }

  /// @dev Creates a new Politician with the given name
  function createContractPolitician(string _name) public onlyCOO {
    _createPolitician(_name, address(this), startingPrice);
  }

  /// @notice Returns all the relevant information about a specific politician.
  /// @param _tokenId The tokenId of the politician of interest.
  function getPolitician(uint256 _tokenId) public view returns (
    string politicianName,
    uint256 sellingPrice,
    address owner
  ) {
    Politician storage politician = politicians[_tokenId];
    politicianName = politician.name;
    sellingPrice = politicianIndexToPrice[_tokenId];
    owner = politicianIndexToOwner[_tokenId];
  }

  function implementsERC721() public pure returns (bool) {
    return true;
  }

  /// @dev Required for ERC-721 compliance.
  function name() public pure returns (string) {
    return NAME;
  }

  /// For querying owner of token
  /// @param _tokenId The tokenID for owner inquiry
  /// @dev Required for ERC-721 compliance.
  function ownerOf(uint256 _tokenId)
    public
    view
    returns (address owner)
  {
    owner = politicianIndexToOwner[_tokenId];
    require(owner != address(0));
  }

  function payout(address _to) public onlyCLevel {
    _payout(_to);
  }

  function withdrawFunds(address _to, uint256 amount) public onlyCLevel {
    _withdrawFunds(_to, amount);
  }

  // Allows someone to send ether and obtain the token
  function purchase(uint256 _tokenId) public payable {
    address oldOwner = politicianIndexToOwner[_tokenId];
    address newOwner = msg.sender;

    uint256 sellingPrice = politicianIndexToPrice[_tokenId];

    // Making sure token owner is not sending to self
    require(oldOwner != newOwner);

    // Safety check to prevent against an unexpected 0x0 default.
    require(_addressNotNull(newOwner));

    // Making sure sent amount is greater than or equal to the sellingPrice
    require(msg.value >= sellingPrice);

    uint256 payment = uint256(SafeMath.div(SafeMath.mul(sellingPrice, 94), 100));
    uint256 purchaseExcess = SafeMath.sub(msg.value, sellingPrice);

    // Update prices
    if (sellingPrice < firstStepLimit) {
      // first stage
      politicianIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 200), 94);
    } else if (sellingPrice < secondStepLimit) {
      // second stage
      politicianIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 150), 94);
    } else if (sellingPrice < thirdStepLimit) {
      // second stage
      politicianIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 125), 94);
    } else {
      // third stage
      politicianIndexToPrice[_tokenId] = SafeMath.div(SafeMath.mul(sellingPrice, 115), 94);
    }

    _transfer(oldOwner, newOwner, _tokenId);

    // Pay previous tokenOwner if owner is not contract
    if (oldOwner != address(this)) {
      oldOwner.transfer(payment); //(1-0.06)
    }

    TokenSold(_tokenId, sellingPrice, politicianIndexToPrice[_tokenId], oldOwner, newOwner,
      politicians[_tokenId].name);

    msg.sender.transfer(purchaseExcess);
  }

  function priceOf(uint256 _tokenId) public view returns (uint256 price) {
    return politicianIndexToPrice[_tokenId];
  }

  /// @dev Assigns a new address to act as the CEO. Only available to the current CEO.
  /// @param _newCEO The address of the new CEO
  function setCEO(address _newCEO) public onlyCEO {
    require(_newCEO != address(0));

    ceoAddress = _newCEO;
  }

  /// @dev Assigns a new address to act as the COO. Only available to the current COO.
  /// @param _newCOO The address of the new COO
  function setCOO(address _newCOO) public onlyCOO {
    require(_newCOO != address(0));

    cooAddress = _newCOO;
  }

  /// @dev Required for ERC-721 compliance.
  function symbol() public pure returns (string) {
    return SYMBOL;
  }

  /// @notice Allow pre-approved user to take ownership of a token
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function takeOwnership(uint256 _tokenId) public {
    address newOwner = msg.sender;
    address oldOwner = politicianIndexToOwner[_tokenId];

    // Safety check to prevent against an unexpected 0x0 default.
    require(_addressNotNull(newOwner));

    // Making sure transfer is approved
    require(_approved(newOwner, _tokenId));

    _transfer(oldOwner, newOwner, _tokenId);
  }

  /// @param _owner The owner whose politician tokens we are interested in.
  /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly
  ///  expensive (it walks the entire Politicians array looking for politicians belonging to owner),
  ///  but it also returns a dynamic array, which is only supported for web3 calls, and
  ///  not contract-to-contract calls.
  function tokensOfOwner(address _owner) public view returns(uint256[] ownerTokens) {
    uint256 tokenCount = balanceOf(_owner);
    if (tokenCount == 0) {
        // Return an empty array
      return new uint256[](0);
    } else {
      uint256[] memory result = new uint256[](tokenCount);
      uint256 totalPoliticians = totalSupply();
      uint256 resultIndex = 0;

      uint256 politicianId;
      for (politicianId = 0; politicianId <= totalPoliticians; politicianId++) {
        if (politicianIndexToOwner[politicianId] == _owner) {
          result[resultIndex] = politicianId;
          resultIndex++;
        }
      }
      return result;
    }
  }

  /// For querying totalSupply of token
  /// @dev Required for ERC-721 compliance.
  function totalSupply() public view returns (uint256 total) {
    return politicians.length;
  }

  /// Owner initates the transfer of the token to another account
  /// @param _to The address for the token to be transferred to.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function transfer(
    address _to,
    uint256 _tokenId
  ) public {
    require(_owns(msg.sender, _tokenId));
    require(_addressNotNull(_to));

    _transfer(msg.sender, _to, _tokenId);
  }

  /// Third-party initiates transfer of token from address _from to address _to
  /// @param _from The address for the token to be transferred from.
  /// @param _to The address for the token to be transferred to.
  /// @param _tokenId The ID of the Token that can be transferred if this call succeeds.
  /// @dev Required for ERC-721 compliance.
  function transferFrom(
    address _from,
    address _to,
    uint256 _tokenId
  ) public {
    require(_owns(_from, _tokenId));
    require(_approved(_to, _tokenId));
    require(_addressNotNull(_to));

    _transfer(_from, _to, _tokenId);
  }

  /*** PRIVATE FUNCTIONS ***/
  /// Safety check on _to address to prevent against an unexpected 0x0 default.
  function _addressNotNull(address _to) private pure returns (bool) {
    return _to != address(0);
  }

  /// For checking approval of transfer for address _to
  function _approved(address _to, uint256 _tokenId) private view returns (bool) {
    return politicianIndexToApproved[_tokenId] == _to;
  }

  /// For creating Politician
  function _createPolitician(string _name, address _owner, uint256 _price) private {
    Politician memory _politician = Politician({
      name: _name
    });
    uint256 newPoliticianId = politicians.push(_politician) - 1;

    // It's probably never going to happen, 4 billion tokens are A LOT, but
    // let's just be 100% sure we never let this happen.
    require(newPoliticianId == uint256(uint32(newPoliticianId)));

    Birth(newPoliticianId, _name, _owner);

    politicianIndexToPrice[newPoliticianId] = _price;

    // This will assign ownership, and also emit the Transfer event as
    // per ERC721 draft
    _transfer(address(0), _owner, newPoliticianId);
  }

  /// Check for token ownership
  function _owns(address claimant, uint256 _tokenId) private view returns (bool) {
    return claimant == politicianIndexToOwner[_tokenId];
  }

  /// For paying out balance on contract
  function _payout(address _to) private {
    if (_to == address(0)) {
      ceoAddress.transfer(this.balance);
    } else {
      _to.transfer(this.balance);
    }
  }

  function _withdrawFunds(address _to, uint256 amount) private {
    require(this.balance >= amount);
    if (_to == address(0)) {
      ceoAddress.transfer(amount);
    } else {
      _to.transfer(amount);
    }
  }

  /// @dev Assigns ownership of a specific Politician to an address.
  function _transfer(address _from, address _to, uint256 _tokenId) private {
    // Since the number of politicians is capped to 2^32 we can't overflow this
    ownershipTokenCount[_to]++;
    //transfer ownership
    politicianIndexToOwner[_tokenId] = _to;

    // When creating new polticians _from is 0x0, but we can't account that address.
    if (_from != address(0)) {
      ownershipTokenCount[_from]--;
      // clear any previously approved ownership exchange
      delete politicianIndexToApproved[_tokenId];
    }

    // Emit the transfer event.
    Transfer(_from, _to, _tokenId);
  }

}

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  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;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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;
  }

  /**
  * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

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

    Contract ABI  
[{"constant":true,"inputs":[],"name":"promoCreatedCount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ceoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"payout","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"politicianIndexToApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementsERC721","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"total","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCEO","type":"address"}],"name":"setCEO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newCOO","type":"address"}],"name":"setCOO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"name":"owner","type":"address"}],"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":"_tokenId","type":"uint256"}],"name":"getPolitician","outputs":[{"name":"politicianName","type":"string"},{"name":"sellingPrice","type":"uint256"},{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"name":"ownerTokens","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_owner","type":"address"},{"name":"_name","type":"string"},{"name":"_price","type":"uint256"}],"name":"createPromoPolitician","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":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"cooAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"takeOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"politicianIndexToOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"priceOf","outputs":[{"name":"price","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"amount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_name","type":"string"}],"name":"createContractPolitician","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"purchase","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"SYMBOL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"name","type":"string"},{"indexed":false,"name":"owner","type":"address"}],"name":"Birth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"tokenId","type":"uint256"},{"indexed":false,"name":"oldPrice","type":"uint256"},{"indexed":false,"name":"newPrice","type":"uint256"},{"indexed":false,"name":"prevOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"},{"indexed":false,"name":"name","type":"string"}],"name":"TokenSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"from","type":"address"},{"indexed":false,"name":"to","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newContract","type":"address"}],"name":"ContractUpgrade","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"approved","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"}]

  Contract Creation Code Switch To Opcodes View
606060405266038d7ea4c6800060005566b1a2bc2ec500006001556706f05b59d3b20000600255671bc16d674ec80000600355341561003d57600080fd5b33600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506122f6806100ce6000396000f30060606040526004361061015f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305e455461461016457806306fdde031461018d578063095ea7b31461021b5780630a0f81681461025d5780630b7e9c44146102b25780630dc6d81e146102eb5780631051db341461034e57806318160ddd1461037b57806323b872dd146103a457806327d7874c146104055780632ba73c151461043e5780636352211e1461047757806370a08231146104da5780637d8d5c9b146105275780638462151c146105fd57806395d89b411461068b5780639f1dec6b14610719578063a3f4df7e1461079e578063a9059cbb1461082c578063b047fb501461086e578063b2e6ceeb146108c3578063b2faec38146108e6578063b9186d7d14610949578063c107532914610980578063c7468ebc146109c2578063efef39a114610a1f578063f76f8d7814610a37575b600080fd5b341561016f57600080fd5b610177610ac5565b6040518082815260200191505060405180910390f35b341561019857600080fd5b6101a0610acb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e05780820151818401526020810190506101c5565b50505050905090810190601f16801561020d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561022657600080fd5b61025b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b0e565b005b341561026857600080fd5b610270610bde565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102bd57600080fd5b6102e9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c04565b005b34156102f657600080fd5b61030c6004808035906020019091905050610cc4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561035957600080fd5b610361610cf7565b604051808215151515815260200191505060405180910390f35b341561038657600080fd5b61038e610d00565b6040518082815260200191505060405180910390f35b34156103af57600080fd5b610403600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d0d565b005b341561041057600080fd5b61043c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d5b565b005b341561044957600080fd5b610475600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e37565b005b341561048257600080fd5b6104986004808035906020019091905050610f13565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104e557600080fd5b610511600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610f8c565b6040518082815260200191505060405180910390f35b341561053257600080fd5b6105486004808035906020019091905050610fd5565b60405180806020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825285818151815260200191508051906020019080838360005b838110156105c05780820151818401526020810190506105a5565b50505050905090810190601f1680156105ed5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b341561060857600080fd5b610634600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506110f1565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561067757808201518184015260208101905061065c565b505050509050019250505060405180910390f35b341561069657600080fd5b61069e611228565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106de5780820151818401526020810190506106c3565b50505050905090810190601f16801561070b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561072457600080fd5b61079c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190505061126b565b005b34156107a957600080fd5b6107b161136c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107f15780820151818401526020810190506107d6565b50505050905090810190601f16801561081e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561083757600080fd5b61086c600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506113a5565b005b341561087957600080fd5b6108816113dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108ce57600080fd5b6108e46004808035906020019091905050611403565b005b34156108f157600080fd5b6109076004808035906020019091905050611478565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561095457600080fd5b61096a60048080359060200190919050506114ab565b6040518082815260200191505060405180910390f35b341561098b57600080fd5b6109c0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114c8565b005b34156109cd57600080fd5b610a1d600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061158a565b005b610a3560048080359060200190919050506115f6565b005b3415610a4257600080fd5b610a4a6119de565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a8a578082015181840152602081019050610a6f565b50505050905090810190601f168015610ab75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b600a5481565b610ad361212c565b6040805190810160405280601181526020017f43727970746f506f6c6974696369616e73000000000000000000000000000000815250905090565b610b183382611a17565b1515610b2357600080fd5b816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610cad5750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610cb857600080fd5b610cc181611a83565b50565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006001905090565b6000600b80549050905090565b610d178382611a17565b1515610d2257600080fd5b610d2c8282611b91565b1515610d3757600080fd5b610d4082611bfd565b1515610d4b57600080fd5b610d56838383611c36565b505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610db757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610df357600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e9357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610ecf57600080fd5b80600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610f8757600080fd5b919050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610fdd61212c565b6000806000600b85815481101515610ff157fe5b90600052602060002090019050806000018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110965780601f1061106b57610100808354040283529160200191611096565b820191906000526020600020905b81548152906001019060200180831161107957829003601f168201915b50505050509350600760008681526020019081526020016000205492506004600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150509193909250565b6110f9612140565b6000611103612140565b600080600061111187610f8c565b9450600085141561114357600060405180591061112b5750595b9080825280602002602001820160405250955061121e565b846040518059106111515750595b9080825280602002602001820160405250935061116c610d00565b925060009150600090505b828111151561121a578673ffffffffffffffffffffffffffffffffffffffff166004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561120d578084838151811015156111f657fe5b906020019060200201818152505081806001019250505b8080600101915050611177565b8395505b5050505050919050565b61123061212c565b6040805190810160405280600a81526020017f504f4c4954494349414e00000000000000000000000000000000000000000000815250905090565b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112c957600080fd5b611388600a541015156112db57600080fd5b839050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561133957600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b6000821115156113495760005491505b600a60008154809291906001019190505550611366838284611e38565b50505050565b6040805190810160405280601181526020017f43727970746f506f6c6974696369616e7300000000000000000000000000000081525081565b6113af3382611a17565b15156113ba57600080fd5b6113c382611bfd565b15156113ce57600080fd5b6113d9338383611c36565b5050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000803391506004600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905061144882611bfd565b151561145357600080fd5b61145d8284611b91565b151561146857600080fd5b611473818385611c36565b505050565b60046020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060076000838152602001908152602001600020549050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806115715750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561157c57600080fd5b6115868282611fb6565b5050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156115e657600080fd5b6115f38130600054611e38565b50565b60008060008060006004600087815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169450339350600760008781526020019081526020016000205492508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415151561168857600080fd5b61169184611bfd565b151561169c57600080fd5b8234101515156116ab57600080fd5b6116c06116b984605e6120bd565b60646120f8565b91506116cc3484612113565b9050600154831015611709576116ed6116e68460c86120bd565b605e6120f8565b60076000888152602001908152602001600020819055506117ae565b600254831015611744576117286117218460966120bd565b605e6120f8565b60076000888152602001908152602001600020819055506117ad565b60035483101561177f5761176361175c84607d6120bd565b605e6120f8565b60076000888152602001908152602001600020819055506117ac565b61179461178d8460736120bd565b605e6120f8565b60076000888152602001908152602001600020819055505b5b5b6117b9858588611c36565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151561182f578473ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561182e57600080fd5b5b7e8201e7bcbf010c2c07de59d6e97cb7e3cf67a46125c49cbc89b9d2cde1f48f8684600760008a8152602001908152602001600020548888600b8c81548110151561187657fe5b9060005260206000209001600001604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156119835780601f1061195857610100808354040283529160200191611983565b820191906000526020600020905b81548152906001019060200180831161196657829003601f168201915b505097505050505050505060405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156119d657600080fd5b505050505050565b6040805190810160405280600a81526020017f504f4c4954494349414e0000000000000000000000000000000000000000000081525081565b60006004600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b3657600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515611b3157600080fd5b611b8e565b8073ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f193505050501515611b8d57600080fd5b5b50565b60008273ffffffffffffffffffffffffffffffffffffffff166006600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614159050919050565b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550816004600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515611d9457600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001900391905055506006600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef838383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050565b611e40612154565b60006020604051908101604052808681525091506001600b8054806001018281611e6a919061216e565b916000526020600020900160008590919091506000820151816000019080519060200190611e9992919061219a565b5050500390508063ffffffff1681141515611eb357600080fd5b7fb3b0cf861f168bcdb275c69da97b2543631552ba562628aa3c7317d4a6089ef281868660405180848152602001806020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828103825284818151815260200191508051906020019080838360005b83811015611f4f578082015181840152602081019050611f34565b50505050905090810190601f168015611f7c5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1826007600083815260200190815260200160002081905550611faf60008583611c36565b5050505050565b803073ffffffffffffffffffffffffffffffffffffffff163110151515611fdc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561207857600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050151561207357600080fd5b6120b9565b8173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156120b857600080fd5b5b5050565b60008060008414156120d257600091506120f1565b82840290508284828115156120e357fe5b041415156120ed57fe5b8091505b5092915050565b600080828481151561210657fe5b0490508091505092915050565b600082821115151561212157fe5b818303905092915050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b60206040519081016040528061216861221a565b81525090565b81548183558181151161219557818360005260206000209182019101612194919061222e565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106121db57805160ff1916838001178555612209565b82800160010185558215612209579182015b828111156122085782518255916020019190600101906121ed565b5b509050612216919061225d565b5090565b602060405190810160405280600081525090565b61225a91905b80821115612256576000808201600061224d9190612282565b50600101612234565b5090565b90565b61227f91905b8082111561227b576000816000905550600101612263565b5090565b90565b50805460018160011615610100020316600290046000825580601f106122a857506122c7565b601f0160209004906000526020600020908101906122c6919061225d565b5b505600a165627a7a72305820d37ec330ad0e4721d622a2f6b26787bc1c55552f434ef9cfdb74c2ff8007e8880029

   Swarm Source:
bzzr://d37ec330ad0e4721d622a2f6b26787bc1c55552f434ef9cfdb74c2ff8007e888

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward