ETH Price: $1,852.04 (+1.21%)
Gas: 21 Gwei
 

Overview

ETH Balance

0.014 ETH

Eth Value

$25.93 (@ $1,852.04/ETH)

Multi Chain

Multichain Addresses

0 address found via
Transaction Hash
Method
Block
From
To
Value
Create Artwork134117642021-10-13 19:16:35603 days 3 hrs ago1634152595IN
0xA5655f...3117CCA5
0.002 ETH0.0290921797.4661335
Create Artwork134108892021-10-13 15:54:23603 days 6 hrs ago1634140463IN
0xA5655f...3117CCA5
0.002 ETH0.03938303100.66156381
Create Artwork134058612021-10-12 20:36:24604 days 1 hr ago1634070984IN
0xA5655f...3117CCA5
0.002 ETH0.0109452160.15769054
Create Artwork134047022021-10-12 16:25:14604 days 6 hrs ago1634055914IN
0xA5655f...3117CCA5
0.002 ETH0.0556341590.15726068
Create Artwork127018692021-06-25 7:10:31713 days 15 hrs ago1624605031IN
0xA5655f...3117CCA5
0.002 ETH0.004261476
Create Artwork126673012021-06-19 21:48:05719 days 47 mins ago1624139285IN
0xA5655f...3117CCA5
0.002 ETH0.0148245510
Approve126490512021-06-17 1:40:04721 days 20 hrs ago1623894004IN
0xA5655f...3117CCA5
0 ETH0.000655113
Approve126472612021-06-16 18:52:29722 days 3 hrs ago1623869549IN
0xA5655f...3117CCA5
0 ETH0.0008717917.3
Create Sale Auct...126210072021-06-12 17:35:09726 days 5 hrs ago1623519309IN
0xA5655f...3117CCA5
0 ETH0.0025467418
Create Artwork125982252021-06-09 4:34:34729 days 18 hrs ago1623213274IN
0xA5655f...3117CCA5
0.002 ETH0.0055311912
Set Username125979602021-06-09 3:35:03729 days 19 hrs ago1623209703IN
0xA5655f...3117CCA5
0 ETH0.0004971117
Transfer125968192021-06-08 23:22:23729 days 23 hrs ago1623194543IN
0xA5655f...3117CCA5
0 ETH0.0006404113
Transfer125365312021-05-30 15:26:19739 days 7 hrs ago1622388379IN
0xA5655f...3117CCA5
0 ETH0.0012608919
Set Username125340272021-05-30 6:05:18739 days 16 hrs ago1622354718IN
0xA5655f...3117CCA5
0 ETH0.0005418918.501
Set Username125337902021-05-30 5:15:31739 days 17 hrs ago1622351731IN
0xA5655f...3117CCA5
0 ETH0.0011175824
Withdraw Balance125262172021-05-29 1:08:46740 days 21 hrs ago1622250526IN
0xA5655f...3117CCA5
0 ETH0.0008228626.4
Set CFO125252552021-05-28 21:37:06741 days 58 mins ago1622237826IN
0xA5655f...3117CCA5
0 ETH0.0016763736
Set Metadata Add...125252122021-05-28 21:27:28741 days 1 hr ago1622237248IN
0xA5655f...3117CCA5
0 ETH0.0017025136
Create Artwork94845032020-02-15 0:52:181209 days 21 hrs ago1581727938IN
0xA5655f...3117CCA5
0.002 ETH0.002543714
Create Coupling ...94395802020-02-08 3:11:011216 days 19 hrs ago1581131461IN
0xA5655f...3117CCA5
0 ETH0.00028462
Create Artwork93806342020-01-30 1:32:201225 days 21 hrs ago1580347940IN
0xA5655f...3117CCA5
0.002 ETH0.001609722
Set Token As Pub...93598442020-01-26 21:12:141229 days 1 hr ago1580073134IN
0xA5655f...3117CCA5
0 ETH0.0004893110.78924871
Transfer93560672020-01-26 7:13:241229 days 15 hrs ago1580022804IN
0xA5655f...3117CCA5
0 ETH0.000047861
Transfer93560602020-01-26 7:11:361229 days 15 hrs ago1580022696IN
0xA5655f...3117CCA5
0 ETH0.000047861
Set Token As Pub...93557892020-01-26 6:15:431229 days 16 hrs ago1580019343IN
0xA5655f...3117CCA5
0 ETH0.000045351
View all transactions

Latest 1 internal transaction

Advanced mode:
Advanced Filter
Parent Txn Hash Block From To Value
125262172021-05-29 1:08:46740 days 21 hrs ago1622250526
0xA5655f...3117CCA5
0.08 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ArtworkCore

Compiler Version
v0.4.25+commit.59dbf8f1

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-01-12
*/

pragma solidity ^0.4.25;
// Pixelicu Source code
/**
 * @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;


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


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


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

}



/// @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 totalSupply() public view returns (uint256 total);
    function balanceOf(address _owner) public view returns (uint256 balance);
    function ownerOf(uint256 _tokenId) external view returns (address owner);
    function approve(address _to, uint256 _tokenId) external;
    function transfer(address _to, uint256 _tokenId) external payable;
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;

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

    // Optional
    // function name() public view returns (string name);
    // function symbol() public view returns (string symbol);
    // function tokensOfOwner(address _owner) external view returns (uint256[] tokenIds);
    // function tokenMetadata(uint256 _tokenId, string _preferredTransport) public view returns (string infoUrl);

    // ERC-165 Compatibility (https://github.com/ethereum/EIPs/issues/165)
    function supportsInterface(bytes4 _interfaceID) external view returns (bool);
}


// // Auction wrapper functions


// Auction wrapper functions

/// @title A facet of ArtworkCore that manages special access privileges.
/// @author Axiom Zen (https://www.axiomzen.co)
/// @dev See the ArtworkCore contract documentation to understand how the various contract facets are arranged.
contract ArtworkAccessControl {
    // This facet controls access control for Pixelicu. There are four roles managed here:
    //
    //     - The CEO: The CEO can reassign other roles and change the addresses of our dependent smart
    //         contracts. It is also the only role that can unpause the smart contract. It is initially
    //         set to the address that created the smart contract in the ArtworkCore constructor.
    //
    //     - The CFO: The CFO can withdraw funds from ArtworkCore and its auction contracts.
    //
    //     - The COO: The COO can release gen0 artworks to auction, and mint promo artworks.
    //
    // It should be noted that these roles are distinct without overlap in their access abilities, the
    // abilities listed for each role above are exhaustive. In particular, while the CEO can assign any
    // address to any role, the CEO address itself doesn't have the ability to act in those roles. This
    // restriction is intentional so that we aren't tempted to use the CEO address frequently out of
    // convenience. The less we use an address, the less likely it is that we somehow compromise the
    // account.

    /// @dev Emited when contract is upgraded - See README.md for updgrade plan
    event ContractUpgrade(address newContract);

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

    // @dev Keeps track whether the contract is paused. When that is true, most actions are blocked
    bool public paused = false;

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

    /// @dev Access modifier for CFO-only functionality
    modifier onlyCFO() {
        require(msg.sender == cfoAddress);
        _;
    }

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

    modifier onlyCLevel() {
        require(
            msg.sender == cooAddress ||
            msg.sender == ceoAddress ||
            msg.sender == cfoAddress
        );
        _;
    }

    /// @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) external payable onlyCEO {
        require(_newCEO != address(0));

        ceoAddress = _newCEO;
    }

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

        cfoAddress = _newCFO;
    }

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

        cooAddress = _newCOO;
    }

    /*** Pausable functionality adapted from OpenZeppelin ***/

    /// @dev Modifier to allow actions only when the contract IS NOT paused
    modifier whenNotPaused() {
        require(!paused);
        _;
    }

    /// @dev Modifier to allow actions only when the contract IS paused
    modifier whenPaused {
        require(paused);
        _;
    }

    /// @dev Called by any "C-level" role to pause the contract. Used only when
    ///  a bug or exploit is detected and we need to limit damage.
    function pause() external onlyCLevel whenNotPaused {
        paused = true;
    }

    /// @dev Unpauses the smart contract. Can only be called by the CEO, since
    ///  one reason we may pause the contract is when CFO or COO accounts are
    ///  compromised.
    /// @notice This is public rather than external so it can be called by
    ///  derived contracts.
    function unpause() public payable onlyCEO whenPaused {
        // can't unpause if contract was upgraded
        paused = false;
    }
}




/// @title Base contract for Pixelicu. Holds all common structs, events and base variables.
/// @author Axiom Zen (https://www.axiomzen.co)
/// @dev See the ArtworkCore contract documentation to understand how the various contract facets are arranged.
contract ArtworkBase is ArtworkAccessControl {
    /*** EVENTS ***/

    /// @dev The Birth event is fired whenever a new artwork comes into existence. This obviously
    event Birth(address owner,bytes artworkContent);
     /// @dev The CoupledArt  event is fired when two artworks successfully couple a
    event CoupledArt(address owner, uint256 topId, uint256 bottomId);
    event CoupledArtRightpiece(address owner, uint256 topId, uint256 bottomId);

    /// @dev The Grant events are fired when a control token assigns a token to the left/right/control slots
    event Grant(uint256 _tokenToGrantControlOf, uint256 _tokenToGrantControlTo);
    event GrantControl(uint256 _tokenToGrantControlOf, uint256 _tokenToGrantControlTo);


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

    /*** DATA TYPES ***/

    /// @dev The main Artwork struct. Every artwork in Pixelicu is represented by a copy
    ///  of this structure, so great care was taken to ensure that it fits neatly into
    ///  exactly two 256-bit words. Note that the order of the members in this structure
    ///  is important because of the byte-packing rules used by Ethereum.
    ///  Ref: http://solidity.readthedocs.io/en/develop/miscellaneous.html
    struct Artwork {
        address creatorId;
        uint64 birthTime;
        bytes artworkContent;
    }

    /*** CONSTANTS ***/


    // An approximation of currently how many seconds are in between blocks.
    uint256 public secondsPerBlock = 15;

    /*** STORAGE ***/

    /// @dev An array containing the Artwork struct for all Artworks in existence. The ID
    ///  of each artwork is actually an index into this array. Note that ID 0 is a negaartwork,
    ///  the unArtwork, the mythical beast that is the parent of all gen0 artworks. A bizarre
    ///  creature that is both creator and license... to itself! Has an invalid genetic code.
    ///  In other words, artwork ID 0 is invalid... ;-)
    // Artwork[] artworks; 
    Artwork[] artworks;
    mapping (bytes => bool) isTaken;


    /// @dev A mapping from artwork IDs to the address that owns them. All artworks have
    ///  some valid owner address, even gen0 artworks are created with a non-zero owner.
    mapping (uint256 => address) public artworkIndexToOwner;
    mapping (uint256 => bool) public artworkIndexToPublic;
    mapping (address=> bytes32) public addressToUsername;

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

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


    
        /// @dev A mapping from artworkIDs to an address that has been approved to use
    ///  this Kitty for coupling . Each Artwork can only have one approved
    ///  address for coupling at any time. A zero value means no approval is outstanding.
    mapping (uint256 => address) public coupleAllowedToAddress;
    /// @dev The address of the ClockAuction contract that handles sales of Artworks. This
    ///  same contract handles both peer-to-peer sales as well as the gen0 sales which are
    ///  initiated every 15 minutes.
    SaleClockAuction public saleAuction;
    CouplingClockAuction public couplingAuction;


      function _getBytes(uint256 _artworkId) internal returns (bytes artworkContent){
           return artworks[_artworkId].artworkContent;
    }

    /// @dev Assigns ownership of a specific Artwork to an address.
    function _transfer(address _from, address _to, uint256 _tokenId) internal {
        // Since the number of artworks is capped to 2^32 we can't overflow this
        ownershipTokenCount[_to]++;
        // transfer ownership
        artworkIndexToOwner[_tokenId] = _to;
        // When creating new artworks _from is 0x0, but we can't account that address.
        if (_from != address(0)) {
            ownershipTokenCount[_from]--;
            // clear any previously approved ownership exchange
            delete artworkIndexToApproved[_tokenId];
        }
        // Emit the transfer event.
        Transfer(_from, _to, _tokenId);
    }

    /// @dev An internal method that creates a new artwork and stores it. This
    ///  method doesn't do any checking and should only be called when the
    ///  input data is known to be valid. Will generate both a Birth event
    ///  and a Transfer event.
    /// @param _creatorId The artwork ID of the creator of this artwork (zero for gen0)
    /// @param _artworkContent The artwork's genetic code.
    /// @param _owner The inital owner of this artwork, must be non-zero (except for the unArtwork, ID 0)
    function _createArtwork(
        bytes _artworkContent,
        address _owner,
        address _creatorId
    )
        internal
        returns (uint256)
    {
        // These requires are not strictly necessary, our calling code should make
        // sure that these conditions are never broken. However! _createArtwork() is already
        // an expensive call (for storage), and it doesn't hurt to be especially careful
        // to ensure our data structures are always valid.
        require(isTaken[_artworkContent] == false);
        Artwork memory _artwork = Artwork({
            birthTime: uint64(now),
            creatorId: _creatorId,
            artworkContent: _artworkContent
        });
        
        uint256 newArtId = artworks.push(_artwork) - 1;
        isTaken[_artworkContent] = true;

        // It's probably never going to happen, 4 ga-billion artworks is A LOT, but
        // let's just be 100% sure we never let this happen.
        require(newArtId == uint256(newArtId));

        // emit the birth event
        Birth(
            _artwork.creatorId,
            _artworkContent
        );
        artworkIndexToLeftpiece[newArtId] = 0;
        artworkIndexToRightpiece[newArtId] = 0;

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

        return newArtId;
    }
    
     function _assignLeftpiece(uint256 _topId, uint256 _leftId) internal {


        // Mark the topPiece as having a tailpiece, keeping track of which one
        
        artworkIndexToLeftpiece[_topId] = _leftId;
        // Emit the coupling event.
        CoupledArt(artworkIndexToOwner[_topId], _topId, _leftId);
    }

     function _assignControlPiece(uint256 _tokenId, uint256 _controlId) internal {
    
        artworkIndexToControlPiece[_tokenId] = _controlId;
    }

    function _assignRightpiece(uint256 _topId, uint256 _rightId) internal {
         Artwork storage topArtwork = artworks[_topId];

        // Mark the topPiece as having a tailpiece, keeping track of which one
        //topArtwork.rightpieceId = _rightId;
        
        artworkIndexToRightpiece[_topId] = _rightId;
        // Emit the coupling event.
        CoupledArtRightpiece(artworkIndexToOwner[_topId], _topId, _rightId);
    }
    
     function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return artworkIndexToOwner[_tokenId] == _claimant;
    }
      // External function intended for subcontracts to be able to attach rewards to tokens
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _claimant the owned token of the msg sender they are using to validate their claim.
    /// @param _tokenId the token that the caller is indicating as being controlled
    /// @param _controlToken tthe token that is being used to control the _tokenId;
      function _ownsOrControls(address _claimant, uint256 _tokenId, uint256 _controlToken) internal view returns (bool) {
        return artworkIndexToOwner[_tokenId] == _claimant || artworkIndexToControlPiece[_tokenId] == _controlToken;
    }

    function _shareControl(uint256 _masterToken, uint256 _childToken) internal view returns (bool){
        return (artworkIndexToControlPiece[_childToken] == _masterToken || artworkIndexToControlPiece[_childToken] == artworkIndexToControlPiece[_masterToken]);
    }
    
     function _isCouplingPermitted(uint256 _topId, uint256 _partnerId) internal view returns (bool) {
        address topOwner = artworkIndexToOwner[_topId];
        address bottomOwner = artworkIndexToOwner[_partnerId];

        // Coupling is okay if they have same owner, or if the top's owner was given
        // permission to pair with this artwork.
        return (topOwner == bottomOwner || coupleAllowedToAddress[_partnerId] == topOwner || artworkIndexToPublic[_partnerId] == true);
    }
    
        function approveCoupling(address _addr, uint256 _partnerId)
        external payable
        whenNotPaused
    {
        require(_owns(msg.sender, _partnerId));
        coupleAllowedToAddress[_partnerId] = _addr;
    }

        function setUsername(bytes32 _username)
        external payable
        whenNotPaused
    {
        addressToUsername[msg.sender] = _username;
    }


      function setTokenAsPublic(uint256 _tokenId)
        external payable
        whenNotPaused
    {
        require(_owns(msg.sender, _tokenId));
        artworkIndexToPublic[_tokenId] = true;
    }

      function setTokenAsPrivate(uint256 _tokenId)
        external payable
        whenNotPaused
    {
        require(_owns(msg.sender, _tokenId));
        artworkIndexToPublic[_tokenId] = false;
    }
    
           function removeCouplingPermission(uint256 _partnerId)
        external payable
        whenNotPaused
    {
        require(_owns(msg.sender, _partnerId));
        coupleAllowedToAddress[_partnerId] = msg.sender;
    }

}


