Contract Overview
Balance: 0 Ether
Transactions: 11 txns
 Latest 11 txns

TxHash Age From To Value [TxFee]
0x6717c080a8a944d0186c940941cda0355e60a9a5638f5ab81dc3fb37130e3da37 days 12 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.000352304
0xd75a0bc24e3e27ed112d274a072fbc237438c66b5e42a3cb6496dfe5ff286fcc7 days 12 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.00044038
0xb9efdc40817700214b5d98fdcccf888498d527c311a8ad4c57edbf93c86e896e7 days 13 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.0005565448
0x8fa2078139457489d4ac3b157078c92571ccbe8136193c7bd9ef3a2ef36d149a7 days 14 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.0004668028
0xaab406757f39ca1026b654bca06e9fe56b13e2a252db1d1f5f426cdc6b6f234b7 days 14 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.0003390926
0x2650d28cfa2b845d5ef85f0d54be01c6bebacfd83b198f6ad19e02c523ea48397 days 14 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.0002334014
0x27bb50eebb55b33ab325d33cb0866c768650cd27bf41bbde17191b7ce1d94f9b7 days 15 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.00022019
0x4e0eb40982655a9c2ea79965b414bcee73beadc97a1fd9c168be0af7ff5d59ef7 days 16 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.00022019
0x2ad92281cffe2f1207006d185afbf16a8df39f99ece312a1d0637c8c7d29257c7 days 16 hrs ago0xf2cc472523800d36fe5b8a1ec1ec73273a174bd3  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.00022019
0xe500fb2695fd31d5782e1f5492800a8dbd70c32700268214dab57c9a7c13ee7a11 days 5 hrs ago0xb7cf24accd758df9c92797f4835ab0a10e568098  IN   0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether0.000073416
0x81bc54ec323411e10fc37202827b7788ec7ea3df8854c8d1a33191d1958bff1611 days 5 hrs ago0xb7cf24accd758df9c92797f4835ab0a10e568098  IN    Contract Creation0 Ether0.002880193
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 25 Internal Txns, Click here To View More View All
ParentTxHash Block Age From To Value
0x0cbf59e08b85248223807f120ded4c6603f3385c6d36c571562321353e4b315a103953993 days 14 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x0cbf59e08b85248223807f120ded4c6603f3385c6d36c571562321353e4b315a103953993 days 14 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x0cbf59e08b85248223807f120ded4c6603f3385c6d36c571562321353e4b315a103953993 days 14 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0x3cc3d15bf5bd2e9bb0dc3f9cff51aeeb7412399e0751f4cc4a9dcee6c10be817103953273 days 15 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x3cc3d15bf5bd2e9bb0dc3f9cff51aeeb7412399e0751f4cc4a9dcee6c10be817103953273 days 15 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x3cc3d15bf5bd2e9bb0dc3f9cff51aeeb7412399e0751f4cc4a9dcee6c10be817103953273 days 15 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0x9ca942abb6d50a2abec91556620824ac616480a9bfbb9af4523311b021fd9822103952383 days 15 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x9ca942abb6d50a2abec91556620824ac616480a9bfbb9af4523311b021fd9822103952383 days 15 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x9ca942abb6d50a2abec91556620824ac616480a9bfbb9af4523311b021fd9822103952383 days 15 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0xcc9e88a3b48451f3fade08816c78d2a38c35fe39d1bef5966d1251936027246e103948343 days 16 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xcc9e88a3b48451f3fade08816c78d2a38c35fe39d1bef5966d1251936027246e103948343 days 16 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xcc9e88a3b48451f3fade08816c78d2a38c35fe39d1bef5966d1251936027246e103948343 days 16 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0xec3622765f0892b223e87e3263fbcb9113ae76a45504e5a090a7d0c323ef9b8c103677247 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xec3622765f0892b223e87e3263fbcb9113ae76a45504e5a090a7d0c323ef9b8c103677247 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xec3622765f0892b223e87e3263fbcb9113ae76a45504e5a090a7d0c323ef9b8c103677247 days 12 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0x6717c080a8a944d0186c940941cda0355e60a9a5638f5ab81dc3fb37130e3da3103677157 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x7b960e29e48ba93c60b2cb7ad4727a1e6499839f306f5d516334abc261181a99103677037 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x096ce139d8cc7991d23035fc4983c35e4ae3170e0 Ether
0x7b960e29e48ba93c60b2cb7ad4727a1e6499839f306f5d516334abc261181a99103677037 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x7b960e29e48ba93c60b2cb7ad4727a1e6499839f306f5d516334abc261181a99103677037 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0x7b960e29e48ba93c60b2cb7ad4727a1e6499839f306f5d516334abc261181a99103677037 days 12 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
0xd75a0bc24e3e27ed112d274a072fbc237438c66b5e42a3cb6496dfe5ff286fcc103676957 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xe83ff50e4f4e4277a5e1b635d2df2c7948dfb7f394c1095da187dcd4453a3e7b103676797 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x096ce139d8cc7991d23035fc4983c35e4ae3170e0 Ether
0xe83ff50e4f4e4277a5e1b635d2df2c7948dfb7f394c1095da187dcd4453a3e7b103676797 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xe83ff50e4f4e4277a5e1b635d2df2c7948dfb7f394c1095da187dcd4453a3e7b103676797 days 12 hrs ago0xf8bffca43fb76d46ba18b528eeec7608e6ee694b0x595150692f1719bc556d3280bee733c49aaae9570 Ether
0xe83ff50e4f4e4277a5e1b635d2df2c7948dfb7f394c1095da187dcd4453a3e7b103676797 days 12 hrs ago0x595150692f1719bc556d3280bee733c49aaae9570xf8bffca43fb76d46ba18b528eeec7608e6ee694b0 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: SaleMarket
Compiler Version: v0.4.25+commit.59dbf8f1
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.23;

pragma solidity ^0.4.23;

pragma solidity ^0.4.23;

pragma solidity ^0.4.23;

/// @title BlockchainCuties: Collectible and breedable cuties on the Ethereum blockchain.
/// @author https://BlockChainArchitect.io
/// @dev This is the BlockchainCuties configuration. It can be changed redeploying another version.
interface ConfigInterface
{
    function isConfig() external pure returns (bool);

    function getCooldownIndexFromGeneration(uint16 _generation, uint40 _cutieId) external view returns (uint16);
    function getCooldownEndTimeFromIndex(uint16 _cooldownIndex, uint40 _cutieId) external view returns (uint40);
    function getCooldownIndexFromGeneration(uint16 _generation) external view returns (uint16);
    function getCooldownEndTimeFromIndex(uint16 _cooldownIndex) external view returns (uint40);

    function getCooldownIndexCount() external view returns (uint256);

    function getBabyGenFromId(uint40 _momId, uint40 _dadId) external view returns (uint16);
    function getBabyGen(uint16 _momGen, uint16 _dadGen) external pure returns (uint16);

    function getTutorialBabyGen(uint16 _dadGen) external pure returns (uint16);

    function getBreedingFee(uint40 _momId, uint40 _dadId) external view returns (uint256);
}


