ETH Price: $3,474.33 (+0.77%)

Token

Su Squares (SU)
 

Overview

Max Total Supply

10,000 SU

Holders

477

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
cold.0xdamn.eth
Balance
1 SU
0xE581B4CbE18172d4Ed99e68F9e126a91e09AB304
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Su Squares, cute squares user own and personalize.Su Squares are little blocks where user can attach a picture and website link. It will show publicly on the homepage, and you can update it anytime. Once user own a Su Square, it is users and ownership is enforced by the Ethereum® blockchain.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
SuMain

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-11-05
*/

pragma solidity ^0.4.24;

/******************************************************************************\
*..................................SU SQUARES..................................*
*.....................Cute squares you own and personalize.....................*
*..............................................................................*
* First, I just want to say we are so excited and humbled to get this far and  *
* that you're even reading this. So thank you!                                 *
*                                                                              *
* This file is organized into multiple contracts that separate functionality   *
* into logical parts. The deployed contract, SuMain, is at the bottom and      *
* includes the rest of the file using inheritance.                             *
*                                                                              *
*  - ERC165, ERC721: These interfaces follow the official EIPs                 *
*  - AccessControl: A reusable CEO/CFO/COO access model                        *
*  - SupportsInterface: An implementation of ERC165                            *
*  - SuNFT: An implementation of ERC721                                        *
*  - SuOperation: The actual square data and the personalize function          *
*  - SuPromo, SuVending: How we grant or sell squares                          *
*..............................................................................*
*............................Su & William Entriken.............................*
*...................................(c) 2018...................................*
\******************************************************************************/

/* AccessControl.sol **********************************************************/

/// @title Reusable three-role access control inspired by CryptoKitties
/// @author William Entriken (https://phor.net)
/// @dev Keep the CEO wallet stored offline, I warned you.
contract AccessControl {
    /// @notice The account that can only reassign executive accounts
    address public executiveOfficerAddress;

    /// @notice The account that can collect funds from this contract
    address public financialOfficerAddress;

    /// @notice The account with administrative control of this contract
    address public operatingOfficerAddress;

    constructor() internal {
        executiveOfficerAddress = msg.sender;
    }

    /// @dev Only allowed by executive officer
    modifier onlyExecutiveOfficer() {
        require(msg.sender == executiveOfficerAddress);
        _;
    }

    /// @dev Only allowed by financial officer
    modifier onlyFinancialOfficer() {
        require(msg.sender == financialOfficerAddress);
        _;
    }

    /// @dev Only allowed by operating officer
    modifier onlyOperatingOfficer() {
        require(msg.sender == operatingOfficerAddress);
        _;
    }

    /// @notice Reassign the executive officer role
    /// @param _executiveOfficerAddress new officer address
    function setExecutiveOfficer(address _executiveOfficerAddress)
        external
        onlyExecutiveOfficer
    {
        require(_executiveOfficerAddress != address(0));
        executiveOfficerAddress = _executiveOfficerAddress;
    }

    /// @notice Reassign the financial officer role
    /// @param _financialOfficerAddress new officer address
    function setFinancialOfficer(address _financialOfficerAddress)
        external
        onlyExecutiveOfficer
    {
        require(_financialOfficerAddress != address(0));
        financialOfficerAddress = _financialOfficerAddress;
    }

    /// @notice Reassign the operating officer role
    /// @param _operatingOfficerAddress new officer address
    function setOperatingOfficer(address _operatingOfficerAddress)
        external
        onlyExecutiveOfficer
    {
        require(_operatingOfficerAddress != address(0));
        operatingOfficerAddress = _operatingOfficerAddress;
    }

    /// @notice Collect funds from this contract
    function withdrawBalance() external onlyFinancialOfficer {
        financialOfficerAddress.transfer(address(this).balance);
    }
}

/* ERC165.sol *****************************************************************/

/// @title ERC-165 Standard Interface Detection
/// @dev Reference https://eips.ethereum.org/EIPS/eip-165
interface ERC165 {
    function supportsInterface(bytes4 interfaceID) external view returns (bool);
}

/* ERC721.sol *****************************************************************/

/// @title ERC-721 Non-Fungible Token Standard
/// @dev Reference https://eips.ethereum.org/EIPS/eip-721
interface ERC721 /* is ERC165 */ {
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);
    function balanceOf(address _owner) external view returns (uint256);
    function ownerOf(uint256 _tokenId) external view returns (address);
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable;
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function transferFrom(address _from, address _to, uint256 _tokenId) external payable;
    function approve(address _approved, uint256 _tokenId) external payable;
    function setApprovalForAll(address _operator, bool _approved) external;
    function getApproved(uint256 _tokenId) external view returns (address);
    function isApprovedForAll(address _owner, address _operator) external view returns (bool);
}

/// @title ERC-721 Non-Fungible Token Standard
interface ERC721TokenReceiver {
    function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns(bytes4);
}

/// @title ERC-721 Non-Fungible Token Standard, optional metadata extension
interface ERC721Metadata /* is ERC721 */ {
    function name() external pure returns (string _name);
    function symbol() external pure returns (string _symbol);
    function tokenURI(uint256 _tokenId) external view returns (string);
}

/// @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
interface ERC721Enumerable /* is ERC721 */ {
    function totalSupply() external view returns (uint256);
    function tokenByIndex(uint256 _index) external view returns (uint256);
    function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256);
}

/* SupportsInterface.sol ******************************************************/

/// @title A reusable contract to comply with ERC-165
/// @author William Entriken (https://phor.net)
contract SupportsInterface is ERC165 {
    /// @dev Every interface that we support, do not set 0xffffffff to true
    mapping(bytes4 => bool) internal supportedInterfaces;

    constructor() internal {
        supportedInterfaces[0x01ffc9a7] = true; // ERC165
    }

    /// @notice Query if a contract implements an interface
    /// @param interfaceID The interface identifier, as specified in ERC-165
    /// @dev Interface identification is specified in ERC-165. This function
    ///  uses less than 30,000 gas.
    /// @return `true` if the contract implements `interfaceID` and
    ///  `interfaceID` is not 0xffffffff, `false` otherwise
    function supportsInterface(bytes4 interfaceID) external view returns (bool) {
        return supportedInterfaces[interfaceID] && (interfaceID != 0xffffffff);
    }
}

/* SuNFT.sol ******************************************************************/

