ETH Price: $2,634.37 (+6.08%)
Gas: 4 Gwei

Token

PaymentLinks Access Key ()
 

Overview

Max Total Supply

0 PaymentLinks Access Key

Holders

102

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
rambling.eth
Balance
1 PaymentLinks Access Key
0x9fa6d8fe72cef99dac2f29f0d9e2befe18ab98da
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PaymentLinksAccessKey

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : PaymentLinksAccessKey.sol
// SPDX-License-Identifier: MIT
/*
 * PaymentLinksAccessKey.sol
 *
 * Author: Jack Kasbeer
 * Created: November 30, 2021
 *
 * Price: 0.5 ETH
 * Rinkeby: 0x9652620B8973C85ba073D2c27B3BFd4Df0E2D812
 * Mainnet:
 *
 * Description: An ERC-721 token that will represent an access key for PaymentLinks
 *
 * - 300 total supply
 * - Blacklist functionality
 * - Pause/unpause minting
 * - Limit of 2 PLAK's per wallet
 */

pragma solidity >=0.5.16 <0.9.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./PLAK721.sol";

//@title PaymentLinks Access Key
//@author Jack Kasbeer (gh:@jcksber, tw:@satoshigoat)
contract PaymentLinksAccessKey is PLAK721 {

	using Counters for Counters.Counter;
	using SafeMath for uint256;

	//this is how we'll limit it to 2 per wallet
	mapping (address => uint8) internal _walletToCount;

	constructor() PLAK721("PaymentLinks Access Key", "") {
		_contractUri = "ipfs://QmZ5bBxM8Ggz4eDzvYZmShBVMvDeJfCJ5tTBnhYnVm8L2m";
		weiPrice = 500000000000000000;//0.5 ETH
		payoutAddress = address(0x6E62733E401ceEdD8e43Dc3A85F164EFAE9b9462);
		addToWhitelist(0x6E62733E401ceEdD8e43Dc3A85F164EFAE9b9462);
		whitelistActive = true;
	}

	// -----------
	// RESTRICTORS
	// -----------

	//@dev Ensure there's enough supply remaining 
	modifier enoughSupply()
	{
		require(getCurrentId() < MAX_NUM_TOKENS, "PaymentLinksAccessKey: none left to mint");
		_;
	}

	//@dev Limit wallets to 2 tokens max
	modifier roomInWallet(address a)
	{
		require(_walletToCount[a] < 2, "PaymentLinksAccessKey: 2 per wallet max.");
		_;
	}

	//@dev Determine if a certain token ID exists
	modifier tokenExists(uint256 tokenId)
	{
		require(_exists(tokenId), "PaymentLinksAccessKey: nonexistent token");
		_;
	}

	// ---------
	// PLAK CORE
	// ---------

	//@dev Override 'tokenURI' to account for types of passes
	function tokenURI(uint256 tid) 
		tokenExists(tid) public view virtual override 
		returns (string memory) 
	{	
		string memory baseURI = _baseURI();
		string memory hash = _getTokenType(tid);
		
		return string(abi.encodePacked(baseURI, hash));
	}

	//@dev Determine if a token is disabled, standard, or legendary
	function _getTokenType(uint256 tid)
		internal view returns (string memory)
	{
		if (isDisabled(tid)) {
			return _disabledHash;
		} else if (isLegendary(tid)) {
			return _legendaryHash;
		} else {
			return _standardHash;
		}
	}

	//@dev Before transferring, take care of maintenance for wallet's token count
	// If `to` already has 2 tokens, transfer will abort
	function _beforeTokenTransfer(address from, address to, uint256 tid)
		roomInWallet(to) internal virtual override
	{
		// When this is called on a mint, the `from` address will be 0x00..
		if (from != address(0)) {
			_walletToCount[from] -= 1;//`from` loses 1
		}
		// When this is called on a burn, the `to` address will be 0x00..
		if (to != address(0)) {
			_walletToCount[to] += 1;//`to` gains 1
		}

		super._beforeTokenTransfer(from, to, tid);
	}

    //@dev Allows owners to mint for free
    function mint(address to) 
    	onlyOwner enoughSupply public virtual override
    	returns (uint256)
    {
    	return _mintInternal(to);
    }

    //@dev Allows public addresses (non-owners) to purchase
    function purchase(address payable to) 
    	enoughSupply saleActive public payable 
    	returns (bool)
    {
    	if (whitelistActive) {
    		require(isInWhitelist(to), "PaymentLinksAccessKey: address not whitelisted");
    	}
    	require(msg.value >= weiPrice, "PaymentLinksAccessKey: not enough ether");
    	
    	//send change if too much was sent
    	if (msg.value > 0) {
    		uint256 diff = msg.value.sub(weiPrice);
    		if (diff > 0) {
    	    	to.transfer(diff);
    		}
    	}
    	_mintInternal(to);

    	return true;
    }

	//@dev Mints a single PLAK
	function _mintInternal(address to) 
		roomInWallet(to) internal virtual returns (uint256)
	{
		_tokenIds.increment();
		uint256 newId = _tokenIds.current();
		_safeMint(to, newId);
		emit PaymentLinksAccessKeyMinted(newId);

		return newId;
	}

	//@dev Increase the price
	function updatePrice(uint256 newWeiPrice)
		onlyOwner public
	{
		require(newWeiPrice >= 500000000000000000, 
			"PaymentLinksAccessKey: price cannot be lower than 0.5 ETH");
		weiPrice = newWeiPrice;
	}
}

File 2 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 3 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 4 of 17 : PLAK721.sol
// SPDX-License-Identifier: MIT
/*
 * PLAK721.sol
 *
 * Author: Jack Kasbeer
 * Created: November 30, 2021
 */

pragma solidity >=0.5.16 <0.9.0;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "./PLAKStorage.sol";
import "./PLAKAccessControl.sol";
import "./LibPart.sol";


//@author Jack Kasbeer (git:@jcksber, tw:@satoshigoat)
contract PLAK721 is ERC721, PLAKAccessControl, PLAKStorage {

	using Counters for Counters.Counter;
	using SafeMath for uint256;

	event PaymentLinksAccessKeyMinted(uint256 indexed tid);
	event PaymentLinksAccessKeyBurned(uint256 indexed tid);
	
	constructor(string memory temp_name, string memory temp_symbol) 
		ERC721(temp_name, temp_symbol) {}

	// -----------
	// RESTRICTORS
	// -----------
	
	modifier onlyValidTokenId(uint256 tid)
	{
		require(1 <= tid && tid <= MAX_NUM_TOKENS, "PaymentLinksAccessKey: tid OOB");
		_;
	}

	// ------
	// ERC721 
	// ------

	//@dev All of the asset's will be pinned to IPFS
	function _baseURI() 
		internal view virtual override returns (string memory)
	{
		return "ipfs://";
	}

	//@dev This is here as a reminder to override for custom transfer functionality
	function _beforeTokenTransfer(address from, address to, uint256 tid) 
		internal virtual override 
	{ 
		super._beforeTokenTransfer(from, to, tid);
	}

	//@dev Allows owners to mint for free
    function mint(address to)
    	onlyOwner public virtual returns (uint256)
    {
    	_tokenIds.increment();

		uint256 newId = _tokenIds.current();
		_safeMint(to, newId);
		emit PaymentLinksAccessKeyMinted(newId);

		return newId;
    }

	//@dev Custom burn function - nothing special
	function burn(uint256 tid) 
		onlyOwner public virtual
	{
		_burn(tid);
		emit PaymentLinksAccessKeyBurned(tid);
	}

	function supportsInterface(bytes4 interfaceId) 
		public view virtual override returns (bool)
	{
		return interfaceId == _INTERFACE_ID_ERC165
        || interfaceId == _INTERFACE_ID_ROYALTIES
        || interfaceId == _INTERFACE_ID_ERC721
        || interfaceId == _INTERFACE_ID_ERC721_METADATA
        || interfaceId == _INTERFACE_ID_ERC721_ENUMERABLE
        || interfaceId == _INTERFACE_ID_EIP2981
        || super.supportsInterface(interfaceId);
	}

    // ----------------------
    // IPFS HASH MANIPULATION
    // ----------------------

	//@dev Allows us to update the IPFS hash values
	function updateHash(string memory newHash, string memory hashType) 
		onlyOwner public
	{
		require(_stringsEqual(hashType, "disabled") || 
				_stringsEqual(hashType, "standard") ||
				_stringsEqual(hashType, "legendary"), 
				"PLAK721: hashType must be 'disabled'/'standard'/'legendary'");

		if (_stringsEqual(hashType, "disabled")) {
			_disabledHash = newHash;
		} else if (_stringsEqual(hashType, "standard")) {
			_standardHash = newHash;
		} else {
			_legendaryHash = newHash;
		}
	}

	// -------------
	// CONTRACT LIFE
	// -------------

	//@dev Allows us to withdraw funds collected
	function withdraw(address payable wallet, uint256 amount)
		onlyOwner public
	{
		require(amount <= address(this).balance,
			"PLAK721: Insufficient funds to withdraw");
		wallet.transfer(amount);
	}

	//@dev Destroy contract and reclaim leftover funds
    function kill() onlyOwner public 
    {
        selfdestruct(payable(msg.sender));
    }

	//@dev Controls the contract-level metadata to include things like royalties
	function contractURI()
		public view returns(string memory)
	{
		return _contractUri;
	}

	//@dev Ability to change the contract URI
	function updateContractUri(string memory updatedContractUri) 
		onlyOwner public
	{
        _contractUri = updatedContractUri;
    }
	
    // -----------------
    // SECONDARY MARKETS
	// -----------------

	//@dev Rarible Royalties V2
    function getRaribleV2Royalties(uint256 tid) 
    	onlyValidTokenId(tid) external view returns (LibPart.Part[] memory) 
    {
        LibPart.Part[] memory royalties = new LibPart.Part[](1);
        royalties[0] = LibPart.Part({
            account: payable(payoutAddress),
            value: uint96(royaltyFeeBps)
        });

        return royalties;
    }

    //@dev EIP-2981
    function royaltyInfo(uint256 tid, uint256 salePrice) external view onlyValidTokenId(tid) returns (address receiver, uint256 amount) {
        uint256 ourCut = SafeMath.div(SafeMath.mul(salePrice, royaltyFeeBps), 10000);
        return (payoutAddress, ourCut);
    }

    // -------
    // HELPERS
    // -------

    //@dev Returns the current token id (number minted so far)
	function getCurrentId() 
		public view returns (uint256)
	{
		return _tokenIds.current();
	}

	//@dev Determine if two strings are equal using the length + hash method
	function _stringsEqual(string memory a, string memory b) 
		internal pure returns (bool)
	{
		bytes memory A = bytes(a);
		bytes memory B = bytes(b);

		if (A.length != B.length) {
			return false;
		} else {
			return keccak256(A) == keccak256(B);
		}
	}
}