contract CutieCoreInterface
{
    function isCutieCore() pure public returns (bool);

    ConfigInterface public config;

    function transferFrom(address _from, address _to, uint256 _cutieId) external;
    function transfer(address _to, uint256 _cutieId) external;

    function ownerOf(uint256 _cutieId)
        external
        view
        returns (address owner);

    function getCutie(uint40 _id)
        external
        view
        returns (
        uint256 genes,
        uint40 birthTime,
        uint40 cooldownEndTime,
        uint40 momId,
        uint40 dadId,
        uint16 cooldownIndex,
        uint16 generation
    );

    function getGenes(uint40 _id)
        public
        view
        returns (
        uint256 genes
    );


    function getCooldownEndTime(uint40 _id)
        public
        view
        returns (
        uint40 cooldownEndTime
    );

    function getCooldownIndex(uint40 _id)
        public
        view
        returns (
        uint16 cooldownIndex
    );


    function getGeneration(uint40 _id)
        public
        view
        returns (
        uint16 generation
    );

    function getOptional(uint40 _id)
        public
        view
        returns (
        uint64 optional
    );


    function changeGenes(
        uint40 _cutieId,
        uint256 _genes)
        public;

    function changeCooldownEndTime(
        uint40 _cutieId,
        uint40 _cooldownEndTime)
        public;

    function changeCooldownIndex(
        uint40 _cutieId,
        uint16 _cooldownIndex)
        public;

    function changeOptional(
        uint40 _cutieId,
        uint64 _optional)
        public;

    function changeGeneration(
        uint40 _cutieId,
        uint16 _generation)
        public;

    function createSaleAuction(
        uint40 _cutieId,
        uint128 _startPrice,
        uint128 _endPrice,
        uint40 _duration
    )
    public;

    function getApproved(uint256 _tokenId) external returns (address);
    function totalSupply() view external returns (uint256);
    function createPromoCutie(uint256 _genes, address _owner) external;
    function checkOwnerAndApprove(address _claimant, uint40 _cutieId, address _pluginsContract) external view;
    function breedWith(uint40 _momId, uint40 _dadId) public payable returns (uint40);
    function getBreedingFee(uint40 _momId, uint40 _dadId) public view returns (uint256);
}

pragma solidity ^0.4.23;


pragma solidity ^0.4.23;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
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.
   */
  constructor() 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) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }

}



/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused = false;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

pragma solidity ^0.4.23;

/// @title Auction Market for Blockchain Cuties.
/// @author https://BlockChainArchitect.io
contract MarketInterface 
{
    function withdrawEthFromBalance() external;

    function createAuction(uint40 _cutieId, uint128 _startPrice, uint128 _endPrice, uint40 _duration, address _seller) public payable;
    function createAuctionWithTokens(uint40 _cutieId, uint128 _startPrice, uint128 _endPrice, uint40 _duration, address _seller, address[] allowedTokens) public payable;

    function bid(uint40 _cutieId) public payable;

    function cancelActiveAuctionWhenPaused(uint40 _cutieId) public;

	function getAuctionInfo(uint40 _cutieId)
        public
        view
        returns
    (
        address seller,
        uint128 startPrice,
        uint128 endPrice,
        uint40 duration,
        uint40 startedAt,
        uint128 featuringFee,
        address[] allowedTokens
    );
}

pragma solidity ^0.4.23;

// ----------------------------------------------------------------------------
// Contract function to receive approval and execute function in one call
//
// Borrowed from MiniMeToken

interface TokenRecipientInterface
{
    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external;
}

pragma solidity ^0.4.23;

// https://github.com/ethereum/EIPs/issues/223
interface TokenFallback
{
    function tokenFallback(address _from, uint _value, bytes _data) external;
}

pragma solidity ^0.4.23;

pragma solidity ^0.4.23;

// ----------------------------------------------------------------------------
contract ERC20 {

    // ERC Token Standard #223 Interface
    // https://github.com/ethereum/EIPs/issues/223

    string public symbol;
    string public  name;
    uint8 public decimals;

    function transfer(address _to, uint _value, bytes _data) external returns (bool success);

    // approveAndCall
    function approveAndCall(address spender, uint tokens, bytes data) external returns (bool success);

    // ERC Token Standard #20 Interface
    // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md


    function totalSupply() public constant returns (uint);
    function balanceOf(address tokenOwner) public constant returns (uint balance);
    function allowance(address tokenOwner, address spender) public constant returns (uint remaining);
    function transfer(address to, uint tokens) public returns (bool success);
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
    event Transfer(address indexed from, address indexed to, uint tokens);
    event Approval(address indexed tokenOwner, address indexed spender, uint tokens);

    // bulk operations
    function transferBulk(address[] to, uint[] tokens) public;
    function approveBulk(address[] spender, uint[] tokens) public;
}


interface TokenRegistryInterface
{
    function getPriceInToken(ERC20 tokenContract, uint128 priceWei) external view returns (uint128);
    function areAllTokensAllowed(address[] tokens) external view returns (bool);
    function isTokenInList(address[] allowedTokens, address currentToken) external pure returns (bool);
    function getAllOracleTokens() external view returns (address[]);
    function onTokensReceived(ERC20 tokenContract, uint tokenCount) external;
    function withdrawEthFromBalance() external;
    function canConvertToEth(ERC20 tokenContract) external view returns (bool);
    function convertTokensToEth(ERC20 tokenContract, address seller, uint sellerValue) external;
}