/// @title The external contract that is responsible for generating metadata for the artworks,
///  it has one function that will return the data as bytes.
contract ERC721Metadata {
    /// @dev Given a token Id, returns a byte array that is supposed to be converted into string.
    function getMetadata(uint256 _tokenId, string) public view returns (bytes32[4] buffer, uint256 count) {
        if (_tokenId == 1) {
            buffer[0] = "Hello World! :D";
            count = 15;
        } else if (_tokenId == 2) {
            buffer[0] = "I would definitely choose a medi";
            buffer[1] = "um length string.";
            count = 49;
        } else if (_tokenId == 3) {
            buffer[0] = "Lorem ipsum dolor sit amet, mi e";
            buffer[1] = "st accumsan dapibus augue lorem,";
            buffer[2] = " tristique vestibulum id, libero";
            buffer[3] = " suscipit varius sapien aliquam.";
            count = 128;
        }
    }
}


/// @title The facet of the PIxelicus core contract that manages ownership, ERC-721 (draft) compliant.
/// @author Axiom Zen (https://www.axiomzen.co)
/// @dev Ref: https://github.com/ethereum/EIPs/issues/721
///  See the ArtworkCore contract documentation to understand how the various contract facets are arranged.
contract ArtworkOwnership is ArtworkBase, ERC721 {
    /// @notice Name and symbol of the non fungible token, as defined in ERC721.
    string public constant name = "glia.icu";
    string public constant symbol = "GLIA";

    // The contract that will return artwork metadata
    ERC721Metadata public erc721Metadata;

    bytes4 constant InterfaceSignature_ERC165 =
        bytes4(keccak256("supportsInterface(bytes4)"));

    bytes4 constant InterfaceSignature_ERC721 =
        bytes4(keccak256('name()')) ^
        bytes4(keccak256('symbol()')) ^
        bytes4(keccak256('totalSupply()')) ^
        bytes4(keccak256('balanceOf(address)')) ^
        bytes4(keccak256('ownerOf(uint256)')) ^
        bytes4(keccak256('approve(address,uint256)')) ^
        bytes4(keccak256('transfer(address,uint256)')) ^
        bytes4(keccak256('transferFrom(address,address,uint256)')) ^
        bytes4(keccak256('tokensOfOwner(address)')) ^
        bytes4(keccak256('tokenMetadata(uint256,string)'));

    /// @notice Introspection interface as per ERC-165 (https://github.com/ethereum/EIPs/issues/165).
    ///  Returns true for any standardized interfaces implemented by this contract. We implement
    ///  ERC-165 (obviously!) and ERC-721.
 function supportsInterface(bytes4 _interfaceID) external view returns (bool) {
        // DEBUG ONLY
        //require((InterfaceSignature_ERC165 == 0x01ffc9a7) && (InterfaceSignature_ERC721 == 0x9a20483d));

        return ((_interfaceID == InterfaceSignature_ERC165) || (_interfaceID == InterfaceSignature_ERC721));
    }

    /// @dev Set the address of the sibling contract that tracks metadata.
    function setMetadataAddress(address _contractAddress) public onlyCEO {
        erc721Metadata = ERC721Metadata(_contractAddress);
     }

    // Internal utility functions: These functions all assume that their input arguments
    // are valid. We leave it to public methods to sanitize their inputs and follow
    // the required logic.

    /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _claimant the address we are validating against.
    /// @param _tokenId artwork id, only valid when > 0
    function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return artworkIndexToOwner[_tokenId] == _claimant;
    }

    /// @dev Checks if a given address currently has transferApproval for a particular Artwork.
    /// @param _claimant the address we are confirming artwork is approved for.
    /// @param _tokenId artwork id, only valid when > 0
    function _approvedFor(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return artworkIndexToApproved[_tokenId] == _claimant;
    }

    /// @dev Marks an address as being approved for transferFrom(), overwriting any previous
    ///  approval. Setting _approved to address(0) clears all transfer approval.
    ///  NOTE: _approve() does NOT send the Approval event. This is intentional because
    ///  _approve() and transferFrom() are used together for putting Artworks on auction, and
    ///  there is no value in spamming the log with Approval events in that case.
    function _approve(uint256 _tokenId, address _approved) internal {
        artworkIndexToApproved[_tokenId] = _approved;
    }

    /// @notice Returns the number of Artworks owned by a specific address.
    /// @param _owner The owner address to check.
    /// @dev Required for ERC-721 compliance
    function balanceOf(address _owner) public view returns (uint256 count) {
        return ownershipTokenCount[_owner];
    }

    /// @notice Transfers a Artwork to another address. If transferring to a smart
    ///  contract be VERY CAREFUL to ensure that it is aware of ERC-721 (or
    ///  Pixelicu specifically) or your Artwork may be lost forever. Seriously.
    /// @param _to The address of the recipient, can be a user or contract.
    /// @param _tokenId The ID of the Artwork to transfer.
    /// @dev Required for ERC-721 compliance.
    function transfer(
        address _to,
        uint256 _tokenId
    )
        external payable
        whenNotPaused
    {
        // Safety check to prevent against an unexpected 0x0 default.
        require(_to != address(0));
        // Disallow transfers to this contract to prevent accidental misuse.
        // The contract should never own any artworks (except very briefly
        // after a gen0 artwork is created and before it goes on auction).
        require(_to != address(this));
        // Disallow transfers to the auction contracts to prevent accidental
        // misuse. Auction contracts should only take ownership of artworks
        // through the allow + transferFrom flow.
        require(_to != address(saleAuction));
        require(_to != address(couplingAuction));

        // You can only send your own artwork.
        require(_owns(msg.sender, _tokenId));

        // Reassign ownership, clear pending approvals, emit Transfer event.
        _transfer(msg.sender, _to, _tokenId);
    }

    /// @notice Grant another address the right to transfer a specific Artwork via
    ///  transferFrom(). This is the preferred flow for transfering NFTs to contracts.
    /// @param _to The address to be granted transfer approval. Pass address(0) to
    ///  clear all approvals.
    /// @param _tokenId The ID of the Artwork that can be transferred if this call succeeds.
    /// @dev Required for ERC-721 compliance.
    function approve(
        address _to,
        uint256 _tokenId
    )
        external
        whenNotPaused
    {
        // Only an owner can grant transfer approval.
        require(_owns(msg.sender, _tokenId));

        // Register the approval (replacing any previous approval).
        _approve(_tokenId, _to);

        // Emit approval event.
        Approval(msg.sender, _to, _tokenId);
    }

    /// @notice Transfer a Artwork owned by another address, for which the calling address
    ///  has previously been granted transfer approval by the owner.
    /// @param _from The address that owns the Artwork to be transfered.
    /// @param _to The address that should take ownership of the Artwork. Can be any address,
    ///  including the caller.
    /// @param _tokenId The ID of the Artwork to be transferred.
    /// @dev Required for ERC-721 compliance.
    function transferFrom(
        address _from,
        address _to,
        uint256 _tokenId
    )
        external payable
        whenNotPaused
    {
        // Safety check to prevent against an unexpected 0x0 default.
        require(_to != address(0));
        // Disallow transfers to this contract to prevent accidental misuse.
        // The contract should never own any artworks (except very briefly
        // after a gen0 artwork is created and before it goes on auction).
        require(_to != address(this));
        // Check for approval and valid ownership
        require(_approvedFor(msg.sender, _tokenId));
        require(_owns(_from, _tokenId));

        // Reassign ownership (also clears pending approvals and emits Transfer event).
        _transfer(_from, _to, _tokenId);
    }

    /// @notice Returns the total number of Artworks currently in existence.
    /// @dev Required for ERC-721 compliance.
    function totalSupply() public view returns (uint) {
        return artworks.length - 1;
    }

    /// @notice Returns the address currently assigned ownership of a given Artwork.
    /// @dev Required for ERC-721 compliance.
    function ownerOf(uint256 _tokenId)
        external
        view
        returns (address owner)
    {
        owner = artworkIndexToOwner[_tokenId];

        require(owner != address(0));
    }

    /// @notice Returns a list of all Artwork IDs assigned to an address.
    /// @param _owner The owner whose Artworks we are interested in.
    /// @dev This method MUST NEVER be called by smart contract code. First, it's fairly
    ///  expensive (it walks the entire Artwork array looking for artworks 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) external view returns(uint256[] ownerTokens) {
        uint256 tokenCount = balanceOf(_owner);

        if (tokenCount == 0) {
            // Return an empty arrayz
            return new uint256[](0);
        } else {
            uint256[] memory result = new uint256[](tokenCount);
            uint256 totalArtpieces = totalSupply();
            uint256 resultIndex = 0;

            // We count on the fact that all artworks have IDs starting at 1 and increasing
            // sequentially up to the totalCat count.
            uint256 artworkId;

            for (artworkId = 1; artworkId <= totalArtpieces; artworkId++) {
                if (artworkIndexToOwner[artworkId] == _owner) {
                    result[resultIndex] = artworkId;
                    resultIndex++;
                }
            }

            return result;
        }
    }

    /// @dev Adapted from memcpy() by @arachnid (Nick Johnson <[email protected]>)
    ///  This method is licenced under the Apache License.
    ///  Ref: https://github.com/Arachnid/solidity-stringutils/blob/2f6ca9accb48ae14c66f1437ec50ed19a0616f78/strings.sol
    function _memcpy(uint _dest, uint _src, uint _len) private view {
        // Copy word-length chunks while possible
        for(; _len >= 32; _len -= 32) {
            assembly {
                mstore(_dest, mload(_src))
            }
            _dest += 32;
            _src += 32;
        }

        // Copy remaining bytes
        uint256 mask = 256 ** (32 - _len) - 1;
        assembly {
            let srcpart := and(mload(_src), not(mask))
            let destpart := and(mload(_dest), mask)
            mstore(_dest, or(destpart, srcpart))
        }
    }

    /// @dev Adapted from toString(slice) by @arachnid (Nick Johnson <[email protected]>)
    ///  This method is licenced under the Apache License.
    ///  Ref: https://github.com/Arachnid/solidity-stringutils/blob/2f6ca9accb48ae14c66f1437ec50ed19a0616f78/strings.sol
    function _toString(bytes32[4] _rawBytes, uint256 _stringLength) private view returns (string) {
        var outputString = new string(_stringLength);
        uint256 outputPtr;
        uint256 bytesPtr;

        assembly {
            outputPtr := add(outputString, 32)
            bytesPtr := _rawBytes
        }

        _memcpy(outputPtr, bytesPtr, _stringLength);

        return outputString;
    }

    /// @notice Returns a URI pointing to a metadata package for this token conforming to
    ///  ERC-721 (https://github.com/ethereum/EIPs/issues/721)
    /// @param _tokenId The ID number of the Artwork whose metadata should be returned.
    function tokenMetadata(uint256 _tokenId, string _preferredTransport) external view returns (string infoUrl) {
        require(erc721Metadata != address(0));
        bytes32[4] memory buffer;
        uint256 count;
        (buffer, count) = erc721Metadata.getMetadata(_tokenId, _preferredTransport);

        return _toString(buffer, count);
    }
}