/// @title Compliance with ERC-721 for Su Squares
/// @dev This implementation assumes:
///  - A fixed supply of NFTs, cannot mint or burn
///  - ids are numbered sequentially starting at 1.
///  - NFTs are initially assigned to this contract
///  - This contract does not externally call its own functions
/// @author William Entriken (https://phor.net)
contract SuNFT is ERC165, ERC721, ERC721Metadata, ERC721Enumerable, SupportsInterface {
    /// @dev The authorized address for each NFT
    mapping (uint256 => address) internal tokenApprovals;

    /// @dev The authorized operators for each address
    mapping (address => mapping (address => bool)) internal operatorApprovals;

    /// @dev Guarantees msg.sender is the owner of _tokenId
    /// @param _tokenId The token to validate belongs to msg.sender
    modifier onlyOwnerOf(uint256 _tokenId) {
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        // assert(msg.sender != address(this))
        require(msg.sender == owner);
        _;
    }

    modifier mustBeOwnedByThisContract(uint256 _tokenId) {
        require(_tokenId >= 1 && _tokenId <= TOTAL_SUPPLY);
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        require(owner == address(0) || owner == address(this));
        _;
    }

    modifier canOperate(uint256 _tokenId) {
        // assert(msg.sender != address(this))
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        require(msg.sender == owner || operatorApprovals[owner][msg.sender]);
        _;
    }

    modifier canTransfer(uint256 _tokenId) {
        // assert(msg.sender != address(this))
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        require(msg.sender == owner ||
          msg.sender == tokenApprovals[_tokenId] ||
          operatorApprovals[owner][msg.sender]);
        _;
    }

    modifier mustBeValidToken(uint256 _tokenId) {
        require(_tokenId >= 1 && _tokenId <= TOTAL_SUPPLY);
        _;
    }

    /// @dev This emits when ownership of any NFT changes by any mechanism.
    ///  This event emits when NFTs are created (`from` == 0) and destroyed
    ///  (`to` == 0). Exception: during contract creation, any number of NFTs
    ///  may be created and assigned without emitting Transfer. At the time of
    ///  any transfer, the approved address for that NFT (if any) is reset to none.
    event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId);

    /// @dev This emits when the approved address for an NFT is changed or
    ///  reaffirmed. The zero address indicates there is no approved address.
    ///  When a Transfer event emits, this also indicates that the approved
    ///  address for that NFT (if any) is reset to none.
    event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId);

    /// @dev This emits when an operator is enabled or disabled for an owner.
    ///  The operator can manage all NFTs of the owner.
    event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved);

    /// @notice Count all NFTs assigned to an owner
    /// @dev NFTs assigned to the zero address are considered invalid, and this
    ///  function throws for queries about the zero address.
    /// @param _owner An address for whom to query the balance
    /// @return The number of NFTs owned by `_owner`, possibly zero
    function balanceOf(address _owner) external view returns (uint256) {
        require(_owner != address(0));
        return _tokensOfOwnerWithSubstitutions[_owner].length;
    }

    /// @notice Find the owner of an NFT
    /// @dev NFTs assigned to zero address are considered invalid, and queries
    ///  about them do throw.
    /// @param _tokenId The identifier for an NFT
    /// @return The address of the owner of the NFT
    function ownerOf(uint256 _tokenId)
        external
        view
        mustBeValidToken(_tokenId)
        returns (address _owner)
    {
        _owner = _tokenOwnerWithSubstitutions[_tokenId];
        // Do owner address substitution
        if (_owner == address(0)) {
            _owner = address(this);
        }
    }

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    ///  operator, or the approved address for this NFT. Throws if `_from` is
    ///  not the current owner. Throws if `_to` is the zero address. Throws if
    ///  `_tokenId` is not a valid NFT. When transfer is complete, this function
    ///  checks if `_to` is a smart contract (code size > 0). If so, it calls
    ///  `onERC721Received` on `_to` and throws if the return value is not
    ///  `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    /// @param data Additional data with no specified format, sent in call to `_to`
    function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable
    {
        _safeTransferFrom(_from, _to, _tokenId, data);
    }

    /// @notice Transfers the ownership of an NFT from one address to another address
    /// @dev This works identically to the other function with an extra data parameter,
    ///  except this function just sets data to "".
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable
    {
        _safeTransferFrom(_from, _to, _tokenId, "");
    }

    /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
    ///  TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
    ///  THEY MAY BE PERMANENTLY LOST
    /// @dev Throws unless `msg.sender` is the current owner, an authorized
    ///  operator, or the approved address for this NFT. Throws if `_from` is
    ///  not the current owner. Throws if `_to` is the zero address. Throws if
    ///  `_tokenId` is not a valid NFT.
    /// @param _from The current owner of the NFT
    /// @param _to The new owner
    /// @param _tokenId The NFT to transfer
    function transferFrom(address _from, address _to, uint256 _tokenId)
        external
        payable
        mustBeValidToken(_tokenId)
        canTransfer(_tokenId)
    {
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        // Do owner address substitution
        if (owner == address(0)) {
            owner = address(this);
        }
        require(owner == _from);
        require(_to != address(0));
        _transfer(_tokenId, _to);
    }

    /// @notice Change or reaffirm the approved address for an NFT
    /// @dev The zero address indicates there is no approved address.
    ///  Throws unless `msg.sender` is the current NFT owner, or an authorized
    ///  operator of the current owner.
    /// @param _approved The new approved NFT controller
    /// @param _tokenId The NFT to approve
    function approve(address _approved, uint256 _tokenId)
        external
        payable
        // assert(mustBeValidToken(_tokenId))
        canOperate(_tokenId)
    {
        address _owner = _tokenOwnerWithSubstitutions[_tokenId];
        // Do owner address substitution
        if (_owner == address(0)) {
            _owner = address(this);
        }
        tokenApprovals[_tokenId] = _approved;
        emit Approval(_owner, _approved, _tokenId);
    }

    /// @notice Enable or disable approval for a third party ("operator") to
    ///  manage all of `msg.sender`'s assets
    /// @dev Emits the ApprovalForAll event. The contract MUST allow
    ///  multiple operators per owner.
    /// @param _operator Address to add to the set of authorized operators
    /// @param _approved True if operator is approved, false to revoke approval
    function setApprovalForAll(address _operator, bool _approved) external {
        operatorApprovals[msg.sender][_operator] = _approved;
        emit ApprovalForAll(msg.sender, _operator, _approved);
    }

    /// @notice Get the approved address for a single NFT
    /// @dev Throws if `_tokenId` is not a valid NFT.
    /// @param _tokenId The NFT to find the approved address for
    /// @return The approved address for this NFT, or the zero address if there is none
    function getApproved(uint256 _tokenId)
        external
        view
        mustBeValidToken(_tokenId)
        returns (address)
    {
        return tokenApprovals[_tokenId];
    }

    /// @notice Query if an address is an authorized operator for another address
    /// @param _owner The address that owns the NFTs
    /// @param _operator The address that acts on behalf of the owner
    /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
    function isApprovedForAll(address _owner, address _operator) external view returns (bool) {
        return operatorApprovals[_owner][_operator];
    }

    // COMPLIANCE WITH ERC721Metadata //////////////////////////////////////////

    /// @notice A descriptive name for a collection of NFTs in this contract
    function name() external pure returns (string) {
        return "Su Squares";
    }

    /// @notice An abbreviated name for NFTs in this contract
    function symbol() external pure returns (string) {
        return "SU";
    }

    /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
    /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
    ///  3986. The URI may point to a JSON file that conforms to the "ERC721
    ///  Metadata JSON Schema".
    function tokenURI(uint256 _tokenId)
        external
        view
        mustBeValidToken(_tokenId)
        returns (string _tokenURI)
    {
        _tokenURI = "https://tenthousandsu.com/erc721/00000.json";
        bytes memory _tokenURIBytes = bytes(_tokenURI);
        _tokenURIBytes[33] = byte(48+(_tokenId / 10000) % 10);
        _tokenURIBytes[34] = byte(48+(_tokenId / 1000) % 10);
        _tokenURIBytes[35] = byte(48+(_tokenId / 100) % 10);
        _tokenURIBytes[36] = byte(48+(_tokenId / 10) % 10);
        _tokenURIBytes[37] = byte(48+(_tokenId / 1) % 10);

    }

    // COMPLIANCE WITH ERC721Enumerable ////////////////////////////////////////

    /// @notice Count NFTs tracked by this contract
    /// @return A count of valid NFTs tracked by this contract, where each one
    ///  has an assigned and queryable owner not equal to the zero address
    function totalSupply() external view returns (uint256) {
        return TOTAL_SUPPLY;
    }

    /// @notice Enumerate valid NFTs
    /// @dev Throws if `_index` >= `totalSupply()`.
    /// @param _index A counter less than `totalSupply()`
    /// @return The token identifier for the `_index`th NFT,
    ///  (sort order not specified)
    function tokenByIndex(uint256 _index) external view returns (uint256) {
        require(_index < TOTAL_SUPPLY);
        return _index + 1;
    }

    /// @notice Enumerate NFTs assigned to an owner
    /// @dev Throws if `_index` >= `balanceOf(_owner)` or if
    ///  `_owner` is the zero address, representing invalid NFTs.
    /// @param _owner An address where we are interested in NFTs owned by them
    /// @param _index A counter less than `balanceOf(_owner)`
    /// @return The token identifier for the `_index`th NFT assigned to `_owner`,
    ///   (sort order not specified)
    function tokenOfOwnerByIndex(address _owner, uint256 _index) external view returns (uint256 _tokenId) {
        require(_owner != address(0));
        require(_index < _tokensOfOwnerWithSubstitutions[_owner].length);
        _tokenId = _tokensOfOwnerWithSubstitutions[_owner][_index];
        // Handle substitutions
        if (_owner == address(this)) {
            if (_tokenId == 0) {
                _tokenId = _index + 1;
            }
        }
    }

    // INTERNAL INTERFACE //////////////////////////////////////////////////////

    /// @dev Actually do a transfer, does NO precondition checking
    function _transfer(uint256 _tokenId, address _to) internal {
        // Here are the preconditions we are not checking:
        // assert(canTransfer(_tokenId))
        // assert(mustBeValidToken(_tokenId))
        require(_to != address(0));

        // Find the FROM address
        address from = _tokenOwnerWithSubstitutions[_tokenId];
        // Do owner address substitution
        if (from == address(0)) {
            from = address(this);
        }

        // Take away from the FROM address
        // The Entriken algorithm for deleting from an indexed, unsorted array
        uint256 indexToDelete = _ownedTokensIndexWithSubstitutions[_tokenId];
        // Do owned tokens substitution
        if (indexToDelete == 0) {
            indexToDelete = _tokenId - 1;
        } else {
            indexToDelete = indexToDelete - 1;
        }
        // We can only shrink an array from its end. If the item we want to
        // delete is in the middle then copy last item to middle and shrink
        // the end.
        if (indexToDelete != _tokensOfOwnerWithSubstitutions[from].length - 1) {
            uint256 lastNft = _tokensOfOwnerWithSubstitutions[from][_tokensOfOwnerWithSubstitutions[from].length - 1];
            // Do tokens of owner substitution
            if (lastNft == 0) {
                // assert(from ==  address(0) || from == address(this));
                lastNft = _tokensOfOwnerWithSubstitutions[from].length; // - 1 + 1
            }
            _tokensOfOwnerWithSubstitutions[from][indexToDelete] = lastNft;
            _ownedTokensIndexWithSubstitutions[lastNft] = indexToDelete + 1;
        }
        // Next line also deletes the contents at the last position of the array (gas refund)
        _tokensOfOwnerWithSubstitutions[from].length--;
        // Right now _ownedTokensIndexWithSubstitutions[_tokenId] is invalid, set it below based on the new owner

        // Give to the TO address
        _tokensOfOwnerWithSubstitutions[_to].push(_tokenId);
        _ownedTokensIndexWithSubstitutions[_tokenId] = (_tokensOfOwnerWithSubstitutions[_to].length - 1) + 1;

        // External processing
        _tokenOwnerWithSubstitutions[_tokenId] = _to;
        tokenApprovals[_tokenId] = address(0);
        emit Transfer(from, _to, _tokenId);
    }

    // PRIVATE STORAGE AND FUNCTIONS ///////////////////////////////////////////

    // See Solidity issue #3356, it would be clearer to initialize in SuMain
    uint256 private constant TOTAL_SUPPLY = 10000;

    bytes4 private constant ERC721_RECEIVED = bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));

    /// @dev The owner of each NFT
    ///  If value == address(0), NFT is owned by address(this)
    ///  If value != address(0), NFT is owned by value
    ///  assert(This contract never assigns ownership to address(0) or destroys NFTs)
    ///  See commented out code in constructor, saves hella gas
    ///  In other words address(0) in storage means address(this) outside
    mapping (uint256 => address) private _tokenOwnerWithSubstitutions;

    /// @dev The list of NFTs owned by each address
    ///  Nomenclature: arr[key][index] = value
    ///  If key != address(this) or value != 0, then value represents an NFT
    ///  If key == address(this) and value == 0, then index + 1 is the NFT
    ///  assert(0 is not a valid NFT)
    ///  See commented out code in constructor, saves hella gas
    ///  In other words [0, 0, a, 0] is equivalent to [1, 2, a, 4] for address(this)
    mapping (address => uint256[]) private _tokensOfOwnerWithSubstitutions;

    /// @dev (Location + 1) of each NFT in its owner's list
    ///  Nomenclature: arr[nftId] = value
    ///  If value != 0, _tokensOfOwnerWithSubstitutions[owner][value - 1] = nftId
    ///  If value == 0, _tokensOfOwnerWithSubstitutions[owner][nftId - 1] = nftId
    ///  assert(2**256-1 is not a valid NFT)
    ///  See commented out code in constructor, saves hella gas
    ///  In other words mapping {a=>a} is equivalent to {a=>0}
    mapping (uint256 => uint256) private _ownedTokensIndexWithSubstitutions;

    // Due to implementation choices (no mint, no burn, contiguous NFT ids), it
    // is not necessary to keep an array of NFT ids nor where each NFT id is
    // located in that array.
    // address[] private nftIds;
    // mapping (uint256 => uint256) private nftIndexOfId;

    constructor() internal {
        // Publish interfaces with ERC-165
        supportedInterfaces[0x80ac58cd] = true; // ERC721
        supportedInterfaces[0x5b5e139f] = true; // ERC721Metadata
        supportedInterfaces[0x780e9d63] = true; // ERC721Enumerable
        supportedInterfaces[0x8153916a] = true; // ERC721 + 165 (not needed)

        // The effect of substitution makes storing address(this), address(this)
        // ..., address(this) for a total of TOTAL_SUPPLY times unnecessary at
        // deployment time
        // for (uint256 i = 1; i <= TOTAL_SUPPLY; i++) {
        //     _tokenOwnerWithSubstitutions[i] = address(this);
        // }

        // The effect of substitution makes storing 1, 2, ..., TOTAL_SUPPLY
        // unnecessary at deployment time
        _tokensOfOwnerWithSubstitutions[address(this)].length = TOTAL_SUPPLY;
        // for (uint256 i = 0; i < TOTAL_SUPPLY; i++) {
        //     _tokensOfOwnerWithSubstitutions[address(this)][i] = i + 1;
        // }
        // for (uint256 i = 1; i <= TOTAL_SUPPLY; i++) {
        //     _ownedTokensIndexWithSubstitutions[i] = i - 1;
        // }
    }

    /// @dev Actually perform the safeTransferFrom
    function _safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data)
        private
        mustBeValidToken(_tokenId)
        canTransfer(_tokenId)
    {
        address owner = _tokenOwnerWithSubstitutions[_tokenId];
        // Do owner address substitution
        if (owner == address(0)) {
            owner = address(this);
        }
        require(owner == _from);
        require(_to != address(0));
        _transfer(_tokenId, _to);

        // Do the callback after everything is done to avoid reentrancy attack
        uint256 codeSize;
        assembly { codeSize := extcodesize(_to) }
        if (codeSize == 0) {
            return;
        }
        bytes4 retval = ERC721TokenReceiver(_to).onERC721Received(msg.sender, _from, _tokenId, data);
        require(retval == ERC721_RECEIVED);
    }
}

