ETH Price: $3,397.53 (+1.97%)

Contract

0x28e5552e8F51DE209e18CDDf90D2A4F260f26216
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer From210014632024-10-19 18:39:2335 days ago1729363163IN
GLASS PASS: PASS Token
0 ETH0.000481968.76948997
Transfer From205236702024-08-14 1:45:11101 days ago1723599911IN
GLASS PASS: PASS Token
0 ETH0.000051110.93010271
Set Approval For...204468242024-08-03 8:29:23112 days ago1722673763IN
GLASS PASS: PASS Token
0 ETH0.0000751.62395153
Safe Transfer Fr...197654772024-04-30 3:36:11207 days ago1714448171IN
GLASS PASS: PASS Token
0 ETH0.000332665.77238891
Set Approval For...197330132024-04-25 14:35:23212 days ago1714055723IN
GLASS PASS: PASS Token
0 ETH0.0007238915.69761987
Set Approval For...197085972024-04-22 4:36:59215 days ago1713760619IN
GLASS PASS: PASS Token
0 ETH0.000334987.26402823
Set Approval For...189987262024-01-13 15:00:47315 days ago1705158047IN
GLASS PASS: PASS Token
0 ETH0.0008644418.71127537
Set Approval For...188744912023-12-27 4:01:35332 days ago1703649695IN
GLASS PASS: PASS Token
0 ETH0.0006156913.35125683
Set Approval For...184070442023-10-22 16:32:35398 days ago1697992355IN
GLASS PASS: PASS Token
0 ETH0.0006686414.4994942
Set Approval For...184052342023-10-22 10:26:59398 days ago1697970419IN
GLASS PASS: PASS Token
0 ETH0.000294426.3846732
Set Approval For...183073682023-10-08 17:52:59412 days ago1696787579IN
GLASS PASS: PASS Token
0 ETH0.000316686.85484361
Safe Transfer Fr...182336212023-09-28 10:24:59422 days ago1695896699IN
GLASS PASS: PASS Token
0 ETH0.000488918.41015876
Set Approval For...179967902023-08-26 5:33:35455 days ago1693028015IN
GLASS PASS: PASS Token
0 ETH0.0005044310.93854327
Set Approval For...179808932023-08-24 0:08:47457 days ago1692835727IN
GLASS PASS: PASS Token
0 ETH0.0010497622.764
Transfer From178530882023-08-06 2:58:23475 days ago1691290703IN
GLASS PASS: PASS Token
0 ETH0.0007047112.82262331
Claim Invitation175686642023-06-27 5:33:59515 days ago1687844039IN
GLASS PASS: PASS Token
0 ETH0.0022923413.15113831
Set Approval For...175676242023-06-27 2:03:47515 days ago1687831427IN
GLASS PASS: PASS Token
0 ETH0.0005260311.40707691
Set Approval For...175406142023-06-23 6:52:35519 days ago1687503155IN
GLASS PASS: PASS Token
0 ETH0.0006122313.27629973
Set Approval For...175405702023-06-23 6:43:23519 days ago1687502603IN
GLASS PASS: PASS Token
0 ETH0.00057312.42564776
Set Approval For...174925162023-06-16 12:52:23526 days ago1686919943IN
GLASS PASS: PASS Token
0 ETH0.0007351415.9416235
Set Approval For...174841852023-06-15 8:45:47527 days ago1686818747IN
GLASS PASS: PASS Token
0 ETH0.0008931519.36803674
Safe Transfer Fr...174405352023-06-09 5:13:11533 days ago1686287591IN
GLASS PASS: PASS Token
0 ETH0.0011318718.13007748
Set Approval For...174311152023-06-07 21:19:59535 days ago1686172799IN
GLASS PASS: PASS Token
0 ETH0.0008306618.01292446
Set Approval For...174239222023-06-06 20:58:47536 days ago1686085127IN
GLASS PASS: PASS Token
0 ETH0.0013914230.17297373
Set Approval For...174238062023-06-06 20:35:23536 days ago1686083723IN
GLASS PASS: PASS Token
0 ETH0.0017386337.70225904
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
184070472023-10-22 16:33:11398 days ago1697992391
0x28e5552e...260f26216
0 ETH
183073712023-10-08 17:53:35412 days ago1696787615
0x28e5552e...260f26216
0 ETH
179968042023-08-26 5:36:23455 days ago1693028183
0x28e5552e...260f26216
0 ETH
175686642023-06-27 5:33:59515 days ago1687844039
0x28e5552e...260f26216
0 ETH
174968132023-06-17 3:20:35525 days ago1686972035
0x28e5552e...260f26216
0 ETH
174686742023-06-13 4:22:11529 days ago1686630131
0x28e5552e...260f26216
0 ETH
174278342023-06-07 10:14:23535 days ago1686132863
0x28e5552e...260f26216
0 ETH
174239862023-06-06 21:11:35536 days ago1686085895
0x28e5552e...260f26216
0 ETH
173916642023-06-02 7:45:59540 days ago1685691959
0x28e5552e...260f26216
0 ETH
173542112023-05-28 1:19:59545 days ago1685236799
0x28e5552e...260f26216
0 ETH
173317262023-05-24 21:30:23549 days ago1684963823
0x28e5552e...260f26216
0 ETH
173240012023-05-23 19:28:23550 days ago1684870103
0x28e5552e...260f26216
0 ETH
173086332023-05-21 15:28:59552 days ago1684682939
0x28e5552e...260f26216
0 ETH
172896082023-05-18 23:10:11555 days ago1684451411
0x28e5552e...260f26216
0 ETH
172890882023-05-18 21:25:11555 days ago1684445111
0x28e5552e...260f26216
0 ETH
172888262023-05-18 20:31:47555 days ago1684441907
0x28e5552e...260f26216
0 ETH
172882322023-05-18 18:31:47555 days ago1684434707
0x28e5552e...260f26216
0 ETH
172773712023-05-17 5:44:59556 days ago1684302299
0x28e5552e...260f26216
0 ETH
172773392023-05-17 5:38:35556 days ago1684301915
0x28e5552e...260f26216
0 ETH
172655412023-05-15 13:41:59558 days ago1684158119
0x28e5552e...260f26216
0 ETH
172499392023-05-13 8:41:35560 days ago1683967295
0x28e5552e...260f26216
0 ETH
172422712023-05-12 6:09:47561 days ago1683871787
0x28e5552e...260f26216
0 ETH
172385602023-05-11 17:23:35562 days ago1683825815
0x28e5552e...260f26216
0 ETH
172384862023-05-11 17:07:59562 days ago1683824879
0x28e5552e...260f26216
0 ETH
172282402023-05-10 6:30:59563 days ago1683700259
0x28e5552e...260f26216
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Pass

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2023-03-23
*/

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████▓▀██████████████████████████████████████████████
// ██████████████████████████████████  ╙███████████████████████████████████████████
// ███████████████████████████████████    ╙████████████████████████████████████████
// ████████████████████████████████████      ╙▀████████████████████████████████████
// ████████████████████████████████████▌        ╙▀█████████████████████████████████
// ████████████████████████████████████▌           ╙███████████████████████████████
// ████████████████████████████████████▌            ███████████████████████████████
// ████████████████████████████████████▌         ▄█████████████████████████████████
// ████████████████████████████████████       ▄████████████████████████████████████
// ███████████████████████████████████▀   ,▄███████████████████████████████████████
// ██████████████████████████████████▀ ,▄██████████████████████████████████████████
// █████████████████████████████████▄▓█████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████
// ████████████████████████████████████████████████████████████████████████████████