/// @title Auction Core
/// @dev Contains models, variables, and internal methods for the auction.
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract ClockAuctionBase {

    // Represents an auction on an NFT
    struct Auction {
        // Current owner of NFT
        address seller;
        // Price (in wei) at beginning of auction
        uint128 startingPrice;
        // Price (in wei) at end of auction
        uint128 endingPrice;
        // Duration (in seconds) of auction
        uint64 duration;
        // Time when auction started
        // NOTE: 0 if this auction has been concluded
        uint64 startedAt;
    }

    // Reference to contract tracking NFT ownership
    ERC721 public nonFungibleContract;

    // Cut owner takes on each auction, measured in basis points (1/100 of a percent).
    // Values 0-10,000 map to 0%-100%
    uint256 public ownerCut;

    // Map from token ID to their corresponding auction.
    mapping (uint256 => Auction) tokenIdToAuction;

    event AuctionCreated(uint256 tokenId, uint256 startingPrice, uint256 endingPrice, uint256 duration);
    event AuctionSuccessful(uint256 tokenId, uint256 totalPrice, address winner);
    event AuctionCancelled(uint256 tokenId);

    /// @dev Returns true if the claimant owns the token.
    /// @param _claimant - Address claiming to own the token.
    /// @param _tokenId - ID of token whose ownership to verify.
    function _owns(address _claimant, uint256 _tokenId) internal view returns (bool) {
        return (nonFungibleContract.ownerOf(_tokenId) == _claimant);
    }

    /// @dev Escrows the NFT, assigning ownership to this contract.
    /// Throws if the escrow fails.
    /// @param _owner - Current owner address of token to escrow.
    /// @param _tokenId - ID of token whose approval to verify.
    function _escrow(address _owner, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transferFrom(_owner, this, _tokenId);
    }

    /// @dev Transfers an NFT owned by this contract to another address.
    /// Returns true if the transfer succeeds.
    /// @param _receiver - Address to transfer NFT to.
    /// @param _tokenId - ID of token to transfer.
    function _transfer(address _receiver, uint256 _tokenId) internal {
        // it will throw if transfer fails
        nonFungibleContract.transfer(_receiver, _tokenId);
    }

    /// @dev Adds an auction to the list of open auctions. Also fires the
    ///  AuctionCreated event.
    /// @param _tokenId The ID of the token to be put on auction.
    /// @param _auction Auction to add.
    function _addAuction(uint256 _tokenId, Auction _auction) internal {
        // Require that all auctions have a duration of
        // at least one minute. (Keeps our math from getting hairy!)
        require(_auction.duration >= 1 minutes);

        tokenIdToAuction[_tokenId] = _auction;

        AuctionCreated(
            uint256(_tokenId),
            uint256(_auction.startingPrice),
            uint256(_auction.endingPrice),
            uint256(_auction.duration)
        );
    }

    /// @dev Cancels an auction unconditionally.
    function _cancelAuction(uint256 _tokenId, address _seller) internal {
        _removeAuction(_tokenId);
        _transfer(_seller, _tokenId);
        AuctionCancelled(_tokenId);
    }

    /// @dev Computes the price and transfers winnings.
    /// Does NOT transfer ownership of token.
    function _bid(uint256 _tokenId, uint256 _bidAmount)
        internal
        returns (uint256)
    {
        // Get a reference to the auction struct
        Auction storage auction = tokenIdToAuction[_tokenId];

        // Explicitly check that this auction is currently live.
        // (Because of how Ethereum mappings work, we can't just count
        // on the lookup above failing. An invalid _tokenId will just
        // return an auction object that is all zeros.)
        require(_isOnAuction(auction));

        // Check that the bid is greater than or equal to the current price
        uint256 price = _currentPrice(auction);
        require(_bidAmount >= price);

        // Grab a reference to the seller before the auction struct
        // gets deleted.
        address seller = auction.seller;

        // The bid is good! Remove the auction before sending the fees
        // to the sender so we can't have a reentrancy attack.
        _removeAuction(_tokenId);

        // Transfer proceeds to seller (if there are any!)
        if (price > 0) {
            // Calculate the auctioneer's cut.
            // (NOTE: _computeCut() is guaranteed to return a
            // value <= price, so this subtraction can't go negative.)
            uint256 auctioneerCut = _computeCut(price);
            uint256 sellerProceeds = price - auctioneerCut;

            // NOTE: Doing a transfer() in the middle of a complex
            // method like this is generally discouraged because of
            // reentrancy attacks and DoS attacks if the seller is
            // a contract with an invalid fallback function. We explicitly
            // guard against reentrancy attacks by removing the auction
            // before calling transfer(), and the only thing the seller
            // can DoS is the sale of their own asset! (And if it's an
            // accident, they can call cancelAuction(). )
            seller.transfer(sellerProceeds);
        }

        // Calculate any excess funds included with the bid. If the excess
        // is anything worth worrying about, transfer it back to bidder.
        // NOTE: We checked above that the bid amount is greater than or
        // equal to the price so this cannot underflow.
        uint256 bidExcess = _bidAmount - price;

        // Return the funds. Similar to the previous transfer, this is
        // not susceptible to a re-entry attack because the auction is
        // removed before any transfers occur.
        msg.sender.transfer(bidExcess);

        // Tell the world!
        AuctionSuccessful(_tokenId, price, msg.sender);

        return price;
    }

    /// @dev Removes an auction from the list of open auctions.
    /// @param _tokenId - ID of NFT on auction.
    function _removeAuction(uint256 _tokenId) internal {
        delete tokenIdToAuction[_tokenId];
    }

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

    /// @dev Returns current price of an NFT on auction. Broken into two
    ///  functions (this one, that computes the duration from the auction
    ///  structure, and the other that does the price computation) so we
    ///  can easily test that the price computation works correctly.
    function _currentPrice(Auction storage _auction)
        internal
        view
        returns (uint256)
    {
        uint256 secondsPassed = 0;

        // A bit of insurance against negative values (or wraparound).
        // Probably not necessary (since Ethereum guarnatees that the
        // now variable doesn't ever go backwards).
        if (now > _auction.startedAt) {
            secondsPassed = now - _auction.startedAt;
        }

        return _computeCurrentPrice(
            _auction.startingPrice,
            _auction.endingPrice,
            _auction.duration,
            secondsPassed
        );
    }

    /// @dev Computes the current price of an auction. Factored out
    ///  from _currentPrice so we can run extensive unit tests.
    ///  When testing, make this function public and turn on
    ///  `Current price computation` test suite.
    function _computeCurrentPrice(
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        uint256 _secondsPassed
    )
        internal
        pure
        returns (uint256)
    {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our public functions carefully cap the maximum values for
        //  time (at 64-bits) and currency (at 128-bits). _duration is
        //  also known to be non-zero (see the require() statement in
        //  _addAuction())
        if (_secondsPassed >= _duration) {
            // We've reached the end of the dynamic pricing portion
            // of the auction, just return the end price.
            return _endingPrice;
        } else {
            // Starting price can be higher than ending price (and often is!), so
            // this delta can be negative.
            int256 totalPriceChange = int256(_endingPrice) - int256(_startingPrice);

            // This multiplication can't overflow, _secondsPassed will easily fit within
            // 64-bits, and totalPriceChange will easily fit within 128-bits, their product
            // will always fit within 256-bits.
            int256 currentPriceChange = totalPriceChange * int256(_secondsPassed) / int256(_duration);

            // currentPriceChange can be negative, but if so, will have a magnitude
            // less that _startingPrice. Thus, this result will always end up positive.
            int256 currentPrice = int256(_startingPrice) + currentPriceChange;

            return uint256(currentPrice);
        }
    }

    /// @dev Computes owner's cut of a sale.
    /// @param _price - Sale price of NFT.
    function _computeCut(uint256 _price) internal view returns (uint256) {
        // NOTE: We don't use SafeMath (or similar) in this function because
        //  all of our entry functions carefully cap the maximum values for
        //  currency (at 128-bits), and ownerCut <= 10000 (see the require()
        //  statement in the ClockAuction constructor). The result of this
        //  function is always guaranteed to be <= _price.
        return _price * ownerCut / 10000;
    }

}


/**
 * @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 allow actions only when the contract IS paused
   */
  modifier whenNotPaused() {
    require(!paused);
    _;
  }

  /**
   * @dev modifier to allow actions only when the contract IS NOT paused
   */
  modifier whenPaused {
    require(paused);
    _;
  }

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

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


/// @title Clock auction for non-fungible tokens.
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract ClockAuction is Pausable, ClockAuctionBase {

    /// @dev The ERC-165 interface signature for ERC-721.
    ///  Ref: https://github.com/ethereum/EIPs/issues/165
    ///  Ref: https://github.com/ethereum/EIPs/issues/721
    bytes4 constant InterfaceSignature_ERC721 = bytes4(0x9a20483d);

    /// @dev Constructor creates a reference to the NFT ownership contract
    ///  and verifies the owner cut is in the valid range.
    /// @param _nftAddress - address of a deployed contract implementing
    ///  the Nonfungible Interface.
    /// @param _cut - percent cut the owner takes on each auction, must be
    ///  between 0-10,000.
    function ClockAuction(address _nftAddress, uint256 _cut) public {
        require(_cut <= 10000);
        ownerCut = _cut;

        ERC721 candidateContract = ERC721(_nftAddress);
        require(candidateContract.supportsInterface(InterfaceSignature_ERC721));
        nonFungibleContract = candidateContract;
    }

    /// @dev Remove all Ether from the contract, which is the owner's cuts
    ///  as well as any Ether sent directly to the contract address.
    ///  Always transfers to the NFT contract, but can be called either by
    ///  the owner or the NFT contract.
    function withdrawBalance() external {
        address nftAddress = address(nonFungibleContract);

        require(
            msg.sender == owner ||
            msg.sender == nftAddress
        );
        // We are using this boolean method to make sure that even if one fails it will still work
        bool res = nftAddress.send(this.balance);
    }

    /// @dev Creates and begins a new auction.
    /// @param _tokenId - ID of token to auction, sender must be owner.
    /// @param _startingPrice - Price of item (in wei) at beginning of auction.
    /// @param _endingPrice - Price of item (in wei) at end of auction.
    /// @param _duration - Length of time to move between starting
    ///  price and ending price (in seconds).
    /// @param _seller - Seller, if not the message sender
    function createAuction(
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        external
        whenNotPaused
    {
        // Sanity check that no inputs overflow how many bits we've allocated
        // to store them in the auction struct.
        require(_startingPrice == uint256(uint128(_startingPrice)));
        require(_endingPrice == uint256(uint128(_endingPrice)));
        require(_duration == uint256(uint64(_duration)));

        require(_owns(msg.sender, _tokenId));
        _escrow(msg.sender, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, auction);
    }

    /// @dev Bids on an open auction, completing the auction and transferring
    ///  ownership of the NFT if enough Ether is supplied.
    /// @param _tokenId - ID of token to bid on.
    function bid(uint256 _tokenId)
        external
        payable
        whenNotPaused
    {
        // _bid will throw if the bid or funds transfer fails
        _bid(_tokenId, msg.value);
        _transfer(msg.sender, _tokenId);
    }

    /// @dev Cancels an auction that hasn't been won yet.
    ///  Returns the NFT to original owner.
    /// @notice This is a state-modifying function that can
    ///  be called while the contract is paused.
    /// @param _tokenId - ID of token on auction
    function cancelAuction(uint256 _tokenId)
        external
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        address seller = auction.seller;
        require(msg.sender == seller);
        _cancelAuction(_tokenId, seller);
    }

    /// @dev Cancels an auction when the contract is paused.
    ///  Only the owner may do this, and NFTs are returned to
    ///  the seller. This should only be used in emergencies.
    /// @param _tokenId - ID of the NFT on auction to cancel.
    function cancelAuctionWhenPaused(uint256 _tokenId)
        whenPaused
        onlyOwner
        external
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        _cancelAuction(_tokenId, auction.seller);
    }

    /// @dev Returns auction info for an NFT on auction.
    /// @param _tokenId - ID of NFT on auction.
    function getAuction(uint256 _tokenId)
        external
        view
        returns
    (
        address seller,
        uint256 startingPrice,
        uint256 endingPrice,
        uint256 duration,
        uint256 startedAt
    ) {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        return (
            auction.seller,
            auction.startingPrice,
            auction.endingPrice,
            auction.duration,
            auction.startedAt
        );
    }

    /// @dev Returns the current price of an auction.
    /// @param _tokenId - ID of the token price we are checking.
    function getCurrentPrice(uint256 _tokenId)
        external
        view
        returns (uint256)
    {
        Auction storage auction = tokenIdToAuction[_tokenId];
        require(_isOnAuction(auction));
        return _currentPrice(auction);
    }

}