/// @title Auction Market for Blockchain Cuties.
/// @author https://BlockChainArchitect.io
contract Market is MarketInterface, Pausable, TokenRecipientInterface, TokenFallback
{
    // Shows the auction on an Cutie Token
    struct Auction {
        // Price (in wei or tokens) at the beginning of auction
        uint128 startPrice;
        // Price (in wei or tokens) at the end of auction
        uint128 endPrice;
        // Current owner of Token
        address seller;
        // Auction duration in seconds
        uint40 duration;
        // Time when auction started
        // NOTE: 0 if this auction has been concluded
        uint40 startedAt;
        // Featuring fee (in wei, optional)
        uint128 featuringFee;
        // list of erc20 tokens addresses, that is allowed to bid with
        address[] allowedTokens;
    }

    // Reference to contract that tracks ownership
    CutieCoreInterface public coreContract;

    // Cut owner takes on each auction, in basis points - 1/100 of a per cent.
    // Values 0-10,000 map to 0%-100%
    uint16 public ownerFee;

    // Map from token ID to their corresponding auction.
    mapping (uint40 => Auction) public cutieIdToAuction;
    TokenRegistryInterface public tokenRegistry;


    address operatorAddress;

    event AuctionCreatedWithTokens(uint40 indexed cutieId, uint128 startPrice, uint128 endPrice, uint40 duration, uint128 fee, address[] allowedTokens);
    event AuctionSuccessful(uint40 indexed cutieId, uint128 totalPriceWei, address indexed winner);
    event AuctionSuccessfulForToken(uint40 indexed cutieId, uint128 totalPriceWei, address indexed winner, uint128 priceInTokens, address indexed token);
    event AuctionCancelled(uint40 indexed cutieId);

    modifier onlyOperator() {
        require(msg.sender == operatorAddress || msg.sender == owner);
        _;
    }

    function setOperator(address _newOperator) public onlyOwner {
        require(_newOperator != address(0));

        operatorAddress = _newOperator;
    }

    /// @dev disables sending fund to this contract
    function() external {}

    modifier canBeStoredIn128Bits(uint256 _value)
    {
        require(_value <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);
        _;
    }

    // @dev Adds to the list of open auctions and fires the
    //  AuctionCreated event.
    // @param _cutieId The token ID is to be put on auction.
    // @param _auction To add an auction.
    // @param _fee Amount of money to feature auction
    function _addAuction(uint40 _cutieId, Auction _auction) internal
    {
        if (_auction.duration == 0 && _auction.seller == address(coreContract))
        {
            _transfer(operatorAddress, _cutieId);
            return;
        }
        // Require that all auctions have a duration of
        // at least one minute. (Keeps our math from getting hairy!)
        require(_auction.duration >= 1 minutes);

        cutieIdToAuction[_cutieId] = _auction;
        
        emit AuctionCreatedWithTokens(
            _cutieId,
            _auction.startPrice,
            _auction.endPrice,
            _auction.duration,
            _auction.featuringFee,
            _auction.allowedTokens
        );
    }

    // @dev Returns true if the token is claimed by the claimant.
    // @param _claimant - Address claiming to own the token.
    function _isOwner(address _claimant, uint256 _cutieId) internal view returns (bool)
    {
        return (coreContract.ownerOf(_cutieId) == _claimant);
    }

    // @dev Transfers the token owned by this contract to another address.
    // Returns true when the transfer succeeds.
    // @param _receiver - Address to transfer token to.
    // @param _cutieId - Token ID to transfer.
    function _transfer(address _receiver, uint40 _cutieId) internal
    {
        // it will throw if transfer fails
        coreContract.transfer(_receiver, _cutieId);
    }

    // @dev Escrows the token and assigns ownership to this contract.
    // Throws if the escrow fails.
    // @param _owner - Current owner address of token to escrow.
    // @param _cutieId - Token ID the approval of which is to be verified.
    function _escrow(address _owner, uint40 _cutieId) internal
    {
        // it will throw if transfer fails
        coreContract.transferFrom(_owner, this, _cutieId);
    }

    // @dev just cancel auction.
    function _cancelActiveAuction(uint40 _cutieId, address _seller) internal
    {
        _removeAuction(_cutieId);
        _transfer(_seller, _cutieId);
        emit AuctionCancelled(_cutieId);
    }

    // @dev Calculates the price and transfers winnings.
    // Does not transfer token ownership.
    function _bid(uint40 _cutieId, uint128 _bidAmount)
        internal
        returns (uint128)
    {
        // Get a reference to the auction struct
        Auction storage auction = cutieIdToAuction[_cutieId];

        require(_isOnAuction(auction));

        // Check that bid > current price
        uint128 price = _currentPrice(auction);
        require(_bidAmount >= price);

        // Provide a reference to the seller before the auction struct is deleted.
        address seller = auction.seller;

        _removeAuction(_cutieId);

        // Transfer proceeds to seller (if there are any!)
        if (price > 0 && seller != address(coreContract)) {
            uint128 fee = _computeFee(price);
            uint128 sellerValue = price - fee;

            seller.transfer(sellerValue);
        }

        emit AuctionSuccessful(_cutieId, price, msg.sender);

        return price;
    }

    // @dev Removes from the list of open auctions.
    // @param _cutieId - ID of token on auction.
    function _removeAuction(uint40 _cutieId) internal
    {
        delete cutieIdToAuction[_cutieId];
    }

    // @dev Returns true if the token is on auction.
    // @param _auction - Auction to check.
    function _isOnAuction(Auction storage _auction) internal view returns (bool)
    {
        return (_auction.startedAt > 0);
    }

    // @dev calculate current price of auction. 
    //  When testing, make this function public and turn on
    //  `Current price calculation` test suite.
    function _computeCurrentPrice(
        uint128 _startPrice,
        uint128 _endPrice,
        uint40 _duration,
        uint40 _secondsPassed
    )
        internal
        pure
        returns (uint128)
    {
        if (_secondsPassed >= _duration) {
            return _endPrice;
        } else {
            int256 totalPriceChange = int256(_endPrice) - int256(_startPrice);
            int256 currentPriceChange = totalPriceChange * int256(_secondsPassed) / int256(_duration);
            uint128 currentPrice = _startPrice + uint128(currentPriceChange);
            
            return currentPrice;
        }
    }
    // @dev return current price of token.
    function _currentPrice(Auction storage _auction)
        internal
        view
        returns (uint128)
    {
        uint40 secondsPassed = 0;

        uint40 timeNow = uint40(now);
        if (timeNow > _auction.startedAt) {
            secondsPassed = timeNow - _auction.startedAt;
        }

        return _computeCurrentPrice(
            _auction.startPrice,
            _auction.endPrice,
            _auction.duration,
            secondsPassed
        );
    }

    // @dev Calculates owner's cut of a sale.
    // @param _price - Sale price of cutie.
    function _computeFee(uint128 _price) internal view returns (uint128)
    {
        return _price * ownerFee / 10000;
    }

    // @dev Remove all Ether from the contract with the owner's cuts. Also, remove any Ether sent directly to the contract address.
    //  Transfers to the token contract, but can be called by
    //  the owner or the token contract.
    function withdrawEthFromBalance() external
    {
        address coreAddress = address(coreContract);

        require(
            msg.sender == owner ||
            msg.sender == coreAddress
        );

        tokenRegistry.withdrawEthFromBalance();
        coreAddress.transfer(address(this).balance);
    }

    // @dev create and start a new auction
    // @param _cutieId - ID of cutie to auction, sender must be owner.
    // @param _startPrice - Price of item (in wei) at the beginning of auction.
    // @param _endPrice - Price of item (in wei) at the end of auction.
    // @param _duration - Length of auction (in seconds). Most significant bit od duration is to allow sell for all tokens.
    // @param _seller - Seller
    function createAuction(uint40 _cutieId, uint128 _startPrice, uint128 _endPrice, uint40 _duration, address _seller)
        public whenNotPaused payable
    {
        require(_isOwner(_seller, _cutieId));
        _escrow(_seller, _cutieId);

        bool allowTokens = _duration < 0x8000000000; // first bit of duration is boolean flag (1 to disable tokens)
        _duration = _duration % 0x8000000000; // clear flag from duration

        Auction memory auction = Auction(
            _startPrice,
            _endPrice,
            _seller,
            _duration,
            uint40(now),
            uint128(msg.value),
            allowTokens ? tokenRegistry.getAllOracleTokens() : new address[](0)
        );
        _addAuction(_cutieId, auction);
    }

    // @dev create and start a new auction
    // @param _cutieId - ID of cutie to auction, sender must be owner.
    // @param _startPrice - Price of item (in wei) at the beginning of auction.
    // @param _endPrice - Price of item (in wei) at the end of auction.
    // @param _duration - Length of auction (in seconds).
    // @param _seller - Seller
    // @param _allowedTokens - list of tokens addresses, that can be used as currency to buy cutie.
    function createAuctionWithTokens(
        uint40 _cutieId,
        uint128 _startPrice,
        uint128 _endPrice,
        uint40 _duration,
        address _seller,
        address[] _allowedTokens) public payable
    {
        require(tokenRegistry.areAllTokensAllowed(_allowedTokens));
        require(_isOwner(_seller, _cutieId));
        _escrow(_seller, _cutieId);

        Auction memory auction = Auction(
            _startPrice,
            _endPrice,
            _seller,
            _duration,
            uint40(now),
            uint128(msg.value),
            _allowedTokens
        );
        _addAuction(_cutieId, auction);
    }

    // @dev Set the reference to cutie ownership contract. Verify the owner's fee.
    //  @param fee should be between 0-10,000.
    function setup(address _coreContractAddress, TokenRegistryInterface _tokenRegistry, uint16 _fee) public onlyOwner
    {
        require(_fee <= 10000);

        ownerFee = _fee;
        
        CutieCoreInterface candidateContract = CutieCoreInterface(_coreContractAddress);
        require(candidateContract.isCutieCore());
        coreContract = candidateContract;
        tokenRegistry = _tokenRegistry;
    }

    // @dev Set the owner's fee.
    //  @param fee should be between 0-10,000.
    function setFee(uint16 _fee) public onlyOwner
    {
        require(_fee <= 10000);

        ownerFee = _fee;
    }

    // @dev bid on auction. Complete it and transfer ownership of cutie if enough ether was given.
    function bid(uint40 _cutieId) public payable whenNotPaused canBeStoredIn128Bits(msg.value)
    {
        // _bid throws if something failed.
        _bid(_cutieId, uint128(msg.value));
        _transfer(msg.sender, _cutieId);
    }

    function getCutieId(bytes _extraData) pure internal returns (uint40)
    {
        require(_extraData.length == 5); // 40 bits

        return
            uint40(_extraData[0]) +
            uint40(_extraData[1]) * 0x100 +
            uint40(_extraData[2]) * 0x10000 +
            uint40(_extraData[3]) * 0x100000 +
            uint40(_extraData[4]) * 0x10000000;
    }

    function bidWithToken(address _tokenContract, uint40 _cutieId) external whenNotPaused
    {
        _bidWithToken(_tokenContract, _cutieId, msg.sender);
    }

    function tokenFallback(address _sender, uint _value, bytes _extraData) external whenNotPaused
    {
        uint40 cutieId = getCutieId(_extraData);
        address tokenContractAddress = msg.sender;
        ERC20 tokenContract = ERC20(tokenContractAddress);

        // Get a reference to the auction struct
        Auction storage auction = cutieIdToAuction[cutieId];

        require(tokenRegistry.isTokenInList(auction.allowedTokens, tokenContractAddress)); // buy for token is allowed

        require(_isOnAuction(auction));

        uint128 priceWei = _currentPrice(auction);

        uint128 priceInTokens = tokenRegistry.getPriceInToken(tokenContract, priceWei);

        // Check that bid > current price (this tokens are already sent to currect contract)
        require(_value >= priceInTokens);

        // Provide a reference to the seller before the auction struct is deleted.
        address seller = auction.seller;

        _removeAuction(cutieId);

        // send tokens to seller
        if (seller != address(coreContract))
        {
            uint128 fee = _computeFee(priceInTokens);
            uint128 sellerValue = priceInTokens - fee;

            tokenContract.transfer(seller, sellerValue);
        }

        emit AuctionSuccessfulForToken(cutieId, priceWei, _sender, priceInTokens, tokenContractAddress);
        _transfer(_sender, cutieId);
    }

    // https://github.com/BitGuildPlatform/Documentation/blob/master/README.md#2-required-game-smart-contract-changes
    // Function that is called when trying to use PLAT for payments from approveAndCall
    function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData)
        external
        canBeStoredIn128Bits(_value)
        whenNotPaused
    {
        uint40 cutieId = getCutieId(_extraData);
        _bidWithToken(_tokenContract, cutieId, _sender);
    }

    function _bidWithToken(address _tokenContract, uint40 _cutieId, address _sender) internal
    {
        ERC20 tokenContract = ERC20(_tokenContract);

        // Get a reference to the auction struct
        Auction storage auction = cutieIdToAuction[_cutieId];

        bool allowTokens = tokenRegistry.isTokenInList(auction.allowedTokens, _tokenContract); // buy for token is allowed
        bool allowConvertToEth = tokenRegistry.canConvertToEth(tokenContract);

        require(allowTokens || allowConvertToEth);

        require(_isOnAuction(auction));

        uint128 priceWei = _currentPrice(auction);

        uint128 priceInTokens = tokenRegistry.getPriceInToken(tokenContract, priceWei);

        // Provide a reference to the seller before the auction struct is deleted.
        address seller = auction.seller;

        _removeAuction(_cutieId);

        if (seller != address(coreContract))
        {
            uint128 fee = _computeFee(priceInTokens);
            uint128 sellerValueTokens = priceInTokens - fee;

            if (allowTokens)
            {
                require(tokenContract.transferFrom(_sender, seller, sellerValueTokens));
            }
            else
            {
                require(tokenContract.transferFrom(_sender, address(tokenRegistry), sellerValueTokens));
                tokenRegistry.convertTokensToEth(tokenContract, seller, sellerValueTokens);
            }

            require(tokenContract.transferFrom(_sender, address(tokenRegistry), fee));
            tokenRegistry.onTokensReceived(tokenContract, fee);
        }
        else
        {
            require(tokenContract.transferFrom(_sender, address(tokenRegistry), priceInTokens));
            tokenRegistry.onTokensReceived(tokenContract, priceInTokens);
        }
        emit AuctionSuccessfulForToken(_cutieId, priceWei, _sender, priceInTokens, _tokenContract);
        _transfer(_sender, _cutieId);
    }

    // @dev Returns auction info for a token on auction.
    // @param _cutieId - ID of token on auction.
    function getAuctionInfo(uint40 _cutieId)
        public
        view
        returns
    (
        address seller,
        uint128 startPrice,
        uint128 endPrice,
        uint40 duration,
        uint40 startedAt,
        uint128 featuringFee,
        address[] allowedTokens
    ) {
        Auction storage auction = cutieIdToAuction[_cutieId];
        require(_isOnAuction(auction));
        return (
            auction.seller,
            auction.startPrice,
            auction.endPrice,
            auction.duration,
            auction.startedAt,
            auction.featuringFee,
            auction.allowedTokens
        );
    }

    // @dev Returns auction info for a token on auction.
    // @param _cutieId - ID of token on auction.
    function isOnAuction(uint40 _cutieId)
        public
        view
        returns (bool) 
    {
        return cutieIdToAuction[_cutieId].startedAt > 0;
    }