/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 indexed id);

    event Approval(address indexed owner, address indexed spender, uint256 indexed id);

    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /*//////////////////////////////////////////////////////////////
                         METADATA STORAGE/LOGIC
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    function tokenURI(uint256 id) public view virtual returns (string memory);

    /*//////////////////////////////////////////////////////////////
                      ERC721 BALANCE/OWNER STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) internal _ownerOf;

    mapping(address => uint256) internal _balanceOf;

    function ownerOf(uint256 id) public view virtual returns (address owner) {
        require((owner = _ownerOf[id]) != address(0), "NOT_MINTED");
    }

    function balanceOf(address owner) public view virtual returns (uint256) {
        require(owner != address(0), "ZERO_ADDRESS");

        return _balanceOf[owner];
    }

    /*//////////////////////////////////////////////////////////////
                         ERC721 APPROVAL STORAGE
    //////////////////////////////////////////////////////////////*/

    mapping(uint256 => address) public getApproved;

    mapping(address => mapping(address => bool)) public isApprovedForAll;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(string memory _name, string memory _symbol) {
        name = _name;
        symbol = _symbol;
    }

    /*//////////////////////////////////////////////////////////////
                              ERC721 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 id) public virtual {
        address owner = _ownerOf[id];

        require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED");

        getApproved[id] = spender;

        emit Approval(owner, spender, id);
    }

    function setApprovalForAll(address operator, bool approved) public virtual {
        isApprovedForAll[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    function transferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        require(from == _ownerOf[id], "WRONG_FROM");

        require(to != address(0), "INVALID_RECIPIENT");

        require(
            msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],
            "NOT_AUTHORIZED"
        );

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        unchecked {
            _balanceOf[from]--;

            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        delete getApproved[id];

        emit Transfer(from, to, id);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        bytes calldata data
    ) public virtual {
        transferFrom(from, to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    /*//////////////////////////////////////////////////////////////
                              ERC165 LOGIC
    //////////////////////////////////////////////////////////////*/

    function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165
            interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721
            interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 id) internal virtual {
        require(to != address(0), "INVALID_RECIPIENT");

        require(_ownerOf[id] == address(0), "ALREADY_MINTED");

        // Counter overflow is incredibly unrealistic.
        unchecked {
            _balanceOf[to]++;
        }

        _ownerOf[id] = to;

        emit Transfer(address(0), to, id);
    }

    function _burn(uint256 id) internal virtual {
        address owner = _ownerOf[id];

        require(owner != address(0), "NOT_MINTED");

        // Ownership check above ensures no underflow.
        unchecked {
            _balanceOf[owner]--;
        }

        delete _ownerOf[id];

        delete getApproved[id];

        emit Transfer(owner, address(0), id);
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL SAFE MINT LOGIC
    //////////////////////////////////////////////////////////////*/

    function _safeMint(address to, uint256 id) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }

    function _safeMint(
        address to,
        uint256 id,
        bytes memory data
    ) internal virtual {
        _mint(to, id);

        require(
            to.code.length == 0 ||
                ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==
                ERC721TokenReceiver.onERC721Received.selector,
            "UNSAFE_RECIPIENT"
        );
    }
}