/// @title Reverse auction modified for coupling
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract CouplingClockAuction is ClockAuction {

    // @dev Sanity check that allows us to ensure that we are pointing to the
    //  right auction in our setCouplingAuctionAddress() call.
    bool public isCouplingClockAuction = true;

    // Delegate constructor
    function CouplingClockAuction(address _nftAddr, uint256 _cut) public
        ClockAuction(_nftAddr, _cut) {}

    /// @dev Creates and begins a new auction. Since this function is wrapped,
    /// require sender to be KittyCore contract.
    /// @param _tokenId - ID of token to auction, sender must be owner.
    /// @param _startingPrice - Price of item (in wei) at beginning of auction.
    /// @param _endingPrice - Price of item (in wei) at end of auction.
    /// @param _duration - Length of auction (in seconds).
    /// @param _seller - Seller, if not the message sender
    function createAuction(
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        external
    {
        // Sanity check that no inputs overflow how many bits we've allocated
        // to store them in the auction struct.
        require(_startingPrice == uint256(uint128(_startingPrice)));
        require(_endingPrice == uint256(uint128(_endingPrice)));
        require(_duration == uint256(uint64(_duration)));

        require(msg.sender == address(nonFungibleContract));
        _escrow(_seller, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, auction);
    }

    /// @dev Places a bid for coupling. Requires the sender
    /// is the KittyCore contract because all bid methods
    /// should be wrapped. Also returns the artwork to the
    /// seller rather than the winner.
    function bid(uint256 _tokenId)
        external
        payable
    {
        require(msg.sender == address(nonFungibleContract));
        address seller = tokenIdToAuction[_tokenId].seller;
        // _bid checks that token ID is valid and will throw if bid fails
        _bid(_tokenId, msg.value);
        // We transfer the artwork back to the seller, the winner will get
        // the offspring
        _transfer(seller, _tokenId);
    }

}


/// @title Clock auction modified for sale of artworks
/// @notice We omit a fallback function to prevent accidental sends to this contract.
contract SaleClockAuction is ClockAuction {

    // @dev Sanity check that allows us to ensure that we are pointing to the
    //  right auction in our setSaleAuctionAddress() call.
    bool public isSaleClockAuction = true;

    // Tracks last 5 sale price of gen0 artwork sales
    uint256 public saleCount;
    uint256[5] public lastSalePrices;

    // Delegate constructor
    function SaleClockAuction(address _nftAddr, uint256 _cut) public
        ClockAuction(_nftAddr, _cut) 
        {}

    /// @dev Creates and begins a new auction.
    /// @param _tokenId - ID of token to auction, sender must be owner.
    /// @param _startingPrice - Price of item (in wei) at beginning of auction.
    /// @param _endingPrice - Price of item (in wei) at end of auction.
    /// @param _duration - Length of auction (in seconds).
    /// @param _seller - Seller, if not the message sender
    function createAuction(
        uint256 _tokenId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration,
        address _seller
    )
        external
    {
        // Sanity check that no inputs overflow how many bits we've allocated
        // to store them in the auction struct.
        require(_startingPrice == uint256(uint128(_startingPrice)));
        require(_endingPrice == uint256(uint128(_endingPrice)));
        require(_duration == uint256(uint64(_duration)));

        require(msg.sender == address(nonFungibleContract));
        _escrow(_seller, _tokenId);
        Auction memory auction = Auction(
            _seller,
            uint128(_startingPrice),
            uint128(_endingPrice),
            uint64(_duration),
            uint64(now)
        );
        _addAuction(_tokenId, auction);
    }

    /// @dev Updates lastSalePrice if seller is the nft contract
        /// @param _tokenId - tokenId

    /// Otherwise, works the same as default bid method.
    function bid(uint256 _tokenId)
        external
        payable
    {
        // _bid verifies token ID size
        address seller = tokenIdToAuction[_tokenId].seller;
        uint256 price = _bid(_tokenId, msg.value);
        _transfer(msg.sender, _tokenId);

       
            lastSalePrices[saleCount % 5] = price;
            saleCount++;
        }
    }

contract ArtworkLicensing is ArtworkOwnership {

   


    /// @notice The minimum payment required to createArtwork(). This is a cost paid 
    ///  the gas cost paid by whatever calls createArtwork(), and can be dynamically updated by
    ///  the COO role as the gas price changes.
    uint256 public autoCreationFee = 2 finney;


    /// @dev Updates the minimum payment required for calling createArtwork(). Can only
    ///  be called by the COO address. (This fee is used to offset the gas cost incurred
    ///  by the autobirth daemon).
    function setAutoCreationFee(uint256 val) external onlyCOO {
        autoCreationFee = val;
    }
}

contract ArtworkAuction is ArtworkLicensing {

    // @notice The auction contract variables are defined in ArtworkBase to allow
    //  us to refer to them in ArtworkOwnership to prevent accidental transfers.
    // `saleAuction` refers to the auction for gen0 and p2p sale of kitties.
    // `siringAuction` refers to the auction for siring rights of kitties.

    /// @dev Sets the reference to the sale auction.
    /// @param _address - Address of sale contract.
    function setSaleAuctionAddress(address _address) external onlyCEO {
        SaleClockAuction candidateContract = SaleClockAuction(_address);

        // NOTE: verify that a contract is what we expect -
        require(candidateContract.isSaleClockAuction());

        // Set the new contract address
        saleAuction = candidateContract;
    }

        /// @dev Sets the reference to the coupling auction.
    /// @param _address - Address of coupling contract.
    function setCouplingAuctionAddress(address _address) external onlyCEO {
        CouplingClockAuction candidateContract = CouplingClockAuction(_address);

        // NOTE: verify that a contract is what we expect -
        require(candidateContract.isCouplingClockAuction());

        // Set the new contract address
        couplingAuction = candidateContract;
    }
        /// @dev Put a artwork up for auction to be coupled.
    ///  delegates to reverse auction.
        function createCouplingAuction(
        uint256 _artworkId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration
    )
        external
        whenNotPaused
    {
        // Auction contract checks input sizes
        // If artwork is already on any auction, this will throw
        // because it will be owned by the auction contract.
        require(_owns(msg.sender, _artworkId));
        _approve(_artworkId, couplingAuction);
        // Coupling auction throws if inputs are invalid and clears
        // transfer and sire approval after escrowing the artwork.
        couplingAuction.createAuction(
            _artworkId,
            _startingPrice,
            _endingPrice,
            _duration,
            msg.sender
        );
    }
    /// @dev Sets the reference to the siring auction.
        // FIXME ? removed for now

    /// @dev Put an artwork up for auction.
    ///  Does some ownership trickery to create auctions in one tx.
    function createSaleAuction(
        uint256 _artworkId,
        uint256 _startingPrice,
        uint256 _endingPrice,
        uint256 _duration
    )
        external
        whenNotPaused
    {
        // Auction contract checks input sizes
        // If artwork is already on any auction, this will throw
        // because it will be owned by the auction contract.
        require(_owns(msg.sender, _artworkId));
        // Ensure the artwork is not pregnant to prevent the auction
        // contract accidentally receiving ownership of the child.
        // NOTE: the artwork IS allowed to be in a cooldown.
        _approve(_artworkId, saleAuction);
        // Sale auction throws if inputs are invalid and clears
        // transfer and sire approval after escrowing the artwork.
        saleAuction.createAuction(
            _artworkId,
            _startingPrice,
            _endingPrice,
            _duration,
            msg.sender
        );
    }



        /// @dev Completes a coupling auction by bidding.
    ///  Immediately couples the winning top with the bottom on auction.
    /// @param _partnerId - ID of the bottom on auction.
    /// @param _topId - ID of the artwork owned by the bidder.
    function bidOnCouplingAuction(
        uint256 _partnerId,
        uint256 _topId
    )
        external
        payable
        whenNotPaused
    {
        // Auction contract checks input sizes
        require(_owns(msg.sender, _topId));

        // Define the current price of the auction.
        uint256 currentPrice = couplingAuction.getCurrentPrice(_partnerId);
        require(msg.value >= currentPrice);

        // Coupling auction will throw if the bid fails.
        couplingAuction.bid.value(msg.value)(_partnerId);
        _assignLeftpiece(_topId,_partnerId);
    }
   

    /// @dev Transfers the balance of the sale auction contract
    /// to the ArtworkCore contract. We use two-step withdrawal to
    /// prevent two transfer calls in the auction bid function.
    function withdrawAuctionBalances() external onlyCLevel {
        saleAuction.withdrawBalance();
        couplingAuction.withdrawBalance();
    }
}

/// @title all functions related to creating artworks
contract ArtworkMinting is ArtworkAuction {

    // Limits the number of artworks the contract owner can ever create.
    uint256 public constant PROMO_CREATION_LIMIT = 5000;

    // Counts the number of artworks the contract owner has created.
    uint256 public promoCreatedCount;

    /// @dev we can create promo artworks, up to a limit. Only callable by COO
    /// @param _artworkContent the encoded artworkContent of the artwork to be created, any value is accepted
    function createPromoArtwork(bytes _artworkContent) external payable onlyCOO {
        address artOwner = msg.sender;
        if (artOwner == address(0)) {
             artOwner = cooAddress;
        }
        require(promoCreatedCount < PROMO_CREATION_LIMIT);
        promoCreatedCount++;
        _createArtwork(_artworkContent, artOwner,artOwner);
    }

    // Same as above but accessible by non-COO requires additional payment equal to autoCreation Fee
     function createArtwork(bytes _artworkContent) external payable whenNotPaused {
        address artOwner = msg.sender;
        if (artOwner == address(0)) {
             artOwner = cooAddress;
        }
        require(msg.value >= autoCreationFee);
        _createArtwork(_artworkContent, artOwner,artOwner);
    }
     function _ownsOrIsOpUnassigned(address _claimant, uint256 _tokenId) internal view returns (bool) {
         
        return (_owns(msg.sender, _tokenId) || (msg.sender == cooAddress && artworkIndexToLeftpiece[_tokenId] == 0));

    }
      // public function callable in contract to assign the control/left/right pieces for an owner
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _tokenId (a.k.a. _topId) the owned token of the msg sender they are using to validate their claim.
    /// @param _controlId the token that the caller is indicating as a control piece
    /// msg.sender doesn't need to own _controlId to be able to assign, must own _tokenId which will receive assignment

     function assignControlPiece(uint256 _tokenId, uint256 _controlId) external payable whenNotPaused  {
        require(_owns(msg.sender, _tokenId));
       _assignControlPiece(_tokenId,_controlId);
    }
       function assignLeftpiece(uint256 _topId, uint256 _leftId) external payable whenNotPaused  {
        require(_owns(msg.sender, _topId));
        require(_isCouplingPermitted(_topId, _leftId));
       _assignLeftpiece(_topId,_leftId);
    }

          function assignRightpiece(uint256 _topId, uint256 _rightId) external payable whenNotPaused  {
        require(_owns(msg.sender, _topId));
        require(_isCouplingPermitted(_topId, _rightId));
       _assignRightpiece(_topId,_rightId);
    }
    // External function intended for subcontracts to be able to attach rewards to tokens
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _masterId the owned token of the msg sender they are using to validate their claim.
    /// @param _controlTargetId the token that the caller is indicating as a control piece
    /// @param _receiverId the token that will have the piece attached to it msg.sender must own
    /// @param _tokenToGrant the tokenThatWill be assigned.
    /// @param _controlOwner address of owner of the control token.  If the address doesn't own those token grant fails

    function grantRightpiece(uint256 _masterId,uint256 _controlTargetId, uint256 _receiverId, uint256 _tokenToGrant, address _controlOwner) external payable whenNotPaused {
        require(artworkIndexToControlPiece[_masterId] != 0);
        require(_owns(msg.sender, _masterId));  
        require(_ownsOrControls(msg.sender, _tokenToGrant, _masterId));
         require(_owns(_controlOwner, _receiverId));
        require(_owns(_controlOwner, _controlTargetId));
        require(_shareControl(_masterId,_controlTargetId));
        require(_shareControl(_masterId,_receiverId));

        _assignRightpiece(_receiverId,_tokenToGrant);
        Grant(_receiverId, _tokenToGrant);
    }


       function grantLeftpiece(uint256 _masterId,uint256 _controlTargetId, uint256 _receiverId, uint256 _tokenToGrant, address _controlOwner) external payable whenNotPaused {
        require(artworkIndexToControlPiece[_masterId] != 0);
        require(_owns(msg.sender, _masterId));
        require(_ownsOrControls(msg.sender, _tokenToGrant, _masterId));
         require(_owns(_controlOwner, _receiverId));
        require(_owns(_controlOwner, _controlTargetId));
        require(_shareControl(_masterId,_controlTargetId));
        require(_shareControl(_masterId,_receiverId));
         _assignLeftpiece(_receiverId,_tokenToGrant);
         Grant(_receiverId, _tokenToGrant);

    }
       // Allows an external contract to change the control piece of a token provided the msg.sender owns token
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _tokenToGrantControlOf this is the token that will have its control reassigned
    /// @param _tokenToGrantControlTo the token that the caller wants to grant as a control piece
    function grantControlpiece(uint256 _masterId,uint256 _tokenToGrantControlOf, uint256 _tokenToGrantControlTo)  external payable whenNotPaused {
          require(artworkIndexToControlPiece[_masterId] != 0);
        require(_owns(msg.sender, _masterId));  
        require(_ownsOrControls(msg.sender, _tokenToGrantControlOf, _masterId));
        require(_shareControl(_masterId,_tokenToGrantControlOf));
        artworkIndexToControlPiece[_tokenToGrantControlTo];
        GrantControl(_tokenToGrantControlOf, _tokenToGrantControlTo);
    }
      // Allows an external contract to change the control piece of a token provided the msg.sender owns token
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _masterId this is the token that is being used to assert control
    /// @param _tokenToPoint this is the token the _masterId asserts control over and will be pointed to
    /// @param _topToken this is the token that will point to _tokenToPoint
    /// @param _controlOwner Additional Sanity check to make sure the address matches owner of token
     function pointRightToControlledArtwork(uint256 _masterId, uint256 _tokenToPoint, uint256 _topToken, address _controlOwner) external payable whenNotPaused {
        require(artworkIndexToControlPiece[_masterId] != 0);
        require(_owns(msg.sender, _masterId));  
        require(_ownsOrControls(msg.sender, _topToken, _masterId));
        require(_ownsOrControls(msg.sender, _topToken, _masterId));
        require(_shareControl(_masterId,_tokenToPoint));
        _assignRightpiece(_topToken,_tokenToPoint);
        Grant(_topToken, _tokenToPoint);
    }


     function pointLeftToControlledArtwork(uint256 _masterId, uint256 _tokenToPoint, uint256 _topToken, address _controlOwner) external payable whenNotPaused {
        require(artworkIndexToControlPiece[_masterId] != 0);
        require(_owns(msg.sender, _masterId));  
        require(_ownsOrControls(msg.sender, _topToken, _masterId));
         require(_owns(_controlOwner, _tokenToPoint));
        require(_shareControl(_masterId,_tokenToPoint));

        _assignLeftpiece(_topToken,_tokenToPoint);
        Grant(_topToken, _tokenToPoint);
    }


    // Allows a external contract to allow token owner to reset the right/left pieces on their token to 0;
     /// @dev Checks if a given address is the current owner of a particular Artwork.
    /// @param _topId this is the token that will have its control reassigned
          function removeRightpiece(uint256 _topId) external payable whenNotPaused {
        require(_owns(msg.sender, _topId));
        artworkIndexToRightpiece[_topId] = 0;
    }

          function removeLeftpiece(uint256 _topId) external payable whenNotPaused {
        require(_owns(msg.sender, _topId));
        artworkIndexToLeftpiece[_topId] = 0;
    }

    function shareControl(uint256 _tokenA, uint256 _tokenB) external view returns (bool){
        return _shareControl(_tokenA,_tokenB);
    }


}
/// @title Pixelicu: Collectible artworks on the Ethereum blockchain.
/// @dev The main Pixelicu contract, keeps track of artworks

contract ArtworkCore is ArtworkMinting {

    // Set in case the core contract is broken and an upgrade is required
    address public newContractAddress;

    /// @notice Creates the main Pixelicu smart contract instance.
    function ArtworkCore() public {
        // Starts paused.
        paused = true;

        // the creator of the contract is the initial CEO
        ceoAddress = msg.sender;

        // the creator of the contract is also the initial COO
        cooAddress = msg.sender;

        // start with the mythical artwork 0 - so we don't have generation-0 parent issues
        // we'll do this manually 
    }

    /// @dev Used to mark the smart contract as upgraded, in case there is a serious
    ///  breaking bug. This method does nothing but keep track of the new contract and
    ///  emit a message indicating that the new address is set. It's up to clients of this
    ///  contract to update to the new contract address in that case. (This contract will
    ///  be paused indefinitely if such an upgrade takes place.)
    /// @param _v2Address new address
    function setNewAddress(address _v2Address) external onlyCEO whenPaused {
        // See README.md for updgrade plan
        newContractAddress = _v2Address;
        ContractUpgrade(_v2Address);
    }

    /// @notice No tipping!
    /// @dev Reject all Ether from being sent here, unless it's from one of the
    ///  two auction contracts. (Hopefully, we can prevent user accidents.)
    function() external payable {
          require(
            msg.sender == address(saleAuction) ||
            msg.sender == address(couplingAuction)
        );
    }

    /// @notice Returns all the relevant information about a specific artwork.
    /// @param _id The ID of the artwork of interest.
    function getArtwork(uint256 _id)
        external
        view
        returns (
        uint256 birthTime,
        address creatorId,
        bytes artworkContent
    ) {
        Artwork storage art = artworks[_id];
        birthTime = uint256(art.birthTime);
        creatorId = art.creatorId;
        artworkContent = art.artworkContent;
    }

    /// @dev Override unpause so it requires all external contract addresses
    ///  to be set before contract can be unpaused. Also, we can't have
    ///  newContractAddress set either, because then the contract was upgraded.
    /// @notice This is public rather than external so we can call super.unpause
    ///  without using an expensive CALL.
    function unpause() public payable onlyCEO whenPaused {
        require(saleAuction != address(0));
        require(couplingAuction != address(0));
        require(newContractAddress == address(0));

        // Actually unpause the contract.
        super.unpause();
    }
    
   

    // @dev Allows the CFO to capture the balance available to the contract.
    function withdrawBalance() external onlyCFO {
        uint256 balance = this.balance;
        // Subtract all the currently pregnant artworks we have, plus 1 of margin.
        cfoAddress.transfer(balance);
    }
}


// @title Voting with delegation.
contract Contest {
    // This declares a new complex type which will
    // be used for variables later.
    // It will represent a single voter.
    struct Voter {
        uint weight; // weight is accumulated by delegation
        bool voted;  // if true, that person already voted
        address delegate; // person delegated to
        uint vote;   // index of the voted contestEntry
    }

    // This is a type for a single contestEntry.
    struct ContestEntry {
        uint voteCount; // number of accumulated votes
    }

    address public chairperson;

    // This declares a state variable that
    // stores a `Voter` struct for each possible address.
    mapping(address => Voter) public voters;

    // A dynamically-sized array of `ContestEntry` structs.
    ContestEntry[] public contestEntrys;

    /// Create a new contest to choose one of `contestEntryTokens`.
    constructor(uint256[] contestEntryTokens) public {
        chairperson = msg.sender;
        voters[chairperson].weight = 1;

        // For each of the provided contestEntry names,
        // create a new contestEntry object and add it
        // to the end of the array.
    }

    function addEntry(uint256 tokenId) public {
        contestEntrys.push(  ContestEntry(   {voteCount:0}  ) );
    }

    // Give `voter` the right to vote on this contest.
    // May only be called by `chairperson`.
    function giveRightToVote(address voter) public {
        // If the first argument of `require` evaluates
        // to `false`, execution terminates and all
        // changes to the state and to Ether balances
        // are reverted.
        // This used to consume all gas in old EVM versions, but
        // not anymore.
        // It is often a good idea to use `require` to check if
        // functions are called correctly.
        // As a second argument, you can also provide an
        // explanation about what went wrong.
        require(
            msg.sender == chairperson,
            "Only chairperson can give right to vote."
        );
        require(
            !voters[voter].voted,
            "The voter already voted."
        );
        require(voters[voter].weight == 0);
        voters[voter].weight = 1;
    }

    /// Delegate your vote to the voter `to`.
    function delegate(address to) public {
        // assigns reference
        Voter storage sender = voters[msg.sender];
        require(!sender.voted, "You already voted.");

        require(to != msg.sender, "Self-delegation is disallowed.");

        // Forward the delegation as long as
        // `to` also delegated.
        // In general, such loops are very dangerous,
        // because if they run too long, they might
        // need more gas than is available in a block.
        // In this case, the delegation will not be executed,
        // but in other situations, such loops might
        // cause a contract to get "stuck" completely.
        while (voters[to].delegate != address(0)) {
            to = voters[to].delegate;

            // We found a loop in the delegation, not allowed.
            require(to != msg.sender, "Found loop in delegation.");
        }

        // Since `sender` is a reference, this
        // modifies `voters[msg.sender].voted`
        sender.voted = true;
        sender.delegate = to;
        Voter storage delegate_ = voters[to];
        if (delegate_.voted) {
            // If the delegate already voted,
            // directly add to the number of votes
            contestEntrys[delegate_.vote].voteCount += sender.weight;
        } else {
            // If the delegate did not vote yet,
            // add to her weight.
            delegate_.weight += sender.weight;
        }
    }

    /// Give your vote (including votes delegated to you)
    /// to contestEntry `contestEntrys[contestEntry].name`.
    function vote(uint contestEntry) public {
        Voter storage sender = voters[msg.sender];
        require(!sender.voted, "Already voted.");
        sender.voted = true;
        sender.vote = contestEntry;

        // If `contestEntry` is out of the range of the array,
        // this will throw automatically and revert all
        // changes.
        contestEntrys[contestEntry].voteCount += sender.weight;
    }

    /// @dev Computes the winning contestEntry taking all
    /// previous votes into account.
    function winningContestEntry() public view
            returns (uint winningContestEntry_)
    {
        uint winningVoteCount = 0;
        for (uint p = 0; p < contestEntrys.length; p++) {
            if (contestEntrys[p].voteCount > winningVoteCount) {
                winningVoteCount = contestEntrys[p].voteCount;
                winningContestEntry_ = p;
            }
        }
    }

    
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_controlId","type":"uint256"}],"name":"assignControlPiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"cfoAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_partnerId","type":"uint256"}],"name":"removeCouplingPermission","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_preferredTransport","type":"string"}],"name":"tokenMetadata","outputs":[{"name":"infoUrl","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"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":"view","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":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToControlPiece","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_id","type":"uint256"}],"name":"getArtwork","outputs":[{"name":"birthTime","type":"uint256"},{"name":"creatorId","type":"address"},{"name":"artworkContent","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToLeftpiece","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_topId","type":"uint256"},{"name":"_rightId","type":"uint256"}],"name":"assignRightpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_addr","type":"address"},{"name":"_partnerId","type":"uint256"}],"name":"approveCoupling","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_newCEO","type":"address"}],"name":"setCEO","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_topId","type":"uint256"},{"name":"_leftId","type":"uint256"}],"name":"assignLeftpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_newCOO","type":"address"}],"name":"setCOO","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_username","type":"bytes32"}],"name":"setUsername","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_artworkId","type":"uint256"},{"name":"_startingPrice","type":"uint256"},{"name":"_endingPrice","type":"uint256"},{"name":"_duration","type":"uint256"}],"name":"createSaleAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToRightpiece","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToPublic","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newCFO","type":"address"}],"name":"setCFO","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_masterId","type":"uint256"},{"name":"_tokenToGrantControlOf","type":"uint256"},{"name":"_tokenToGrantControlTo","type":"uint256"}],"name":"grantControlpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_masterId","type":"uint256"},{"name":"_controlTargetId","type":"uint256"},{"name":"_receiverId","type":"uint256"},{"name":"_tokenToGrant","type":"uint256"},{"name":"_controlOwner","type":"address"}],"name":"grantLeftpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawBalance","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":false,"inputs":[{"name":"_masterId","type":"uint256"},{"name":"_tokenToPoint","type":"uint256"},{"name":"_topToken","type":"uint256"},{"name":"_controlOwner","type":"address"}],"name":"pointLeftToControlledArtwork","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"newContractAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setSaleAuctionAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"count","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_v2Address","type":"address"}],"name":"setNewAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenA","type":"uint256"},{"name":"_tokenB","type":"uint256"}],"name":"shareControl","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"secondsPerBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"coupleAllowedToAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_masterId","type":"uint256"},{"name":"_tokenToPoint","type":"uint256"},{"name":"_topToken","type":"uint256"},{"name":"_controlOwner","type":"address"}],"name":"pointRightToControlledArtwork","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"name":"ownerTokens","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"setTokenAsPrivate","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_masterId","type":"uint256"},{"name":"_controlTargetId","type":"uint256"},{"name":"_receiverId","type":"uint256"},{"name":"_tokenToGrant","type":"uint256"},{"name":"_controlOwner","type":"address"}],"name":"grantRightpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawAuctionBalances","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"autoCreationFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_topId","type":"uint256"}],"name":"removeLeftpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_artworkId","type":"uint256"},{"name":"_startingPrice","type":"uint256"},{"name":"_endingPrice","type":"uint256"},{"name":"_duration","type":"uint256"}],"name":"createCouplingAuction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transfer","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_artworkContent","type":"bytes"}],"name":"createArtwork","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"setTokenAsPublic","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_partnerId","type":"uint256"},{"name":"_topId","type":"uint256"}],"name":"bidOnCouplingAuction","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"cooAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"erc721Metadata","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"artworkIndexToOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_artworkContent","type":"bytes"}],"name":"createPromoArtwork","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_topId","type":"uint256"}],"name":"removeRightpiece","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"PROMO_CREATION_LIMIT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"addressToUsername","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_contractAddress","type":"address"}],"name":"setMetadataAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"saleAuction","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"setCouplingAuctionAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"val","type":"uint256"}],"name":"setAutoCreationFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"couplingAuction","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"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":"owner","type":"address"},{"indexed":false,"name":"approved","type":"address"},{"indexed":false,"name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"artworkContent","type":"bytes"}],"name":"Birth","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"topId","type":"uint256"},{"indexed":false,"name":"bottomId","type":"uint256"}],"name":"CoupledArt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"owner","type":"address"},{"indexed":false,"name":"topId","type":"uint256"},{"indexed":false,"name":"bottomId","type":"uint256"}],"name":"CoupledArtRightpiece","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_tokenToGrantControlOf","type":"uint256"},{"indexed":false,"name":"_tokenToGrantControlTo","type":"uint256"}],"name":"Grant","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_tokenToGrantControlOf","type":"uint256"},{"indexed":false,"name":"_tokenToGrantControlTo","type":"uint256"}],"name":"GrantControl","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newContract","type":"address"}],"name":"ContractUpgrade","type":"event"}]