File 5 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 6 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 7 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 8 of 17 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 17 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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;
    }
}

File 10 of 17 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 11 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 17 : PLAKStorage.sol
// SPDX-License-Identifier: MIT
/*
 * PLAKStorage.sol
 *
 * Author: Jack Kasbeer
 * Created: November 30, 2021
 */

pragma solidity >=0.5.16 <0.9.0;

import "@openzeppelin/contracts/utils/Counters.sol";

//@title A storage contract for relevant data
//@author Jack Kasbeer (@jcksber, @satoshigoat)
contract PLAKStorage {

	//@dev These take care of token id incrementing
	using Counters for Counters.Counter;
	Counters.Counter internal _tokenIds;

	//@dev These are needed for contract compatability
	uint256 constant public royaltyFeeBps = 500; // 5%
    bytes4 internal constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
    bytes4 internal constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
    bytes4 internal constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
    bytes4 internal constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
    bytes4 internal constant _INTERFACE_ID_EIP2981 = 0x2a55205a;
    bytes4 internal constant _INTERFACE_ID_ROYALTIES = 0xcad96cca;

	//@dev Supply
	uint constant MAX_NUM_TOKENS = 300;

	//@dev Properties
	string internal _contractUri;
	address public payoutAddress;
	uint public weiPrice;

	//@dev Initial production hashes
	string internal _standardHash = "QmTFfVfvuZPkzeueZP9kxXTwpcHVjyzBqgLf6jF5Z8XeDb";
	string internal _disabledHash = "QmPWcbjegFCeRqujWf22Hu5cGGWzT46yzBtRSxQdT4E3pL";
	string internal _legendaryHash = "QmTZ6AWRBXoBZBH24NbkKusyJAN6oqznB5VsZUUFHFyMZG";
}

File 14 of 17 : PLAKAccessControl.sol
// SPDX-License-Identifier: MIT
/*
 * PLAKAccessControl.sol
 *
 * Author: Jack Kasbeer
 * Created: November 30, 2021
 */

pragma solidity >=0.5.16 <0.9.0;

import "@openzeppelin/contracts/access/Ownable.sol";

contract PLAKAccessControl is Ownable {

	// -----
	// PAUSE
	// -----

	bool public salePaused;//starts as false

	//@dev This will require the sale to be unpaused & active
	modifier saleActive()
	{
		require(!salePaused, "PLAKAccessControl: minting paused.");
		_;
	}

	//@dev Pause or unpause minting
	function toggleSaleActive() public onlyOwner
	{
		salePaused = !salePaused;
	}

	// ---------
	// LEGENDARY
	// ---------

	//@dev Legendary mapping for token ID's
	mapping (uint256 => bool) internal _legends;

	//@dev Determine if a token id is legendary status
	function isLegendary(uint256 tid)
		public view returns (bool)
	{
		return _legends[tid];
	}

	//@dev Make a token ID legendary
	function makeLegendary(uint256 tid)
		onlyOwner public
	{
		require(!isLegendary(tid), "PLAKAccessControl: token already legendary");
		require(!isDisabled(tid), "PLAKAccessControl: this token is disabled");
		_legends[tid] = true;
	}

	//@dev Remove legendary status from token ID
	function removeLegendary(uint256 tid)
		onlyOwner public
	{
		require(isLegendary(tid), "PLAKAccessControl: token not legendary");
		_legends[tid] = false;
	}

	//@dev Make a bunch of token ID's legendary at once
	function bulkMakeLegendary(uint256[] memory tids)
		onlyOwner public
	{
		uint tidsLen = tids.length;
		require(tidsLen > 1, "PLAKAccessControl: use `makeLegendary` instead");
		require(tidsLen < 256, "PLAKAccessControl: cannot add more than 255 at once");
		uint8 i;
		for (i = 0; i < tidsLen; i++) {
			if (!isLegendary(tids[i])) {
				_legends[tids[i]] = true;
			}
		}
	}

	//@dev Make a bunch of token ID's standard at once
	function bulkRemoveLegendary(uint256[] memory tids)
		onlyOwner public
	{
		uint tidsLen = tids.length;
		require(tidsLen > 1, "PLAKAccessControl: use `removeLegendary` instead");
		require(tidsLen < 256, "PLAKAccessControl: cannot add more than 255 at once");
		uint8 i;
		for (i = 0; i < tidsLen; i++) {
			if (isLegendary(tids[i])) {
				_legends[tids[i]] = false;
			}
		}
	}

	// --------
	// DISABLED
	// --------

	//@dev Blacklist mapping for token IDs
	mapping (uint256 => bool) internal _disabled;

	//@dev Determine if `tid` is disabled
	function isDisabled(uint256 tid) 
		public view returns (bool)
	{
		return _disabled[tid];
	}

	//@dev Disable a single token ID
	function disable(uint256 tid) 
		onlyOwner public
	{
		require(!isDisabled(tid), "PLAKAccessControl: already disabled"); 
		_disabled[tid] = true;
	}

	//@dev Enable a single token ID
	function enable(uint256 tid)
		onlyOwner public
	{
		require(isDisabled(tid), "PLAKAccessControl: already enabled");
		_disabled[tid] = false;
	}

	//@dev Disable a list of token ID's
	function bulkDisable(uint256[] memory tids) 
		onlyOwner public
	{
		uint tidsLen = tids.length;
		require(tidsLen > 1, "PLAKAccessControl: use `disable` instead");
		require(tidsLen < 256, "PLAKAccessControl: cannot add more than 255 at once");
		uint8 i;
		for (i = 0; i < tidsLen; i++) {
			if (!isDisabled(tids[i])) {
				_disabled[tids[i]] = true;
			}
		}
	}

	//@dev Enable a list of token ID's 
	function bulkEnable(uint256[] memory tids) 
		onlyOwner public
	{
		uint tidsLen = tids.length;
		require(tidsLen > 1, "PLAKAccessControl: use `enable` instead");
		require(tidsLen < 256, "PLAKAccessControl: cannot remove more than 255 at once");
		uint8 i;
		for (i = 0; i < tidsLen; i++) {
			if (isDisabled(tids[i])) {
				_disabled[tids[i]] = false;
			}
		}
	}

	// ---------
	// WHITELIST
	// ---------

	//@dev Whitelist mapping for client addresses
	mapping (address => bool) internal _whitelist;

	//@dev Whitelist flag for active/inactive states
	bool public whitelistActive;

	//@dev Toggle the whitelist
	function toggleWhitelistActive()
		onlyOwner public
	{
		whitelistActive = !whitelistActive;
	}

	//@dev Prove that one of our whitelist address owners has been approved
	function isInWhitelist(address a) 
		public view returns (bool)
	{
		return _whitelist[a];
	}

	//@dev Add a single address to whitelist
	function addToWhitelist(address a) 
		onlyOwner public
	{
		require(!isInWhitelist(a), "PLAKAccessControl: already whitelisted"); 
		//here we care if address already whitelisted to save on gas fees
		_whitelist[a] = true;
	}

	//@dev Remove a single address from the whitelist
	function removeFromWhitelist(address a)
		onlyOwner public
	{
		require(isInWhitelist(a), "PLAKAccessControl: not in whitelist");
		_whitelist[a] = false;
	}

	//@dev Add a list of addresses to the whitelist
	function bulkAddToWhitelist(address[] memory addresses) 
		onlyOwner public
	{
		require(addresses.length > 1, "PLAKAccessControl: use `addToWhitelist` instead");
		uint8 i;
		for (i = 0; i < addresses.length; i++) {
			if (!_whitelist[addresses[i]]) {
				_whitelist[addresses[i]] = true;
			}
		}
	}
}