/* SuOperation.sol ************************************************************/

/// @title The features that square owners can use
/// @author William Entriken (https://phor.net)
contract SuOperation is SuNFT {
    /// @dev The personalization of a square has changed
    event Personalized(uint256 _nftId);

    /// @dev The main SuSquare struct. The owner may set these properties,
    ///  subject to certain rules. The actual 10x10 image is rendered on our
    ///  website using this data.
    struct SuSquare {
        /// @dev This increments on each update
        uint256 version;

        /// @dev A 10x10 pixel image, stored 8-bit RGB values from left-to-right
        ///  and top-to-bottom order (normal English reading order). So it is
        ///  exactly 300 bytes. Or it is an empty array.
        ///  So the first byte is the red channel for the top-left pixel, then
        ///  the blue, then the green, and then next is the red channel for the
        ///  pixel to the right of the first pixel.
        bytes rgbData;

        /// @dev The title of this square, at most 64 bytes,
        string title;

        /// @dev The URL of this square, at most 100 bytes, or empty string
        string href;
    }

    /// @notice All the Su Squares that ever exist or will exist. Each Su Square
    ///  represents a square on our webpage in a 100x100 grid. The squares are
    ///  arranged in left-to-right, top-to-bottom order. In other words, normal
    ///  English reading order. So suSquares[1] is the top-left location and
    ///  suSquares[100] is the top-right location. And suSquares[101] is
    ///  directly below suSquares[1].
    /// @dev There is no suSquares[0] -- that is an unused array index.
    SuSquare[10001] public suSquares;

    /// @notice Update the contents of your square, the first 3 personalizations
    ///  for a square are free then cost 10 Finney (0.01 Ether) each
    /// @param _squareId The top-left is 1, to its right is 2, ..., top-right is
    ///  100 and then 101 is below 1... the last one at bottom-right is 10000
    /// @param _squareId A 10x10 image for your square, in 8-bit RGB words
    ///  ordered like the squares are ordered. See Imagemagick's command
    ///  convert -size 10x10 -depth 8 in.rgb out.png
    /// @param _title A description of your square (max 64 bytes UTF-8)
    /// @param _href A hyperlink for your square (max 96 bytes)
    function personalizeSquare(
        uint256 _squareId,
        bytes _rgbData,
        string _title,
        string _href
    )
        external
        onlyOwnerOf(_squareId)
        payable
    {
        require(bytes(_title).length <= 64);
        require(bytes(_href).length <= 96);
        require(_rgbData.length == 300);
        suSquares[_squareId].version++;
        suSquares[_squareId].rgbData = _rgbData;
        suSquares[_squareId].title = _title;
        suSquares[_squareId].href = _href;
        if (suSquares[_squareId].version > 3) {
            require(msg.value == 10 finney);
        }
        emit Personalized(_squareId);
    }
}