/*
    /// @dev Import cuties from previous version of Core contract.
    /// @param _oldAddress Old core contract address
    /// @param _fromIndex (inclusive)
    /// @param _toIndex (inclusive)
    function migrate(address _oldAddress, uint40 _fromIndex, uint40 _toIndex) public onlyOwner whenPaused
    {
        Market old = Market(_oldAddress);

        for (uint40 i = _fromIndex; i <= _toIndex; i++)
        {
            if (coreContract.ownerOf(i) == _oldAddress)
            {
                address seller;
                uint128 startPrice;
                uint128 endPrice;
                uint40 duration;
                uint40 startedAt;
                uint128 featuringFee;   
                (seller, startPrice, endPrice, duration, startedAt, featuringFee) = old.getAuctionInfo(i);

                Auction memory auction = Auction({
                    seller: seller, 
                    startPrice: startPrice, 
                    endPrice: endPrice, 
                    duration: duration, 
                    startedAt: startedAt, 
                    featuringFee: featuringFee
                });
                _addAuction(i, auction);
            }
        }
    }*/

    // @dev Returns the current price of an auction.
    function getCurrentPrice(uint40 _cutieId)
        public
        view
        returns (uint128)
    {
        Auction storage auction = cutieIdToAuction[_cutieId];
        require(_isOnAuction(auction));
        return _currentPrice(auction);
    }

    // @dev Cancels unfinished auction and returns token to owner. 
    // Can be called when contract is paused.
    function cancelActiveAuction(uint40 _cutieId) public
    {
        Auction storage auction = cutieIdToAuction[_cutieId];
        require(_isOnAuction(auction));
        address seller = auction.seller;
        require(msg.sender == seller);
        _cancelActiveAuction(_cutieId, seller);
    }

    // @dev Cancels auction when contract is on pause. Option is available only to owners in urgent situations. Tokens returned to seller.
    //  Used on Core contract upgrade.
    function cancelActiveAuctionWhenPaused(uint40 _cutieId) whenPaused onlyOwner public
    {
        Auction storage auction = cutieIdToAuction[_cutieId];
        require(_isOnAuction(auction));
        _cancelActiveAuction(_cutieId, auction.seller);
    }

    // @dev Cancels unfinished auction and returns token to owner.
    // Can be called when contract is paused.
    function cancelCreatorAuction(uint40 _cutieId) public onlyOperator
    {
        Auction storage auction = cutieIdToAuction[_cutieId];
        require(_isOnAuction(auction));
        address seller = auction.seller;
        require(seller == address(coreContract));
        _cancelActiveAuction(_cutieId, msg.sender);
    }

    // @dev Transfers to _withdrawToAddress all tokens controlled by
    // contract _tokenContract.
    function withdrawTokenFromBalance(ERC20 _tokenContract, address _withdrawToAddress) external
    {
        address coreAddress = address(coreContract);

        require(
            msg.sender == owner ||
            msg.sender == operatorAddress ||
            msg.sender == coreAddress
        );
        uint256 balance = _tokenContract.balanceOf(address(this));
        _tokenContract.transfer(_withdrawToAddress, balance);
    }

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

    function onRemove() public {}

    function run(
        uint40 /*_cutieId*/,
        uint256 /*_parameter*/,
        address /*_seller*/
    )
    public
    payable
    {
        revert();
    }

    function runSigned(
        uint40 /*_cutieId*/,
        uint256 /*_parameter*/,
        address /*_owner*/
    )
    external
    payable
    {
        revert();
    }

    function withdraw() public
    {
        require(
            msg.sender == owner ||
            msg.sender == address(coreContract)
        );
        if (address(this).balance > 0)
        {
            address(coreContract).transfer(address(this).balance);
        }
    }
}