File 15 of 17 : LibPart.sol
// SPDX-License-Identifier: MIT
/*
 * LibPart.sol
 *
 * Author: Jack Kasbeer (taken from 'dot')
 * Created: October 20, 2021
 */

pragma solidity >=0.5.16 <0.9.0;

//@dev We need this libary for Rarible
library LibPart {
    bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)");

    struct Part {
        address payable account;
        uint96 value;
    }

    function hash(Part memory part) internal pure returns (bytes32) {
        return keccak256(abi.encode(TYPE_HASH, part.account, part.value));
    }
}

File 16 of 17 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 17 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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() {
        _setOwner(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tid","type":"uint256"}],"name":"PaymentLinksAccessKeyBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tid","type":"uint256"}],"name":"PaymentLinksAccessKeyMinted","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":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"address[]","name":"addresses","type":"address[]"}],"name":"bulkAddToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tids","type":"uint256[]"}],"name":"bulkDisable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tids","type":"uint256[]"}],"name":"bulkEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tids","type":"uint256[]"}],"name":"bulkMakeLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tids","type":"uint256[]"}],"name":"bulkRemoveLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"disable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"enable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"isDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"isInWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"isLegendary","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"kill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"makeLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payoutAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"purchase","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"a","type":"address"}],"name":"removeFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"}],"name":"removeLegendary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royaltyFeeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","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":[],"name":"toggleSaleActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleWhitelistActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tid","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":"tokenId","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":"string","name":"updatedContractUri","type":"string"}],"name":"updateContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newHash","type":"string"},{"internalType":"string","name":"hashType","type":"string"}],"name":"updateHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newWeiPrice","type":"uint256"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weiPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"wallet","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e0604052602e60808181529062003bf860a03980516200002991600f9160209091019062000307565b506040518060600160405280602e815260200162003bca602e913980516200005a9160109160209091019062000307565b506040518060600160405280602e815260200162003c26602e913980516200008b9160119160209091019062000307565b503480156200009957600080fd5b506040518060400160405280601781526020017f5061796d656e744c696e6b7320416363657373204b65790000000000000000008152506040518060200160405280600081525081818160009080519060200190620000fa92919062000307565b5080516200011090600190602084019062000307565b5050506200012d62000127620001b360201b60201c565b620001b7565b505060405180606001604052806035815260200162003b956035913980516200015f91600c9160209091019062000307565b506706f05b59d3b20000600e55600d80546001600160a01b031916736e62733e401ceedd8e43dc3a85f164efae9b9462908117909155620001a09062000209565b600a805460ff19166001179055620003ea565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6006546001600160a01b03163314620002695760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03811660009081526009602052604090205460ff1615620002e35760405162461bcd60e51b815260206004820152602660248201527f504c414b416363657373436f6e74726f6c3a20616c72656164792077686974656044820152651b1a5cdd195960d21b606482015260840162000260565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b8280546200031590620003ad565b90600052602060002090601f01602090048101928262000339576000855562000384565b82601f106200035457805160ff191683800117855562000384565b8280016001018555821562000384579182015b828111156200038457825182559160200191906001019062000367565b506200039292915062000396565b5090565b5b8082111562000392576000815560010162000397565b600181811c90821680620003c257607f821691505b60208210811415620003e457634e487b7160e01b600052602260045260246000fd5b50919050565b61379b80620003fa6000396000f3fe6080604052600436106102ae5760003560e01c8063721aaa6611610175578063aca6acba116100dc578063d7318f7511610095578063e8a3d4851161006f578063e8a3d4851461088d578063e985e9c5146108a2578063f2fde38b146108c2578063f3fef3a3146108e257600080fd5b8063d7318f7514610837578063e29b9e9714610857578063e43252d71461086d57600080fd5b8063aca6acba1461074a578063ad25ca291461076a578063b88d4fde1461079a578063c5a991f8146107ba578063c87b56dd146107ea578063cad96cca1461080a57600080fd5b80638da5cb5b1161012e5780638da5cb5b146106a157806391192765146106bf57806395d89b41146106d5578063992fd5df146106ea5780639946b9a51461070a578063a22cb4651461072a57600080fd5b8063721aaa66146105ec578063748ea34d1461060c57806385054b371461062c57806387dc7c37146106415780638ab1d681146106615780638d6cc56d1461068157600080fd5b806342966c68116102195780636352211e116101d25780636352211e146105345780636a627842146105545780636c143862146105825780636c79af101461059757806370a08231146105b7578063715018a6146105d757600080fd5b806342966c681461047357806347c8ff5e146104935780634ca9a979146104b3578063516d8602146104d35780635b8d02d7146104f35780635d08c1ae1461051357600080fd5b806323b872dd1161026b57806323b872dd146103b757806325b31a97146103d75780632a55205a146103ea5780633100a5351461042957806341c0e1b51461043e57806342842e0e1461045357600080fd5b806301ffc9a7146102b357806302ce5813146102e857806306fdde0314610302578063081812fc14610324578063095ea7b31461035c57806309fd82121461037e575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613190565b610902565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b50600a546102d39060ff1681565b34801561030e57600080fd5b506103176109b4565b6040516102df919061339c565b34801561033057600080fd5b5061034461033f366004613263565b610a46565b6040516001600160a01b0390911681526020016102df565b34801561036857600080fd5b5061037c610377366004612f05565b610ae0565b005b34801561038a57600080fd5b506102d3610399366004612ee8565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156103c357600080fd5b5061037c6103d2366004612f6a565b610bf6565b6102d36103e5366004612ee8565b610c27565b3480156103f657600080fd5b5061040a61040536600461327c565b610e13565b604080516001600160a01b0390931683526020830191909152016102df565b34801561043557600080fd5b5061037c610ea7565b34801561044a57600080fd5b5061037c610ef2565b34801561045f57600080fd5b5061037c61046e366004612f6a565b610f1f565b34801561047f57600080fd5b5061037c61048e366004613263565b610f3a565b34801561049f57600080fd5b5061037c6104ae3660046131ca565b610f9b565b3480156104bf57600080fd5b5061037c6104ce3660046131ff565b610fdc565b3480156104df57600080fd5b5061037c6104ee366004613104565b61119a565b3480156104ff57600080fd5b50600d54610344906001600160a01b031681565b34801561051f57600080fd5b506006546102d390600160a01b900460ff1681565b34801561054057600080fd5b5061034461054f366004613263565b611339565b34801561056057600080fd5b5061057461056f366004612ee8565b6113b0565b6040519081526020016102df565b34801561058e57600080fd5b5061057461140e565b3480156105a357600080fd5b5061037c6105b236600461305e565b61141e565b3480156105c357600080fd5b506105746105d2366004612ee8565b611571565b3480156105e357600080fd5b5061037c6115f8565b3480156105f857600080fd5b5061037c610607366004613263565b61162e565b34801561061857600080fd5b5061037c610627366004613104565b611756565b34801561063857600080fd5b5061037c6118ac565b34801561064d57600080fd5b5061037c61065c366004613263565b6118ea565b34801561066d57600080fd5b5061037c61067c366004612ee8565b611995565b34801561068d57600080fd5b5061037c61069c366004613263565b611a54565b3480156106ad57600080fd5b506006546001600160a01b0316610344565b3480156106cb57600080fd5b506105746101f481565b3480156106e157600080fd5b50610317611b01565b3480156106f657600080fd5b5061037c610705366004613104565b611b10565b34801561071657600080fd5b5061037c610725366004613263565b611c43565b34801561073657600080fd5b5061037c61074536600461302b565b611cf3565b34801561075657600080fd5b5061037c610765366004613263565b611db8565b34801561077657600080fd5b506102d3610785366004613263565b60009081526008602052604090205460ff1690565b3480156107a657600080fd5b5061037c6107b5366004612fab565b611e67565b3480156107c657600080fd5b506102d36107d5366004613263565b60009081526007602052604090205460ff1690565b3480156107f657600080fd5b50610317610805366004613263565b611e9f565b34801561081657600080fd5b5061082a610825366004613263565b611f82565b6040516102df9190613336565b34801561084357600080fd5b5061037c610852366004613104565b61206a565b34801561086357600080fd5b50610574600e5481565b34801561087957600080fd5b5061037c610888366004612ee8565b6121a6565b34801561089957600080fd5b5061031761226c565b3480156108ae57600080fd5b506102d36108bd366004612f31565b61227b565b3480156108ce57600080fd5b5061037c6108dd366004612ee8565b6122a9565b3480156108ee57600080fd5b5061037c6108fd366004612f05565b612344565b60006001600160e01b031982166301ffc9a760e01b148061093357506001600160e01b0319821663656cb66560e11b145b8061094e57506001600160e01b031982166380ac58cd60e01b145b8061096957506001600160e01b03198216635b5e139f60e01b145b8061098457506001600160e01b0319821663780e9d6360e01b145b8061099f57506001600160e01b0319821663152a902d60e11b145b806109ae57506109ae82612404565b92915050565b6060600080546109c3906136a3565b80601f01602080910402602001604051908101604052809291908181526020018280546109ef906136a3565b8015610a3c5780601f10610a1157610100808354040283529160200191610a3c565b820191906000526020600020905b815481529060010190602001808311610a1f57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ac45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610aeb82611339565b9050806001600160a01b0316836001600160a01b03161415610b595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610abb565b336001600160a01b0382161480610b755750610b75813361227b565b610be75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610abb565b610bf18383612454565b505050565b610c0033826124c2565b610c1c5760405162461bcd60e51b8152600401610abb90613489565b610bf1838383612599565b600061012c610c3461140e565b10610c515760405162461bcd60e51b8152600401610abb90613522565b600654600160a01b900460ff1615610cb65760405162461bcd60e51b815260206004820152602260248201527f504c414b416363657373436f6e74726f6c3a206d696e74696e67207061757365604482015261321760f11b6064820152608401610abb565b600a5460ff1615610d40576001600160a01b03821660009081526009602052604090205460ff16610d405760405162461bcd60e51b815260206004820152602e60248201527f5061796d656e744c696e6b734163636573734b65793a2061646472657373206e60448201526d1bdd081dda1a5d195b1a5cdd195960921b6064820152608401610abb565b600e54341015610da25760405162461bcd60e51b815260206004820152602760248201527f5061796d656e744c696e6b734163636573734b65793a206e6f7420656e6f7567604482015266341032ba3432b960c91b6064820152608401610abb565b3415610e01576000610dbf600e543461274490919063ffffffff16565b90508015610dff576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610dfd573d6000803e3d6000fd5b505b505b610e0a82612757565b50600192915050565b6000808380600111158015610e2a575061012c8111155b610e765760405162461bcd60e51b815260206004820152601e60248201527f5061796d656e744c696e6b734163636573734b65793a20746964204f4f4200006044820152606401610abb565b6000610e8f610e87866101f46127ed565b6127106127f9565b600d546001600160a01b031697909650945050505050565b6006546001600160a01b03163314610ed15760405162461bcd60e51b8152600401610abb90613454565b6006805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6006546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610abb90613454565b33ff5b610bf183838360405180602001604052806000815250611e67565b6006546001600160a01b03163314610f645760405162461bcd60e51b8152600401610abb90613454565b610f6d81612805565b60405181907fb2e185b2f0020f66fb12dac6ae274603a52a1d15a09ccc882e12544af9443fb890600090a250565b6006546001600160a01b03163314610fc55760405162461bcd60e51b8152600401610abb90613454565b8051610fd890600c906020840190612dd7565b5050565b6006546001600160a01b031633146110065760405162461bcd60e51b8152600401610abb90613454565b6110308160405180604001604052806008815260200167191a5cd8589b195960c21b8152506128ac565b80611060575061106081604051806040016040528060088152602001671cdd185b99185c9960c21b8152506128ac565b80611091575061109181604051806040016040528060098152602001686c6567656e6461727960b81b8152506128ac565b6111035760405162461bcd60e51b815260206004820152603b60248201527f504c414b3732313a206861736854797065206d7573742062652027646973616260448201527f6c6564272f277374616e64617264272f276c6567656e646172792700000000006064820152608401610abb565b61112d8160405180604001604052806008815260200167191a5cd8589b195960c21b8152506128ac565b15611145578151610bf1906010906020850190612dd7565b61116f81604051806040016040528060088152602001671cdd185b99185c9960c21b8152506128ac565b15611187578151610bf190600f906020850190612dd7565b8151610bf1906011906020850190612dd7565b6006546001600160a01b031633146111c45760405162461bcd60e51b8152600401610abb90613454565b8051600181116112265760405162461bcd60e51b815260206004820152602760248201527f504c414b416363657373436f6e74726f6c3a207573652060656e61626c6560206044820152661a5b9cdd19585960ca1b6064820152608401610abb565b61010081106112965760405162461bcd60e51b815260206004820152603660248201527f504c414b416363657373436f6e74726f6c3a2063616e6e6f742072656d6f7665604482015275206d6f7265207468616e20323535206174206f6e636560501b6064820152608401610abb565b60005b818160ff161015610bf1576112d9838260ff16815181106112bc576112bc61370e565b602002602001015160009081526008602052604090205460ff1690565b1561132757600060086000858460ff16815181106112f9576112f961370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611331816136d8565b915050611299565b6000818152600260205260408120546001600160a01b0316806109ae5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610abb565b6006546000906001600160a01b031633146113dd5760405162461bcd60e51b8152600401610abb90613454565b61012c6113e861140e565b106114055760405162461bcd60e51b8152600401610abb90613522565b6109ae82612757565b6000611419600b5490565b905090565b6006546001600160a01b031633146114485760405162461bcd60e51b8152600401610abb90613454565b60018151116114b15760405162461bcd60e51b815260206004820152602f60248201527f504c414b416363657373436f6e74726f6c3a207573652060616464546f57686960448201526e1d195b1a5cdd18081a5b9cdd195859608a1b6064820152608401610abb565b60005b81518160ff161015610fd85760096000838360ff16815181106114d9576114d961370e565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1661155f57600160096000848460ff168151811061151f5761151f61370e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611569816136d8565b9150506114b4565b60006001600160a01b0382166115dc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610abb565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146116225760405162461bcd60e51b8152600401610abb90613454565b61162c60006128e1565b565b6006546001600160a01b031633146116585760405162461bcd60e51b8152600401610abb90613454565b60008181526007602052604090205460ff16156116ca5760405162461bcd60e51b815260206004820152602a60248201527f504c414b416363657373436f6e74726f6c3a20746f6b656e20616c7265616479604482015269206c6567656e6461727960b01b6064820152608401610abb565b60008181526008602052604090205460ff161561173b5760405162461bcd60e51b815260206004820152602960248201527f504c414b416363657373436f6e74726f6c3a207468697320746f6b656e20697360448201526808191a5cd8589b195960ba1b6064820152608401610abb565b6000908152600760205260409020805460ff19166001179055565b6006546001600160a01b031633146117805760405162461bcd60e51b8152600401610abb90613454565b8051600181116117e95760405162461bcd60e51b815260206004820152602e60248201527f504c414b416363657373436f6e74726f6c3a2075736520606d616b654c65676560448201526d1b99185c9e58081a5b9cdd19585960921b6064820152608401610abb565b610100811061180a5760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf15761184d838260ff16815181106118305761183061370e565b602002602001015160009081526007602052604090205460ff1690565b61189a57600160076000858460ff168151811061186c5761186c61370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806118a4816136d8565b91505061180d565b6006546001600160a01b031633146118d65760405162461bcd60e51b8152600401610abb90613454565b600a805460ff19811660ff90911615179055565b6006546001600160a01b031633146119145760405162461bcd60e51b8152600401610abb90613454565b60008181526008602052604090205460ff1661197d5760405162461bcd60e51b815260206004820152602260248201527f504c414b416363657373436f6e74726f6c3a20616c726561647920656e61626c604482015261195960f21b6064820152608401610abb565b6000908152600860205260409020805460ff19169055565b6006546001600160a01b031633146119bf5760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b03811660009081526009602052604090205460ff16611a335760405162461bcd60e51b815260206004820152602360248201527f504c414b416363657373436f6e74726f6c3a206e6f7420696e2077686974656c6044820152621a5cdd60ea1b6064820152608401610abb565b6001600160a01b03166000908152600960205260409020805460ff19169055565b6006546001600160a01b03163314611a7e5760405162461bcd60e51b8152600401610abb90613454565b6706f05b59d3b20000811015611afc5760405162461bcd60e51b815260206004820152603960248201527f5061796d656e744c696e6b734163636573734b65793a2070726963652063616e60448201527f6e6f74206265206c6f776572207468616e20302e3520455448000000000000006064820152608401610abb565b600e55565b6060600180546109c3906136a3565b6006546001600160a01b03163314611b3a5760405162461bcd60e51b8152600401610abb90613454565b805160018111611b9d5760405162461bcd60e51b815260206004820152602860248201527f504c414b416363657373436f6e74726f6c3a20757365206064697361626c6560604482015267081a5b9cdd19585960c21b6064820152608401610abb565b6101008110611bbe5760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf157611be4838260ff16815181106112bc576112bc61370e565b611c3157600160086000858460ff1681518110611c0357611c0361370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611c3b816136d8565b915050611bc1565b6006546001600160a01b03163314611c6d5760405162461bcd60e51b8152600401610abb90613454565b60008181526008602052604090205460ff1615611cd85760405162461bcd60e51b815260206004820152602360248201527f504c414b416363657373436f6e74726f6c3a20616c72656164792064697361626044820152621b195960ea1b6064820152608401610abb565b6000908152600860205260409020805460ff19166001179055565b6001600160a01b038216331415611d4c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610abb565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b03163314611de25760405162461bcd60e51b8152600401610abb90613454565b60008181526007602052604090205460ff16611e4f5760405162461bcd60e51b815260206004820152602660248201527f504c414b416363657373436f6e74726f6c3a20746f6b656e206e6f74206c6567604482015265656e6461727960d01b6064820152608401610abb565b6000908152600760205260409020805460ff19169055565b611e7133836124c2565b611e8d5760405162461bcd60e51b8152600401610abb90613489565b611e9984848484612933565b50505050565b606081611ec3816000908152600260205260409020546001600160a01b0316151590565b611f205760405162461bcd60e51b815260206004820152602860248201527f5061796d656e744c696e6b734163636573734b65793a206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610abb565b6000611f46604080518082019091526007815266697066733a2f2f60c81b602082015290565b90506000611f5385612966565b90508181604051602001611f689291906132ca565b604051602081830303815290604052935050505b50919050565b60608180600111158015611f98575061012c8111155b611fe45760405162461bcd60e51b815260206004820152601e60248201527f5061796d656e744c696e6b734163636573734b65793a20746964204f4f4200006044820152606401610abb565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081611ffb57505060408051808201909152600d546001600160a01b031681526101f4602082015281519192509082906000906120585761205861370e565b60209081029190910101529392505050565b6006546001600160a01b031633146120945760405162461bcd60e51b8152600401610abb90613454565b8051600181116120ff5760405162461bcd60e51b815260206004820152603060248201527f504c414b416363657373436f6e74726f6c3a20757365206072656d6f76654c6560448201526f19d95b99185c9e58081a5b9cdd19585960821b6064820152608401610abb565b61010081106121205760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf157612146838260ff16815181106118305761183061370e565b1561219457600060076000858460ff16815181106121665761216661370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061219e816136d8565b915050612123565b6006546001600160a01b031633146121d05760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b03811660009081526009602052604090205460ff16156122485760405162461bcd60e51b815260206004820152602660248201527f504c414b416363657373436f6e74726f6c3a20616c72656164792077686974656044820152651b1a5cdd195960d21b6064820152608401610abb565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6060600c80546109c3906136a3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6006546001600160a01b031633146122d35760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b0381166123385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abb565b612341816128e1565b50565b6006546001600160a01b0316331461236e5760405162461bcd60e51b8152600401610abb90613454565b478111156123ce5760405162461bcd60e51b815260206004820152602760248201527f504c414b3732313a20496e73756666696369656e742066756e647320746f20776044820152666974686472617760c81b6064820152608401610abb565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610bf1573d6000803e3d6000fd5b60006001600160e01b031982166380ac58cd60e01b148061243557506001600160e01b03198216635b5e139f60e01b145b806109ae57506301ffc9a760e01b6001600160e01b03198316146109ae565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061248982611339565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661253b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610abb565b600061254683611339565b9050806001600160a01b0316846001600160a01b031614806125815750836001600160a01b031661257684610a46565b6001600160a01b0316145b806125915750612591818561227b565b949350505050565b826001600160a01b03166125ac82611339565b6001600160a01b0316146126145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610abb565b6001600160a01b0382166126765760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610abb565b612681838383612a43565b61268c600082612454565b6001600160a01b03831660009081526003602052604081208054600192906126b590849061363d565b90915550506001600160a01b03821660009081526003602052604081208054600192906126e39084906135bf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612750828461363d565b9392505050565b6001600160a01b0381166000908152601260205260408120548290600260ff909116106127965760405162461bcd60e51b8152600401610abb906134da565b6127a4600b80546001019055565b60006127af600b5490565b90506127bb8482612b2f565b60405181907fbbb418df7d8746dfd813372315d0187b95105c0e256e1db14dcf1dad63bf977f90600090a29392505050565b6000612750828461361e565b600061275082846135fc565b600061281082611339565b905061281e81600084612a43565b612829600083612454565b6001600160a01b038116600090815260036020526040812080546001929061285290849061363d565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b8051825160009184918491146128c7576000925050506109ae565b8080519060200120828051906020012014925050506109ae565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61293e848484612599565b61294a84848484612b49565b611e995760405162461bcd60e51b8152600401610abb906133af565b60008181526008602052604090205460609060ff1615612a12576010805461298d906136a3565b80601f01602080910402602001604051908101604052809291908181526020018280546129b9906136a3565b8015612a065780601f106129db57610100808354040283529160200191612a06565b820191906000526020600020905b8154815290600101906020018083116129e957829003601f168201915b50505050509050919050565b60008281526007602052604090205460ff1615612a36576011805461298d906136a3565b600f805461298d906136a3565b6001600160a01b0382166000908152601260205260409020548290600260ff90911610612a825760405162461bcd60e51b8152600401610abb906134da565b6001600160a01b03841615612ad6576001600160a01b0384166000908152601260205260408120805460019290612abd90849060ff16613654565b92506101000a81548160ff021916908360ff1602179055505b6001600160a01b03831615612b2a576001600160a01b0383166000908152601260205260408120805460019290612b1190849060ff166135d7565b92506101000a81548160ff021916908360ff1602179055505b611e99565b610fd8828260405180602001604052806000815250612c56565b60006001600160a01b0384163b15612c4b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612b8d9033908990889088906004016132f9565b602060405180830381600087803b158015612ba757600080fd5b505af1925050508015612bd7575060408051601f3d908101601f19168201909252612bd4918101906131ad565b60015b612c31573d808015612c05576040519150601f19603f3d011682016040523d82523d6000602084013e612c0a565b606091505b508051612c295760405162461bcd60e51b8152600401610abb906133af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612591565b506001949350505050565b612c608383612c89565b612c6d6000848484612b49565b610bf15760405162461bcd60e51b8152600401610abb906133af565b6001600160a01b038216612cdf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610abb565b6000818152600260205260409020546001600160a01b031615612d445760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610abb565b612d5060008383612a43565b6001600160a01b0382166000908152600360205260408120805460019290612d799084906135bf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612de3906136a3565b90600052602060002090601f016020900481019282612e055760008555612e4b565b82601f10612e1e57805160ff1916838001178555612e4b565b82800160010185558215612e4b579182015b82811115612e4b578251825591602001919060010190612e30565b50612e57929150612e5b565b5090565b5b80821115612e575760008155600101612e5c565b600067ffffffffffffffff831115612e8a57612e8a613724565b612e9d601f8401601f191660200161356a565b9050828152838383011115612eb157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612ed957600080fd5b61275083833560208501612e70565b600060208284031215612efa57600080fd5b81356127508161373a565b60008060408385031215612f1857600080fd5b8235612f238161373a565b946020939093013593505050565b60008060408385031215612f4457600080fd5b8235612f4f8161373a565b91506020830135612f5f8161373a565b809150509250929050565b600080600060608486031215612f7f57600080fd5b8335612f8a8161373a565b92506020840135612f9a8161373a565b929592945050506040919091013590565b60008060008060808587031215612fc157600080fd5b8435612fcc8161373a565b93506020850135612fdc8161373a565b925060408501359150606085013567ffffffffffffffff811115612fff57600080fd5b8501601f8101871361301057600080fd5b61301f87823560208401612e70565b91505092959194509250565b6000806040838503121561303e57600080fd5b82356130498161373a565b915060208301358015158114612f5f57600080fd5b6000602080838503121561307157600080fd5b823567ffffffffffffffff81111561308857600080fd5b8301601f8101851361309957600080fd5b80356130ac6130a78261359b565b61356a565b80828252848201915084840188868560051b87010111156130cc57600080fd5b600094505b838510156130f85780356130e48161373a565b8352600194909401939185019185016130d1565b50979650505050505050565b6000602080838503121561311757600080fd5b823567ffffffffffffffff81111561312e57600080fd5b8301601f8101851361313f57600080fd5b803561314d6130a78261359b565b80828252848201915084840188868560051b870101111561316d57600080fd5b600094505b838510156130f8578035835260019490940193918501918501613172565b6000602082840312156131a257600080fd5b81356127508161374f565b6000602082840312156131bf57600080fd5b81516127508161374f565b6000602082840312156131dc57600080fd5b813567ffffffffffffffff8111156131f357600080fd5b61259184828501612ec8565b6000806040838503121561321257600080fd5b823567ffffffffffffffff8082111561322a57600080fd5b61323686838701612ec8565b9350602085013591508082111561324c57600080fd5b5061325985828601612ec8565b9150509250929050565b60006020828403121561327557600080fd5b5035919050565b6000806040838503121561328f57600080fd5b50508035926020909101359150565b600081518084526132b6816020860160208601613677565b601f01601f19169290920160200192915050565b600083516132dc818460208801613677565b8351908301906132f0818360208801613677565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061332c9083018461329e565b9695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561338f57815180516001600160a01b031685528601516bffffffffffffffffffffffff16868501529284019290850190600101613353565b5091979650505050505050565b602081526000612750602083018461329e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526033908201527f504c414b416363657373436f6e74726f6c3a2063616e6e6f7420616464206d6f6040820152727265207468616e20323535206174206f6e636560681b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526028908201527f5061796d656e744c696e6b734163636573734b65793a2032207065722077616c6040820152673632ba1036b0bc1760c11b606082015260800190565b60208082526028908201527f5061796d656e744c696e6b734163636573734b65793a206e6f6e65206c656674604082015267081d1bc81b5a5b9d60c21b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561359357613593613724565b604052919050565b600067ffffffffffffffff8211156135b5576135b5613724565b5060051b60200190565b600082198211156135d2576135d26136f8565b500190565b600060ff821660ff84168060ff038211156135f4576135f46136f8565b019392505050565b60008261361957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613638576136386136f8565b500290565b60008282101561364f5761364f6136f8565b500390565b600060ff821660ff84168082101561366e5761366e6136f8565b90039392505050565b60005b8381101561369257818101518382015260200161367a565b83811115611e995750506000910152565b600181811c908216806136b757607f821691505b60208210811415611f7c57634e487b7160e01b600052602260045260246000fd5b600060ff821660ff8114156136ef576136ef6136f8565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461234157600080fd5b6001600160e01b03198116811461234157600080fdfea26469706673582212208183ea09571da88eb969d92d0bf8d1165feb309a424201c9713bff0f55f4cb9964736f6c63430008070033697066733a2f2f516d5a356242784d3847677a3465447a76595a6d536842564d7644654a66434a357454426e68596e566d384c326d516d505763626a65674643655271756a57663232487535634747577a543436797a4274525378516454344533704c516d544666566676755a506b7a6575655a50396b78585477706348566a797a4271674c66366a46355a3858654462516d545a3641575242586f425a424832344e626b4b7573794a414e366f717a6e423556735a5555464846794d5a47