/* SuPromo.sol ****************************************************************/

/// @title A limited pre-sale and promotional giveaway
/// @author William Entriken (https://phor.net)
contract SuPromo is AccessControl, SuNFT {
    uint256 constant PROMO_CREATION_LIMIT = 5000;

    /// @notice How many promo squares were granted
    uint256 public promoCreatedCount;

    /// @notice BEWARE, this does not use a safe transfer mechanism!
    ///  You must manually check the receiver can accept NFTs
    function grantToken(uint256 _tokenId, address _newOwner)
        external
        onlyOperatingOfficer
        mustBeValidToken(_tokenId)
        mustBeOwnedByThisContract(_tokenId)
    {
        require(promoCreatedCount < PROMO_CREATION_LIMIT);
        promoCreatedCount++;
        _transfer(_tokenId, _newOwner);
    }
}

/* SuVending.sol **************************************************************/

/// @title A token vending machine
/// @author William Entriken (https://phor.net)
contract SuVending is SuNFT {
    uint256 constant SALE_PRICE = 500 finney; // 0.5 Ether

    /// @notice The price is always 0.5 Ether, and you can buy any available square
    ///  Be sure you are calling this from a regular account (not a smart contract)
    ///  or if you are calling from a smart contract, make sure it can use
    ///  ERC-721 non-fungible tokens
    function purchase(uint256 _nftId)
        external
        payable
        mustBeValidToken(_nftId)
        mustBeOwnedByThisContract(_nftId)
    {
        require(msg.value == SALE_PRICE);
        _transfer(_nftId, msg.sender);
    }
}