/// @title Auction market for cuties sale 
/// @author https://BlockChainArchitect.io
contract SaleMarket is Market
{
    // @dev Sanity check reveals that the
    //  auction in our setSaleAuctionAddress() call is right.
    bool public isSaleMarket = true;

    // @dev LastSalePrice is updated if seller is the token contract.
    // Otherwise, default bid method is used.
    function bid(uint40 _cutieId)
        public
        payable
        canBeStoredIn128Bits(msg.value)
    {
        // _bid verifies token ID size
        _bid(_cutieId, uint128(msg.value));
        _transfer(msg.sender, _cutieId);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"onRemove","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"isOnAuction","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_coreContractAddress","type":"address"},{"name":"_tokenRegistry","type":"address"},{"name":"_fee","type":"uint16"}],"name":"setup","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"cancelCreatorAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isSaleMarket","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"},{"name":"_cutieId","type":"uint40"}],"name":"bidWithToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawEthFromBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"getCurrentPrice","outputs":[{"name":"","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint40"}],"name":"cutieIdToAuction","outputs":[{"name":"startPrice","type":"uint128"},{"name":"endPrice","type":"uint128"},{"name":"seller","type":"address"},{"name":"duration","type":"uint40"},{"name":"startedAt","type":"uint40"},{"name":"featuringFee","type":"uint128"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_fee","type":"uint16"}],"name":"setFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_tokenContract","type":"address"},{"name":"_extraData","type":"bytes"}],"name":"receiveApproval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isPluginInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"","type":"uint40"},{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"runSigned","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"cancelActiveAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"getAuctionInfo","outputs":[{"name":"seller","type":"address"},{"name":"startPrice","type":"uint128"},{"name":"endPrice","type":"uint128"},{"name":"duration","type":"uint40"},{"name":"startedAt","type":"uint40"},{"name":"featuringFee","type":"uint128"},{"name":"allowedTokens","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenRegistry","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"","type":"uint40"},{"name":"","type":"uint256"},{"name":"","type":"address"}],"name":"run","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"cancelActiveAuctionWhenPaused","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_newOperator","type":"address"}],"name":"setOperator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"},{"name":"_startPrice","type":"uint128"},{"name":"_endPrice","type":"uint128"},{"name":"_duration","type":"uint40"},{"name":"_seller","type":"address"},{"name":"_allowedTokens","type":"address[]"}],"name":"createAuctionWithTokens","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"tokenFallback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"}],"name":"bid","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_cutieId","type":"uint40"},{"name":"_startPrice","type":"uint128"},{"name":"_endPrice","type":"uint128"},{"name":"_duration","type":"uint40"},{"name":"_seller","type":"address"}],"name":"createAuction","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenContract","type":"address"},{"name":"_withdrawToAddress","type":"address"}],"name":"withdrawTokenFromBalance","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ownerFee","outputs":[{"name":"","type":"uint16"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"coreContract","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"cutieId","type":"uint40"},{"indexed":false,"name":"startPrice","type":"uint128"},{"indexed":false,"name":"endPrice","type":"uint128"},{"indexed":false,"name":"duration","type":"uint40"},{"indexed":false,"name":"fee","type":"uint128"},{"indexed":false,"name":"allowedTokens","type":"address[]"}],"name":"AuctionCreatedWithTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"cutieId","type":"uint40"},{"indexed":false,"name":"totalPriceWei","type":"uint128"},{"indexed":true,"name":"winner","type":"address"}],"name":"AuctionSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"cutieId","type":"uint40"},{"indexed":false,"name":"totalPriceWei","type":"uint128"},{"indexed":true,"name":"winner","type":"address"},{"indexed":false,"name":"priceInTokens","type":"uint128"},{"indexed":true,"name":"token","type":"address"}],"name":"AuctionSuccessfulForToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"cutieId","type":"uint40"}],"name":"AuctionCancelled","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6080604052600080546004805460a060020a60ff02191674010000000000000000000000000000000000000000179055600160a860020a031916331790556129518061004c6000396000f30060806040526004361061017c5763ffffffff60e060020a60003504166311952369811461018b5780632177885d146101a25780632c5959f9146101d557806330d9161d146102035780633ccfd60b146102225780633f4ba83a146102375780635c975abb1461024c5780636066b0661461026157806370f6fcad14610276578063776247c4146102a15780637ea310d4146102b657806381baab24146102f15780638456cb59146103615780638da5cb5b146103765780638e005553146103a75780638f4ffcb1146103c357806394a89233146103fb5780639652713e1461041057806398c9faac146104315780639ccaec98146104505780639d23c4c714610514578063a055d45514610410578063b2fb3b9014610529578063b3ab15fb14610548578063b9fbad0d14610569578063c0ee0b8a146105e5578063c170fd5414610616578063c1d1faf314610628578063cda8c71514610661578063d5b2a01a14610688578063e80db5db146106b4578063f2fde38b146106c9575b34801561018857600080fd5b50005b34801561019757600080fd5b506101a06106ea565b005b3480156101ae57600080fd5b506101c164ffffffffff600435166106ec565b604080519115158252519081900360200190f35b3480156101e157600080fd5b506101a0600160a060020a036004358116906024351661ffff60443516610715565b34801561020f57600080fd5b506101a064ffffffffff60043516610816565b34801561022e57600080fd5b506101a06108a5565b34801561024357600080fd5b506101a061091a565b34801561025857600080fd5b506101c1610990565b34801561026d57600080fd5b506101c16109a0565b34801561028257600080fd5b506101a0600160a060020a036004351664ffffffffff602435166109b0565b3480156102ad57600080fd5b506101a06109d6565b3480156102c257600080fd5b506102d564ffffffffff60043516610aab565b604080516001608060020a039092168252519081900360200190f35b3480156102fd57600080fd5b5061031064ffffffffff60043516610ae5565b604080516001608060020a0397881681529587166020870152600160a060020a039094168585015264ffffffffff92831660608601529116608084015290921660a082015290519081900360c00190f35b34801561036d57600080fd5b506101a0610b4e565b34801561038257600080fd5b5061038b610bc9565b60408051600160a060020a039092168252519081900360200190f35b3480156103b357600080fd5b506101a061ffff60043516610bd8565b3480156103cf57600080fd5b506101a060048035600160a060020a039081169160248035926044351691606435918201910135610c35565b34801561040757600080fd5b506101c1610cb2565b6101a064ffffffffff60043516602435600160a060020a0360443516610cb8565b34801561043d57600080fd5b506101a064ffffffffff60043516610cbd565b34801561045c57600080fd5b5061046f64ffffffffff60043516610d0d565b60408051600160a060020a03891681526001608060020a038089166020808401919091528882169383019390935264ffffffffff808816606084015286166080830152841660a082015260e060c08201818152845191830191909152835191929091610100840191858101910280838360005b838110156104fa5781810151838201526020016104e2565b505050509050019850505050505050505060405180910390f35b34801561052057600080fd5b5061038b610e14565b34801561053557600080fd5b506101a064ffffffffff60043516610e23565b34801561055457600080fd5b506101a0600160a060020a0360043516610e97565b6040805160a435600481810135602081810285810182019096528185526101a09564ffffffffff84358116966001608060020a03602480358216986044359092169760643590941696600160a060020a036084351696369660c4959490930192829185019084908082843750949750610ef29650505050505050565b3480156105f157600080fd5b506101a060048035600160a060020a0316906024803591604435918201910135611068565b6101a064ffffffffff60043516611425565b6101a064ffffffffff6004358116906001608060020a036024358116916044359091169060643516600160a060020a036084351661144f565b34801561066d57600080fd5b506101a0600160a060020a0360043581169060243516611615565b34801561069457600080fd5b5061069d61178c565b6040805161ffff9092168252519081900360200190f35b3480156106c057600080fd5b5061038b61179d565b3480156106d557600080fd5b506101a0600160a060020a03600435166117ac565b565b64ffffffffff90811660009081526002602052604081206001015460c860020a90049091161190565b60008054600160a060020a0316331461072d57600080fd5b61271061ffff8316111561074057600080fd5b81600160146101000a81548161ffff021916908361ffff16021790555083905080600160a060020a0316634d6a813a6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561079e57600080fd5b505af11580156107b2573d6000803e3d6000fd5b505050506040513d60208110156107c857600080fd5b505115156107d557600080fd5b60018054600160a060020a0392831673ffffffffffffffffffffffffffffffffffffffff199182161790915560038054949092169316929092179091555050565b6004546000908190600160a060020a031633148061083e5750600054600160a060020a031633145b151561084957600080fd5b64ffffffffff83166000908152600260205260409020915061086a82611840565b151561087557600080fd5b506001808201549054600160a060020a039182169116811461089657600080fd5b6108a08333611859565b505050565b600054600160a060020a03163314806108c85750600154600160a060020a031633145b15156108d357600080fd5b6000303111156106ea57600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610917573d6000803e3d6000fd5b50565b600054600160a060020a0316331461093157600080fd5b60005460a060020a900460ff16151561094957600080fd5b6000805474ff0000000000000000000000000000000000000000191681556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b339190a1565b60005460a060020a900460ff1681565b60045460a060020a900460ff1681565b60005460a060020a900460ff16156109c757600080fd5b6109d28282336118a2565b5050565b600154600054600160a060020a0391821691163314806109fe575033600160a060020a038216145b1515610a0957600080fd5b600360009054906101000a9004600160a060020a0316600160a060020a031663776247c46040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015610a5c57600080fd5b505af1158015610a70573d6000803e3d6000fd5b5050604051600160a060020a0384169250303180156108fc029250906000818181858888f193505050501580156109d2573d6000803e3d6000fd5b64ffffffffff81166000908152600260205260408120610aca81611840565b1515610ad557600080fd5b610ade81612034565b9392505050565b60026020819052600091825260409091208054600182015491909201546001608060020a03808416937001000000000000000000000000000000009004811692600160a060020a0381169264ffffffffff60a060020a830481169360c860020a90930416911686565b600054600160a060020a03163314610b6557600080fd5b60005460a060020a900460ff1615610b7c57600080fd5b6000805474ff0000000000000000000000000000000000000000191660a060020a1781556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff6259190a1565b600054600160a060020a031681565b600054600160a060020a03163314610bef57600080fd5b61271061ffff82161115610c0257600080fd5b6001805461ffff90921660a060020a0275ffff000000000000000000000000000000000000000019909216919091179055565b6000846001608060020a03811115610c4c57600080fd5b60005460a060020a900460ff1615610c6357600080fd5b610c9c84848080601f016020809104026020016040519081016040528093929190818152602001838380828437506120bb945050505050565b9150610ca98583896118a2565b50505050505050565b60015b90565b600080fd5b64ffffffffff8116600090815260026020526040812090610cdd82611840565b1515610ce857600080fd5b506001810154600160a060020a0316338114610d0357600080fd5b6108a08382611859565b64ffffffffff8116600090815260026020526040812081908190819081908190606090610d3981611840565b1515610d4457600080fd5b60018101548154600283015460038401805460408051602080840282018101909252828152600160a060020a038716966001608060020a0380881697700100000000000000000000000000000000900481169664ffffffffff60a060020a840481169760c860020a9094041695911693919291839190830182828015610df357602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610dd5575b50505050509050975097509750975097509750975050919395979092949650565b600354600160a060020a031681565b6000805460a060020a900460ff161515610e3c57600080fd5b600054600160a060020a03163314610e5357600080fd5b5064ffffffffff81166000908152600260205260409020610e7381611840565b1515610e7e57600080fd5b60018101546109d2908390600160a060020a0316611859565b600054600160a060020a03163314610eae57600080fd5b600160a060020a0381161515610ec357600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610efa61280c565b6003546040517f90a308a5000000000000000000000000000000000000000000000000000000008152602060048201818152855160248401528551600160a060020a03909416936390a308a59387938392604490920191818601910280838360005b83811015610f74578181015183820152602001610f5c565b5050505090500192505050602060405180830381600087803b158015610f9957600080fd5b505af1158015610fad573d6000803e3d6000fd5b505050506040513d6020811015610fc357600080fd5b50511515610fd057600080fd5b610fe1838864ffffffffff166121af565b1515610fec57600080fd5b610ff68388612258565b60e060405190810160405280876001608060020a03168152602001866001608060020a0316815260200184600160a060020a031681526020018564ffffffffff1681526020014264ffffffffff168152602001346001608060020a03168152602001838152509050610ca987826122d0565b60008060008060008060008060008060149054906101000a900460ff1615151561109157600080fd5b6110ca8b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437506120bb945050505050565b64ffffffffff8116600090815260026020526040908190206003805483517f223e6b5b000000000000000000000000000000000000000000000000000000008152336024820181905260048201958652928401805460448301819052969f50929d508d9c50929a50600160a060020a03169363223e6b5b9391928c92918291606401908590801561118457602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611166575b50509350505050602060405180830381600087803b1580156111a557600080fd5b505af11580156111b9573d6000803e3d6000fd5b505050506040513d60208110156111cf57600080fd5b505115156111dc57600080fd5b6111e586611840565b15156111f057600080fd5b6111f986612034565b600354604080517fa01da7b2000000000000000000000000000000000000000000000000000000008152600160a060020a038b811660048301526001608060020a0385166024830152915193985091169163a01da7b2916044808201926020929091908290030181600087803b15801561127257600080fd5b505af1158015611286573d6000803e3d6000fd5b505050506040513d602081101561129c57600080fd5b505193506001608060020a0384168c10156112b657600080fd5b6001860154600160a060020a031692506112cf89612562565b600154600160a060020a0384811691161461138d576112ed846125cf565b9150818403905086600160a060020a031663a9059cbb84836040518363ffffffff1660e060020a0281526004018083600160a060020a0316600160a060020a03168152602001826001608060020a0316815260200192505050602060405180830381600087803b15801561136057600080fd5b505af1158015611374573d6000803e3d6000fd5b505050506040513d602081101561138a57600080fd5b50505b87600160a060020a03168d600160a060020a03168a64ffffffffff167ff65c85ee1272f6f51bd40bae1565e2868b8e887082e6f94b4924d29d21f842d7888860405180836001608060020a03166001608060020a03168152602001826001608060020a03166001608060020a031681526020019250505060405180910390a46114168d8a6125f6565b50505050505050505050505050565b346001608060020a0381111561143a57600080fd5b611444823461266a565b506109d233836125f6565b600061145961280c565b60005460a060020a900460ff161561147057600080fd5b611481838864ffffffffff166121af565b151561148c57600080fd5b6114968388612258565b64800000000064ffffffffff8516818110935006935060e060405190810160405280876001608060020a03168152602001866001608060020a0316815260200184600160a060020a031681526020018564ffffffffff1681526020014264ffffffffff168152602001346001608060020a031681526020018361152757604080516000815260208101909152611607565b600360009054906101000a9004600160a060020a0316600160a060020a031663e6cd92f36040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561157a57600080fd5b505af115801561158e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156115b757600080fd5b8101908080516401000000008111156115cf57600080fd5b820160208101848111156115e257600080fd5b81518560208202830111640100000000821117156115ff57600080fd5b509093505050505b90529050610ca987826122d0565b60015460008054600160a060020a0392831692163314806116405750600454600160a060020a031633145b80611653575033600160a060020a038316145b151561165e57600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038616916370a082319160248083019260209291908290030181600087803b1580156116bf57600080fd5b505af11580156116d3573d6000803e3d6000fd5b505050506040513d60208110156116e957600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0386811660048301526024820184905291519293509086169163a9059cbb916044808201926020929091908290030181600087803b15801561175a57600080fd5b505af115801561176e573d6000803e3d6000fd5b505050506040513d602081101561178457600080fd5b505050505050565b60015460a060020a900461ffff1681565b600154600160a060020a031681565b600054600160a060020a031633146117c357600080fd5b600160a060020a03811615156117d857600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60010154600060c860020a90910464ffffffffff161190565b61186282612562565b61186c81836125f6565b60405164ffffffffff8316907ff6680ade663631ec4dd74f7eaa1f75125361380cd50a22f969e9acfa5f53670490600090a25050565b64ffffffffff82166000908152600260205260408082206003805483517f223e6b5b000000000000000000000000000000000000000000000000000000008152600160a060020a03808a166024830152600482019586529284018054604483018190528a979596869586958695869586958695949093169363223e6b5b9391928e928291606401908590801561196157602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611943575b50509350505050602060405180830381600087803b15801561198257600080fd5b505af1158015611996573d6000803e3d6000fd5b505050506040513d60208110156119ac57600080fd5b5051600354604080517f6c8251d2000000000000000000000000000000000000000000000000000000008152600160a060020a038d811660048301529151939a50911691636c8251d2916024808201926020929091908290030181600087803b158015611a1857600080fd5b505af1158015611a2c573d6000803e3d6000fd5b505050506040513d6020811015611a4257600080fd5b505195508680611a4f5750855b1515611a5a57600080fd5b611a6388611840565b1515611a6e57600080fd5b611a7788612034565b600354604080517fa01da7b2000000000000000000000000000000000000000000000000000000008152600160a060020a038d811660048301526001608060020a0385166024830152915193985091169163a01da7b2916044808201926020929091908290030181600087803b158015611af057600080fd5b505af1158015611b04573d6000803e3d6000fd5b505050506040513d6020811015611b1a57600080fd5b50516001890154909450600160a060020a03169250611b388b612562565b600154600160a060020a03848116911614611e6e57611b56846125cf565b9150508083038615611c04576040805160e060020a6323b872dd028152600160a060020a038c8116600483015285811660248301526001608060020a03841660448301529151918b16916323b872dd916064808201926020929091908290030181600087803b158015611bc857600080fd5b505af1158015611bdc573d6000803e3d6000fd5b505050506040513d6020811015611bf257600080fd5b50511515611bff57600080fd5b611d3b565b6003546040805160e060020a6323b872dd028152600160a060020a038d8116600483015292831660248201526001608060020a03841660448201529051918b16916323b872dd916064808201926020929091908290030181600087803b158015611c6d57600080fd5b505af1158015611c81573d6000803e3d6000fd5b505050506040513d6020811015611c9757600080fd5b50511515611ca457600080fd5b600354604080517fce99fe84000000000000000000000000000000000000000000000000000000008152600160a060020a038c8116600483015286811660248301526001608060020a03851660448301529151919092169163ce99fe8491606480830192600092919082900301818387803b158015611d2257600080fd5b505af1158015611d36573d6000803e3d6000fd5b505050505b6003546040805160e060020a6323b872dd028152600160a060020a038d8116600483015292831660248201526001608060020a03851660448201529051918b16916323b872dd916064808201926020929091908290030181600087803b158015611da457600080fd5b505af1158015611db8573d6000803e3d6000fd5b505050506040513d6020811015611dce57600080fd5b50511515611ddb57600080fd5b600354604080517f4e82a391000000000000000000000000000000000000000000000000000000008152600160a060020a038c811660048301526001608060020a038616602483015291519190921691634e82a39191604480830192600092919082900301818387803b158015611e5157600080fd5b505af1158015611e65573d6000803e3d6000fd5b50505050611f9d565b6003546040805160e060020a6323b872dd028152600160a060020a038d8116600483015292831660248201526001608060020a03871660448201529051918b16916323b872dd916064808201926020929091908290030181600087803b158015611ed757600080fd5b505af1158015611eeb573d6000803e3d6000fd5b505050506040513d6020811015611f0157600080fd5b50511515611f0e57600080fd5b600354604080517f4e82a391000000000000000000000000000000000000000000000000000000008152600160a060020a038c811660048301526001608060020a038816602483015291519190921691634e82a39191604480830192600092919082900301818387803b158015611f8457600080fd5b505af1158015611f98573d6000803e3d6000fd5b505050505b8b600160a060020a03168a600160a060020a03168c64ffffffffff167ff65c85ee1272f6f51bd40bae1565e2868b8e887082e6f94b4924d29d21f842d7888860405180836001608060020a03166001608060020a03168152602001826001608060020a03166001608060020a031681526020019250505060405180910390a46120268a8c6125f6565b505050505050505050505050565b60018101546000908190429064ffffffffff60c860020a9091048116908216111561207157600184015460c860020a900464ffffffffff16810391505b835460018501546120b3916001608060020a0380821692700100000000000000000000000000000000909204169060a060020a900464ffffffffff16856127a5565b949350505050565b80516000906005146120cc57600080fd5b8160048151811015156120db57fe5b90602001015160f860020a900460f860020a0260f860020a900463100000000282600381518110151561210a57fe5b90602001015160f860020a900460f860020a0260f860020a9004621000000283600281518110151561213857fe5b90602001015160f860020a900460f860020a0260f860020a9004620100000284600181518110151561216657fe5b90602001015160f860020a900460f860020a0260f860020a90046101000285600081518110151561219357fe5b016020015160f860020a90819004810204010101019050919050565b600154604080517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490529051600092600160a060020a0380871693911691636352211e9160248082019260209290919082900301818887803b15801561221b57600080fd5b505af115801561222f573d6000803e3d6000fd5b505050506040513d602081101561224557600080fd5b5051600160a060020a0316149392505050565b6001546040805160e060020a6323b872dd028152600160a060020a03858116600483015230602483015264ffffffffff85166044830152915191909216916323b872dd91606480830192600092919082900301818387803b1580156122bc57600080fd5b505af1158015611784573d6000803e3d6000fd5b606081015164ffffffffff161580156122fb57506001546040820151600160a060020a039081169116145b1561231b5760045461231690600160a060020a0316836125f6565b6109d2565b603c816060015164ffffffffff161015151561233657600080fd5b64ffffffffff80831660009081526002602081815260409283902085518154838801516001608060020a03908116700100000000000000000000000000000000029281166fffffffffffffffffffffffffffffffff199283161781169290921783559487015160018301805460608a015160808b01518a1660c860020a027fffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffffff91909a1660a060020a0278ffffffffff000000000000000000000000000000000000000019600160a060020a0390951673ffffffffffffffffffffffffffffffffffffffff19909316929092179390931617919091169690961790955560a0860151928101805493909516929093169190911790925560c08301518051849361246592600385019291019061284a565b509050508164ffffffffff167f204860a5ee867ceff41013d88caf4a6e6b852d0eba7efaf413c8978d9589f4588260000151836020015184606001518560a001518660c0015160405180866001608060020a03166001608060020a03168152602001856001608060020a03166001608060020a031681526020018464ffffffffff1664ffffffffff168152602001836001608060020a03166001608060020a0316815260200180602001828103825283818151815260200191508051906020019060200280838360005b8381101561254757818101518382015260200161252f565b50505050905001965050505050505060405180910390a25050565b64ffffffffff8116600090815260026020819052604082208281556001810180547fffff00000000000000000000000000000000000000000000000000000000000016905590810180546fffffffffffffffffffffffffffffffff19169055906108a060038301826128bc565b6001546000906127109060a060020a900461ffff1683026001608060020a03160492915050565b600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03858116600483015264ffffffffff851660248301529151919092169163a9059cbb91604480830192600092919082900301818387803b1580156122bc57600080fd5b64ffffffffff821660009081526002602052604081208180808061268d85611840565b151561269857600080fd5b6126a185612034565b93506001608060020a0380851690881610156126bc57600080fd5b6001850154600160a060020a031692506126d588612562565b6000846001608060020a03161180156126fc5750600154600160a060020a03848116911614155b156127525761270a846125cf565b6040519092508285039150600160a060020a038416906001608060020a03831680156108fc02916000818181858888f19350505050158015612750573d6000803e3d6000fd5b505b604080516001608060020a03861681529051339164ffffffffff8b16917f8500e47909916e51e97e4880e742d8b9af1afaeb9ea54166947cf42e6616b1179181900360200190a350919695505050505050565b600080808064ffffffffff808716908616106127c357869350612801565b876001608060020a0316876001608060020a03160392508564ffffffffff168564ffffffffff1684028115156127f557fe5b05915081880190508093505b505050949350505050565b6040805160e08101825260008082526020820181905291810182905260608082018390526080820183905260a082019290925260c081019190915290565b8280548282559060005260206000209081019282156128ac579160200282015b828111156128ac578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390911617825560209092019160019091019061286a565b506128b89291506128da565b5090565b5080546000825590600052602060002090810190610917919061290b565b610cb591905b808211156128b857805473ffffffffffffffffffffffffffffffffffffffff191681556001016128e0565b610cb591905b808211156128b857600081556001016129115600a165627a7a72305820992b3258342b29afbd123df83fc75a1805d09ea2bd49dfcf91624b45dae1ee830029

   Swarm Source:
bzzr://992b3258342b29afbd123df83fc75a1805d09ea2bd49dfcf91624b45dae1ee83

 

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