Deployed Bytecode

0x6080604052600436106102ae5760003560e01c8063721aaa6611610175578063aca6acba116100dc578063d7318f7511610095578063e8a3d4851161006f578063e8a3d4851461088d578063e985e9c5146108a2578063f2fde38b146108c2578063f3fef3a3146108e257600080fd5b8063d7318f7514610837578063e29b9e9714610857578063e43252d71461086d57600080fd5b8063aca6acba1461074a578063ad25ca291461076a578063b88d4fde1461079a578063c5a991f8146107ba578063c87b56dd146107ea578063cad96cca1461080a57600080fd5b80638da5cb5b1161012e5780638da5cb5b146106a157806391192765146106bf57806395d89b41146106d5578063992fd5df146106ea5780639946b9a51461070a578063a22cb4651461072a57600080fd5b8063721aaa66146105ec578063748ea34d1461060c57806385054b371461062c57806387dc7c37146106415780638ab1d681146106615780638d6cc56d1461068157600080fd5b806342966c68116102195780636352211e116101d25780636352211e146105345780636a627842146105545780636c143862146105825780636c79af101461059757806370a08231146105b7578063715018a6146105d757600080fd5b806342966c681461047357806347c8ff5e146104935780634ca9a979146104b3578063516d8602146104d35780635b8d02d7146104f35780635d08c1ae1461051357600080fd5b806323b872dd1161026b57806323b872dd146103b757806325b31a97146103d75780632a55205a146103ea5780633100a5351461042957806341c0e1b51461043e57806342842e0e1461045357600080fd5b806301ffc9a7146102b357806302ce5813146102e857806306fdde0314610302578063081812fc14610324578063095ea7b31461035c57806309fd82121461037e575b600080fd5b3480156102bf57600080fd5b506102d36102ce366004613190565b610902565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b50600a546102d39060ff1681565b34801561030e57600080fd5b506103176109b4565b6040516102df919061339c565b34801561033057600080fd5b5061034461033f366004613263565b610a46565b6040516001600160a01b0390911681526020016102df565b34801561036857600080fd5b5061037c610377366004612f05565b610ae0565b005b34801561038a57600080fd5b506102d3610399366004612ee8565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156103c357600080fd5b5061037c6103d2366004612f6a565b610bf6565b6102d36103e5366004612ee8565b610c27565b3480156103f657600080fd5b5061040a61040536600461327c565b610e13565b604080516001600160a01b0390931683526020830191909152016102df565b34801561043557600080fd5b5061037c610ea7565b34801561044a57600080fd5b5061037c610ef2565b34801561045f57600080fd5b5061037c61046e366004612f6a565b610f1f565b34801561047f57600080fd5b5061037c61048e366004613263565b610f3a565b34801561049f57600080fd5b5061037c6104ae3660046131ca565b610f9b565b3480156104bf57600080fd5b5061037c6104ce3660046131ff565b610fdc565b3480156104df57600080fd5b5061037c6104ee366004613104565b61119a565b3480156104ff57600080fd5b50600d54610344906001600160a01b031681565b34801561051f57600080fd5b506006546102d390600160a01b900460ff1681565b34801561054057600080fd5b5061034461054f366004613263565b611339565b34801561056057600080fd5b5061057461056f366004612ee8565b6113b0565b6040519081526020016102df565b34801561058e57600080fd5b5061057461140e565b3480156105a357600080fd5b5061037c6105b236600461305e565b61141e565b3480156105c357600080fd5b506105746105d2366004612ee8565b611571565b3480156105e357600080fd5b5061037c6115f8565b3480156105f857600080fd5b5061037c610607366004613263565b61162e565b34801561061857600080fd5b5061037c610627366004613104565b611756565b34801561063857600080fd5b5061037c6118ac565b34801561064d57600080fd5b5061037c61065c366004613263565b6118ea565b34801561066d57600080fd5b5061037c61067c366004612ee8565b611995565b34801561068d57600080fd5b5061037c61069c366004613263565b611a54565b3480156106ad57600080fd5b506006546001600160a01b0316610344565b3480156106cb57600080fd5b506105746101f481565b3480156106e157600080fd5b50610317611b01565b3480156106f657600080fd5b5061037c610705366004613104565b611b10565b34801561071657600080fd5b5061037c610725366004613263565b611c43565b34801561073657600080fd5b5061037c61074536600461302b565b611cf3565b34801561075657600080fd5b5061037c610765366004613263565b611db8565b34801561077657600080fd5b506102d3610785366004613263565b60009081526008602052604090205460ff1690565b3480156107a657600080fd5b5061037c6107b5366004612fab565b611e67565b3480156107c657600080fd5b506102d36107d5366004613263565b60009081526007602052604090205460ff1690565b3480156107f657600080fd5b50610317610805366004613263565b611e9f565b34801561081657600080fd5b5061082a610825366004613263565b611f82565b6040516102df9190613336565b34801561084357600080fd5b5061037c610852366004613104565b61206a565b34801561086357600080fd5b50610574600e5481565b34801561087957600080fd5b5061037c610888366004612ee8565b6121a6565b34801561089957600080fd5b5061031761226c565b3480156108ae57600080fd5b506102d36108bd366004612f31565b61227b565b3480156108ce57600080fd5b5061037c6108dd366004612ee8565b6122a9565b3480156108ee57600080fd5b5061037c6108fd366004612f05565b612344565b60006001600160e01b031982166301ffc9a760e01b148061093357506001600160e01b0319821663656cb66560e11b145b8061094e57506001600160e01b031982166380ac58cd60e01b145b8061096957506001600160e01b03198216635b5e139f60e01b145b8061098457506001600160e01b0319821663780e9d6360e01b145b8061099f57506001600160e01b0319821663152a902d60e11b145b806109ae57506109ae82612404565b92915050565b6060600080546109c3906136a3565b80601f01602080910402602001604051908101604052809291908181526020018280546109ef906136a3565b8015610a3c5780601f10610a1157610100808354040283529160200191610a3c565b820191906000526020600020905b815481529060010190602001808311610a1f57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610ac45760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610aeb82611339565b9050806001600160a01b0316836001600160a01b03161415610b595760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610abb565b336001600160a01b0382161480610b755750610b75813361227b565b610be75760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610abb565b610bf18383612454565b505050565b610c0033826124c2565b610c1c5760405162461bcd60e51b8152600401610abb90613489565b610bf1838383612599565b600061012c610c3461140e565b10610c515760405162461bcd60e51b8152600401610abb90613522565b600654600160a01b900460ff1615610cb65760405162461bcd60e51b815260206004820152602260248201527f504c414b416363657373436f6e74726f6c3a206d696e74696e67207061757365604482015261321760f11b6064820152608401610abb565b600a5460ff1615610d40576001600160a01b03821660009081526009602052604090205460ff16610d405760405162461bcd60e51b815260206004820152602e60248201527f5061796d656e744c696e6b734163636573734b65793a2061646472657373206e60448201526d1bdd081dda1a5d195b1a5cdd195960921b6064820152608401610abb565b600e54341015610da25760405162461bcd60e51b815260206004820152602760248201527f5061796d656e744c696e6b734163636573734b65793a206e6f7420656e6f7567604482015266341032ba3432b960c91b6064820152608401610abb565b3415610e01576000610dbf600e543461274490919063ffffffff16565b90508015610dff576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015610dfd573d6000803e3d6000fd5b505b505b610e0a82612757565b50600192915050565b6000808380600111158015610e2a575061012c8111155b610e765760405162461bcd60e51b815260206004820152601e60248201527f5061796d656e744c696e6b734163636573734b65793a20746964204f4f4200006044820152606401610abb565b6000610e8f610e87866101f46127ed565b6127106127f9565b600d546001600160a01b031697909650945050505050565b6006546001600160a01b03163314610ed15760405162461bcd60e51b8152600401610abb90613454565b6006805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6006546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610abb90613454565b33ff5b610bf183838360405180602001604052806000815250611e67565b6006546001600160a01b03163314610f645760405162461bcd60e51b8152600401610abb90613454565b610f6d81612805565b60405181907fb2e185b2f0020f66fb12dac6ae274603a52a1d15a09ccc882e12544af9443fb890600090a250565b6006546001600160a01b03163314610fc55760405162461bcd60e51b8152600401610abb90613454565b8051610fd890600c906020840190612dd7565b5050565b6006546001600160a01b031633146110065760405162461bcd60e51b8152600401610abb90613454565b6110308160405180604001604052806008815260200167191a5cd8589b195960c21b8152506128ac565b80611060575061106081604051806040016040528060088152602001671cdd185b99185c9960c21b8152506128ac565b80611091575061109181604051806040016040528060098152602001686c6567656e6461727960b81b8152506128ac565b6111035760405162461bcd60e51b815260206004820152603b60248201527f504c414b3732313a206861736854797065206d7573742062652027646973616260448201527f6c6564272f277374616e64617264272f276c6567656e646172792700000000006064820152608401610abb565b61112d8160405180604001604052806008815260200167191a5cd8589b195960c21b8152506128ac565b15611145578151610bf1906010906020850190612dd7565b61116f81604051806040016040528060088152602001671cdd185b99185c9960c21b8152506128ac565b15611187578151610bf190600f906020850190612dd7565b8151610bf1906011906020850190612dd7565b6006546001600160a01b031633146111c45760405162461bcd60e51b8152600401610abb90613454565b8051600181116112265760405162461bcd60e51b815260206004820152602760248201527f504c414b416363657373436f6e74726f6c3a207573652060656e61626c6560206044820152661a5b9cdd19585960ca1b6064820152608401610abb565b61010081106112965760405162461bcd60e51b815260206004820152603660248201527f504c414b416363657373436f6e74726f6c3a2063616e6e6f742072656d6f7665604482015275206d6f7265207468616e20323535206174206f6e636560501b6064820152608401610abb565b60005b818160ff161015610bf1576112d9838260ff16815181106112bc576112bc61370e565b602002602001015160009081526008602052604090205460ff1690565b1561132757600060086000858460ff16815181106112f9576112f961370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611331816136d8565b915050611299565b6000818152600260205260408120546001600160a01b0316806109ae5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610abb565b6006546000906001600160a01b031633146113dd5760405162461bcd60e51b8152600401610abb90613454565b61012c6113e861140e565b106114055760405162461bcd60e51b8152600401610abb90613522565b6109ae82612757565b6000611419600b5490565b905090565b6006546001600160a01b031633146114485760405162461bcd60e51b8152600401610abb90613454565b60018151116114b15760405162461bcd60e51b815260206004820152602f60248201527f504c414b416363657373436f6e74726f6c3a207573652060616464546f57686960448201526e1d195b1a5cdd18081a5b9cdd195859608a1b6064820152608401610abb565b60005b81518160ff161015610fd85760096000838360ff16815181106114d9576114d961370e565b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1661155f57600160096000848460ff168151811061151f5761151f61370e565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611569816136d8565b9150506114b4565b60006001600160a01b0382166115dc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610abb565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146116225760405162461bcd60e51b8152600401610abb90613454565b61162c60006128e1565b565b6006546001600160a01b031633146116585760405162461bcd60e51b8152600401610abb90613454565b60008181526007602052604090205460ff16156116ca5760405162461bcd60e51b815260206004820152602a60248201527f504c414b416363657373436f6e74726f6c3a20746f6b656e20616c7265616479604482015269206c6567656e6461727960b01b6064820152608401610abb565b60008181526008602052604090205460ff161561173b5760405162461bcd60e51b815260206004820152602960248201527f504c414b416363657373436f6e74726f6c3a207468697320746f6b656e20697360448201526808191a5cd8589b195960ba1b6064820152608401610abb565b6000908152600760205260409020805460ff19166001179055565b6006546001600160a01b031633146117805760405162461bcd60e51b8152600401610abb90613454565b8051600181116117e95760405162461bcd60e51b815260206004820152602e60248201527f504c414b416363657373436f6e74726f6c3a2075736520606d616b654c65676560448201526d1b99185c9e58081a5b9cdd19585960921b6064820152608401610abb565b610100811061180a5760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf15761184d838260ff16815181106118305761183061370e565b602002602001015160009081526007602052604090205460ff1690565b61189a57600160076000858460ff168151811061186c5761186c61370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806118a4816136d8565b91505061180d565b6006546001600160a01b031633146118d65760405162461bcd60e51b8152600401610abb90613454565b600a805460ff19811660ff90911615179055565b6006546001600160a01b031633146119145760405162461bcd60e51b8152600401610abb90613454565b60008181526008602052604090205460ff1661197d5760405162461bcd60e51b815260206004820152602260248201527f504c414b416363657373436f6e74726f6c3a20616c726561647920656e61626c604482015261195960f21b6064820152608401610abb565b6000908152600860205260409020805460ff19169055565b6006546001600160a01b031633146119bf5760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b03811660009081526009602052604090205460ff16611a335760405162461bcd60e51b815260206004820152602360248201527f504c414b416363657373436f6e74726f6c3a206e6f7420696e2077686974656c6044820152621a5cdd60ea1b6064820152608401610abb565b6001600160a01b03166000908152600960205260409020805460ff19169055565b6006546001600160a01b03163314611a7e5760405162461bcd60e51b8152600401610abb90613454565b6706f05b59d3b20000811015611afc5760405162461bcd60e51b815260206004820152603960248201527f5061796d656e744c696e6b734163636573734b65793a2070726963652063616e60448201527f6e6f74206265206c6f776572207468616e20302e3520455448000000000000006064820152608401610abb565b600e55565b6060600180546109c3906136a3565b6006546001600160a01b03163314611b3a5760405162461bcd60e51b8152600401610abb90613454565b805160018111611b9d5760405162461bcd60e51b815260206004820152602860248201527f504c414b416363657373436f6e74726f6c3a20757365206064697361626c6560604482015267081a5b9cdd19585960c21b6064820152608401610abb565b6101008110611bbe5760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf157611be4838260ff16815181106112bc576112bc61370e565b611c3157600160086000858460ff1681518110611c0357611c0361370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80611c3b816136d8565b915050611bc1565b6006546001600160a01b03163314611c6d5760405162461bcd60e51b8152600401610abb90613454565b60008181526008602052604090205460ff1615611cd85760405162461bcd60e51b815260206004820152602360248201527f504c414b416363657373436f6e74726f6c3a20616c72656164792064697361626044820152621b195960ea1b6064820152608401610abb565b6000908152600860205260409020805460ff19166001179055565b6001600160a01b038216331415611d4c5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610abb565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6006546001600160a01b03163314611de25760405162461bcd60e51b8152600401610abb90613454565b60008181526007602052604090205460ff16611e4f5760405162461bcd60e51b815260206004820152602660248201527f504c414b416363657373436f6e74726f6c3a20746f6b656e206e6f74206c6567604482015265656e6461727960d01b6064820152608401610abb565b6000908152600760205260409020805460ff19169055565b611e7133836124c2565b611e8d5760405162461bcd60e51b8152600401610abb90613489565b611e9984848484612933565b50505050565b606081611ec3816000908152600260205260409020546001600160a01b0316151590565b611f205760405162461bcd60e51b815260206004820152602860248201527f5061796d656e744c696e6b734163636573734b65793a206e6f6e657869737465604482015267373a103a37b5b2b760c11b6064820152608401610abb565b6000611f46604080518082019091526007815266697066733a2f2f60c81b602082015290565b90506000611f5385612966565b90508181604051602001611f689291906132ca565b604051602081830303815290604052935050505b50919050565b60608180600111158015611f98575061012c8111155b611fe45760405162461bcd60e51b815260206004820152601e60248201527f5061796d656e744c696e6b734163636573734b65793a20746964204f4f4200006044820152606401610abb565b604080516001808252818301909252600091816020015b6040805180820190915260008082526020820152815260200190600190039081611ffb57505060408051808201909152600d546001600160a01b031681526101f4602082015281519192509082906000906120585761205861370e565b60209081029190910101529392505050565b6006546001600160a01b031633146120945760405162461bcd60e51b8152600401610abb90613454565b8051600181116120ff5760405162461bcd60e51b815260206004820152603060248201527f504c414b416363657373436f6e74726f6c3a20757365206072656d6f76654c6560448201526f19d95b99185c9e58081a5b9cdd19585960821b6064820152608401610abb565b61010081106121205760405162461bcd60e51b8152600401610abb90613401565b60005b818160ff161015610bf157612146838260ff16815181106118305761183061370e565b1561219457600060076000858460ff16815181106121665761216661370e565b6020026020010151815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061219e816136d8565b915050612123565b6006546001600160a01b031633146121d05760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b03811660009081526009602052604090205460ff16156122485760405162461bcd60e51b815260206004820152602660248201527f504c414b416363657373436f6e74726f6c3a20616c72656164792077686974656044820152651b1a5cdd195960d21b6064820152608401610abb565b6001600160a01b03166000908152600960205260409020805460ff19166001179055565b6060600c80546109c3906136a3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6006546001600160a01b031633146122d35760405162461bcd60e51b8152600401610abb90613454565b6001600160a01b0381166123385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610abb565b612341816128e1565b50565b6006546001600160a01b0316331461236e5760405162461bcd60e51b8152600401610abb90613454565b478111156123ce5760405162461bcd60e51b815260206004820152602760248201527f504c414b3732313a20496e73756666696369656e742066756e647320746f20776044820152666974686472617760c81b6064820152608401610abb565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610bf1573d6000803e3d6000fd5b60006001600160e01b031982166380ac58cd60e01b148061243557506001600160e01b03198216635b5e139f60e01b145b806109ae57506301ffc9a760e01b6001600160e01b03198316146109ae565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061248982611339565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661253b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610abb565b600061254683611339565b9050806001600160a01b0316846001600160a01b031614806125815750836001600160a01b031661257684610a46565b6001600160a01b0316145b806125915750612591818561227b565b949350505050565b826001600160a01b03166125ac82611339565b6001600160a01b0316146126145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610abb565b6001600160a01b0382166126765760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610abb565b612681838383612a43565b61268c600082612454565b6001600160a01b03831660009081526003602052604081208054600192906126b590849061363d565b90915550506001600160a01b03821660009081526003602052604081208054600192906126e39084906135bf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612750828461363d565b9392505050565b6001600160a01b0381166000908152601260205260408120548290600260ff909116106127965760405162461bcd60e51b8152600401610abb906134da565b6127a4600b80546001019055565b60006127af600b5490565b90506127bb8482612b2f565b60405181907fbbb418df7d8746dfd813372315d0187b95105c0e256e1db14dcf1dad63bf977f90600090a29392505050565b6000612750828461361e565b600061275082846135fc565b600061281082611339565b905061281e81600084612a43565b612829600083612454565b6001600160a01b038116600090815260036020526040812080546001929061285290849061363d565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b8051825160009184918491146128c7576000925050506109ae565b8080519060200120828051906020012014925050506109ae565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61293e848484612599565b61294a84848484612b49565b611e995760405162461bcd60e51b8152600401610abb906133af565b60008181526008602052604090205460609060ff1615612a12576010805461298d906136a3565b80601f01602080910402602001604051908101604052809291908181526020018280546129b9906136a3565b8015612a065780601f106129db57610100808354040283529160200191612a06565b820191906000526020600020905b8154815290600101906020018083116129e957829003601f168201915b50505050509050919050565b60008281526007602052604090205460ff1615612a36576011805461298d906136a3565b600f805461298d906136a3565b6001600160a01b0382166000908152601260205260409020548290600260ff90911610612a825760405162461bcd60e51b8152600401610abb906134da565b6001600160a01b03841615612ad6576001600160a01b0384166000908152601260205260408120805460019290612abd90849060ff16613654565b92506101000a81548160ff021916908360ff1602179055505b6001600160a01b03831615612b2a576001600160a01b0383166000908152601260205260408120805460019290612b1190849060ff166135d7565b92506101000a81548160ff021916908360ff1602179055505b611e99565b610fd8828260405180602001604052806000815250612c56565b60006001600160a01b0384163b15612c4b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612b8d9033908990889088906004016132f9565b602060405180830381600087803b158015612ba757600080fd5b505af1925050508015612bd7575060408051601f3d908101601f19168201909252612bd4918101906131ad565b60015b612c31573d808015612c05576040519150601f19603f3d011682016040523d82523d6000602084013e612c0a565b606091505b508051612c295760405162461bcd60e51b8152600401610abb906133af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612591565b506001949350505050565b612c608383612c89565b612c6d6000848484612b49565b610bf15760405162461bcd60e51b8152600401610abb906133af565b6001600160a01b038216612cdf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610abb565b6000818152600260205260409020546001600160a01b031615612d445760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610abb565b612d5060008383612a43565b6001600160a01b0382166000908152600360205260408120805460019290612d799084906135bf565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612de3906136a3565b90600052602060002090601f016020900481019282612e055760008555612e4b565b82601f10612e1e57805160ff1916838001178555612e4b565b82800160010185558215612e4b579182015b82811115612e4b578251825591602001919060010190612e30565b50612e57929150612e5b565b5090565b5b80821115612e575760008155600101612e5c565b600067ffffffffffffffff831115612e8a57612e8a613724565b612e9d601f8401601f191660200161356a565b9050828152838383011115612eb157600080fd5b828260208301376000602084830101529392505050565b600082601f830112612ed957600080fd5b61275083833560208501612e70565b600060208284031215612efa57600080fd5b81356127508161373a565b60008060408385031215612f1857600080fd5b8235612f238161373a565b946020939093013593505050565b60008060408385031215612f4457600080fd5b8235612f4f8161373a565b91506020830135612f5f8161373a565b809150509250929050565b600080600060608486031215612f7f57600080fd5b8335612f8a8161373a565b92506020840135612f9a8161373a565b929592945050506040919091013590565b60008060008060808587031215612fc157600080fd5b8435612fcc8161373a565b93506020850135612fdc8161373a565b925060408501359150606085013567ffffffffffffffff811115612fff57600080fd5b8501601f8101871361301057600080fd5b61301f87823560208401612e70565b91505092959194509250565b6000806040838503121561303e57600080fd5b82356130498161373a565b915060208301358015158114612f5f57600080fd5b6000602080838503121561307157600080fd5b823567ffffffffffffffff81111561308857600080fd5b8301601f8101851361309957600080fd5b80356130ac6130a78261359b565b61356a565b80828252848201915084840188868560051b87010111156130cc57600080fd5b600094505b838510156130f85780356130e48161373a565b8352600194909401939185019185016130d1565b50979650505050505050565b6000602080838503121561311757600080fd5b823567ffffffffffffffff81111561312e57600080fd5b8301601f8101851361313f57600080fd5b803561314d6130a78261359b565b80828252848201915084840188868560051b870101111561316d57600080fd5b600094505b838510156130f8578035835260019490940193918501918501613172565b6000602082840312156131a257600080fd5b81356127508161374f565b6000602082840312156131bf57600080fd5b81516127508161374f565b6000602082840312156131dc57600080fd5b813567ffffffffffffffff8111156131f357600080fd5b61259184828501612ec8565b6000806040838503121561321257600080fd5b823567ffffffffffffffff8082111561322a57600080fd5b61323686838701612ec8565b9350602085013591508082111561324c57600080fd5b5061325985828601612ec8565b9150509250929050565b60006020828403121561327557600080fd5b5035919050565b6000806040838503121561328f57600080fd5b50508035926020909101359150565b600081518084526132b6816020860160208601613677565b601f01601f19169290920160200192915050565b600083516132dc818460208801613677565b8351908301906132f0818360208801613677565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061332c9083018461329e565b9695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561338f57815180516001600160a01b031685528601516bffffffffffffffffffffffff16868501529284019290850190600101613353565b5091979650505050505050565b602081526000612750602083018461329e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526033908201527f504c414b416363657373436f6e74726f6c3a2063616e6e6f7420616464206d6f6040820152727265207468616e20323535206174206f6e636560681b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526028908201527f5061796d656e744c696e6b734163636573734b65793a2032207065722077616c6040820152673632ba1036b0bc1760c11b606082015260800190565b60208082526028908201527f5061796d656e744c696e6b734163636573734b65793a206e6f6e65206c656674604082015267081d1bc81b5a5b9d60c21b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff8111828210171561359357613593613724565b604052919050565b600067ffffffffffffffff8211156135b5576135b5613724565b5060051b60200190565b600082198211156135d2576135d26136f8565b500190565b600060ff821660ff84168060ff038211156135f4576135f46136f8565b019392505050565b60008261361957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615613638576136386136f8565b500290565b60008282101561364f5761364f6136f8565b500390565b600060ff821660ff84168082101561366e5761366e6136f8565b90039392505050565b60005b8381101561369257818101518382015260200161367a565b83811115611e995750506000910152565b600181811c908216806136b757607f821691505b60208210811415611f7c57634e487b7160e01b600052602260045260246000fd5b600060ff821660ff8114156136ef576136ef6136f8565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461234157600080fd5b6001600160e01b03198116811461234157600080fdfea26469706673582212208183ea09571da88eb969d92d0bf8d1165feb309a424201c9713bff0f55f4cb9964736f6c63430008070033

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.