/* SuMain.sol *****************************************************************/

/// @title The features that deed owners can use
/// @author William Entriken (https://phor.net)
contract SuMain is AccessControl, SuNFT, SuOperation, SuVending, SuPromo {
    constructor() public {
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"executiveOfficerAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"name":"","type":"bool"}],"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":"pure","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_approved","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"approve","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_tokenId","type":"uint256"},{"name":"_newOwner","type":"address"}],"name":"grantToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"_operatingOfficerAddress","type":"address"}],"name":"setOperatingOfficer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"name":"_tokenId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"name":"","type":"uint256"}],"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":true,"inputs":[],"name":"operatingOfficerAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_squareId","type":"uint256"},{"name":"_rgbData","type":"bytes"},{"name":"_title","type":"string"},{"name":"_href","type":"string"}],"name":"personalizeSquare","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"name":"_operator","type":"address"},{"name":"_approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"financialOfficerAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_tokenId","type":"uint256"},{"name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"name":"_tokenURI","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_financialOfficerAddress","type":"address"}],"name":"setFinancialOfficer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_executiveOfficerAddress","type":"address"}],"name":"setExecutiveOfficer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_nftId","type":"uint256"}],"name":"purchase","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"suSquares","outputs":[{"name":"version","type":"uint256"},{"name":"rgbData","type":"bytes"},{"name":"title","type":"string"},{"name":"href","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_nftId","type":"uint256"}],"name":"Personalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_approved","type":"address"},{"indexed":true,"name":"_tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_operator","type":"address"},{"indexed":false,"name":"_approved","type":"bool"}],"name":"ApprovalForAll","type":"event"}]