60806040526000600260146101000a81548160ff021916908315150217905550600f60035566071afd498d000060125534801561003b57600080fd5b506001600260146101000a81548160ff021916908315150217905550336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550614cb3806100e76000396000f300608060405260043610610301576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806301ffc9a7146103b75780630506af941461041b5780630519ce7914610445578063051fae021461049c5780630560ff44146104bc57806305e455461461057a57806306fdde03146105a5578063095ea7b3146106355780630a0f816814610682578063127399c2146106d9578063167ddf6e1461071a57806316a9f8c0146107fa57806318160ddd1461083b57806319c35303146108665780631b9a24a41461089057806323b872dd146108d057806327d7874c1461093057806328b8d74c146109665780632ba73c15146109905780633157506a146109c657806331d7c37b146109ea5780633d7d3f5a14610a575780633f4ba83a14610aa257806348675a5914610aac5780634b61f30314610aed5780634e0a337914610b325780635397ea7c14610b755780635c6936d914610ba95780635c975abb14610c075780635fd8c71014610c365780636352211e14610c4d57806364b5c8ac14610cba5780636af04a5714610d0e5780636fbde40d14610d6557806370a0823114610da85780637158798814610dff5780637604369e14610e425780637a7d493714610e915780638302c36614610ebc57806383ef07e714610f295780638456cb5914610f7d5780638462151c14610f9457806385f5ed241461102c578063917798a01461104c57806391876e57146110aa57806395b138f6146110c157806395d89b41146110ec578063a414e91b1461117c578063a7b049f31461119c578063a9059cbb146111e7578063ab2694ad14611227578063abd9140414611255578063aec8f15c14611275578063b047fb501461129f578063bc4006f5146112f6578063cd5841ed1461134d578063d03f4e53146113ba578063db7e6808146113e8578063defb958414611408578063e07a0baa14611433578063e17b25af14611492578063e6cbe351146114d5578063e78bef901461152c578063f3d89c491461156f578063fba3cc381461159c575b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806103aa5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156103b557600080fd5b005b3480156103c357600080fd5b5061040160048036038101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191690602001909291905050506115f3565b604051808215151515815260200191505060405180910390f35b6104436004803603810190808035906020019092919080359060200190929190505050611904565b005b34801561045157600080fd5b5061045a611943565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104ba60048036038101908080359060200190929190505050611969565b005b3480156104c857600080fd5b506104ff600480360381019080803590602001909291908035906020019082018035906020019190919293919293905050506119ef565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561053f578082015181840152602081019050610524565b50505050905090810190601f16801561056c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561058657600080fd5b5061058f611b78565b6040518082815260200191505060405180910390f35b3480156105b157600080fd5b506105ba611b7e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105fa5780820151818401526020810190506105df565b50505050905090810190601f1680156106275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561064157600080fd5b50610680600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611bb7565b005b34801561068e57600080fd5b50610697611c95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106e557600080fd5b5061070460048036038101908080359060200190929190505050611cba565b6040518082815260200191505060405180910390f35b34801561072657600080fd5b5061074560048036038101908080359060200190929190505050611cd2565b604051808481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156107bd5780820151818401526020810190506107a2565b50505050905090810190601f1680156107ea5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34801561080657600080fd5b5061082560048036038101908080359060200190929190505050611deb565b6040518082815260200191505060405180910390f35b34801561084757600080fd5b50610850611e03565b6040518082815260200191505060405180910390f35b61088e6004803603810190808035906020019092919080359060200190929190505050611e13565b005b6108ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e67565b005b61092e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611eee565b005b610964600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fbb565b005b61098e6004803603810190808035906020019092919080359060200190929190505050612095565b005b6109c4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506120e9565b005b6109e860048036038101908080356000191690602001909291905050506121c4565b005b3480156109f657600080fd5b50610a156004803603810190808035906020019092919050505061222b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a6357600080fd5b50610aa06004803603810190808035906020019092919080359060200190929190803590602001909291908035906020019092919050505061225e565b005b610aaa6123b6565b005b348015610ab857600080fd5b50610ad76004803603810190808035906020019092919050505061254f565b6040518082815260200191505060405180910390f35b348015610af957600080fd5b50610b1860048036038101908080359060200190929190505050612567565b604051808215151515815260200191505060405180910390f35b348015610b3e57600080fd5b50610b73600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612587565b005b610ba7600480360381019080803590602001909291908035906020019092919080359060200190929190505050612662565b005b610c0560048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612739565b005b348015610c1357600080fd5b50610c1c612847565b604051808215151515815260200191505060405180910390f35b348015610c4257600080fd5b50610c4b61285a565b005b348015610c5957600080fd5b50610c786004803603810190808035906020019092919050505061293e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610d0c600480360381019080803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506129b7565b005b348015610d1a57600080fd5b50610d23612a9a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d7157600080fd5b50610da6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612ac0565b005b348015610db457600080fd5b50610de9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c0f565b6040518082815260200191505060405180910390f35b348015610e0b57600080fd5b50610e40600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612c58565b005b348015610e4e57600080fd5b50610e776004803603810190808035906020019092919080359060200190929190505050612d75565b604051808215151515815260200191505060405180910390f35b348015610e9d57600080fd5b50610ea6612d89565b6040518082815260200191505060405180910390f35b348015610ec857600080fd5b50610ee760048036038101908080359060200190929190505050612d8f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610f7b600480360381019080803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc2565b005b348015610f8957600080fd5b50610f92612ea6565b005b348015610fa057600080fd5b50610fd5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612fea565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015611018578082015181840152602081019050610ffd565b505050509050019250505060405180910390f35b61104a60048036038101908080359060200190929190505050613137565b005b6110a860048036038101908080359060200190929190803590602001909291908035906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613197565b005b3480156110b657600080fd5b506110bf6132a5565b005b3480156110cd57600080fd5b506110d66134ee565b6040518082815260200191505060405180910390f35b3480156110f857600080fd5b506111016134f4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611141578082015181840152602081019050611126565b50505050905090810190601f16801561116e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61119a6004803603810190808035906020019092919050505061352d565b005b3480156111a857600080fd5b506111e56004803603810190808035906020019092919080359060200190929190803590602001909291908035906020019092919050505061357a565b005b611225600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506136d2565b005b611253600480360381019080803590602001908201803590602001919091929391929390505050613843565b005b61127360048036038101908080359060200190929190505050613913565b005b61129d6004803603810190808035906020019092919080359060200190929190505050613973565b005b3480156112ab57600080fd5b506112b4613b3c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561130257600080fd5b5061130b613b62565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561135957600080fd5b5061137860048036038101908080359060200190929190505050613b88565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6113e6600480360381019080803590602001908201803590602001919091929391929390505050613bbb565b005b61140660048036038101908080359060200190929190505050613cde565b005b34801561141457600080fd5b5061141d613d2b565b6040518082815260200191505060405180910390f35b34801561143f57600080fd5b50611474600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613d31565b60405180826000191660001916815260200191505060405180910390f35b34801561149e57600080fd5b506114d3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613d49565b005b3480156114e157600080fd5b506114ea613de8565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561153857600080fd5b5061156d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613e0e565b005b34801561157b57600080fd5b5061159a60048036038101908080359060200190929190505050613f5d565b005b3480156115a857600080fd5b506115b1613fc3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600060405180807f737570706f727473496e74657266616365286279746573342900000000000000815250601901905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806118fd575060405180807f746f6b656e4d657461646174612875696e743235362c737472696e6729000000815250601d019050604051809103902060405180807f746f6b656e734f664f776e6572286164647265737329000000000000000000008152506016019050604051809103902060405180807f7472616e7366657246726f6d28616464726573732c616464726573732c75696e81526020017f74323536290000000000000000000000000000000000000000000000000000008152506025019050604051809103902060405180807f7472616e7366657228616464726573732c75696e7432353629000000000000008152506019019050604051809103902060405180807f617070726f766528616464726573732c75696e743235362900000000000000008152506018019050604051809103902060405180807f6f776e65724f662875696e7432353629000000000000000000000000000000008152506010019050604051809103902060405180807f62616c616e63654f6628616464726573732900000000000000000000000000008152506012019050604051809103902060405180807f746f74616c537570706c79282900000000000000000000000000000000000000815250600d019050604051809103902060405180807f73796d626f6c28290000000000000000000000000000000000000000000000008152506008019050604051809103902060405180807f6e616d6528290000000000000000000000000000000000000000000000000000815250600601905060405180910390201818181818181818187bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b600260149054906101000a900460ff1615151561192057600080fd5b61192a3383613fe9565b151561193557600080fd5b61193f8282614055565b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1615151561198557600080fd5b61198f3382613fe9565b151561199a57600080fd5b33600e600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60606119f9614b7d565b60008073ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515611a5857600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663cb4799f28787876040518463ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180848152602001806020018281038252848482818152602001925080828437820191505094505050505060a060405180830381600087803b158015611b0b57600080fd5b505af1158015611b1f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525060a0811015611b4457600080fd5b81019080919082608001805190602001909291905050508092508193505050611b6d8282614071565b925050509392505050565b60135481565b6040805190810160405280600881526020017f676c69612e69637500000000000000000000000000000000000000000000000081525081565b600260149054906101000a900460ff16151515611bd357600080fd5b611bdd3382613fe9565b1515611be857600080fd5b611bf281836140cd565b7f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925338383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d6020528060005260406000206000915090505481565b60008060606000600485815481101515611ce857fe5b906000526020600020906002020190508060000160149054906101000a900467ffffffffffffffff1667ffffffffffffffff1693508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250806001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ddc5780601f10611db157610100808354040283529160200191611ddc565b820191906000526020600020905b815481529060010190602001808311611dbf57829003601f168201915b50505050509150509193909250565b600b6020528060005260406000206000915090505481565b6000600160048054905003905090565b600260149054906101000a900460ff16151515611e2f57600080fd5b611e393383613fe9565b1515611e4457600080fd5b611e4e8282614123565b1515611e5957600080fd5b611e638282614265565b5050565b600260149054906101000a900460ff16151515611e8357600080fd5b611e8d3382613fe9565b1515611e9857600080fd5b81600e600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600260149054906101000a900460ff16151515611f0a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515611f4657600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515611f8157600080fd5b611f8b3382614349565b1515611f9657600080fd5b611fa08382613fe9565b1515611fab57600080fd5b611fb68383836143b5565b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561201657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561205257600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260149054906101000a900460ff161515156120b157600080fd5b6120bb3383613fe9565b15156120c657600080fd5b6120d08282614123565b15156120db57600080fd5b6120e582826145b7565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561214457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561218057600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260149054906101000a900460ff161515156121e057600080fd5b80600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020816000191690555050565b600a6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff1615151561227a57600080fd5b6122843385613fe9565b151561228f57600080fd5b6122bb84600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166140cd565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327ebe40a85858585336040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200195505050505050600060405180830381600087803b15801561239857600080fd5b505af11580156123ac573d6000803e3d6000fd5b5050505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561241157600080fd5b600260149054906101000a900460ff16151561242c57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415151561248a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156124e857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561254557600080fd5b61254d614679565b565b600c6020528060005260406000206000915090505481565b60076020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156125e257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561261e57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260149054906101000a900460ff1615151561267e57600080fd5b6000600d600085815260200190815260200160002054141515156126a157600080fd5b6126ab3384613fe9565b15156126b657600080fd5b6126c133838561470c565b15156126cc57600080fd5b6126d68383614796565b15156126e157600080fd5b600d6000828152602001908152602001600020507f3a48ec3a1fdca3272205273ae7f6d4fa1c5467f52f4574e6318452aa2167a3a38282604051808381526020018281526020019250505060405180910390a1505050565b600260149054906101000a900460ff1615151561275557600080fd5b6000600d6000878152602001908152602001600020541415151561277857600080fd5b6127823386613fe9565b151561278d57600080fd5b61279833838761470c565b15156127a357600080fd5b6127ad8184613fe9565b15156127b857600080fd5b6127c28185613fe9565b15156127cd57600080fd5b6127d78585614796565b15156127e257600080fd5b6127ec8584614796565b15156127f757600080fd5b61280183836145b7565b7f12f772f6e83b6b65c3a54e2e3b954182508de4d2a1ce498a40613a11343dd0e48383604051808381526020018281526020019250505060405180910390a15050505050565b600260149054906101000a900460ff1681565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128b857600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16319050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561293a573d6000803e3d6000fd5b5050565b60006006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156129b257600080fd5b919050565b600260149054906101000a900460ff161515156129d357600080fd5b6000600d600086815260200190815260200160002054141515156129f657600080fd5b612a003385613fe9565b1515612a0b57600080fd5b612a1633838661470c565b1515612a2157600080fd5b612a2b8184613fe9565b1515612a3657600080fd5b612a408484614796565b1515612a4b57600080fd5b612a5582846145b7565b7f12f772f6e83b6b65c3a54e2e3b954182508de4d2a1ce498a40613a11343dd0e48284604051808381526020018281526020019250505060405180910390a150505050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b1d57600080fd5b8190508073ffffffffffffffffffffffffffffffffffffffff166385b861886040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015612b8457600080fd5b505af1158015612b98573d6000803e3d6000fd5b505050506040513d6020811015612bae57600080fd5b81019080805190602001909291905050501515612bca57600080fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612cb357600080fd5b600260149054906101000a900460ff161515612cce57600080fd5b80601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f450db8da6efbe9c22f2347f7c2021231df1fc58d3ae9a2fa75d39fa44619930581604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000612d818383614796565b905092915050565b60035481565b600e6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260149054906101000a900460ff16151515612dde57600080fd5b6000600d60008681526020019081526020016000205414151515612e0157600080fd5b612e0b3385613fe9565b1515612e1657600080fd5b612e2133838661470c565b1515612e2c57600080fd5b612e3733838661470c565b1515612e4257600080fd5b612e4c8484614796565b1515612e5757600080fd5b612e618284614265565b7f12f772f6e83b6b65c3a54e2e3b954182508de4d2a1ce498a40613a11343dd0e48284604051808381526020018281526020019250505060405180910390a150505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480612f4e57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80612fa65750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515612fb157600080fd5b600260149054906101000a900460ff16151515612fcd57600080fd5b6001600260146101000a81548160ff021916908315150217905550565b6060600060606000806000612ffe87612c0f565b945060008514156130415760006040519080825280602002602001820160405280156130395781602001602082028038833980820191505090505b50955061312d565b846040519080825280602002602001820160405280156130705781602001602082028038833980820191505090505b50935061307b611e03565b925060009150600190505b8281111515613129578673ffffffffffffffffffffffffffffffffffffffff166006600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561311c5780848381518110151561310557fe5b906020019060200201818152505081806001019250505b8080600101915050613086565b8395505b5050505050919050565b600260149054906101000a900460ff1615151561315357600080fd5b61315d3382613fe9565b151561316857600080fd5b60006007600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600260149054906101000a900460ff161515156131b357600080fd5b6000600d600087815260200190815260200160002054141515156131d657600080fd5b6131e03386613fe9565b15156131eb57600080fd5b6131f633838761470c565b151561320157600080fd5b61320b8184613fe9565b151561321657600080fd5b6132208185613fe9565b151561322b57600080fd5b6132358585614796565b151561324057600080fd5b61324a8584614796565b151561325557600080fd5b61325f8383614265565b7f12f772f6e83b6b65c3a54e2e3b954182508de4d2a1ce498a40613a11343dd0e48383604051808381526020018281526020019250505060405180910390a15050505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061334d57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806133a55750600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b15156133b057600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd8c7106040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b15801561343657600080fd5b505af115801561344a573d6000803e3d6000fd5b50505050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635fd8c7106040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381600087803b1580156134d457600080fd5b505af11580156134e8573d6000803e3d6000fd5b50505050565b60125481565b6040805190810160405280600481526020017f474c49410000000000000000000000000000000000000000000000000000000081525081565b600260149054906101000a900460ff1615151561354957600080fd5b6135533382613fe9565b151561355e57600080fd5b6000600b60008381526020019081526020016000208190555050565b600260149054906101000a900460ff1615151561359657600080fd5b6135a03385613fe9565b15156135ab57600080fd5b6135d784601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166140cd565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166327ebe40a85858585336040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808681526020018581526020018481526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200195505050505050600060405180830381600087803b1580156136b457600080fd5b505af11580156136c8573d6000803e3d6000fd5b5050505050505050565b600260149054906101000a900460ff161515156136ee57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561372a57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561376557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156137c257600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415151561381f57600080fd5b6138293382613fe9565b151561383457600080fd5b61383f3383836143b5565b5050565b6000600260149054906101000a900460ff1615151561386157600080fd5b339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156138bf57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b60125434101515156138d057600080fd5b61390d83838080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505082836147e6565b50505050565b600260149054906101000a900460ff1615151561392f57600080fd5b6139393382613fe9565b151561394457600080fd5b60016007600083815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600260149054906101000a900460ff1615151561399157600080fd5b61399b3383613fe9565b15156139a657600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c55d0f56846040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b158015613a3757600080fd5b505af1158015613a4b573d6000803e3d6000fd5b505050506040513d6020811015613a6157600080fd5b81019080805190602001909291905050509050803410151515613a8357600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663454a2ab334856040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808281526020019150506000604051808303818588803b158015613b1457600080fd5b505af1158015613b28573d6000803e3d6000fd5b5050505050613b3782846145b7565b505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60066020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613c1957600080fd5b339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415613c7757600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690505b611388601354101515613c8957600080fd5b601360008154809291906001019190505550613cd883838080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505082836147e6565b50505050565b600260149054906101000a900460ff16151515613cfa57600080fd5b613d043382613fe9565b1515613d0f57600080fd5b6000600c60008381526020019081526020016000208190555050565b61138881565b60086020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613da457600080fd5b80601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613e6b57600080fd5b8190508073ffffffffffffffffffffffffffffffffffffffff1663025c9fc26040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015613ed257600080fd5b505af1158015613ee6573d6000803e3d6000fd5b505050506040513d6020811015613efc57600080fd5b81019080805190602001909291905050501515613f1857600080fd5b80601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613fb957600080fd5b8060128190555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008273ffffffffffffffffffffffffffffffffffffffff166006600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b80600d6000848152602001908152602001600020819055505050565b606080600080846040519080825280601f01601f1916602001820160405280156140aa5781602001602082028038833980820191505090505b5092506020830191508590506140c1828287614b32565b82935050505092915050565b80600a600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60008060006006600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691506006600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148061422c57508173ffffffffffffffffffffffffffffffffffffffff16600e600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b8061425b5750600115156007600086815260200190815260200160002060009054906101000a900460ff161515145b9250505092915050565b600060048381548110151561427657fe5b9060005260206000209060020201905081600c6000858152602001908152602001600020819055507f64d52041b574f975db4f3740716848a7fd244be1895f7c42c8ef452d615ef5326006600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168484604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b60008273ffffffffffffffffffffffffffffffffffffffff16600a600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614905092915050565b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505550816006600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151561451357600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600190039190505550600a600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef838383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050565b80600b6000848152602001908152602001600020819055507f98fd493d52a0c0a536dae6d3bd6ae26da574f30c33a64e9b58c6bc3c39171d606006600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168383604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156146d457600080fd5b600260149054906101000a900460ff1615156146ef57600080fd5b6000600260146101000a81548160ff021916908315150217905550565b60008373ffffffffffffffffffffffffffffffffffffffff166006600085815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061478d575081600d600085815260200190815260200160002054145b90509392505050565b600082600d60008481526020019081526020016000205414806147de5750600d600084815260200190815260200160002054600d600084815260200190815260200160002054145b905092915050565b60006147f0614ba0565b60008015156005876040518082805190602001908083835b60208310151561482d5780518252602082019150602081019050602083039250614808565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16151514151561487c57600080fd5b6060604051908101604052808573ffffffffffffffffffffffffffffffffffffffff1681526020014267ffffffffffffffff16815260200187815250915060016004839080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550604082015181600101908051906020019061497c929190614be2565b50505003905060016005876040518082805190602001908083835b6020831015156149bc5780518252602082019150602081019050602083039250614997565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055508081141515614a1457600080fd5b7f27e31f7a49a1c77bdb8ecbddcd737ca66b3c4cdaba3568a083c5e4fc79f54777826000015187604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015614aad578082015181840152602081019050614a92565b50505050905090810190601f168015614ada5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a16000600b6000838152602001908152602001600020819055506000600c600083815260200190815260200160002081905550614b26600086836143b5565b80925050509392505050565b60005b602082101515614b5a5782518452602084019350602083019250602082039150614b35565b6001826020036101000a0390508019835116818551168181178652505050505050565b608060405190810160405280600490602082028038833980820191505090505090565b606060405190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10614c2357805160ff1916838001178555614c51565b82800160010185558215614c51579182015b82811115614c50578251825591602001919060010190614c35565b5b509050614c5e9190614c62565b5090565b614c8491905b80821115614c80576000816000905550600101614c68565b5090565b905600a165627a7a72305820c0ecdaab17816f79f6e007c548ba8b741cebdf42e569815021ccebd9f12757340029