/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol)
abstract contract ERC721TokenReceiver {
    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external virtual returns (bytes4) {
        return ERC721TokenReceiver.onERC721Received.selector;
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

contract Pass is ERC721, Ownable {
    //////////////////////////////////////////////////////////////////////
    // ERRORS
    //////////////////////////////////////////////////////////////////////
    error DoesNotExist(); // Custom error for when a token does not exist
    error Unauthorized(); // Custom error for unauthorized access
    error AlreadyTaken(); // Custom error for when a token is already taken
    error AddressAlreadyClaimed(); // Custom error for when an address has already claimed a token
    error AlreadyClaimed(); // Custom error for when a token has already been claimed
    error InvalidLength(); // Custom error for when a username is an invalid length
    error InvalidFirstOrLastCharacter(); // Custom error for when a username starts or ends with an underscore
    error InvalidCharacter(); // Custom error for when a username contains an invalid character

    event DefaultUsernameSet(address indexed user, uint256 indexed tokenId); // Event emitted when a user sets their default username
    event PassMinted(address indexed user, uint256 indexed passId, string username, PassType passType, address invitedBy); // Event emitted when a user claims a token

    //////////////////////////////////////////////////////////////////////
    // TYPES
    //////////////////////////////////////////////////////////////////////
    enum PassType {
        // Custom enum to represent the type of token
        GENESIS, // The first token
        CURATED, // A token invited by a curated user
        OPEN // A token claimed during open claim period
    }

    //////////////////////////////////////////////////////////////////////
    // CONSTANTS
    //////////////////////////////////////////////////////////////////////
    address public immutable genesis; // Address of the user who created the contract
    string internal constant TABLE_ENCODE = // Lookup table for base64 encoding
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 
    bytes internal constant TABLE_DECODE = // Lookup table for base64 decoding
        hex"0000000000000000000000000000000000000000000000000000000000000000"
        hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
        hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
        hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    //////////////////////////////////////////////////////////////////////
    // VARIABLES
    //////////////////////////////////////////////////////////////////////
    mapping(uint256 => string) public usernames; // Mapping of token IDs to usernames
    mapping(address => address) public invitedBy; // Mapping of addresses to the address of the user who invited them to claim a token
    mapping(address => uint256) public defaultUsername; // Mapping of addresses to the ID of the token associated with their default username
    mapping(address => bool) public claimed; // Mapping of addresses to a boolean indicating whether or not they have claimed a token
    mapping(uint => PassType) public passType; // Mapping of token IDs to their respective PassType
    bool public open; // Boolean indicating whether or not the contract is currently allowing open claims

    //////////////////////////////////////////////////////////////////////
    // CONSTRUCTOR
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Constructor function for the Pass contract.
    * @param name Name of the ERC721 token.
    * @param symbol Symbol of the ERC721 token.
    * @param _genesis Address of the genesis user who can mint GENESIS passes.
    */
    constructor(
        string memory name,
        string memory symbol,
        address _genesis
    ) ERC721(name, symbol) { // Call the constructor of the parent contract ERC721
        genesis = _genesis; // Set the address of the user who created the contract
        invitedBy[genesis] = genesis; // Set the genesis user as the inviter of the genesis token
        transferOwnership(msg.sender); // Transfer ownership of the contract to the user who deployed it
    }

    //////////////////////////////////////////////////////////////////////
    // ADMIN FUNCTIONS
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Function to change the open claim status.
    * @param _open Boolean indicating whether or not the open claim feature is enabled.
    */
    function changeOpenClaimStatus(bool _open) public onlyOwner { // Function to change the status of open claims
        open = _open; // Set the open status of claims to the given value
    }

    //////////////////////////////////////////////////////////////////////
    // USERNAME FUNCTIONS
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Function to set the default username for a user.
    * @param id ID of the token to set the default username for.
    */
    function setDefaultUsername(uint256 id) public { // Function to set the default username associated with a given token ID
        if (_ownerOf[id] != msg.sender) revert Unauthorized(); // Check if the caller of the function is the owner of the token
        defaultUsername[msg.sender] = id; // Set the default username of the caller to the given ID

        emit DefaultUsernameSet(msg.sender, id);
    }

    /**
    * @dev Function to validate a username.
    * @param username Username to validate.
    */
    function validateUsername(string memory username) public pure {
        // make it so first or last character cant be underscore
        uint256 usernameLength = bytes(username).length;

        if (usernameLength < 3 || usernameLength > 15) revert InvalidLength();
        bytes1 firstByte = bytes(username)[0];
        bytes1 lastByte = bytes(username)[usernameLength - 1];
        if (firstByte == "_" || lastByte == "_")
            revert InvalidFirstOrLastCharacter();

        for (uint256 i = 0; i < usernameLength; ) {
            bytes1 char = bytes(username)[i];
            if (
                !(char >= 0x30 && char <= 0x39) && // 9-0
                !(char >= 0x61 && char <= 0x7A) && // a-z
                !(char == 0x5F) // _ underscore
            ) {
                revert InvalidCharacter();
            }
            unchecked {
                ++i;
            }
        }
    }

    //////////////////////////////////////////////////////////////////////
    // CLAIM FUNCTIONS
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Function to check the eligibility of a user to claim a token.
    * @param id ID of the token to check.
    * @param _callingOpenClaim Boolean indicating whether or not the open claim feature is enabled.
    */
    function checkEligibility(uint id, bool _callingOpenClaim) internal view { // Function to check eligibility to claim a token
        if (_callingOpenClaim)
            if (!open) revert Unauthorized(); // Check that open claims are currently allowed
        if (claimed[msg.sender]) revert AddressAlreadyClaimed(); // Check that the caller has not already claimed a token
        if (_ownerOf[id] != address(0)) revert AlreadyTaken(); // Check that the token has not already been claimed
    }

    /**
    * @dev Function for users to claim a token using the open claim feature.
    * @param _username Username to claim the token with.
    */
    function openClaim(string memory _username) public { // Function to claim a token during the open claim period
        uint256 id = uint(keccak256(abi.encodePacked(_username))); // Generate a unique ID for the token based on the username
        checkEligibility(id, true); // Check the eligibility to claim the token
        validateUsername(_username); // Validate the given username

        mint(id, _username, address(this)); // Mint the token with the given ID, username, and no inviter
    }

    /**
    * @dev Verify a signature and return the address of who signed this message.
    * @param _address The address being signed.
    * @param _signature The signature as a byte array.
    * @return An address indicating who signed the message.
    */
    function verifySignature(address _address, bytes memory _signature) public pure returns (address) {
        // Make sure the signature has the correct length
        require(_signature.length == 65, "Invalid signature length");
        // Get the hash of the message being signed
        bytes32 messageHash = getMessageHash(_address);

        bytes32 r;
        bytes32 s;
        uint8 v;
        assembly {
            // first 32 bytes, after the length prefix
            r := mload(add(_signature, 32))
            // second 32 bytes
            s := mload(add(_signature, 64))
            // final byte (first byte of the next 32 bytes)
            v := byte(0, mload(add(_signature, 96)))
        }

        // Recover the address that signed the message and check if it matches the calling address
        return recoverSigner(messageHash, v, r, s);
    }

    /**
    * @dev Get the hash of an address.
    * @param _address The address to hash.
    * @return The hash of the address.
    */
    function getMessageHash(address _address) public pure returns (bytes32) {
        // Hash the address using keccak256
        return keccak256(abi.encodePacked(_address));
    }

    /**
    * @dev Recover the address that signed a message.
    * @param _messageHash The hash of the signed message.
    * @param _v The recovery identifier (0 or 1).
    * @param _r The x-coordinate of the point on the elliptic curve that represents the signature.
    * @param _s The signature value.
    * @return The address of the signer.
    */
    function recoverSigner(bytes32 _messageHash, uint8 _v, bytes32 _r, bytes32 _s) public pure returns (address) {
        // Add prefix to message hash as per EIP-191 standard
        bytes32 prefixedHash = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _messageHash));
        // Recover the address that signed the message using ecrecover
        return ecrecover(prefixedHash, _v, _r, _s);
    }

    /**
    * @dev Function for invited users to claim a token.
    * @param _username Username to claim the token with.
    * @param _signature Value of the signature.
    */
    function claimInvitation(
        string memory _username,
        bytes memory _signature
    ) public { // Function to claim a token using an invitation
        address signer = verifySignature(msg.sender, _signature);
        if (invitedBy[signer] == address(0)) revert Unauthorized(); // Check that the signer is a valid inviter
        uint256 id = uint(keccak256(abi.encodePacked(_username))); // Generate a unique ID for the token based on the username
        checkEligibility(id, false); // Check the eligibility to claim the token
        validateUsername(_username); // Validate the given username
        mint(id, _username, signer); // Mint the token with the given ID, username, and inviter
    }

    /**
    * @dev Function to mint a token.
    * @param id ID of the token to mint.
    * @param _username Username to mint the token with.
    * @param _invitedBy Address of the user who invited the token owner.
    */
    function mint(
        uint id,
        string memory _username,
        address _invitedBy
    ) private { // Function to mint a new token
        _mint(msg.sender, id); // Mint the token to the caller of the function
        usernames[id] = _username; // Set the username associated with the token ID
        defaultUsername[msg.sender] = id; // Set the default username of the caller to the given ID
        claimed[msg.sender] = true; // Set the claimed status of the caller to true
        invitedBy[msg.sender] = _invitedBy; // Set the inviter of the caller to the given address
        if (_invitedBy == genesis) { // If the inviter is the genesis address, set the pass type to GENESIS
            passType[id] = PassType.GENESIS;
        } else if (_invitedBy != address(this) || _invitedBy != address(0)) { // If the inviter is not the genesis address and not zero, set the pass type to CURATED
            passType[id] = PassType.CURATED;
        } else { // Otherwise, set the pass type to OPEN
            passType[id] = PassType.OPEN;
        }

        emit PassMinted(msg.sender, id, _username, passType[id], _invitedBy); // Emit the PassClaimed event
    }

    //////////////////////////////////////////////////////////////////////
    // METADATA FUNCTIONS
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Function to get the URI of a token.
    * @param id ID of the token to get the URI of.
    * @return The URI of the token.
    */
    function tokenURI(uint256 id) public view override returns (string memory) { // Function to get the metadata URI for a token
        address owner = _ownerOf[id]; // Get the owner of the token
        if (owner == address(0)) revert DoesNotExist(); // Check that the token exists
        if (passType[id] == PassType.GENESIS) { // If the pass type is GENESIS, set the background color to #FF4E00 and the font color to #000000
            return nftMetadata(usernames[id], "GENESIS", "#FF4F00", "#000000");
        }
        if (passType[id] == PassType.CURATED) { // If the pass type is CURATED, set the background color to #000000 and the font color to #FFFFFF
            return nftMetadata(usernames[id], "CURATED", "#000000", "#FFFFFF");
        }
        return nftMetadata(usernames[id], "OPEN", "#FFFFFF", "#000000"); // Otherwise, set the background color to #FFFFFF and the font color to #000000
    }

    /**
    * @dev Function to generate the metadata for a token.
    * @param username Username of the token.
    * @param _passType Type of the token.
    * @param backgroundColor Background color of the token.
    * @param fontColor Font color of the token.
    * @return The metadata for the token.
    */
    function nftMetadata(
        string memory username,
        string memory _passType,
        string memory backgroundColor,
        string memory fontColor
    ) internal pure returns (string memory) { // Function to generate the metadata for a token
        return
            string(
                abi.encodePacked(
                    "data:application/json;base64,",
                    base64Encode(
                        bytes(
                            abi.encodePacked(
                                '{"name":"',
                                username, // Set the name of the token to the given username
                                '.glass", "description":"',
                                "Glass passes are special assets that signify usernames, ownership, and the power to give others access to join the protocol.",
                                '", "image": "',
                                svg(username, backgroundColor, fontColor), // Set the image of the token to the SVG generated by the svg() function
                                '", "attributes": [',
                                '{"trait_type": "Pass Type", "value": "',
                                _passType, // Set the pass type attribute to the given pass type
                                '"}',
                                "]}"
                            )
                        )
                    )
                )
            );
    }

    /**
    * @dev Function to generate the SVG for a token.
    * @param username Username of the token.
    * @param backgroundColor Background color of the token.
    * @param fontColor Font color of the token.
    * @return The SVG for the token.
    */
    function svg(
        string memory username,
        string memory backgroundColor,
        string memory fontColor
    ) internal pure returns (string memory) { // Function to generate an SVG for a token
        return
            string(
                abi.encodePacked(
                    "data:image/svg+xml;base64,",
                    base64Encode(
                        bytes(
                            abi.encodePacked(
                                '<svg width="512" height="512" viewBox="0 0 512 512" fill="none" xmlns="http://www.w3.org/2000/svg">',
                                '<rect width="512" height="512" fill="',
                                backgroundColor, // Set the background color of the SVG to the given color
                                '"/>'
                                '<path d="M250.3 410C250.3 418.982 246.746 427.113 241 433L268.498 412.982C270.501 411.524 270.501 408.477 268.498 407.018L241 387C246.746 392.887 250.3 401.018 250.3 410Z" fill="',
                                fontColor, // Set the font color of the SVG to the given color
                                '"/>'
                                '<text font-family="sans-serif" font-weight="bold" y="50%" x="50%" dominant-baseline="middle" text-anchor="middle" font-size="40" fill="',
                                fontColor, // Set the font color of the text to the given color
                                '">',
                                username, // Set the text of the SVG to the given username
                                "</text>",
                                "</svg>"
                            )
                        )
                    )
                )
            );
    }

    //////////////////////////////////////////////////////////////////////
    // UTILITY FUNCTIONS
    //////////////////////////////////////////////////////////////////////
    /**
    * @dev Function to encode bytes as base64.
    * @param data The bytes to encode.
    * @return The base64 encoded string.
    */
    function base64Encode(
        bytes memory data
    ) internal pure returns (string memory) {
        if (data.length == 0) return "";

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(18, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(12, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(
                    resultPtr,
                    mload(add(tablePtr, and(shr(6, input), 0x3F)))
                )
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }
        }

        return result;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address","name":"_genesis","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AddressAlreadyClaimed","type":"error"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"AlreadyTaken","type":"error"},{"inputs":[],"name":"DoesNotExist","type":"error"},{"inputs":[],"name":"InvalidCharacter","type":"error"},{"inputs":[],"name":"InvalidFirstOrLastCharacter","type":"error"},{"inputs":[],"name":"InvalidLength","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DefaultUsernameSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"passId","type":"uint256"},{"indexed":false,"internalType":"string","name":"username","type":"string"},{"indexed":false,"internalType":"enum Pass.PassType","name":"passType","type":"uint8"},{"indexed":false,"internalType":"address","name":"invitedBy","type":"address"}],"name":"PassMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_open","type":"bool"}],"name":"changeOpenClaimStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_username","type":"string"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claimInvitation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"defaultUsername","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"genesis","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"invitedBy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"open","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_username","type":"string"}],"name":"openClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"passType","outputs":[{"internalType":"enum Pass.PassType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageHash","type":"bytes32"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"setDefaultUsername","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usernames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"username","type":"string"}],"name":"validateUsername","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verifySignature","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"}]

60a06040523480156200001157600080fd5b5060405162002b4338038062002b438339810160408190526200003491620002ae565b82826000620000448382620003ca565b506001620000538282620003ca565b505050620000706200006a620000b260201b60201c565b620000b6565b6001600160a01b0381166080819052600081815260086020526040902080546001600160a01b0319169091179055620000a93362000108565b50505062000496565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001126200018b565b6001600160a01b0381166200017d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6200018881620000b6565b50565b6006546001600160a01b03163314620001e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000174565b565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200021157600080fd5b81516001600160401b03808211156200022e576200022e620001e9565b604051601f8301601f19908116603f01168101908282118183101715620002595762000259620001e9565b816040528381526020925086838588010111156200027657600080fd5b600091505b838210156200029a57858201830151818301840152908201906200027b565b600093810190920192909252949350505050565b600080600060608486031215620002c457600080fd5b83516001600160401b0380821115620002dc57600080fd5b620002ea87838801620001ff565b945060208601519150808211156200030157600080fd5b506200031086828701620001ff565b604086015190935090506001600160a01b03811681146200033057600080fd5b809150509250925092565b600181811c908216806200035057607f821691505b6020821081036200037157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003c557600081815260208120601f850160051c81016020861015620003a05750805b601f850160051c820191505b81811015620003c157828155600101620003ac565b5050505b505050565b81516001600160401b03811115620003e657620003e6620001e9565b620003fe81620003f784546200033b565b8462000377565b602080601f8311600181146200043657600084156200041d5750858301515b600019600386901b1c1916600185901b178555620003c1565b600085815260208120601f198616915b82811015620004675788860151825594840194600190910190840162000446565b5085821015620004865787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60805161268a620004b9600039600081816103b201526115f8015261268a6000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c806383f95f131161010f578063d45167d0116100a2578063efd672a911610071578063efd672a914610491578063f1f8d7da146104a4578063f2fde38b146104cd578063fcfff16f146104e057600080fd5b8063d45167d01461041d578063e2055c1a14610430578063e985e9c514610443578063ea39b8e91461047157600080fd5b8063a7f0b3de116100de578063a7f0b3de146103ad578063b88d4fde146103d4578063c87b56dd146103e7578063c884ef83146103fa57600080fd5b806383f95f131461036e5780638da5cb5b1461038157806395d89b4114610392578063a22cb4651461039a57600080fd5b8063258c1ef5116101875780636352211e116101565780636352211e1461032d57806370a0823114610340578063715018a6146103535780637f7971031461035b57600080fd5b8063258c1ef5146102c4578063367aefb5146102d757806342842e0e146102ea57806355e732da146102fd57600080fd5b8063095ea7b3116101c3578063095ea7b314610268578063136dd9631461027d5780631f5ac1b21461029057806323b872dd146102b157600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611a22565b6104ed565b60405190151581526020015b60405180910390f35b61021a61053f565b6040516102099190611a8f565b610250610235366004611aa2565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61027b610276366004611ad2565b6105cd565b005b61021a61028b366004611aa2565b6106b4565b6102a361029e366004611afc565b6106cd565b604051908152602001610209565b61027b6102bf366004611b17565b61070c565b6102506102d2366004611bf6565b6108d3565b61027b6102e5366004611aa2565b61095f565b61027b6102f8366004611b17565b6109d2565b61032061030b366004611aa2565b600b6020526000908152604090205460ff1681565b6040516102099190611c7c565b61025061033b366004611aa2565b610aca565b6102a361034e366004611afc565b610b21565b61027b610b84565b61027b610369366004611c8a565b610b98565b61027b61037c366004611c8a565b610d2d565b6006546001600160a01b0316610250565b61021a610d7e565b61027b6103a8366004611cd7565b610d8b565b6102507f000000000000000000000000000000000000000000000000000000000000000081565b61027b6103e2366004611d0a565b610df7565b61021a6103f5366004611aa2565b610ed8565b6101fd610408366004611afc565b600a6020526000908152604090205460ff1681565b61025061042b366004611da5565b61126a565b61027b61043e366004611de8565b61131f565b6101fd610451366004611e03565b600560209081526000928352604080842090915290825290205460ff1681565b6102a361047f366004611afc565b60096020526000908152604090205481565b61027b61049f366004611e2d565b61133a565b6102506104b2366004611afc565b6008602052600090815260409020546001600160a01b031681565b61027b6104db366004611afc565b6113d3565b600c546101fd9060ff1681565b60006301ffc9a760e01b6001600160e01b03198316148061051e57506380ac58cd60e01b6001600160e01b03198316145b806105395750635b5e139f60e01b6001600160e01b03198316145b92915050565b6000805461054c90611e87565b80601f016020809104026020016040519081016040528092919081815260200182805461057890611e87565b80156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061061657506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6106585760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007602052600090815260409020805461054c90611e87565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b6000818152600260205260409020546001600160a01b038481169116146107625760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b604482015260640161064f565b6001600160a01b0382166107ac5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b604482015260640161064f565b336001600160a01b03841614806107e657506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b8061080757506000818152600460205260409020546001600160a01b031633145b6108445760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161064f565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081516041146109265760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604482015260640161064f565b6000610931846106cd565b602084015160408501516060860151929350909160001a6109548482858561126a565b979650505050505050565b6000818152600260205260409020546001600160a01b03163314610995576040516282b42960e81b815260040160405180910390fd5b33600081815260096020526040808220849055518392917fe61fb46789e4a901ffd5e656b31782f15727402adc543cff7eafd545341d089e91a350565b6109dd83838361070c565b6001600160a01b0382163b1580610a865750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7a9190611ec1565b6001600160e01b031916145b610ac55760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b604482015260640161064f565b505050565b6000818152600260205260409020546001600160a01b031680610b1c5760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b604482015260640161064f565b919050565b60006001600160a01b038216610b685760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015260640161064f565b506001600160a01b031660009081526003602052604090205490565b610b8c61144c565b610b9660006114a6565b565b80516003811080610ba95750600f81115b15610bc75760405163251f56a160e21b815260040160405180910390fd5b600082600081518110610bdc57610bdc611ede565b01602001516001600160f81b0319169050600083610bfb600185611f0a565b81518110610c0b57610c0b611ede565b01602001516001600160f81b03199081169150605f60f81b9083161480610c3f5750605f60f81b6001600160f81b03198216145b15610c5d576040516308b5027960e21b815260040160405180910390fd5b60005b83811015610d26576000858281518110610c7c57610c7c611ede565b01602001516001600160f81b0319169050600360fc1b8110801590610caf5750603960f81b6001600160f81b0319821611155b158015610ce55750606160f81b6001600160f81b0319821610801590610ce35750603d60f91b6001600160f81b0319821611155b155b8015610cff5750605f60f81b6001600160f81b0319821614155b15610d1d576040516318954fab60e11b815260040160405180910390fd5b50600101610c60565b5050505050565b600081604051602001610d409190611f39565b6040516020818303038152906040528051906020012060001c9050610d668160016114f8565b610d6f82610b98565b610d7a818330611587565b5050565b6001805461054c90611e87565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e0285858561070c565b6001600160a01b0384163b1580610e995750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610e4a9033908a90899089908990600401611f55565b6020604051808303816000875af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d9190611ec1565b6001600160e01b031916145b610d265760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b604482015260640161064f565b6000818152600260205260409020546060906001600160a01b031680610f115760405163b0ce759160e01b815260040160405180910390fd5b6000838152600b602052604081205460ff166002811115610f3457610f34611c44565b03611041576000838152600760205260409020805461103a9190610f5790611e87565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390611e87565b8015610fd05780601f10610fa557610100808354040283529160200191610fd0565b820191906000526020600020905b815481529060010190602001808311610fb357829003601f168201915b50505050506040518060400160405280600781526020016647454e4553495360c81b815250604051806040016040528060078152602001660234646344630360cc1b815250604051806040016040528060078152602001660233030303030360cc1b8152506116f7565b9392505050565b60016000848152600b602052604090205460ff16600281111561106657611066611c44565b0361116c576000838152600760205260409020805461103a919061108990611e87565b80601f01602080910402602001604051908101604052809291908181526020018280546110b590611e87565b80156111025780601f106110d757610100808354040283529160200191611102565b820191906000526020600020905b8154815290600101906020018083116110e557829003601f168201915b50505050506040518060400160405280600781526020016610d5549055115160ca1b815250604051806040016040528060078152602001660233030303030360cc1b8152506040518060400160405280600781526020016611a3232323232360c91b8152506116f7565b6000838152600760205260409020805461103a919061118a90611e87565b80601f01602080910402602001604051908101604052809291908181526020018280546111b690611e87565b80156112035780601f106111d857610100808354040283529160200191611203565b820191906000526020600020905b8154815290600101906020018083116111e657829003601f168201915b50505050506040518060400160405280600481526020016327a822a760e11b8152506040518060400160405280600781526020016611a3232323232360c91b815250604051806040016040528060078152602001660233030303030360cc1b8152506116f7565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018590526000908190605c0160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8816918301919091526060820186905260808201859052915060019060a0016020604051602081039080840390855afa15801561130a573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b61132761144c565b600c805460ff1916911515919091179055565b600061134633836108d3565b6001600160a01b0380821660009081526008602052604090205491925016611380576040516282b42960e81b815260040160405180910390fd5b6000836040516020016113939190611f39565b6040516020818303038152906040528051906020012060001c90506113b98160006114f8565b6113c284610b98565b6113cd818584611587565b50505050565b6113db61144c565b6001600160a01b0381166114405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064f565b611449816114a6565b50565b6006546001600160a01b03163314610b965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161064f565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b801561152057600c5460ff16611520576040516282b42960e81b815260040160405180910390fd5b336000908152600a602052604090205460ff161561155157604051635986e84960e01b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b031615610d7a57604051630c0e5cf760e21b815260040160405180910390fd5b6115913384611758565b60008381526007602052604090206115a98382611ff7565b50336000908152600960209081526040808320869055600a8252808320805460ff191660011790556008909152902080546001600160a01b038381166001600160a01b031990921682179092557f00000000000000000000000000000000000000000000000000000000000000009091169003611642576000838152600b60205260408120805460ff19166001835b02179055506116a0565b6001600160a01b0381163014158061166257506001600160a01b03811615155b15611686576000838152600b6020526040902080546001919060ff19168280611638565b6000838152600b60205260409020805460ff191660021790555b6000838152600b602052604090819020549051849133917fa2505bb9d406b492ad9f3e41d58aa05145501156da23c9780b2e3e257f377579916116ea91879160ff169087906120b7565b60405180910390a3505050565b606061172f85611708878686611863565b8660405160200161171b939291906120f2565b6040516020818303038152906040526118a7565b60405160200161173f9190612291565b6040516020818303038152906040529050949350505050565b6001600160a01b0382166117a25760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b604482015260640161064f565b6000818152600260205260409020546001600160a01b0316156117f85760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b604482015260640161064f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606061187f8383848760405160200161171b94939291906122d6565b60405160200161188f9190612583565b60405160208183030381529060405290509392505050565b606081516000036118c657505060408051602081019091526000815290565b600060405180606001604052806040815260200161261560409139905060006003845160026118f591906125c8565b6118ff91906125db565b61190a9060046125fd565b905060006119198260206125c8565b67ffffffffffffffff81111561193157611931611b53565b6040519080825280601f01601f19166020018201604052801561195b576020820181803683370190505b509050818152600183018586518101602084015b818310156119c7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161196f565b6003895106600181146119e157600281146119f2576119fe565b613d3d60f01b6001198301526119fe565b603d60f81b6000198301525b509398975050505050505050565b6001600160e01b03198116811461144957600080fd5b600060208284031215611a3457600080fd5b813561103a81611a0c565b60005b83811015611a5a578181015183820152602001611a42565b50506000910152565b60008151808452611a7b816020860160208601611a3f565b601f01601f19169290920160200192915050565b60208152600061103a6020830184611a63565b600060208284031215611ab457600080fd5b5035919050565b80356001600160a01b0381168114610b1c57600080fd5b60008060408385031215611ae557600080fd5b611aee83611abb565b946020939093013593505050565b600060208284031215611b0e57600080fd5b61103a82611abb565b600080600060608486031215611b2c57600080fd5b611b3584611abb565b9250611b4360208501611abb565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611b7a57600080fd5b813567ffffffffffffffff80821115611b9557611b95611b53565b604051601f8301601f19908116603f01168101908282118183101715611bbd57611bbd611b53565b81604052838152866020858801011115611bd657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611c0957600080fd5b611c1283611abb565b9150602083013567ffffffffffffffff811115611c2e57600080fd5b611c3a85828601611b69565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60038110611c7857634e487b7160e01b600052602160045260246000fd5b9052565b602081016105398284611c5a565b600060208284031215611c9c57600080fd5b813567ffffffffffffffff811115611cb357600080fd5b611cbf84828501611b69565b949350505050565b80358015158114610b1c57600080fd5b60008060408385031215611cea57600080fd5b611cf383611abb565b9150611d0160208401611cc7565b90509250929050565b600080600080600060808688031215611d2257600080fd5b611d2b86611abb565b9450611d3960208701611abb565b935060408601359250606086013567ffffffffffffffff80821115611d5d57600080fd5b818801915088601f830112611d7157600080fd5b813581811115611d8057600080fd5b896020828501011115611d9257600080fd5b9699959850939650602001949392505050565b60008060008060808587031215611dbb57600080fd5b84359350602085013560ff81168114611dd357600080fd5b93969395505050506040820135916060013590565b600060208284031215611dfa57600080fd5b61103a82611cc7565b60008060408385031215611e1657600080fd5b611e1f83611abb565b9150611d0160208401611abb565b60008060408385031215611e4057600080fd5b823567ffffffffffffffff80821115611e5857600080fd5b611e6486838701611b69565b93506020850135915080821115611e7a57600080fd5b50611c3a85828601611b69565b600181811c90821680611e9b57607f821691505b602082108103611ebb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611ed357600080fd5b815161103a81611a0c565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561053957610539611ef4565b60008151611f2f818560208601611a3f565b9290920192915050565b60008251611f4b818460208701611a3f565b9190910192915050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b601f821115610ac557600081815260208120601f850160051c81016020861015611fd05750805b601f850160051c820191505b81811015611fef57828155600101611fdc565b505050505050565b815167ffffffffffffffff81111561201157612011611b53565b6120258161201f8454611e87565b84611fa9565b602080601f83116001811461205a57600084156120425750858301515b600019600386901b1c1916600185901b178555611fef565b600085815260208120601f198616915b828110156120895788860151825594840194600190910190840161206a565b50858210156120a75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006120ca6060830186611a63565b90506120d96020830185611c5a565b6001600160a01b03929092166040919091015292915050565b683d913730b6b2911d1160b91b81528351600090612117816009850160208901611a3f565b7f2e676c617373222c20226465736372697074696f6e223a2200000000000000006009918401918201527f476c6173732070617373657320617265207370656369616c206173736574732060218201527f74686174207369676e69667920757365726e616d65732c206f776e657273686960418201527f702c20616e642074686520706f77657220746f2067697665206f74686572732060618201527f61636365737320746f206a6f696e207468652070726f746f636f6c2e0000000060818201526c1116101134b6b0b3b2911d101160991b609d82015284516122028160aa840160208901611a3f565b71222c202261747472696275746573223a205b60701b910160aa8101919091527f7b2274726169745f74797065223a2022506173732054797065222c202276616c60bc820152653ab2911d101160d11b60dc82015261228761227961226b60e284015b87611f1d565b61227d60f01b815260020190565b615d7d60f01b815260020190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516122c981601d850160208701611a3f565b91909101601d0192915050565b7f3c7376672077696474683d2235313222206865696768743d223531322220766981527f6577426f783d223020302035313220353132222066696c6c3d226e6f6e65222060208201527f786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737660408201526233911f60e91b60608201527f3c726563742077696474683d2235313222206865696768743d2235313222206660638201526434b6361e9160d91b60838201526000855161239a816088850160208a01611a3f565b7f222f3e3c7061746820643d224d3235302e3320343130433235302e33203431386088918401918201527f2e393832203234362e373436203432372e31313320323431203433334c32363860a88201527f2e343938203431322e393832433237302e353031203431312e3532342032373060c88201527f2e353031203430382e343737203236382e343938203430372e3031384c32343160e88201527f20333837433234362e373436203339322e383837203235302e33203430312e3061010882015274189c10191a981719901a18982d11103334b6361e9160591b61012882015261095461257161255e61226561255061254a61249c61013d88018d611f1d565b7f222f3e3c7465787420666f6e742d66616d696c793d2273616e732d736572696681527f2220666f6e742d7765696768743d22626f6c642220793d223530252220783d2260208201527f3530252220646f6d696e616e742d626173656c696e653d226d6964646c65222060408201527f746578742d616e63686f723d226d6964646c652220666f6e742d73697a653d226060820152691a1811103334b6361e9160b11b6080820152608a0190565b8a611f1d565b61111f60f11b815260020190565b661e17ba32bc3a1f60c91b815260070190565b651e17b9bb339f60d11b815260060190565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516125bb81601a850160208701611a3f565b91909101601a0192915050565b8082018082111561053957610539611ef4565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761053957610539611ef456fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220edd2792655fc00038e0f4cbedcca63bf568ca1eadbdebd432d44a3896d0a529764736f6c63430008130033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000229958eb3b8fb06dc345f86f4dba53050663ca66000000000000000000000000000000000000000000000000000000000000000a474c41535320504153530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045041535300000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101e55760003560e01c806383f95f131161010f578063d45167d0116100a2578063efd672a911610071578063efd672a914610491578063f1f8d7da146104a4578063f2fde38b146104cd578063fcfff16f146104e057600080fd5b8063d45167d01461041d578063e2055c1a14610430578063e985e9c514610443578063ea39b8e91461047157600080fd5b8063a7f0b3de116100de578063a7f0b3de146103ad578063b88d4fde146103d4578063c87b56dd146103e7578063c884ef83146103fa57600080fd5b806383f95f131461036e5780638da5cb5b1461038157806395d89b4114610392578063a22cb4651461039a57600080fd5b8063258c1ef5116101875780636352211e116101565780636352211e1461032d57806370a0823114610340578063715018a6146103535780637f7971031461035b57600080fd5b8063258c1ef5146102c4578063367aefb5146102d757806342842e0e146102ea57806355e732da146102fd57600080fd5b8063095ea7b3116101c3578063095ea7b314610268578063136dd9631461027d5780631f5ac1b21461029057806323b872dd146102b157600080fd5b806301ffc9a7146101ea57806306fdde0314610212578063081812fc14610227575b600080fd5b6101fd6101f8366004611a22565b6104ed565b60405190151581526020015b60405180910390f35b61021a61053f565b6040516102099190611a8f565b610250610235366004611aa2565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b039091168152602001610209565b61027b610276366004611ad2565b6105cd565b005b61021a61028b366004611aa2565b6106b4565b6102a361029e366004611afc565b6106cd565b604051908152602001610209565b61027b6102bf366004611b17565b61070c565b6102506102d2366004611bf6565b6108d3565b61027b6102e5366004611aa2565b61095f565b61027b6102f8366004611b17565b6109d2565b61032061030b366004611aa2565b600b6020526000908152604090205460ff1681565b6040516102099190611c7c565b61025061033b366004611aa2565b610aca565b6102a361034e366004611afc565b610b21565b61027b610b84565b61027b610369366004611c8a565b610b98565b61027b61037c366004611c8a565b610d2d565b6006546001600160a01b0316610250565b61021a610d7e565b61027b6103a8366004611cd7565b610d8b565b6102507f000000000000000000000000229958eb3b8fb06dc345f86f4dba53050663ca6681565b61027b6103e2366004611d0a565b610df7565b61021a6103f5366004611aa2565b610ed8565b6101fd610408366004611afc565b600a6020526000908152604090205460ff1681565b61025061042b366004611da5565b61126a565b61027b61043e366004611de8565b61131f565b6101fd610451366004611e03565b600560209081526000928352604080842090915290825290205460ff1681565b6102a361047f366004611afc565b60096020526000908152604090205481565b61027b61049f366004611e2d565b61133a565b6102506104b2366004611afc565b6008602052600090815260409020546001600160a01b031681565b61027b6104db366004611afc565b6113d3565b600c546101fd9060ff1681565b60006301ffc9a760e01b6001600160e01b03198316148061051e57506380ac58cd60e01b6001600160e01b03198316145b806105395750635b5e139f60e01b6001600160e01b03198316145b92915050565b6000805461054c90611e87565b80601f016020809104026020016040519081016040528092919081815260200182805461057890611e87565b80156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b03163381148061061657506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b6106585760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6007602052600090815260409020805461054c90611e87565b6040516bffffffffffffffffffffffff19606083901b166020820152600090603401604051602081830303815290604052805190602001209050919050565b6000818152600260205260409020546001600160a01b038481169116146107625760405162461bcd60e51b815260206004820152600a60248201526957524f4e475f46524f4d60b01b604482015260640161064f565b6001600160a01b0382166107ac5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b604482015260640161064f565b336001600160a01b03841614806107e657506001600160a01b038316600090815260056020908152604080832033845290915290205460ff165b8061080757506000818152600460205260409020546001600160a01b031633145b6108445760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b604482015260640161064f565b6001600160a01b0380841660008181526003602090815260408083208054600019019055938616808352848320805460010190558583526002825284832080546001600160a01b03199081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081516041146109265760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e6774680000000000000000604482015260640161064f565b6000610931846106cd565b602084015160408501516060860151929350909160001a6109548482858561126a565b979650505050505050565b6000818152600260205260409020546001600160a01b03163314610995576040516282b42960e81b815260040160405180910390fd5b33600081815260096020526040808220849055518392917fe61fb46789e4a901ffd5e656b31782f15727402adc543cff7eafd545341d089e91a350565b6109dd83838361070c565b6001600160a01b0382163b1580610a865750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610a56573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a7a9190611ec1565b6001600160e01b031916145b610ac55760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b604482015260640161064f565b505050565b6000818152600260205260409020546001600160a01b031680610b1c5760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b604482015260640161064f565b919050565b60006001600160a01b038216610b685760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b604482015260640161064f565b506001600160a01b031660009081526003602052604090205490565b610b8c61144c565b610b9660006114a6565b565b80516003811080610ba95750600f81115b15610bc75760405163251f56a160e21b815260040160405180910390fd5b600082600081518110610bdc57610bdc611ede565b01602001516001600160f81b0319169050600083610bfb600185611f0a565b81518110610c0b57610c0b611ede565b01602001516001600160f81b03199081169150605f60f81b9083161480610c3f5750605f60f81b6001600160f81b03198216145b15610c5d576040516308b5027960e21b815260040160405180910390fd5b60005b83811015610d26576000858281518110610c7c57610c7c611ede565b01602001516001600160f81b0319169050600360fc1b8110801590610caf5750603960f81b6001600160f81b0319821611155b158015610ce55750606160f81b6001600160f81b0319821610801590610ce35750603d60f91b6001600160f81b0319821611155b155b8015610cff5750605f60f81b6001600160f81b0319821614155b15610d1d576040516318954fab60e11b815260040160405180910390fd5b50600101610c60565b5050505050565b600081604051602001610d409190611f39565b6040516020818303038152906040528051906020012060001c9050610d668160016114f8565b610d6f82610b98565b610d7a818330611587565b5050565b6001805461054c90611e87565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610e0285858561070c565b6001600160a01b0384163b1580610e995750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610e4a9033908a90899089908990600401611f55565b6020604051808303816000875af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d9190611ec1565b6001600160e01b031916145b610d265760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b604482015260640161064f565b6000818152600260205260409020546060906001600160a01b031680610f115760405163b0ce759160e01b815260040160405180910390fd5b6000838152600b602052604081205460ff166002811115610f3457610f34611c44565b03611041576000838152600760205260409020805461103a9190610f5790611e87565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8390611e87565b8015610fd05780601f10610fa557610100808354040283529160200191610fd0565b820191906000526020600020905b815481529060010190602001808311610fb357829003601f168201915b50505050506040518060400160405280600781526020016647454e4553495360c81b815250604051806040016040528060078152602001660234646344630360cc1b815250604051806040016040528060078152602001660233030303030360cc1b8152506116f7565b9392505050565b60016000848152600b602052604090205460ff16600281111561106657611066611c44565b0361116c576000838152600760205260409020805461103a919061108990611e87565b80601f01602080910402602001604051908101604052809291908181526020018280546110b590611e87565b80156111025780601f106110d757610100808354040283529160200191611102565b820191906000526020600020905b8154815290600101906020018083116110e557829003601f168201915b50505050506040518060400160405280600781526020016610d5549055115160ca1b815250604051806040016040528060078152602001660233030303030360cc1b8152506040518060400160405280600781526020016611a3232323232360c91b8152506116f7565b6000838152600760205260409020805461103a919061118a90611e87565b80601f01602080910402602001604051908101604052809291908181526020018280546111b690611e87565b80156112035780601f106111d857610100808354040283529160200191611203565b820191906000526020600020905b8154815290600101906020018083116111e657829003601f168201915b50505050506040518060400160405280600481526020016327a822a760e11b8152506040518060400160405280600781526020016611a3232323232360c91b815250604051806040016040528060078152602001660233030303030360cc1b8152506116f7565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c81018590526000908190605c0160408051601f1981840301815282825280516020918201206000845290830180835281905260ff8816918301919091526060820186905260808201859052915060019060a0016020604051602081039080840390855afa15801561130a573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b61132761144c565b600c805460ff1916911515919091179055565b600061134633836108d3565b6001600160a01b0380821660009081526008602052604090205491925016611380576040516282b42960e81b815260040160405180910390fd5b6000836040516020016113939190611f39565b6040516020818303038152906040528051906020012060001c90506113b98160006114f8565b6113c284610b98565b6113cd818584611587565b50505050565b6113db61144c565b6001600160a01b0381166114405760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064f565b611449816114a6565b50565b6006546001600160a01b03163314610b965760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161064f565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b801561152057600c5460ff16611520576040516282b42960e81b815260040160405180910390fd5b336000908152600a602052604090205460ff161561155157604051635986e84960e01b815260040160405180910390fd5b6000828152600260205260409020546001600160a01b031615610d7a57604051630c0e5cf760e21b815260040160405180910390fd5b6115913384611758565b60008381526007602052604090206115a98382611ff7565b50336000908152600960209081526040808320869055600a8252808320805460ff191660011790556008909152902080546001600160a01b038381166001600160a01b031990921682179092557f000000000000000000000000229958eb3b8fb06dc345f86f4dba53050663ca669091169003611642576000838152600b60205260408120805460ff19166001835b02179055506116a0565b6001600160a01b0381163014158061166257506001600160a01b03811615155b15611686576000838152600b6020526040902080546001919060ff19168280611638565b6000838152600b60205260409020805460ff191660021790555b6000838152600b602052604090819020549051849133917fa2505bb9d406b492ad9f3e41d58aa05145501156da23c9780b2e3e257f377579916116ea91879160ff169087906120b7565b60405180910390a3505050565b606061172f85611708878686611863565b8660405160200161171b939291906120f2565b6040516020818303038152906040526118a7565b60405160200161173f9190612291565b6040516020818303038152906040529050949350505050565b6001600160a01b0382166117a25760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b604482015260640161064f565b6000818152600260205260409020546001600160a01b0316156117f85760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b604482015260640161064f565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606061187f8383848760405160200161171b94939291906122d6565b60405160200161188f9190612583565b60405160208183030381529060405290509392505050565b606081516000036118c657505060408051602081019091526000815290565b600060405180606001604052806040815260200161261560409139905060006003845160026118f591906125c8565b6118ff91906125db565b61190a9060046125fd565b905060006119198260206125c8565b67ffffffffffffffff81111561193157611931611b53565b6040519080825280601f01601f19166020018201604052801561195b576020820181803683370190505b509050818152600183018586518101602084015b818310156119c7576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f811685015182535060010161196f565b6003895106600181146119e157600281146119f2576119fe565b613d3d60f01b6001198301526119fe565b603d60f81b6000198301525b509398975050505050505050565b6001600160e01b03198116811461144957600080fd5b600060208284031215611a3457600080fd5b813561103a81611a0c565b60005b83811015611a5a578181015183820152602001611a42565b50506000910152565b60008151808452611a7b816020860160208601611a3f565b601f01601f19169290920160200192915050565b60208152600061103a6020830184611a63565b600060208284031215611ab457600080fd5b5035919050565b80356001600160a01b0381168114610b1c57600080fd5b60008060408385031215611ae557600080fd5b611aee83611abb565b946020939093013593505050565b600060208284031215611b0e57600080fd5b61103a82611abb565b600080600060608486031215611b2c57600080fd5b611b3584611abb565b9250611b4360208501611abb565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112611b7a57600080fd5b813567ffffffffffffffff80821115611b9557611b95611b53565b604051601f8301601f19908116603f01168101908282118183101715611bbd57611bbd611b53565b81604052838152866020858801011115611bd657600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060408385031215611c0957600080fd5b611c1283611abb565b9150602083013567ffffffffffffffff811115611c2e57600080fd5b611c3a85828601611b69565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b60038110611c7857634e487b7160e01b600052602160045260246000fd5b9052565b602081016105398284611c5a565b600060208284031215611c9c57600080fd5b813567ffffffffffffffff811115611cb357600080fd5b611cbf84828501611b69565b949350505050565b80358015158114610b1c57600080fd5b60008060408385031215611cea57600080fd5b611cf383611abb565b9150611d0160208401611cc7565b90509250929050565b600080600080600060808688031215611d2257600080fd5b611d2b86611abb565b9450611d3960208701611abb565b935060408601359250606086013567ffffffffffffffff80821115611d5d57600080fd5b818801915088601f830112611d7157600080fd5b813581811115611d8057600080fd5b896020828501011115611d9257600080fd5b9699959850939650602001949392505050565b60008060008060808587031215611dbb57600080fd5b84359350602085013560ff81168114611dd357600080fd5b93969395505050506040820135916060013590565b600060208284031215611dfa57600080fd5b61103a82611cc7565b60008060408385031215611e1657600080fd5b611e1f83611abb565b9150611d0160208401611abb565b60008060408385031215611e4057600080fd5b823567ffffffffffffffff80821115611e5857600080fd5b611e6486838701611b69565b93506020850135915080821115611e7a57600080fd5b50611c3a85828601611b69565b600181811c90821680611e9b57607f821691505b602082108103611ebb57634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215611ed357600080fd5b815161103a81611a0c565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561053957610539611ef4565b60008151611f2f818560208601611a3f565b9290920192915050565b60008251611f4b818460208701611a3f565b9190910192915050565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b601f821115610ac557600081815260208120601f850160051c81016020861015611fd05750805b601f850160051c820191505b81811015611fef57828155600101611fdc565b505050505050565b815167ffffffffffffffff81111561201157612011611b53565b6120258161201f8454611e87565b84611fa9565b602080601f83116001811461205a57600084156120425750858301515b600019600386901b1c1916600185901b178555611fef565b600085815260208120601f198616915b828110156120895788860151825594840194600190910190840161206a565b50858210156120a75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6060815260006120ca6060830186611a63565b90506120d96020830185611c5a565b6001600160a01b03929092166040919091015292915050565b683d913730b6b2911d1160b91b81528351600090612117816009850160208901611a3f565b7f2e676c617373222c20226465736372697074696f6e223a2200000000000000006009918401918201527f476c6173732070617373657320617265207370656369616c206173736574732060218201527f74686174207369676e69667920757365726e616d65732c206f776e657273686960418201527f702c20616e642074686520706f77657220746f2067697665206f74686572732060618201527f61636365737320746f206a6f696e207468652070726f746f636f6c2e0000000060818201526c1116101134b6b0b3b2911d101160991b609d82015284516122028160aa840160208901611a3f565b71222c202261747472696275746573223a205b60701b910160aa8101919091527f7b2274726169745f74797065223a2022506173732054797065222c202276616c60bc820152653ab2911d101160d11b60dc82015261228761227961226b60e284015b87611f1d565b61227d60f01b815260020190565b615d7d60f01b815260020190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516122c981601d850160208701611a3f565b91909101601d0192915050565b7f3c7376672077696474683d2235313222206865696768743d223531322220766981527f6577426f783d223020302035313220353132222066696c6c3d226e6f6e65222060208201527f786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737660408201526233911f60e91b60608201527f3c726563742077696474683d2235313222206865696768743d2235313222206660638201526434b6361e9160d91b60838201526000855161239a816088850160208a01611a3f565b7f222f3e3c7061746820643d224d3235302e3320343130433235302e33203431386088918401918201527f2e393832203234362e373436203432372e31313320323431203433334c32363860a88201527f2e343938203431322e393832433237302e353031203431312e3532342032373060c88201527f2e353031203430382e343737203236382e343938203430372e3031384c32343160e88201527f20333837433234362e373436203339322e383837203235302e33203430312e3061010882015274189c10191a981719901a18982d11103334b6361e9160591b61012882015261095461257161255e61226561255061254a61249c61013d88018d611f1d565b7f222f3e3c7465787420666f6e742d66616d696c793d2273616e732d736572696681527f2220666f6e742d7765696768743d22626f6c642220793d223530252220783d2260208201527f3530252220646f6d696e616e742d626173656c696e653d226d6964646c65222060408201527f746578742d616e63686f723d226d6964646c652220666f6e742d73697a653d226060820152691a1811103334b6361e9160b11b6080820152608a0190565b8a611f1d565b61111f60f11b815260020190565b661e17ba32bc3a1f60c91b815260070190565b651e17b9bb339f60d11b815260060190565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c0000000000008152600082516125bb81601a850160208701611a3f565b91909101601a0192915050565b8082018082111561053957610539611ef4565b6000826125f857634e487b7160e01b600052601260045260246000fd5b500490565b808202811582820484141761053957610539611ef456fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220edd2792655fc00038e0f4cbedcca63bf568ca1eadbdebd432d44a3896d0a529764736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000229958eb3b8fb06dc345f86f4dba53050663ca66000000000000000000000000000000000000000000000000000000000000000a474c41535320504153530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045041535300000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): GLASS PASS
Arg [1] : symbol (string): PASS
Arg [2] : _genesis (address): 0x229958Eb3B8fB06dC345f86F4DbA53050663cA66

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000229958eb3b8fb06dc345f86f4dba53050663ca66
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [4] : 474c415353205041535300000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [6] : 5041535300000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

The Glass Pass is your identity on Glass Protocol. It is the key to creating decentralized videos on Ethereum. Claim your .glass username, upload videos, and truly own the value you create. Welcome to Glass.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ 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.