60806040523480156200001157600080fd5b5060008054600160a060020a031916331781557f28b0ef64f7e82d3b26f3fd404bd0151552f792965f39c29ae82c0a78df67af9c805460ff1990811660019081179092557f41a75b24256f422320613da5706c374a0a7eea8e8d418281bda8820c6b34435680548216831790557fcca39824a677cee72cd3539fc56c0e5a676a28b60617ea00a9d38305722c8b6480548216831790557f785e4d925c4778965a1107f0c202069d496d641ab5dd08a13bd2b783950e105f80548216831790557fd81be3d5a8393f58461506a14b229ceec96395fa3c1be4c1e06a2e23a28bd07180549091169091179055308152600760205260409020612710906200011790826200011e565b506200016e565b8154818355818111156200014557600083815260209020620001459181019083016200014a565b505050565b6200016b91905b8082111562000167576000815560010162000151565b5090565b90565b6118ad806200017e6000396000f3006080604052600436106101685763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166215be71811461016d57806301ffc9a71461019e57806305e45546146101d457806306fdde03146101fb578063081812fc14610285578063095ea7b31461029d578063133252a6146102b657806318160ddd146102da57806323b872dd146102ef5780632aad292e1461030c5780632f745c591461032d57806342842e0e146103515780634f6ccce71461036e5780635fd8c710146103865780636352211e1461039b5780636bfa5edc146103b357806370a08231146103c857806376f14c98146103e957806395d89b4114610418578063a22cb4651461042d578063abe088a714610453578063b88d4fde14610468578063c87b56dd14610494578063d978a0d3146104ac578063e985e9c5146104cd578063ec13df6b146104f4578063efef39a114610515578063ffa6ab4414610520575b600080fd5b34801561017957600080fd5b50610182610683565b60408051600160a060020a039092168252519081900360200190f35b3480156101aa57600080fd5b506101c0600160e060020a031960043516610692565b604080519115158252519081900360200190f35b3480156101e057600080fd5b506101e96106cb565b60408051918252519081900360200190f35b34801561020757600080fd5b506102106106d2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024a578181015183820152602001610232565b50505050905090810190601f1680156102775780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029157600080fd5b5061018260043561070a565b6102b4600160a060020a036004351660243561074c565b005b3480156102c257600080fd5b506102b4600435600160a060020a0360243516610832565b3480156102e657600080fd5b506101e96108ee565b6102b4600160a060020a03600435811690602435166044356108f4565b34801561031857600080fd5b506102b4600160a060020a03600435166109f1565b34801561033957600080fd5b506101e9600160a060020a0360043516602435610a4c565b6102b4600160a060020a0360043581169060243516604435610ae2565b34801561037a57600080fd5b506101e9600435610b03565b34801561039257600080fd5b506102b4610b1a565b3480156103a757600080fd5b50610182600435610b6e565b3480156103bf57600080fd5b50610182610bb8565b3480156103d457600080fd5b506101e9600160a060020a0360043516610bc7565b6102b4600480359060248035808201929081013591604435808201929081013591606435908101910135610bfa565b34801561042457600080fd5b50610210610d3e565b34801561043957600080fd5b506102b4600160a060020a03600435166024351515610d75565b34801561045f57600080fd5b50610182610de3565b6102b4600160a060020a0360048035821691602480359091169160443591606435908101910135610df2565b3480156104a057600080fd5b50610210600435610e2e565b3480156104b857600080fd5b506102b4600160a060020a0360043516610fcf565b3480156104d957600080fd5b506101c0600160a060020a036004358116906024351661102a565b34801561050057600080fd5b506102b4600160a060020a0360043516611058565b6102b46004356110b3565b34801561052c57600080fd5b50610538600435611150565b60405180858152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561058357818101518382015260200161056b565b50505050905090810190601f1680156105b05780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156105e35781810151838201526020016105cb565b50505050905090810190601f1680156106105780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b8381101561064357818101518382015260200161062b565b50505050905090810190601f1680156106705780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b600054600160a060020a031681565b600160e060020a0319811660009081526003602052604081205460ff1680156106c55750600160e060020a031980831614155b92915050565b619c4d5481565b60408051808201909152600a81527f537520537175617265730000000000000000000000000000000000000000000060208201525b90565b6000816001811015801561072057506127108111155b151561072b57600080fd5b600083815260046020526040902054600160a060020a031691505b50919050565b6000818152600660205260408120548290600160a060020a0316338114806107975750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b15156107a257600080fd5b600084815260066020526040902054600160a060020a031692508215156107c7573092505b600084815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0389811691821790925591518793918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45050505050565b600254600160a060020a0316331461084957600080fd5b816001811015801561085d57506127108111155b151561086857600080fd5b8260006001821015801561087e57506127108211155b151561088957600080fd5b50600081815260066020526040902054600160a060020a03168015806108b75750600160a060020a03811630145b15156108c257600080fd5b619c4d54611388116108d357600080fd5b619c4d805460010190556108e7858561131d565b5050505050565b61271090565b6000816001811015801561090a57506127108111155b151561091557600080fd5b6000838152600660205260409020548390600160a060020a0316338114806109535750600082815260046020526040902054600160a060020a031633145b806109815750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b151561098c57600080fd5b600085815260066020526040902054600160a060020a031693508315156109b1573093505b600160a060020a03848116908816146109c957600080fd5b600160a060020a03861615156109de57600080fd5b6109e8858761131d565b50505050505050565b600054600160a060020a03163314610a0857600080fd5b600160a060020a0381161515610a1d57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a6357600080fd5b600160a060020a0383166000908152600760205260409020548210610a8757600080fd5b600160a060020a0383166000908152600760205260409020805483908110610aab57fe5b9060005260206000200154905030600160a060020a031683600160a060020a031614156106c5578015156106c55750600101919050565b610afe8383836020604051908101604052806000815250611517565b505050565b60006127108210610b1357600080fd5b5060010190565b600154600160a060020a03163314610b3157600080fd5b600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610b6b573d6000803e3d6000fd5b50565b60008160018110158015610b8457506127108111155b1515610b8f57600080fd5b600083815260066020526040902054600160a060020a0316915081151561074657503092915050565b600254600160a060020a031681565b6000600160a060020a0382161515610bde57600080fd5b50600160a060020a031660009081526007602052604090205490565b6000878152600660205260409020548790600160a060020a0316338114610c2057600080fd5b6040851115610c2e57600080fd5b6060831115610c3c57600080fd5b61012c8714610c4a57600080fd5b6009896127118110610c5857fe5b6004020180546001019055878760098b6127118110610c7357fe5b600402016001019190610c879291906117c9565b50858560098b6127118110610c9857fe5b600402016002019190610cac9291906117c9565b50838360098b6127118110610cbd57fe5b600402016003019190610cd19291906117c9565b50600360098a6127118110610ce257fe5b60040201541115610d0057662386f26fc100003414610d0057600080fd5b604080518a815290517f95820ed330d949e85d003e7c553aa060e3cdffc1f8af4eb8c9cf988dca7878329181900360200190a1505050505050505050565b60408051808201909152600281527f5355000000000000000000000000000000000000000000000000000000000000602082015290565b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600154600160a060020a031681565b6108e785858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843750611517945050505050565b6060808260018110158015610e4557506127108111155b1515610e5057600080fd5b60408051606081018252602b81527f68747470733a2f2f74656e74686f7573616e6473752e636f6d2f65726337323160208201527f2f30303030302e6a736f6e0000000000000000000000000000000000000000009181019190915292508291507fff00000000000000000000000000000000000000000000000000000000000000600a61271086040660300160f860020a0216600081901a604184015350600a6103e885040660300160f860020a02826022815181101515610f0f57fe5b906020010190600160f860020a031916908160001a905350600a606485040660300160f860020a02826023815181101515610f4657fe5b906020010190600160f860020a031916908160001a905350600a8085040660300160f860020a02826024815181101515610f7c57fe5b906020010190600160f860020a031916908160001a905350600a840660300160f860020a02826025815181101515610fb057fe5b906020010190600160f860020a031916908160001a9053505050919050565b600054600160a060020a03163314610fe657600080fd5b600160a060020a0381161515610ffb57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600054600160a060020a0316331461106f57600080fd5b600160a060020a038116151561108457600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b80600181101580156110c757506127108111155b15156110d257600080fd5b816000600182101580156110e857506127108211155b15156110f357600080fd5b50600081815260066020526040902054600160a060020a03168015806111215750600160a060020a03811630145b151561112c57600080fd5b346706f05b59d3b200001461114057600080fd5b61114a843361131d565b50505050565b600981612711811061115e57fe5b60040201805460018083018054604080516020600295841615610100026000190190931694909404601f8101839004830285018301909152808452939550919290918301828280156111f15780601f106111c6576101008083540402835291602001916111f1565b820191906000526020600020905b8154815290600101906020018083116111d457829003601f168201915b50505060028085018054604080516020601f60001961010060018716150201909416959095049283018590048502810185019091528181529596959450909250908301828280156112835780601f1061125857610100808354040283529160200191611283565b820191906000526020600020905b81548152906001019060200180831161126657829003601f168201915b5050505060038301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529495949350908301828280156113135780601f106112e857610100808354040283529160200191611313565b820191906000526020600020905b8154815290600101906020018083116112f657829003601f168201915b5050505050905084565b60008080600160a060020a038416151561133657600080fd5b600085815260066020526040902054600160a060020a0316925082151561135b573092505b600085815260086020526040902054915081151561137e57600185039150611385565b6001820391505b600160a060020a03831660009081526007602052604090205460001901821461144c57600160a060020a0383166000908152600760205260409020805460001981019081106113d057fe5b9060005260206000200154905080600014156114015750600160a060020a0382166000908152600760205260409020545b600160a060020a038316600090815260076020526040902080548291908490811061142857fe5b60009182526020808320909101929092558281526008909152604090206001830190555b600160a060020a0383166000908152600760205260409020805490611475906000198301611847565b50600160a060020a0380851660008181526007602090815260408083208054600181018255818552838520018b9055548a8452600883528184205560068252808320805473ffffffffffffffffffffffffffffffffffffffff199081168617909155600490925280832080549092169091555188938716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45050505050565b6000806000846001811015801561153057506127108111155b151561153b57600080fd5b6000868152600660205260409020548690600160a060020a0316338114806115795750600082815260046020526040902054600160a060020a031633145b806115a75750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b15156115b257600080fd5b600088815260066020526040902054600160a060020a031695508515156115d7573095505b600160a060020a03868116908b16146115ef57600080fd5b600160a060020a038916151561160457600080fd5b61160e888a61131d565b883b945084151561161e576117bd565b88600160a060020a031663150b7a02338c8b8b6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156116cf5781810151838201526020016116b7565b50505050905090810190601f1680156116fc5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561171e57600080fd5b505af1158015611732573d6000803e3d6000fd5b505050506040513d602081101561174857600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f019020909450600160e060020a03198086169116146117bd57600080fd5b50505050505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061180a5782800160ff19823516178555611837565b82800160010185558215611837579182015b8281111561183757823582559160200191906001019061181c565b50611843929150611867565b5090565b815481835581811115610afe57600083815260209020610afe9181019083015b61070791905b80821115611843576000815560010161186d5600a165627a7a72305820442b258250332058a1160f306a40a73245a4d60c6b0bdf7744ce14acc00a2cac0029