Deployed ByteCode Sourcemap

65933:3146:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67533:11;;;;;;;;;;;67511:34;;:10;:34;;;:89;;;;67584:15;;;;;;;;;;;67562:38;;:10;:38;;;67511:89;67489:122;;;;;;;;65933:3146;20078:328;;8:9:-1;5:2;;;30:1;27;20:12;5:2;20078:328:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;59585:203;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4007:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4007:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;17270:223;;;;;;;;;;;;;;;;;;;;;;;;;;29888:353;;8:9:-1;5:2;;;30:1;27;20:12;5:2;29888:353:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;29888:353:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57797:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57797:32:0;;;;;;;;;;;;;;;;;;;;;;;18956:40;;8:9:-1;5:2;;;30:1;27;20:12;5:2;18956:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;18956:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24396:415;;8:9:-1;5:2;;;30:1;27;20:12;5:2;24396:415:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3975:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3975:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;10271:62;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10271:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67762:358;;8:9:-1;5:2;;;30:1;27;20:12;5:2;67762:358:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;67762:358:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10138:59;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10138:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26250:95;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26250:95:0;;;;;;;;;;;;;;;;;;;;;;;60053:247;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16435:224;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25295:822;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4994:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;59797:242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5564:140;;;;;;;;;;;;;;;;;;;;;;;;;;;;16671:154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10067:58;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10067:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55270:988;;8:9:-1;5:2;;;30:1;27;20:12;5:2;55270:988:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68485:278;;;;;;10204:60;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10204:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9495:53;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9495:53:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5283:132;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5283:132:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;62749:544;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61661:688;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4174:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4174:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;68860:216;;8:9:-1;5:2;;;30:1;27;20:12;5:2;68860:216:0;;;;;;26486:202;;8:9:-1;5:2;;;30:1;27;20:12;5:2;26486:202:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64441:552;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66056:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;66056:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;53285:354;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53285:354:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;22360:124;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22360:124:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67050:203;;8:9:-1;5:2;;;30:1;27;20:12;5:2;67050:203:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;65649:140;;8:9:-1;5:2;;;30:1;27;20:12;5:2;65649:140:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8653:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8653:35:0;;;;;;;;;;;;;;;;;;;;;;;10605:58;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10605:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63865:565;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6231:83;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6231:83:0;;;;;;27161:918;;8:9:-1;5:2;;;30:1;27;20:12;5:2;27161:918:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;27161:918:0;;;;;;;;;;;;;;;;;17048:203;;;;;;;;;;;;;;;;;;;;;;;;;;60958:690;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;57333:147;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57333:147:0;;;;;;52432:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52432:41:0;;;;;;;;;;;;;;;;;;;;;;;19003:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19003:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;19003:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65470:171;;;;;;;;;;;;;;;;;;;;;;;;;;54252:804;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54252:804:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22918:1042;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58502:321;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;16837:201;;;;;;;;;;;;;;;;;;;;;;;;;;56525:597;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4039:25;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4039:25:0;;;;;;;;;;;;;;;;;;;;;;;;;;;19105:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;19105:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;9433:55;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9433:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58029:362;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65283:173;;;;;;;;;;;;;;;;;;;;;;;;;;57667:51;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57667:51:0;;;;;;;;;;;;;;;;;;;;;;;9555:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9555:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;20490:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;20490:138:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10892:35;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10892:35:0;;;;;;;;;;;;;;;;;;;;;;;;;;;53766:374;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53766:374:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;52699:98;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52699:98:0;;;;;;;;;;;;;;;;;;;;;;;;;;10934:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10934:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;20078:328;20149:4;19210:38;;;;;;;;;;;;;;;;;;;20308:41;;;:12;:41;;;;20307:90;;;;19784:42;;;;;;;;;;;;;;;;;;;19729:35;;;;;;;;;;;;;;;;;;;19659:50;;;;;;;;;;;;;;;;;;;;;;;;19601:38;;;;;;;;;;;;;;;;;;;19544:37;;;;;;;;;;;;;;;;;;;19495:29;;;;;;;;;;;;;;;;;;;19444:31;;;;;;;;;;;;;;;;;;;19398:26;;;;;;;;;;;;;;;;;;;19357:21;;;;;;;;;;;;;;;;;;;19318:19;;;;;;;;;;;;;;;;;;;19311:68;:114;:165;:214;:271;:329;:399;:454;:516;20355:41;;;:12;:41;;;;20307:90;20299:99;;20078:328;;;:::o;59585:203::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;59702:27;59708:10;59720:8;59702:5;:27::i;:::-;59694:36;;;;;;;;59740:40;59760:8;59769:10;59740:19;:40::i;:::-;59585:203;;:::o;4007:25::-;;;;;;;;;;;;;:::o;17270:223::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;17397:29;17403:10;17415;17397:5;:29::i;:::-;17389:38;;;;;;;;17475:10;17438:22;:34;17461:10;17438:34;;;;;;;;;;;;:47;;;;;;;;;;;;;;;;;;17270:223;:::o;29888:353::-;29980:14;30055:24;;:::i;:::-;30090:13;30041:1;30015:28;;:14;;;;;;;;;;;:28;;;;30007:37;;;;;;;;30132:14;;;;;;;;;;;:26;;;30159:8;30169:19;;30132:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30132:57:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30132:57:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;13:3;8;5:12;2:2;;;30:1;27;20:12;2:2;30132:57:0;;;;;;;;;;;;;;;;;;;;;30114:75;;;;;;;;30209:24;30219:6;30227:5;30209:9;:24::i;:::-;30202:31;;29888:353;;;;;;;:::o;57797:32::-;;;;:::o;18956:40::-;;;;;;;;;;;;;;;;;;;;:::o;24396:415::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;24589:27;24595:10;24607:8;24589:5;:27::i;:::-;24581:36;;;;;;;;24699:23;24708:8;24718:3;24699:8;:23::i;:::-;24768:35;24777:10;24789:3;24794:8;24768:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24396:415;;:::o;3975:25::-;;;;;;;;;;;;;:::o;10271:62::-;;;;;;;;;;;;;;;;;:::o;67762:358::-;67855:17;67883;67911:20;67950:19;67972:8;67981:3;67972:13;;;;;;;;;;;;;;;;;;;;67950:35;;68016:3;:13;;;;;;;;;;;;68008:22;;67996:34;;68053:3;:13;;;;;;;;;;;;68041:25;;68094:3;:18;;68077:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67762:358;;;;;;:::o;10138:59::-;;;;;;;;;;;;;;;;;:::o;26250:95::-;26294:4;26336:1;26318:8;:15;;;;:19;26311:26;;26250:95;:::o;60053:247::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;60164:25;60170:10;60182:6;60164:5;:25::i;:::-;60156:34;;;;;;;;60209:38;60230:6;60238:8;60209:20;:38::i;:::-;60201:47;;;;;;;;60258:34;60276:6;60283:8;60258:17;:34::i;:::-;60053:247;;:::o;16435:224::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;16568:29;16574:10;16586;16568:5;:29::i;:::-;16560:38;;;;;;;;16646:5;16609:22;:34;16632:10;16609:34;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;16435:224;;:::o;25295:822::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;25556:1;25541:17;;:3;:17;;;;25533:26;;;;;;;;25823:4;25808:20;;:3;:20;;;;25800:29;;;;;;;;25899:34;25912:10;25924:8;25899:12;:34::i;:::-;25891:43;;;;;;;;25953:22;25959:5;25966:8;25953:5;:22::i;:::-;25945:31;;;;;;;;26078;26088:5;26095:3;26100:8;26078:9;:31::i;:::-;25295:822;;;:::o;4994:140::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;5090:1;5071:21;;:7;:21;;;;5063:30;;;;;;;;5119:7;5106:10;;:20;;;;;;;;;;;;;;;;;;4994:140;:::o;59797:242::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;59906:25;59912:10;59924:6;59906:5;:25::i;:::-;59898:34;;;;;;;;59951:37;59972:6;59980:7;59951:20;:37::i;:::-;59943:46;;;;;;;;59999:32;60016:6;60023:7;59999:16;:32::i;:::-;59797:242;;:::o;5564:140::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;5660:1;5641:21;;:7;:21;;;;5633:30;;;;;;;;5689:7;5676:10;;:20;;;;;;;;;;;;;;;;;;5564:140;:::o;16671:154::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;16808:9;16776:17;:29;16794:10;16776:29;;;;;;;;;;;;;;;:41;;;;;;;16671:154;:::o;10067:58::-;;;;;;;;;;;;;;;;;;;;;;:::o;55270:988::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;55666:29;55672:10;55684;55666:5;:29::i;:::-;55658:38;;;;;;;;55907:33;55916:10;55928:11;;;;;;;;;;;55907:8;:33::i;:::-;56084:11;;;;;;;;;;;:25;;;56124:10;56149:14;56178:12;56205:9;56229:10;56084:166;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56084:166:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56084:166:0;;;;55270:988;;;;:::o;68485:278::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;6047:6;;;;;;;;;;;6039:15;;;;;;;;68580:1;68557:25;;:11;;;;;;;;;;;:25;;;;68549:34;;;;;;;;68629:1;68602:29;;:15;;;;;;;;;;;:29;;;;68594:38;;;;;;;;68681:1;68651:32;;:18;;;;;;;;;;;:32;;;68643:41;;;;;;;;68740:15;:13;:15::i;:::-;68485:278::o;10204:60::-;;;;;;;;;;;;;;;;;:::o;9495:53::-;;;;;;;;;;;;;;;;;;;;;;:::o;5283:132::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;5371:1;5352:21;;:7;:21;;;;5344:30;;;;;;;;5400:7;5387:10;;:20;;;;;;;;;;;;;;;;;;5283:132;:::o;62749:544::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;62952:1;62911:26;:37;62938:9;62911:37;;;;;;;;;;;;:42;;62903:51;;;;;;;;62973:28;62979:10;62991:9;62973:5;:28::i;:::-;62965:37;;;;;;;;63023:62;63039:10;63051:22;63075:9;63023:15;:62::i;:::-;63015:71;;;;;;;;63105:47;63119:9;63129:22;63105:13;:47::i;:::-;63097:56;;;;;;;;63164:26;:50;63191:22;63164:50;;;;;;;;;;;;63225:60;63238:22;63262;63225:60;;;;;;;;;;;;;;;;;;;;;;;;62749:544;;;:::o;61661:688::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;61887:1;61846:26;:37;61873:9;61846:37;;;;;;;;;;;;:42;;61838:51;;;;;;;;61908:28;61914:10;61926:9;61908:5;:28::i;:::-;61900:37;;;;;;;;61956:53;61972:10;61984:13;61999:9;61956:15;:53::i;:::-;61948:62;;;;;;;;62030:33;62036:13;62051:11;62030:5;:33::i;:::-;62022:42;;;;;;;;62083:38;62089:13;62104:16;62083:5;:38::i;:::-;62075:47;;;;;;;;62141:41;62155:9;62165:16;62141:13;:41::i;:::-;62133:50;;;;;;;;62202:36;62216:9;62226:11;62202:13;:36::i;:::-;62194:45;;;;;;;;62251:43;62268:11;62280:13;62251:16;:43::i;:::-;62306:33;62312:11;62325:13;62306:33;;;;;;;;;;;;;;;;;;;;;;;;61661:688;;;;;:::o;4174:26::-;;;;;;;;;;;;;:::o;68860:216::-;68915:15;4466:10;;;;;;;;;;;4452:24;;:10;:24;;;4444:33;;;;;;;;68933:4;:12;;;68915:30;;69040:10;;;;;;;;;;;:19;;:28;69060:7;69040:28;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;69040:28:0;68860:216;:::o;26486:202::-;26571:13;26610:19;:29;26630:8;26610:29;;;;;;;;;;;;;;;;;;;;;26602:37;;26677:1;26660:19;;:5;:19;;;;26652:28;;;;;;;;26486:202;;;:::o;64441:552::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;64654:1;64613:26;:37;64640:9;64613:37;;;;;;;;;;;;:42;;64605:51;;;;;;;;64675:28;64681:10;64693:9;64675:5;:28::i;:::-;64667:37;;;;;;;;64725:49;64741:10;64753:9;64764;64725:15;:49::i;:::-;64717:58;;;;;;;;64795:35;64801:13;64816;64795:5;:35::i;:::-;64787:44;;;;;;;;64850:38;64864:9;64874:13;64850;:38::i;:::-;64842:47;;;;;;;;64902:41;64919:9;64929:13;64902:16;:41::i;:::-;64954:31;64960:9;64971:13;64954:31;;;;;;;;;;;;;;;;;;;;;;;;64441:552;;;;:::o;66056:33::-;;;;;;;;;;;;;:::o;53285:354::-;53362:34;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;53416:8;53362:63;;53507:17;:36;;;:38;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;53507:38:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;53507:38:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;53507:38:0;;;;;;;;;;;;;;;;53499:47;;;;;;;;53614:17;53600:11;;:31;;;;;;;;;;;;;;;;;;53285:354;;:::o;22360:124::-;22416:13;22449:19;:27;22469:6;22449:27;;;;;;;;;;;;;;;;22442:34;;22360:124;;;:::o;67050:203::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;6047:6;;;;;;;;;;;6039:15;;;;;;;;67197:10;67176:18;;:31;;;;;;;;;;;;;;;;;;67218:27;67234:10;67218:27;;;;;;;;;;;;;;;;;;;;;;67050:203;:::o;65649:140::-;65728:4;65751:30;65765:7;65773;65751:13;:30::i;:::-;65744:37;;65649:140;;;;:::o;8653:35::-;;;;:::o;10605:58::-;;;;;;;;;;;;;;;;;;;;;;:::o;63865:565::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;64079:1;64038:26;:37;64065:9;64038:37;;;;;;;;;;;;:42;;64030:51;;;;;;;;64100:28;64106:10;64118:9;64100:5;:28::i;:::-;64092:37;;;;;;;;64150:49;64166:10;64178:9;64189;64150:15;:49::i;:::-;64142:58;;;;;;;;64219:49;64235:10;64247:9;64258;64219:15;:49::i;:::-;64211:58;;;;;;;;64288:38;64302:9;64312:13;64288;:38::i;:::-;64280:47;;;;;;;;64338:42;64356:9;64366:13;64338:17;:42::i;:::-;64391:31;64397:9;64408:13;64391:31;;;;;;;;;;;;;;;;;;;;;;;;63865:565;;;;:::o;6231:83::-;4722:10;;;;;;;;;;;4708:24;;:10;:24;;;:65;;;;4763:10;;;;;;;;;;;4749:24;;:10;:24;;;4708:65;:106;;;;4804:10;;;;;;;;;;;4790:24;;:10;:24;;;4708:106;4686:139;;;;;;;;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;6302:4;6293:6;;:13;;;;;;;;;;;;;;;;;;6231:83::o;27161:918::-;27222:21;27256:18;27438:23;27504:22;27557:19;27745:17;27277;27287:6;27277:9;:17::i;:::-;27256:38;;27325:1;27311:10;:15;27307:765;;;27403:1;27389:16;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;27389:16:0;;;;27382:23;;;;27307:765;27478:10;27464:25;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;27464:25:0;;;;27438:51;;27529:13;:11;:13::i;:::-;27504:38;;27579:1;27557:23;;27796:1;27784:13;;27779:252;27812:14;27799:9;:27;;27779:252;;;27898:6;27864:40;;:19;:30;27884:9;27864:30;;;;;;;;;;;;;;;;;;;;;:40;;;27860:156;;;27951:9;27929:6;27936:11;27929:19;;;;;;;;;;;;;;;;;:31;;;;;27983:13;;;;;;;27860:156;27828:11;;;;;;;27779:252;;;28054:6;28047:13;;27161:918;;;;;;;;;:::o;17048:203::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;17166:27;17172:10;17184:8;17166:5;:27::i;:::-;17158:36;;;;;;;;17238:5;17205:20;:30;17226:8;17205:30;;;;;;;;;;;;:38;;;;;;;;;;;;;;;;;;17048:203;:::o;60958:690::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;61185:1;61144:26;:37;61171:9;61144:37;;;;;;;;;;;;:42;;61136:51;;;;;;;;61206:28;61212:10;61224:9;61206:5;:28::i;:::-;61198:37;;;;;;;;61256:53;61272:10;61284:13;61299:9;61256:15;:53::i;:::-;61248:62;;;;;;;;61330:33;61336:13;61351:11;61330:5;:33::i;:::-;61322:42;;;;;;;;61383:38;61389:13;61404:16;61383:5;:38::i;:::-;61375:47;;;;;;;;61441:41;61455:9;61465:16;61441:13;:41::i;:::-;61433:50;;;;;;;;61502:36;61516:9;61526:11;61502:13;:36::i;:::-;61494:45;;;;;;;;61552:44;61570:11;61582:13;61552:17;:44::i;:::-;61607:33;61613:11;61626:13;61607:33;;;;;;;;;;;;;;;;;;;;;;;;60958:690;;;;;:::o;57333:147::-;4722:10;;;;;;;;;;;4708:24;;:10;:24;;;:65;;;;4763:10;;;;;;;;;;;4749:24;;:10;:24;;;4708:65;:106;;;;4804:10;;;;;;;;;;;4790:24;;:10;:24;;;4708:106;4686:139;;;;;;;;57399:11;;;;;;;;;;;:27;;;:29;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57399:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57399:29:0;;;;57439:15;;;;;;;;;;;:31;;;:33;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57439:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57439:33:0;;;;57333:147::o;52432:41::-;;;;:::o;19003:38::-;;;;;;;;;;;;;;;;;;;;:::o;65470:171::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;65561:25;65567:10;65579:6;65561:5;:25::i;:::-;65553:34;;;;;;;;65632:1;65598:23;:31;65622:6;65598:31;;;;;;;;;;;:35;;;;65470:171;:::o;54252:804::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;54652:29;54658:10;54670;54652:5;:29::i;:::-;54644:38;;;;;;;;54693:37;54702:10;54714:15;;;;;;;;;;;54693:8;:37::i;:::-;54878:15;;;;;;;;;;;:29;;;54922:10;54947:14;54976:12;55003:9;55027:10;54878:170;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54878:170:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;54878:170:0;;;;54252:804;;;;:::o;22918:1042::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;23151:1;23136:17;;:3;:17;;;;23128:26;;;;;;;;23418:4;23403:20;;:3;:20;;;;23395:29;;;;;;;;23664:11;;;;;;;;;;;23649:27;;:3;:27;;;;23641:36;;;;;;;;23711:15;;;;;;;;;;;23696:31;;:3;:31;;;;23688:40;;;;;;;;23797:27;23803:10;23815:8;23797:5;:27::i;:::-;23789:36;;;;;;;;23916;23926:10;23938:3;23943:8;23916:9;:36::i;:::-;22918:1042;;:::o;58502:321::-;58590:16;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;58609:10;58590:29;;58654:1;58634:22;;:8;:22;;;58630:77;;;58685:10;;;;;;;;;;;58674:21;;58630:77;58738:15;;58725:9;:28;;58717:37;;;;;;;;58765:50;58780:15;;58765:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58797:8;58806;58765:14;:50::i;:::-;;58502:321;;;:::o;16837:201::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;16954:27;16960:10;16972:8;16954:5;:27::i;:::-;16946:36;;;;;;;;17026:4;16993:20;:30;17014:8;16993:30;;;;;;;;;;;;:37;;;;;;;;;;;;;;;;;;16837:201;:::o;56525:597::-;56838:20;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;56746:25;56752:10;56764:6;56746:5;:25::i;:::-;56738:34;;;;;;;;56861:15;;;;;;;;;;;:31;;;56893:10;56861:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;56861:43:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;56861:43:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;56861:43:0;;;;;;;;;;;;;;;;56838:66;;56936:12;56923:9;:25;;56915:34;;;;;;;;57020:15;;;;;;;;;;;:19;;;57046:9;57057:10;57020:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57020:48:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57020:48:0;;;;;57079:35;57096:6;57103:10;57079:16;:35::i;:::-;56525:597;;;:::o;4039:25::-;;;;;;;;;;;;;:::o;19105:36::-;;;;;;;;;;;;;:::o;9433:55::-;;;;;;;;;;;;;;;;;;;;;;:::o;58029:362::-;58116:16;4614:10;;;;;;;;;;;4600:24;;:10;:24;;;4592:33;;;;;;;;58135:10;58116:29;;58180:1;58160:22;;:8;:22;;;58156:77;;;58211:10;;;;;;;;;;;58200:21;;58156:77;57714:4;58251:17;;:40;58243:49;;;;;;;;58303:17;;:19;;;;;;;;;;;;;58333:50;58348:15;;58333:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58365:8;58374;58333:14;:50::i;:::-;;58029:362;;;:::o;65283:173::-;5900:6;;;;;;;;;;;5899:7;5891:16;;;;;;;;65375:25;65381:10;65393:6;65375:5;:25::i;:::-;65367:34;;;;;;;;65447:1;65412:24;:32;65437:6;65412:32;;;;;;;;;;;:36;;;;65283:173;:::o;57667:51::-;57714:4;57667:51;:::o;9555:52::-;;;;;;;;;;;;;;;;;:::o;20490:138::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;20602:16;20570:14;;:49;;;;;;;;;;;;;;;;;;20490:138;:::o;10892:35::-;;;;;;;;;;;;;:::o;53766:374::-;53847:38;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;53909:8;53847:71;;54000:17;:40;;;:42;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;54000:42:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;54000:42:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;54000:42:0;;;;;;;;;;;;;;;;53992:51;;;;;;;;54115:17;54097:15;;:35;;;;;;;;;;;;;;;;;;53766:374;;:::o;52699:98::-;4614:10;;;;;;;;;;;4600:24;;:10;:24;;;4592:33;;;;;;;;52786:3;52768:15;:21;;;;52699:98;:::o;10934:43::-;;;;;;;;;;;;;:::o;21049:149::-;21124:4;21181:9;21148:42;;:19;:29;21168:8;21148:29;;;;;;;;;;;;;;;;;;;;;:42;;;21141:49;;21049:149;;;;:::o;14175:150::-;14307:10;14268:26;:36;14295:8;14268:36;;;;;;;;;;;:49;;;;14175:150;;:::o;29220:416::-;29306:6;29325:16;29380:17;29408:16;29355:13;29344:25;;;;;;;;;;;;;;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;29344:25:0;;;;29325:44;;29492:2;29478:12;29474:21;29461:34;;29521:9;29509:21;;29553:43;29561:9;29572:8;29582:13;29553:7;:43::i;:::-;29616:12;29609:19;;29220:416;;;;;;;:::o;22051:127::-;22161:9;22126:22;:32;22149:8;22126:32;;;;;;;;;;;;:44;;;;;;;;;;;;;;;;;;22051:127;;:::o;15920:499::-;16009:4;16026:16;16083:19;16045;:27;16065:6;16045:27;;;;;;;;;;;;;;;;;;;;;16026:46;;16105:19;:31;16125:10;16105:31;;;;;;;;;;;;;;;;;;;;;16083:53;;16305:11;16293:23;;:8;:23;;;:73;;;;16358:8;16320:46;;:22;:34;16343:10;16320:34;;;;;;;;;;;;;;;;;;;;;:46;;;16293:73;:117;;;;16406:4;16370:40;;:20;:32;16391:10;16370:32;;;;;;;;;;;;;;;;;;;;;:40;;;16293:117;16285:126;;15920:499;;;;;;:::o;14333:443::-;14415:26;14444:8;14453:6;14444:16;;;;;;;;;;;;;;;;;;;;14415:45;;14645:8;14610:24;:32;14635:6;14610:32;;;;;;;;;;;:43;;;;14701:67;14722:19;:27;14742:6;14722:27;;;;;;;;;;;;;;;;;;;;;14751:6;14759:8;14701:67;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14333:443;;;:::o;21441:159::-;21523:4;21583:9;21547:45;;:22;:32;21570:8;21547:32;;;;;;;;;;;;;;;;;;;;;:45;;;21540:52;;21441:159;;;;:::o;11209:653::-;11376:19;:24;11396:3;11376:24;;;;;;;;;;;;;;;;:26;;;;;;;;;;;;;11476:3;11444:19;:29;11464:8;11444:29;;;;;;;;;;;;:35;;;;;;;;;;;;;;;;;;11599:1;11582:19;;:5;:19;;;;11578:199;;;11618:19;:26;11638:5;11618:26;;;;;;;;;;;;;;;;:28;;;;;;;;;;;;;;11733:22;:32;11756:8;11733:32;;;;;;;;;;;;11726:39;;;;;;;;;;;11578:199;11824:30;11833:5;11840:3;11845:8;11824:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11209:653;;;:::o;13840:326::-;14047:7;14013:23;:31;14037:6;14013:31;;;;;;;;;;;:41;;;;14102:56;14113:19;:27;14133:6;14113:27;;;;;;;;;;;;;;;;;;;;;14142:6;14150:7;14102:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13840:326;;:::o;6609:137::-;4318:10;;;;;;;;;;;4304:24;;:10;:24;;;4296:33;;;;;;;;6047:6;;;;;;;;;;;6039:15;;;;;;;;6733:5;6724:6;;:14;;;;;;;;;;;;;;;;;;6609:137::o;15396:239::-;15504:4;15561:9;15528:42;;:19;:29;15548:8;15528:29;;;;;;;;;;;;;;;;;;;;;:42;;;:99;;;;15614:13;15574:26;:36;15601:8;15574:36;;;;;;;;;;;;:53;15528:99;15521:106;;15396:239;;;;;:::o;15643:264::-;15732:4;15799:12;15756:26;:39;15783:11;15756:39;;;;;;;;;;;;:55;:142;;;;15858:26;:40;15885:12;15858:40;;;;;;;;;;;;15815:26;:39;15842:11;15815:39;;;;;;;;;;;;:83;15756:142;15748:151;;15643:264;;;;:::o;12390:1437::-;12543:7;12949:23;;:::i;:::-;13135:16;12932:5;12904:33;;:7;12912:15;12904:24;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;12904:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:33;;;12896:42;;;;;;;;12975:139;;;;;;;;;13046:10;12975:139;;;;;;13016:3;12975:139;;;;;;13087:15;12975:139;;;12949:165;;13180:1;13154:8;13168;13154:23;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;13154:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:27;13135:46;;13219:4;13192:7;13200:15;13192:24;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;13192:24:0;;;;;;;;;;;;;;;;;;;;;;:31;;;;;;;;;;;;;;;;;;13411:8;13391;:29;13383:38;;;;;;;;13467:79;13487:8;:18;;;13520:15;13467:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;13467:79:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13593:1;13557:23;:33;13581:8;13557:33;;;;;;;;;;;:37;;;;13642:1;13605:24;:34;13630:8;13605:34;;;;;;;;;;;:38;;;;13761:30;13771:1;13774:6;13782:8;13761:9;:30::i;:::-;13811:8;13804:15;;12390:1437;;;;;;;:::o;28355:582::-;28702:12;28481:176;28495:2;28487:4;:10;;28481:176;;;28574:4;28568:11;28561:5;28554:26;28618:2;28609:11;;;;28643:2;28635:10;;;;28507:2;28499:10;;;;28481:176;;;28738:1;28730:4;28725:2;:9;28717:3;:18;:22;28702:37;;28810:4;28806:9;28799:4;28793:11;28789:27;28864:4;28856:5;28850:12;28846:23;28910:7;28900:8;28897:21;28890:5;28883:36;28759:171;;;;;;:::o;65933:3146::-;;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;148:4;140:6;136:17;126:27;;0:157;65933:3146:0;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

bzzr://c0ecdaab17816f79f6e007c548ba8b741cebdf42e569815021ccebd9f1275734

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.