Deployed Bytecode

0x6080604052600436106101685763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166215be71811461016d57806301ffc9a71461019e57806305e45546146101d457806306fdde03146101fb578063081812fc14610285578063095ea7b31461029d578063133252a6146102b657806318160ddd146102da57806323b872dd146102ef5780632aad292e1461030c5780632f745c591461032d57806342842e0e146103515780634f6ccce71461036e5780635fd8c710146103865780636352211e1461039b5780636bfa5edc146103b357806370a08231146103c857806376f14c98146103e957806395d89b4114610418578063a22cb4651461042d578063abe088a714610453578063b88d4fde14610468578063c87b56dd14610494578063d978a0d3146104ac578063e985e9c5146104cd578063ec13df6b146104f4578063efef39a114610515578063ffa6ab4414610520575b600080fd5b34801561017957600080fd5b50610182610683565b60408051600160a060020a039092168252519081900360200190f35b3480156101aa57600080fd5b506101c0600160e060020a031960043516610692565b604080519115158252519081900360200190f35b3480156101e057600080fd5b506101e96106cb565b60408051918252519081900360200190f35b34801561020757600080fd5b506102106106d2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561024a578181015183820152602001610232565b50505050905090810190601f1680156102775780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561029157600080fd5b5061018260043561070a565b6102b4600160a060020a036004351660243561074c565b005b3480156102c257600080fd5b506102b4600435600160a060020a0360243516610832565b3480156102e657600080fd5b506101e96108ee565b6102b4600160a060020a03600435811690602435166044356108f4565b34801561031857600080fd5b506102b4600160a060020a03600435166109f1565b34801561033957600080fd5b506101e9600160a060020a0360043516602435610a4c565b6102b4600160a060020a0360043581169060243516604435610ae2565b34801561037a57600080fd5b506101e9600435610b03565b34801561039257600080fd5b506102b4610b1a565b3480156103a757600080fd5b50610182600435610b6e565b3480156103bf57600080fd5b50610182610bb8565b3480156103d457600080fd5b506101e9600160a060020a0360043516610bc7565b6102b4600480359060248035808201929081013591604435808201929081013591606435908101910135610bfa565b34801561042457600080fd5b50610210610d3e565b34801561043957600080fd5b506102b4600160a060020a03600435166024351515610d75565b34801561045f57600080fd5b50610182610de3565b6102b4600160a060020a0360048035821691602480359091169160443591606435908101910135610df2565b3480156104a057600080fd5b50610210600435610e2e565b3480156104b857600080fd5b506102b4600160a060020a0360043516610fcf565b3480156104d957600080fd5b506101c0600160a060020a036004358116906024351661102a565b34801561050057600080fd5b506102b4600160a060020a0360043516611058565b6102b46004356110b3565b34801561052c57600080fd5b50610538600435611150565b60405180858152602001806020018060200180602001848103845287818151815260200191508051906020019080838360005b8381101561058357818101518382015260200161056b565b50505050905090810190601f1680156105b05780820380516001836020036101000a031916815260200191505b50848103835286518152865160209182019188019080838360005b838110156105e35781810151838201526020016105cb565b50505050905090810190601f1680156106105780820380516001836020036101000a031916815260200191505b50848103825285518152855160209182019187019080838360005b8381101561064357818101518382015260200161062b565b50505050905090810190601f1680156106705780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390f35b600054600160a060020a031681565b600160e060020a0319811660009081526003602052604081205460ff1680156106c55750600160e060020a031980831614155b92915050565b619c4d5481565b60408051808201909152600a81527f537520537175617265730000000000000000000000000000000000000000000060208201525b90565b6000816001811015801561072057506127108111155b151561072b57600080fd5b600083815260046020526040902054600160a060020a031691505b50919050565b6000818152600660205260408120548290600160a060020a0316338114806107975750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b15156107a257600080fd5b600084815260066020526040902054600160a060020a031692508215156107c7573092505b600084815260046020526040808220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0389811691821790925591518793918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a45050505050565b600254600160a060020a0316331461084957600080fd5b816001811015801561085d57506127108111155b151561086857600080fd5b8260006001821015801561087e57506127108211155b151561088957600080fd5b50600081815260066020526040902054600160a060020a03168015806108b75750600160a060020a03811630145b15156108c257600080fd5b619c4d54611388116108d357600080fd5b619c4d805460010190556108e7858561131d565b5050505050565b61271090565b6000816001811015801561090a57506127108111155b151561091557600080fd5b6000838152600660205260409020548390600160a060020a0316338114806109535750600082815260046020526040902054600160a060020a031633145b806109815750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b151561098c57600080fd5b600085815260066020526040902054600160a060020a031693508315156109b1573093505b600160a060020a03848116908816146109c957600080fd5b600160a060020a03861615156109de57600080fd5b6109e8858761131d565b50505050505050565b600054600160a060020a03163314610a0857600080fd5b600160a060020a0381161515610a1d57600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a6357600080fd5b600160a060020a0383166000908152600760205260409020548210610a8757600080fd5b600160a060020a0383166000908152600760205260409020805483908110610aab57fe5b9060005260206000200154905030600160a060020a031683600160a060020a031614156106c5578015156106c55750600101919050565b610afe8383836020604051908101604052806000815250611517565b505050565b60006127108210610b1357600080fd5b5060010190565b600154600160a060020a03163314610b3157600080fd5b600154604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610b6b573d6000803e3d6000fd5b50565b60008160018110158015610b8457506127108111155b1515610b8f57600080fd5b600083815260066020526040902054600160a060020a0316915081151561074657503092915050565b600254600160a060020a031681565b6000600160a060020a0382161515610bde57600080fd5b50600160a060020a031660009081526007602052604090205490565b6000878152600660205260409020548790600160a060020a0316338114610c2057600080fd5b6040851115610c2e57600080fd5b6060831115610c3c57600080fd5b61012c8714610c4a57600080fd5b6009896127118110610c5857fe5b6004020180546001019055878760098b6127118110610c7357fe5b600402016001019190610c879291906117c9565b50858560098b6127118110610c9857fe5b600402016002019190610cac9291906117c9565b50838360098b6127118110610cbd57fe5b600402016003019190610cd19291906117c9565b50600360098a6127118110610ce257fe5b60040201541115610d0057662386f26fc100003414610d0057600080fd5b604080518a815290517f95820ed330d949e85d003e7c553aa060e3cdffc1f8af4eb8c9cf988dca7878329181900360200190a1505050505050505050565b60408051808201909152600281527f5355000000000000000000000000000000000000000000000000000000000000602082015290565b336000818152600560209081526040808320600160a060020a03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b600154600160a060020a031681565b6108e785858585858080601f01602080910402602001604051908101604052809392919081815260200183838082843750611517945050505050565b6060808260018110158015610e4557506127108111155b1515610e5057600080fd5b60408051606081018252602b81527f68747470733a2f2f74656e74686f7573616e6473752e636f6d2f65726337323160208201527f2f30303030302e6a736f6e0000000000000000000000000000000000000000009181019190915292508291507fff00000000000000000000000000000000000000000000000000000000000000600a61271086040660300160f860020a0216600081901a604184015350600a6103e885040660300160f860020a02826022815181101515610f0f57fe5b906020010190600160f860020a031916908160001a905350600a606485040660300160f860020a02826023815181101515610f4657fe5b906020010190600160f860020a031916908160001a905350600a8085040660300160f860020a02826024815181101515610f7c57fe5b906020010190600160f860020a031916908160001a905350600a840660300160f860020a02826025815181101515610fb057fe5b906020010190600160f860020a031916908160001a9053505050919050565b600054600160a060020a03163314610fe657600080fd5b600160a060020a0381161515610ffb57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205460ff1690565b600054600160a060020a0316331461106f57600080fd5b600160a060020a038116151561108457600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b80600181101580156110c757506127108111155b15156110d257600080fd5b816000600182101580156110e857506127108211155b15156110f357600080fd5b50600081815260066020526040902054600160a060020a03168015806111215750600160a060020a03811630145b151561112c57600080fd5b346706f05b59d3b200001461114057600080fd5b61114a843361131d565b50505050565b600981612711811061115e57fe5b60040201805460018083018054604080516020600295841615610100026000190190931694909404601f8101839004830285018301909152808452939550919290918301828280156111f15780601f106111c6576101008083540402835291602001916111f1565b820191906000526020600020905b8154815290600101906020018083116111d457829003601f168201915b50505060028085018054604080516020601f60001961010060018716150201909416959095049283018590048502810185019091528181529596959450909250908301828280156112835780601f1061125857610100808354040283529160200191611283565b820191906000526020600020905b81548152906001019060200180831161126657829003601f168201915b5050505060038301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529495949350908301828280156113135780601f106112e857610100808354040283529160200191611313565b820191906000526020600020905b8154815290600101906020018083116112f657829003601f168201915b5050505050905084565b60008080600160a060020a038416151561133657600080fd5b600085815260066020526040902054600160a060020a0316925082151561135b573092505b600085815260086020526040902054915081151561137e57600185039150611385565b6001820391505b600160a060020a03831660009081526007602052604090205460001901821461144c57600160a060020a0383166000908152600760205260409020805460001981019081106113d057fe5b9060005260206000200154905080600014156114015750600160a060020a0382166000908152600760205260409020545b600160a060020a038316600090815260076020526040902080548291908490811061142857fe5b60009182526020808320909101929092558281526008909152604090206001830190555b600160a060020a0383166000908152600760205260409020805490611475906000198301611847565b50600160a060020a0380851660008181526007602090815260408083208054600181018255818552838520018b9055548a8452600883528184205560068252808320805473ffffffffffffffffffffffffffffffffffffffff199081168617909155600490925280832080549092169091555188938716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45050505050565b6000806000846001811015801561153057506127108111155b151561153b57600080fd5b6000868152600660205260409020548690600160a060020a0316338114806115795750600082815260046020526040902054600160a060020a031633145b806115a75750600160a060020a038116600090815260056020908152604080832033845290915290205460ff165b15156115b257600080fd5b600088815260066020526040902054600160a060020a031695508515156115d7573095505b600160a060020a03868116908b16146115ef57600080fd5b600160a060020a038916151561160457600080fd5b61160e888a61131d565b883b945084151561161e576117bd565b88600160a060020a031663150b7a02338c8b8b6040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184600160a060020a0316600160a060020a0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156116cf5781810151838201526020016116b7565b50505050905090810190601f1680156116fc5780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561171e57600080fd5b505af1158015611732573d6000803e3d6000fd5b505050506040513d602081101561174857600080fd5b5051604080517f6f6e455243373231526563656976656428616464726573732c6164647265737381527f2c75696e743235362c62797465732900000000000000000000000000000000006020820152905190819003602f019020909450600160e060020a03198086169116146117bd57600080fd5b50505050505050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061180a5782800160ff19823516178555611837565b82800160010185558215611837579182015b8281111561183757823582559160200191906001019061181c565b50611843929150611867565b5090565b815481835581811115610afe57600083815260209020610afe9181019083015b61070791905b80821115611843576000815560010161186d5600a165627a7a72305820442b258250332058a1160f306a40a73245a4d60c6b0bdf7744ce14acc00a2cac0029

Swarm Source

bzzr://442b258250332058a1160f306a40a73245a4d60c6b0bdf7744ce14acc00a2cac
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.