ETH Price: $2,494.20 (-1.61%)

Token

Triangulum by Farmoore Art (TRI)
 

Overview

Max Total Supply

334 TRI

Holders

167

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
3 TRI
0x4f2716477d7c014d5b65a84570ccf8770d4e7290
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:
Triangulum

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 19 : Triangulum.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;

import "./ERC721APreapproved.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

contract Triangulum is ERC721APreapproved, EIP712, IERC2981, PaymentSplitter {
    enum SaleState { CLOSED, OPEN }
    enum SaleType { PUBLIC, ALLOWLIST, FARMOORE }
    struct MintKey { SaleType saleType; uint8 quantity; address wallet; }

    struct SaleConfig {
        SaleState SALE_STATUS;
        uint8 RESERVED;
        uint8 MAX_PER_MINT;
        uint16 ROYALTY_BPS;
        uint128 PUBLIC_PRICE;
        uint128 ALLOWLIST_PRICE;
        uint128 FARMOORE_PRICE;
    }

    struct Addresses {
        address signer;
        address treasury;
        address openSeaProxyRegistryAddress;
        address looksRareTransferManagerAddress;
    }

    bytes32 private constant MINTKEY_TYPE_HASH = keccak256("MintKey(uint8 saleType,uint8 quantity,address wallet)");
    uint16 private constant MAX_SUPPLY = 2000;
    
    SaleConfig private _config;
    Addresses private _addresses;
    string private _baseTokenURI;

    mapping(address => bool) private _walletsClaimed;

    constructor(
        string memory name,
        string memory symbol,
        address[] memory payees,
        uint256[] memory shares,
        SaleConfig memory saleConfig,
        Addresses memory addresses,
        string memory baseTokenURI
    ) 
        ERC721APreapproved(name, symbol, addresses.openSeaProxyRegistryAddress, addresses.looksRareTransferManagerAddress) 
        EIP712(name, "1") 
        PaymentSplitter(payees, shares) 
    {
        _config = saleConfig;
        _addresses = addresses;
        _baseTokenURI = baseTokenURI;
    }

    modifier saleIsOpen() {
        require(_config.SALE_STATUS != SaleState.CLOSED, "SALE_CLOSED");
        _;
    }

    modifier doesNotExceedMaxSupply(uint8 amount) {
        require(_currentIndex + amount <= MAX_SUPPLY, "QTY_EXCEEDS_MAX_SUPPLY");
        _;
    }

    function mintNFTs(bytes calldata signature, MintKey calldata mintKey) external payable saleIsOpen doesNotExceedMaxSupply(mintKey.quantity) {
        require(mintKey.quantity > 0 && mintKey.quantity <= _config.MAX_PER_MINT, "INCORRECT_QUANTITY");
        require(msg.value == getPrice(mintKey.saleType) * mintKey.quantity, "INCORRECT_FUNDS");

        if (mintKey.saleType != SaleType.PUBLIC) {
            require(verify(signature, mintKey), "INVALID_SIGNATURE");
        }

        if (mintKey.saleType == SaleType.FARMOORE) {
            require(mintKey.quantity == 1, "ONLY_ONE_FREE_ALLOWED");
            require(_walletsClaimed[mintKey.wallet] == false, "ALREADY_CLAIMED");
            _walletsClaimed[mintKey.wallet] = true;
        }

        _safeMint(mintKey.wallet, mintKey.quantity);
    }

    function reserve(uint8 amount) external onlyOwner doesNotExceedMaxSupply(amount) {
        require(amount > 0 && amount <= _config.RESERVED, "RESERVE_EXCEEDED");

        _safeMint(msg.sender, amount);
        _config.RESERVED -= amount;
    }
    
    function getPrice(SaleType saleType) public view returns (uint128) {
        if (saleType == SaleType.ALLOWLIST)
            return _config.ALLOWLIST_PRICE;

        if (saleType == SaleType.FARMOORE)
            return _config.FARMOORE_PRICE;

        return _config.PUBLIC_PRICE;
    }

    function _baseURI() internal view virtual override returns (string memory) {
        return _baseTokenURI;
    }

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "NONEXISTENT_TOKEN");

        return string(abi.encodePacked(_baseTokenURI, Strings.toString(tokenId), ".json"));
    }

    function setBaseTokenURI(string calldata baseTokenURI) external onlyOwner {
        _baseTokenURI = baseTokenURI;
    }
    
    function isFarmooreMintClaimed(address wallet) external view returns (bool) {
        return _walletsClaimed[wallet];
    }

    function royaltyInfo(uint256 /* _tokenId */, uint256 _salePrice) external view override returns (address, uint256) {
        return (_addresses.treasury, (_salePrice * _config.ROYALTY_BPS / 10000));
    }

    function saleStatus() external view returns (SaleState) {
        return _config.SALE_STATUS;
    }

    function setSaleConfig(SaleConfig calldata config) external onlyOwner {
        uint8 oldReserve = _config.RESERVED; // don't allow reserve override
        _config = config;
        _config.RESERVED = oldReserve;
    }

    function getChainId() external view returns (uint256) {
        return block.chainid;
    }

    function domainSeparator() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    function supportsInterface(bytes4 _interfaceId) public view virtual override(IERC165, ERC721A) returns (bool) {
        return _interfaceId == type(IERC2981).interfaceId || super.supportsInterface(_interfaceId);
    }

    function verify(bytes calldata signature, MintKey calldata mintKey) public view returns (bool) {
        bytes32 digest = _hashTypedDataV4(
            keccak256(
                abi.encode(
                    MINTKEY_TYPE_HASH,
                    mintKey.saleType,
                    mintKey.quantity,
                    mintKey.wallet
                )
            )
        );

        return ECDSA.recover(digest, signature) == _addresses.signer;
    }
}

File 2 of 19 : ERC721APreapproved.sol
// SPDX-License-Identifier: MIT
// Top Dog Studios 0.1
//  Allows users to list their assetss across OpenSea and LooksRare
//  without spending gas (approving the collection for trading)
pragma solidity ^0.8.11;

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

contract OwnableDelegateProxy {}
contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }

abstract contract ERC721APreapproved is ERC721A, Ownable {
    address private immutable _openSeaProxyRegistryAddress;
    address private immutable _looksRareTransferManagerAddress;
    bool private _isMarketplacesApproved = true;

    constructor (
        string memory name,
        string memory symbol,
        address openSeaProxyRegistryAddress,
        address looksRareTransferManagerAddress
    ) ERC721A(name, symbol) {
        _openSeaProxyRegistryAddress = openSeaProxyRegistryAddress;
        _looksRareTransferManagerAddress = looksRareTransferManagerAddress;
    }

    function setMarketplacesApproved(bool isMarketplacesApproved) external onlyOwner {
        _isMarketplacesApproved = isMarketplacesApproved;
    }

    function isApprovedForAll(address owner, address operator) public view override returns (bool) {
        ProxyRegistry proxyRegistry = ProxyRegistry(_openSeaProxyRegistryAddress);
        if (_isMarketplacesApproved && (address(proxyRegistry.proxies(owner)) == operator || _looksRareTransferManagerAddress == operator))
            return true;

        return super.isApprovedForAll(owner, operator);
    }
}

File 3 of 19 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 4 of 19 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 5 of 19 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + totalReleased();
        uint256 payment = _pendingPayment(account, totalReceived, released(account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] += payment;
        _totalReleased += payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        uint256 payment = _pendingPayment(account, totalReceived, released(token, account));

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _erc20Released[token][account] += payment;
        _erc20TotalReleased[token] += payment;

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 6 of 19 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 7 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

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 8 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

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() {
        _transferOwnership(_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 {
        _transferOwnership(address(0));
    }

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

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

File 9 of 19 : ERC721A.sol
// SPDX-License-Identifier: MIT
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

error ApprovalCallerNotOwnerNorApproved();
error ApprovalQueryForNonexistentToken();
error ApproveToCaller();
error ApprovalToCurrentOwner();
error BalanceQueryForZeroAddress();
error MintToZeroAddress();
error MintZeroQuantity();
error OwnerQueryForNonexistentToken();
error TransferCallerNotOwnerNorApproved();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();
error TransferToZeroAddress();
error URIQueryForNonexistentToken();

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Compiler will pack this into a single 256bit word.
    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    // Compiler will pack this into a single 256bit word.
    struct AddressData {
        // Realistically, 2**64-1 is more than enough.
        uint64 balance;
        // Keeps track of mint count with minimal overhead for tokenomics.
        uint64 numberMinted;
        // Keeps track of burn count with minimal overhead for tokenomics.
        uint64 numberBurned;
        // For miscellaneous variable(s) pertaining to the address
        // (e.g. number of whitelist mint slots used).
        // If there are multiple variables, please pack them into a uint64.
        uint64 aux;
    }

    // The tokenId of the next token to be minted.
    uint256 internal _currentIndex;

    // The number of tokens burned.
    uint256 internal _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details.
    mapping(uint256 => TokenOwnership) internal _ownerships;

    // Mapping owner address to address data
    mapping(address => AddressData) private _addressData;

    // 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;

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * To change the starting tokenId, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens.
     */
    function totalSupply() public view returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than _currentIndex - _startTokenId() times
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to _startTokenId()
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @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 override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return uint256(_addressData[owner].balance);
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberMinted);
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return uint256(_addressData[owner].numberBurned);
    }

    /**
     * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return _addressData[owner].aux;
    }

    /**
     * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        _addressData[owner].aux = aux;
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr && curr < _currentIndex) {
                TokenOwnership memory ownership = _ownerships[curr];
                if (!ownership.burned) {
                    if (ownership.addr != address(0)) {
                        return ownership;
                    }
                    // Invariant:
                    // There will always be an ownership that has an address and is not burned
                    // before an ownership that does not have an address and is not burned.
                    // Hence, curr will not underflow.
                    while (true) {
                        curr--;
                        ownership = _ownerships[curr];
                        if (ownership.addr != address(0)) {
                            return ownership;
                        }
                    }
                }
            }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return _ownershipOf(tokenId).addr;
    }

    /**
     * @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) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        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 override {
        address owner = ERC721A.ownerOf(tokenId);
        if (to == owner) revert ApprovalToCurrentOwner();

        if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) {
            revert ApprovalCallerNotOwnerNorApproved();
        }

        _approve(to, tokenId, owner);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSender()) revert ApproveToCaller();

        _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 {
        _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 {
        _transfer(from, to, tokenId);
        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

    /**
     * @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`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned;
    }

    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity, _data, true);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address to,
        uint256 quantity,
        bytes memory _data,
        bool safe
    ) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            _addressData[to].balance += uint64(quantity);
            _addressData[to].numberMinted += uint64(quantity);

            _ownerships[startTokenId].addr = to;
            _ownerships[startTokenId].startTimestamp = uint64(block.timestamp);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex != end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex != end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * 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
    ) private {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        if (prevOwnership.addr != from) revert TransferFromIncorrectOwner();

        bool isApprovedOrOwner = (_msgSender() == from ||
            isApprovedForAll(from, _msgSender()) ||
            getApproved(tokenId) == _msgSender());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _addressData[from].balance -= 1;
            _addressData[to].balance += 1;

            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = to;
            currSlot.startTimestamp = uint64(block.timestamp);

            // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev This is equivalent to _burn(tokenId, false)
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        TokenOwnership memory prevOwnership = _ownershipOf(tokenId);

        address from = prevOwnership.addr;

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSender() == from ||
                isApprovedForAll(from, _msgSender()) ||
                getApproved(tokenId) == _msgSender());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

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

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            AddressData storage addressData = _addressData[from];
            addressData.balance -= 1;
            addressData.numberBurned += 1;

            // Keep track of who burned the token, and the timestamp of burning.
            TokenOwnership storage currSlot = _ownerships[tokenId];
            currSlot.addr = from;
            currSlot.startTimestamp = uint64(block.timestamp);
            currSlot.burned = true;

            // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it.
            // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls.
            uint256 nextTokenId = tokenId + 1;
            TokenOwnership storage nextSlot = _ownerships[nextTokenId];
            if (nextSlot.addr == address(0)) {
                // This will suffice for checking _exists(nextTokenId),
                // as a burned slot cannot contain the zero address.
                if (nextTokenId != _currentIndex) {
                    nextSlot.addr = from;
                    nextSlot.startTimestamp = prevOwnership.startTimestamp;
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

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

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * 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, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes
     * minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}
}

File 10 of 19 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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 11 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

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 12 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

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 13 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

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 14 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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 15 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

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 16 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

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 17 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 18 of 19 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 19 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"},{"components":[{"internalType":"enum Triangulum.SaleState","name":"SALE_STATUS","type":"uint8"},{"internalType":"uint8","name":"RESERVED","type":"uint8"},{"internalType":"uint8","name":"MAX_PER_MINT","type":"uint8"},{"internalType":"uint16","name":"ROYALTY_BPS","type":"uint16"},{"internalType":"uint128","name":"PUBLIC_PRICE","type":"uint128"},{"internalType":"uint128","name":"ALLOWLIST_PRICE","type":"uint128"},{"internalType":"uint128","name":"FARMOORE_PRICE","type":"uint128"}],"internalType":"struct Triangulum.SaleConfig","name":"saleConfig","type":"tuple"},{"components":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"treasury","type":"address"},{"internalType":"address","name":"openSeaProxyRegistryAddress","type":"address"},{"internalType":"address","name":"looksRareTransferManagerAddress","type":"address"}],"internalType":"struct Triangulum.Addresses","name":"addresses","type":"tuple"},{"internalType":"string","name":"baseTokenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"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":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","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":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","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":"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":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum Triangulum.SaleType","name":"saleType","type":"uint8"}],"name":"getPrice","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"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":"address","name":"wallet","type":"address"}],"name":"isFarmooreMintClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"components":[{"internalType":"enum Triangulum.SaleType","name":"saleType","type":"uint8"},{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"address","name":"wallet","type":"address"}],"internalType":"struct Triangulum.MintKey","name":"mintKey","type":"tuple"}],"name":"mintNFTs","outputs":[],"stateMutability":"payable","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":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"amount","type":"uint8"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","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":"saleStatus","outputs":[{"internalType":"enum Triangulum.SaleState","name":"","type":"uint8"}],"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":"string","name":"baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"isMarketplacesApproved","type":"bool"}],"name":"setMarketplacesApproved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum Triangulum.SaleState","name":"SALE_STATUS","type":"uint8"},{"internalType":"uint8","name":"RESERVED","type":"uint8"},{"internalType":"uint8","name":"MAX_PER_MINT","type":"uint8"},{"internalType":"uint16","name":"ROYALTY_BPS","type":"uint16"},{"internalType":"uint128","name":"PUBLIC_PRICE","type":"uint128"},{"internalType":"uint128","name":"ALLOWLIST_PRICE","type":"uint128"},{"internalType":"uint128","name":"FARMOORE_PRICE","type":"uint128"}],"internalType":"struct Triangulum.SaleConfig","name":"config","type":"tuple"}],"name":"setSaleConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","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":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"components":[{"internalType":"enum Triangulum.SaleType","name":"saleType","type":"uint8"},{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"address","name":"wallet","type":"address"}],"internalType":"struct Triangulum.MintKey","name":"mintKey","type":"tuple"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101806040526008805460ff60a01b1916600160a01b1790553480156200002557600080fd5b506040516200454e3803806200454e833981016040819052620000489162000a6c565b848488604051806040016040528060018152602001603160f81b8152508a8a87604001518860600151838381600290805190602001906200008b92919062000634565b508051620000a190600390602084019062000634565b50506000805550620000b333620003f4565b6001600160a01b039182166080521660a052505081516020808401919091208251918301919091206101208290526101408190524660e0527f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6200015c8184846040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b60c052306101005261016052505082518451149150620001e090505760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620002335760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620001d7565b60005b82518110156200029f576200028a83828151811062000259576200025962000b77565b602002602001015183838151811062000276576200027662000b77565b60200260200101516200044660201b60201c565b80620002968162000ba3565b91505062000236565b5050835160108054869350909190829060ff191660018381811115620002c957620002c962000bc1565b02179055506020828101518254604080860151606080880151608089015162ffff001990951661010060ff9788160262ff0000191617620100009690931695909502919091176301000000600160a81b031916630100000061ffff90951694909402600160281b600160a81b03191693909317650100000000006001600160801b039384160217855560a086015160c090960151958216600160801b9690921695909502176001909301929092558451601280546001600160a01b03199081166001600160a01b0393841617909155868301516013805483169184169190911790559386015160148054861691831691909117905591850151601580549094169216919091179091558151620003e6916016919084019062000634565b505050505050505062000c2f565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620004b35760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620001d7565b60008111620005055760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620001d7565b6001600160a01b0382166000908152600b602052604090205415620005815760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620001d7565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b60205260409020819055600954620005eb90829062000bd7565b600955604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054620006429062000bf2565b90600052602060002090601f016020900481019282620006665760008555620006b1565b82601f106200068157805160ff1916838001178555620006b1565b82800160010185558215620006b1579182015b82811115620006b157825182559160200191906001019062000694565b50620006bf929150620006c3565b5090565b5b80821115620006bf5760008155600101620006c4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200071b576200071b620006da565b604052919050565b600082601f8301126200073557600080fd5b81516001600160401b03811115620007515762000751620006da565b602062000767601f8301601f19168201620006f0565b82815285828487010111156200077c57600080fd5b60005b838110156200079c5785810183015182820184015282016200077f565b83811115620007ae5760008385840101525b5095945050505050565b60006001600160401b03821115620007d457620007d4620006da565b5060051b60200190565b80516001600160a01b0381168114620007f657600080fd5b919050565b600082601f8301126200080d57600080fd5b81516020620008266200082083620007b8565b620006f0565b82815260059290921b840181019181810190868411156200084657600080fd5b8286015b848110156200086c576200085e81620007de565b83529183019183016200084a565b509695505050505050565b600082601f8301126200088957600080fd5b815160206200089c6200082083620007b8565b82815260059290921b84018101918181019086841115620008bc57600080fd5b8286015b848110156200086c5780518352918301918301620008c0565b805160ff81168114620007f657600080fd5b805161ffff81168114620007f657600080fd5b80516001600160801b0381168114620007f657600080fd5b600060e082840312156200092957600080fd5b60405160e081016001600160401b03811182821017156200094e576200094e620006da565b80604052508091508251600281106200096657600080fd5b81526200097660208401620008d9565b60208201526200098960408401620008d9565b60408201526200099c60608401620008eb565b6060820152620009af60808401620008fe565b6080820152620009c260a08401620008fe565b60a0820152620009d560c08401620008fe565b60c08201525092915050565b600060808284031215620009f457600080fd5b604051608081016001600160401b038111828210171562000a195762000a19620006da565b60405290508062000a2a83620007de565b815262000a3a60208401620007de565b602082015262000a4d60408401620007de565b604082015262000a6060608401620007de565b60608201525092915050565b6000806000806000806000610200888a03121562000a8957600080fd5b87516001600160401b038082111562000aa157600080fd5b62000aaf8b838c0162000723565b985060208a015191508082111562000ac657600080fd5b62000ad48b838c0162000723565b975060408a015191508082111562000aeb57600080fd5b62000af98b838c01620007fb565b965060608a015191508082111562000b1057600080fd5b62000b1e8b838c0162000877565b955062000b2f8b60808c0162000916565b945062000b418b6101608c01620009e1565b93506101e08a015191508082111562000b5957600080fd5b5062000b688a828b0162000723565b91505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141562000bba5762000bba62000b8d565b5060010190565b634e487b7160e01b600052602160045260246000fd5b6000821982111562000bed5762000bed62000b8d565b500190565b600181811c9082168062000c0757607f821691505b6020821081141562000c2957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161014051610160516138b962000c956000396000612603015260006126520152600061262d01526000612586015260006125b0015260006125da0152600061190e0152600061183901526138b96000f3fe6080604052600436106102895760003560e01c8063715018a611610153578063b88d4fde116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b146107db578063f698da25146107fb578063f9020e331461081057600080fd5b8063e985e9c51461079b578063f11ef5cf146107bb57600080fd5b8063ce7c2ac2116100b0578063ce7c2ac21461071a578063d79779b214610750578063e33b7de31461078657600080fd5b8063b88d4fde146106da578063c87b56dd146106fa57600080fd5b80638f57b026116101225780639852595c116101075780639852595c14610664578063a22cb4651461069a578063b65b056a146106ba57600080fd5b80638f57b0261461063c57806395d89b411461064f57600080fd5b8063715018a6146105c95780637cd0ae8c146105de5780638b83209b146105fe5780638da5cb5b1461061e57600080fd5b80632a55205a11610201578063406072a9116101b557806348b750441161019a57806348b75044146105695780636352211e1461058957806370a08231146105a957600080fd5b8063406072a91461050357806342842e0e1461054957600080fd5b80633408e470116101e65780633408e470146104a357806337f1e7f2146104b65780633a98ef39146104ee57600080fd5b80632a55205a1461044457806330176e131461048357600080fd5b80630f79175711610258578063191655871161023d57806319165587146103e457806323b872dd1461040457806327864fd81461042457600080fd5b80630f7917571461038857806318160ddd146103c157600080fd5b806301ffc9a7146102d757806306fdde031461030c578063081812fc1461032e578063095ea7b31461036657600080fd5b366102d2577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102e357600080fd5b506102f76102f2366004612f3c565b610830565b60405190151581526020015b60405180910390f35b34801561031857600080fd5b50610321610874565b6040516103039190612fb1565b34801561033a57600080fd5b5061034e610349366004612fc4565b610906565b6040516001600160a01b039091168152602001610303565b34801561037257600080fd5b50610386610381366004612ff2565b610963565b005b34801561039457600080fd5b506102f76103a336600461301e565b6001600160a01b031660009081526017602052604090205460ff1690565b3480156103cd57600080fd5b50600154600054035b604051908152602001610303565b3480156103f057600080fd5b506103866103ff36600461301e565b610a23565b34801561041057600080fd5b5061038661041f36600461303b565b610bd9565b34801561043057600080fd5b5061038661043f36600461308a565b610be4565b34801561045057600080fd5b5061046461045f3660046130a7565b610c77565b604080516001600160a01b039093168352602083019190915201610303565b34801561048f57600080fd5b5061038661049e36600461310b565b610cbd565b3480156104af57600080fd5b50466103d6565b3480156104c257600080fd5b506104d66104d136600461314d565b610d23565b6040516001600160801b039091168152602001610303565b3480156104fa57600080fd5b506009546103d6565b34801561050f57600080fd5b506103d661051e36600461316e565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b34801561055557600080fd5b5061038661056436600461303b565b610da9565b34801561057557600080fd5b5061038661058436600461316e565b610dc4565b34801561059557600080fd5b5061034e6105a4366004612fc4565b611039565b3480156105b557600080fd5b506103d66105c436600461301e565b61104b565b3480156105d557600080fd5b506103866110b3565b3480156105ea57600080fd5b506102f76105f93660046131a7565b611119565b34801561060a57600080fd5b5061034e610619366004612fc4565b611202565b34801561062a57600080fd5b506008546001600160a01b031661034e565b61038661064a3660046131a7565b611232565b34801561065b57600080fd5b5061032161160d565b34801561067057600080fd5b506103d661067f36600461301e565b6001600160a01b03166000908152600c602052604090205490565b3480156106a657600080fd5b506103866106b5366004613206565b61161c565b3480156106c657600080fd5b506103866106d5366004613234565b6116cb565b3480156106e657600080fd5b506103866106f5366004613262565b61175d565b34801561070657600080fd5b50610321610715366004612fc4565b6117a8565b34801561072657600080fd5b506103d661073536600461301e565b6001600160a01b03166000908152600b602052604090205490565b34801561075c57600080fd5b506103d661076b36600461301e565b6001600160a01b03166000908152600e602052604090205490565b34801561079257600080fd5b50600a546103d6565b3480156107a757600080fd5b506102f76107b636600461316e565b611831565b3480156107c757600080fd5b506103866107d6366004613351565b611979565b3480156107e757600080fd5b506103866107f636600461301e565b611aed565b34801561080757600080fd5b506103d6611bcf565b34801561081c57600080fd5b5060105460ff166040516103039190613384565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061086e575061086e82611bde565b92915050565b6060600280546108839061339e565b80601f01602080910402602001604051908101604052809291908181526020018280546108af9061339e565b80156108fc5780601f106108d1576101008083540402835291602001916108fc565b820191906000526020600020905b8154815290600101906020018083116108df57829003601f168201915b5050505050905090565b600061091182611c79565b610947576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061096e82611039565b9050806001600160a01b0316836001600160a01b031614156109bc576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216148015906109dc57506109da8133611831565b155b15610a13576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a1e838383611ca4565b505050565b6001600160a01b0381166000908152600b6020526040902054610a9c5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084015b60405180910390fd5b6000610aa7600a5490565b610ab190476133e9565b90506000610ade8383610ad9866001600160a01b03166000908152600c602052604090205490565b611d0d565b905080610b415760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a93565b6001600160a01b0383166000908152600c602052604081208054839290610b699084906133e9565b9250508190555080600a6000828254610b8291906133e9565b90915550610b9290508382611d4b565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610a1e838383611e64565b6008546001600160a01b03163314610c3e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b60088054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60135460105460009182916001600160a01b039091169061271090610ca7906301000000900461ffff1686613401565b610cb19190613436565b915091505b9250929050565b6008546001600160a01b03163314610d175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b610a1e60168383612e8d565b60006001826002811115610d3957610d3961336e565b1415610d505750506011546001600160801b031690565b6002826002811115610d6457610d6461336e565b1415610d8f57505060115470010000000000000000000000000000000090046001600160801b031690565b50506010546501000000000090046001600160801b031690565b610a1e8383836040518060200160405280600081525061175d565b6001600160a01b0381166000908152600b6020526040902054610e385760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610a93565b6001600160a01b0382166000908152600e60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015610eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed2919061344a565b610edc91906133e9565b90506000610f158383610ad987876001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b905080610f785760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a93565b6001600160a01b038085166000908152600f6020908152604080832093871683529290529081208054839290610faf9084906133e9565b90915550506001600160a01b0384166000908152600e602052604081208054839290610fdc9084906133e9565b90915550610fed90508484836120a0565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600061104482612120565b5192915050565b60006001600160a01b03821661108d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b0316331461110d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b6111176000612255565b565b60008061119b7f6c7e9da514e7315c2cee3b54d2dc4cd05b45b01b29cf4403459ef8becfabdd7b61114d602086018661314d565b61115d6040870160208801613351565b61116d606088016040890161301e565b6040516020016111809493929190613463565b604051602081830303815290604052805190602001206122b4565b601254604080516020601f89018190048102820181019092528781529293506001600160a01b03909116916111ed91849190899089908190840183828082843760009201919091525061231d92505050565b6001600160a01b0316149150505b9392505050565b6000600d8281548110611217576112176134a1565b6000918252602090912001546001600160a01b031692915050565b600060105460ff16600181111561124b5761124b61336e565b14156112995760405162461bcd60e51b815260206004820152600b60248201527f53414c455f434c4f5345440000000000000000000000000000000000000000006044820152606401610a93565b6112a96040820160208301613351565b6000546107d0906112be9060ff8416906133e9565b111561130c5760405162461bcd60e51b815260206004820152601660248201527f5154595f455843454544535f4d41585f535550504c59000000000000000000006044820152606401610a93565b600061131e6040840160208501613351565b60ff1611801561134b575060105462010000900460ff166113456040840160208501613351565b60ff1611155b6113975760405162461bcd60e51b815260206004820152601260248201527f494e434f52524543545f5155414e5449545900000000000000000000000000006044820152606401610a93565b6113a76040830160208401613351565b60ff166113ba6104d1602085018561314d565b6113c491906134b7565b6001600160801b0316341461141b5760405162461bcd60e51b815260206004820152600f60248201527f494e434f52524543545f46554e445300000000000000000000000000000000006044820152606401610a93565b600061142a602084018461314d565b600281111561143b5761143b61336e565b146114975761144b848484611119565b6114975760405162461bcd60e51b815260206004820152601160248201527f494e56414c49445f5349474e41545552450000000000000000000000000000006044820152606401610a93565b60026114a6602084018461314d565b60028111156114b7576114b761336e565b14156115dc576114cd6040830160208401613351565b60ff1660011461151f5760405162461bcd60e51b815260206004820152601560248201527f4f4e4c595f4f4e455f465245455f414c4c4f57454400000000000000000000006044820152606401610a93565b60176000611533606085016040860161301e565b6001600160a01b0316815260208101919091526040016000205460ff161561159d5760405162461bcd60e51b815260206004820152600f60248201527f414c52454144595f434c41494d454400000000000000000000000000000000006044820152606401610a93565b6001601760006115b3606086016040870161301e565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790555b6116076115ef606084016040850161301e565b6115ff6040850160208601613351565b60ff16612341565b50505050565b6060600380546108839061339e565b6001600160a01b03821633141561165f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b031633146117255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b60108054610100900460ff1690829061173e8282613520565b50506010805460ff9092166101000261ff001990921691909117905550565b611768848484611e64565b6001600160a01b0383163b1515801561178a57506117888484848461235f565b155b15611607576040516368d2bf6b60e11b815260040160405180910390fd5b60606117b382611c79565b6117ff5760405162461bcd60e51b815260206004820152601160248201527f4e4f4e4558495354454e545f544f4b454e0000000000000000000000000000006044820152606401610a93565b601661180a83612447565b60405160200161181b929190613698565b6040516020818303038152906040529050919050565b6008546000907f000000000000000000000000000000000000000000000000000000000000000090600160a01b900460ff16801561193857506040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152808516919083169063c455279190602401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f2919061376b565b6001600160a01b031614806119385750826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316145b1561194757600191505061086e565b6001600160a01b0380851660009081526007602090815260408083209387168352929052205460ff165b949350505050565b6008546001600160a01b031633146119d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b806107d061ffff168160ff166000546119ec91906133e9565b1115611a3a5760405162461bcd60e51b815260206004820152601660248201527f5154595f455843454544535f4d41585f535550504c59000000000000000000006044820152606401610a93565b60008260ff16118015611a5b575060105460ff610100909104811690831611155b611aa75760405162461bcd60e51b815260206004820152601060248201527f524553455256455f4558434545444544000000000000000000000000000000006044820152606401610a93565b611ab4338360ff16612341565b60108054839190600190611ad1908490610100900460ff16613788565b92506101000a81548160ff021916908360ff1602179055505050565b6008546001600160a01b03163314611b475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b6001600160a01b038116611bc35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a93565b611bcc81612255565b50565b6000611bd9612579565b905090565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611c4157506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061086e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461086e565b600080548210801561086e575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009546001600160a01b0384166000908152600b602052604081205490918391611d379086613401565b611d419190613436565b61197191906137ab565b80471015611d9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a93565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611de8576040519150601f19603f3d011682016040523d82523d6000602084013e611ded565b606091505b5050905080610a1e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a93565b6000611e6f82612120565b9050836001600160a01b031681600001516001600160a01b031614611ec0576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611ede5750611ede8533611831565b80611ef9575033611eee84610906565b6001600160a01b0316145b905080611f32576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416611f72576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f7e60008487611ca4565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612054576000548214612054578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e9084906126a0565b60408051606081018252600080825260208201819052918101919091528160005481101561222357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff161515918101829052906122215780516001600160a01b0316156121b7579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff161515928101929092521561221c579392505050565b6121b7565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061086e6122c1612579565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061232c8585612785565b91509150612339816127f2565b509392505050565b61235b8282604051806020016040528060008152506129ad565b5050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906123949033908990889088906004016137c2565b6020604051808303816000875af19250505080156123cf575060408051601f3d908101601f191682019092526123cc918101906137fe565b60015b61242a573d8080156123fd576040519150601f19603f3d011682016040523d82523d6000602084013e612402565b606091505b508051612422576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60608161248757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156124b1578061249b8161381b565b91506124aa9050600a83613436565b915061248b565b60008167ffffffffffffffff8111156124cc576124cc61324c565b6040519080825280601f01601f1916602001820160405280156124f6576020820181803683370190505b5090505b84156119715761250b6001836137ab565b9150612518600a86613836565b6125239060306133e9565b60f81b818381518110612538576125386134a1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612572600a86613436565b94506124fa565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156125d257507f000000000000000000000000000000000000000000000000000000000000000046145b156125fc57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60006126f5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129ba9092919063ffffffff16565b805190915015610a1e5780806020019051810190612713919061384a565b610a1e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a93565b6000808251604114156127bc5760208301516040840151606085015160001a6127b0878285856129c9565b94509450505050610cb6565b8251604014156127e657602083015160408401516127db868383612ab6565b935093505050610cb6565b50600090506002610cb6565b60008160048111156128065761280661336e565b141561280f5750565b60018160048111156128235761282361336e565b14156128715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a93565b60028160048111156128855761288561336e565b14156128d35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a93565b60038160048111156128e7576128e761336e565b14156129405760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a93565b60048160048111156129545761295461336e565b1415611bcc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a93565b610a1e8383836001612b08565b60606119718484600085612d0c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612a005750600090506003612aad565b8460ff16601b14158015612a1857508460ff16601c14155b15612a295750600090506004612aad565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612a7d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612aa657600060019250925050612aad565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612aec60ff86901c601b6133e9565b9050612afa878288856129c9565b935093505050935093915050565b6000546001600160a01b038516612b4b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612b82576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612c3457506001600160a01b0387163b15155b15612cbd575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612c85600088848060010195508861235f565b612ca2576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612c3a578260005414612cb857600080fd5b612d03565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612cbe575b50600055612099565b606082471015612d845760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a93565b6001600160a01b0385163b612ddb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a93565b600080866001600160a01b03168587604051612df79190613867565b60006040518083038185875af1925050503d8060008114612e34576040519150601f19603f3d011682016040523d82523d6000602084013e612e39565b606091505b5091509150612e49828286612e54565b979650505050505050565b60608315612e635750816111fb565b825115612e735782518084602001fd5b8160405162461bcd60e51b8152600401610a939190612fb1565b828054612e999061339e565b90600052602060002090601f016020900481019282612ebb5760008555612f01565b82601f10612ed45782800160ff19823516178555612f01565b82800160010185558215612f01579182015b82811115612f01578235825591602001919060010190612ee6565b50612f0d929150612f11565b5090565b5b80821115612f0d5760008155600101612f12565b6001600160e01b031981168114611bcc57600080fd5b600060208284031215612f4e57600080fd5b81356111fb81612f26565b60005b83811015612f74578181015183820152602001612f5c565b838111156116075750506000910152565b60008151808452612f9d816020860160208601612f59565b601f01601f19169290920160200192915050565b6020815260006111fb6020830184612f85565b600060208284031215612fd657600080fd5b5035919050565b6001600160a01b0381168114611bcc57600080fd5b6000806040838503121561300557600080fd5b823561301081612fdd565b946020939093013593505050565b60006020828403121561303057600080fd5b81356111fb81612fdd565b60008060006060848603121561305057600080fd5b833561305b81612fdd565b9250602084013561306b81612fdd565b929592945050506040919091013590565b8015158114611bcc57600080fd5b60006020828403121561309c57600080fd5b81356111fb8161307c565b600080604083850312156130ba57600080fd5b50508035926020909101359150565b60008083601f8401126130db57600080fd5b50813567ffffffffffffffff8111156130f357600080fd5b602083019150836020828501011115610cb657600080fd5b6000806020838503121561311e57600080fd5b823567ffffffffffffffff81111561313557600080fd5b613141858286016130c9565b90969095509350505050565b60006020828403121561315f57600080fd5b8135600381106111fb57600080fd5b6000806040838503121561318157600080fd5b823561318c81612fdd565b9150602083013561319c81612fdd565b809150509250929050565b600080600083850360808112156131bd57600080fd5b843567ffffffffffffffff8111156131d457600080fd5b6131e0878288016130c9565b9095509350506060601f19820112156131f857600080fd5b506020840190509250925092565b6000806040838503121561321957600080fd5b823561322481612fdd565b9150602083013561319c8161307c565b600060e0828403121561324657600080fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561327857600080fd5b843561328381612fdd565b9350602085013561329381612fdd565b925060408501359150606085013567ffffffffffffffff808211156132b757600080fd5b818701915087601f8301126132cb57600080fd5b8135818111156132dd576132dd61324c565b604051601f8201601f19908116603f011681019083821181831017156133055761330561324c565b816040528281528a602084870101111561331e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60ff81168114611bcc57600080fd5b60006020828403121561336357600080fd5b81356111fb81613342565b634e487b7160e01b600052602160045260246000fd5b60208101600283106133985761339861336e565b91905290565b600181811c908216806133b257607f821691505b6020821081141561324657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156133fc576133fc6133d3565b500190565b600081600019048311821515161561341b5761341b6133d3565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261344557613445613420565b500490565b60006020828403121561345c57600080fd5b5051919050565b848152608081016003851061347a5761347a61336e565b84602083015260ff841660408301526001600160a01b038316606083015295945050505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b03808316818516818304811182151516156134dd576134dd6133d3565b02949350505050565b6000813561086e81613342565b6000813561ffff8116811461086e57600080fd5b600081356001600160801b038116811461086e57600080fd5b81356002811061352f57600080fd5b815460ff821691508160ff198216178355602084013561354e81613342565b61ff008160081b168361ffff1984161717845550505061358b613573604084016134e6565b825462ff0000191660109190911b62ff000016178255565b6135b661359a606084016134f3565b825464ffff000000191660189190911b64ffff00000016178255565b61360b6135c560808401613507565b82547fffffffffffffffffffffff00000000000000000000000000000000ffffffffff1660289190911b74ffffffffffffffffffffffffffffffff000000000016178255565b6001810161364461361e60a08501613507565b82546fffffffffffffffffffffffffffffffff19166001600160801b0391909116178255565b610a1e61365360c08501613507565b82546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff1916178255565b6000815161368e818560208601612f59565b9290920192915050565b600080845481600182811c9150808316806136b457607f831692505b60208084108214156136d457634e487b7160e01b86526022600452602486fd5b8180156136e857600181146136f957613726565b60ff19861689528489019650613726565b60008b81526020902060005b8681101561371e5781548b820152908501908301613705565b505084890196505b505050505050613762613739828661367c565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b60006020828403121561377d57600080fd5b81516111fb81612fdd565b600060ff821660ff8416808210156137a2576137a26133d3565b90039392505050565b6000828210156137bd576137bd6133d3565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137f46080830184612f85565b9695505050505050565b60006020828403121561381057600080fd5b81516111fb81612f26565b600060001982141561382f5761382f6133d3565b5060010190565b60008261384557613845613420565b500690565b60006020828403121561385c57600080fd5b81516111fb8161307c565b60008251613879818460208701612f59565b919091019291505056fea26469706673582212200fc9827bdc24385bd8718661e4080903f2786f33cf3e4b88be7e575c4cac720b64736f6c634300080b003300000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000006a94d74f43000000000000000000000000000000000000000000000000000000470de4df820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036904611ffac41c1a9f3209b7de539d94472c849000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f373000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e0000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000001a547269616e67756c756d206279204661726d6f6f726520417274000000000000000000000000000000000000000000000000000000000000000000000000000354524900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000435cd3902d1b4f4e842f2c0fd5028eee71dd099c000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f3730000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f747269616e67756c756d2e6170692e746f70646f6773747564696f732e696f2f746f6b656e2f000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102895760003560e01c8063715018a611610153578063b88d4fde116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b146107db578063f698da25146107fb578063f9020e331461081057600080fd5b8063e985e9c51461079b578063f11ef5cf146107bb57600080fd5b8063ce7c2ac2116100b0578063ce7c2ac21461071a578063d79779b214610750578063e33b7de31461078657600080fd5b8063b88d4fde146106da578063c87b56dd146106fa57600080fd5b80638f57b026116101225780639852595c116101075780639852595c14610664578063a22cb4651461069a578063b65b056a146106ba57600080fd5b80638f57b0261461063c57806395d89b411461064f57600080fd5b8063715018a6146105c95780637cd0ae8c146105de5780638b83209b146105fe5780638da5cb5b1461061e57600080fd5b80632a55205a11610201578063406072a9116101b557806348b750441161019a57806348b75044146105695780636352211e1461058957806370a08231146105a957600080fd5b8063406072a91461050357806342842e0e1461054957600080fd5b80633408e470116101e65780633408e470146104a357806337f1e7f2146104b65780633a98ef39146104ee57600080fd5b80632a55205a1461044457806330176e131461048357600080fd5b80630f79175711610258578063191655871161023d57806319165587146103e457806323b872dd1461040457806327864fd81461042457600080fd5b80630f7917571461038857806318160ddd146103c157600080fd5b806301ffc9a7146102d757806306fdde031461030c578063081812fc1461032e578063095ea7b31461036657600080fd5b366102d2577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102e357600080fd5b506102f76102f2366004612f3c565b610830565b60405190151581526020015b60405180910390f35b34801561031857600080fd5b50610321610874565b6040516103039190612fb1565b34801561033a57600080fd5b5061034e610349366004612fc4565b610906565b6040516001600160a01b039091168152602001610303565b34801561037257600080fd5b50610386610381366004612ff2565b610963565b005b34801561039457600080fd5b506102f76103a336600461301e565b6001600160a01b031660009081526017602052604090205460ff1690565b3480156103cd57600080fd5b50600154600054035b604051908152602001610303565b3480156103f057600080fd5b506103866103ff36600461301e565b610a23565b34801561041057600080fd5b5061038661041f36600461303b565b610bd9565b34801561043057600080fd5b5061038661043f36600461308a565b610be4565b34801561045057600080fd5b5061046461045f3660046130a7565b610c77565b604080516001600160a01b039093168352602083019190915201610303565b34801561048f57600080fd5b5061038661049e36600461310b565b610cbd565b3480156104af57600080fd5b50466103d6565b3480156104c257600080fd5b506104d66104d136600461314d565b610d23565b6040516001600160801b039091168152602001610303565b3480156104fa57600080fd5b506009546103d6565b34801561050f57600080fd5b506103d661051e36600461316e565b6001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b34801561055557600080fd5b5061038661056436600461303b565b610da9565b34801561057557600080fd5b5061038661058436600461316e565b610dc4565b34801561059557600080fd5b5061034e6105a4366004612fc4565b611039565b3480156105b557600080fd5b506103d66105c436600461301e565b61104b565b3480156105d557600080fd5b506103866110b3565b3480156105ea57600080fd5b506102f76105f93660046131a7565b611119565b34801561060a57600080fd5b5061034e610619366004612fc4565b611202565b34801561062a57600080fd5b506008546001600160a01b031661034e565b61038661064a3660046131a7565b611232565b34801561065b57600080fd5b5061032161160d565b34801561067057600080fd5b506103d661067f36600461301e565b6001600160a01b03166000908152600c602052604090205490565b3480156106a657600080fd5b506103866106b5366004613206565b61161c565b3480156106c657600080fd5b506103866106d5366004613234565b6116cb565b3480156106e657600080fd5b506103866106f5366004613262565b61175d565b34801561070657600080fd5b50610321610715366004612fc4565b6117a8565b34801561072657600080fd5b506103d661073536600461301e565b6001600160a01b03166000908152600b602052604090205490565b34801561075c57600080fd5b506103d661076b36600461301e565b6001600160a01b03166000908152600e602052604090205490565b34801561079257600080fd5b50600a546103d6565b3480156107a757600080fd5b506102f76107b636600461316e565b611831565b3480156107c757600080fd5b506103866107d6366004613351565b611979565b3480156107e757600080fd5b506103866107f636600461301e565b611aed565b34801561080757600080fd5b506103d6611bcf565b34801561081c57600080fd5b5060105460ff166040516103039190613384565b60006001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000148061086e575061086e82611bde565b92915050565b6060600280546108839061339e565b80601f01602080910402602001604051908101604052809291908181526020018280546108af9061339e565b80156108fc5780601f106108d1576101008083540402835291602001916108fc565b820191906000526020600020905b8154815290600101906020018083116108df57829003601f168201915b5050505050905090565b600061091182611c79565b610947576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061096e82611039565b9050806001600160a01b0316836001600160a01b031614156109bc576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216148015906109dc57506109da8133611831565b155b15610a13576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a1e838383611ca4565b505050565b6001600160a01b0381166000908152600b6020526040902054610a9c5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084015b60405180910390fd5b6000610aa7600a5490565b610ab190476133e9565b90506000610ade8383610ad9866001600160a01b03166000908152600c602052604090205490565b611d0d565b905080610b415760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a93565b6001600160a01b0383166000908152600c602052604081208054839290610b699084906133e9565b9250508190555080600a6000828254610b8291906133e9565b90915550610b9290508382611d4b565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b610a1e838383611e64565b6008546001600160a01b03163314610c3e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b60088054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b60135460105460009182916001600160a01b039091169061271090610ca7906301000000900461ffff1686613401565b610cb19190613436565b915091505b9250929050565b6008546001600160a01b03163314610d175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b610a1e60168383612e8d565b60006001826002811115610d3957610d3961336e565b1415610d505750506011546001600160801b031690565b6002826002811115610d6457610d6461336e565b1415610d8f57505060115470010000000000000000000000000000000090046001600160801b031690565b50506010546501000000000090046001600160801b031690565b610a1e8383836040518060200160405280600081525061175d565b6001600160a01b0381166000908152600b6020526040902054610e385760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608401610a93565b6001600160a01b0382166000908152600e60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a0823190602401602060405180830381865afa158015610eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed2919061344a565b610edc91906133e9565b90506000610f158383610ad987876001600160a01b039182166000908152600f6020908152604080832093909416825291909152205490565b905080610f785760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608401610a93565b6001600160a01b038085166000908152600f6020908152604080832093871683529290529081208054839290610faf9084906133e9565b90915550506001600160a01b0384166000908152600e602052604081208054839290610fdc9084906133e9565b90915550610fed90508484836120a0565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b600061104482612120565b5192915050565b60006001600160a01b03821661108d576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b0316331461110d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b6111176000612255565b565b60008061119b7f6c7e9da514e7315c2cee3b54d2dc4cd05b45b01b29cf4403459ef8becfabdd7b61114d602086018661314d565b61115d6040870160208801613351565b61116d606088016040890161301e565b6040516020016111809493929190613463565b604051602081830303815290604052805190602001206122b4565b601254604080516020601f89018190048102820181019092528781529293506001600160a01b03909116916111ed91849190899089908190840183828082843760009201919091525061231d92505050565b6001600160a01b0316149150505b9392505050565b6000600d8281548110611217576112176134a1565b6000918252602090912001546001600160a01b031692915050565b600060105460ff16600181111561124b5761124b61336e565b14156112995760405162461bcd60e51b815260206004820152600b60248201527f53414c455f434c4f5345440000000000000000000000000000000000000000006044820152606401610a93565b6112a96040820160208301613351565b6000546107d0906112be9060ff8416906133e9565b111561130c5760405162461bcd60e51b815260206004820152601660248201527f5154595f455843454544535f4d41585f535550504c59000000000000000000006044820152606401610a93565b600061131e6040840160208501613351565b60ff1611801561134b575060105462010000900460ff166113456040840160208501613351565b60ff1611155b6113975760405162461bcd60e51b815260206004820152601260248201527f494e434f52524543545f5155414e5449545900000000000000000000000000006044820152606401610a93565b6113a76040830160208401613351565b60ff166113ba6104d1602085018561314d565b6113c491906134b7565b6001600160801b0316341461141b5760405162461bcd60e51b815260206004820152600f60248201527f494e434f52524543545f46554e445300000000000000000000000000000000006044820152606401610a93565b600061142a602084018461314d565b600281111561143b5761143b61336e565b146114975761144b848484611119565b6114975760405162461bcd60e51b815260206004820152601160248201527f494e56414c49445f5349474e41545552450000000000000000000000000000006044820152606401610a93565b60026114a6602084018461314d565b60028111156114b7576114b761336e565b14156115dc576114cd6040830160208401613351565b60ff1660011461151f5760405162461bcd60e51b815260206004820152601560248201527f4f4e4c595f4f4e455f465245455f414c4c4f57454400000000000000000000006044820152606401610a93565b60176000611533606085016040860161301e565b6001600160a01b0316815260208101919091526040016000205460ff161561159d5760405162461bcd60e51b815260206004820152600f60248201527f414c52454144595f434c41494d454400000000000000000000000000000000006044820152606401610a93565b6001601760006115b3606086016040870161301e565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790555b6116076115ef606084016040850161301e565b6115ff6040850160208601613351565b60ff16612341565b50505050565b6060600380546108839061339e565b6001600160a01b03821633141561165f576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b031633146117255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b60108054610100900460ff1690829061173e8282613520565b50506010805460ff9092166101000261ff001990921691909117905550565b611768848484611e64565b6001600160a01b0383163b1515801561178a57506117888484848461235f565b155b15611607576040516368d2bf6b60e11b815260040160405180910390fd5b60606117b382611c79565b6117ff5760405162461bcd60e51b815260206004820152601160248201527f4e4f4e4558495354454e545f544f4b454e0000000000000000000000000000006044820152606401610a93565b601661180a83612447565b60405160200161181b929190613698565b6040516020818303038152906040529050919050565b6008546000907f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c190600160a01b900460ff16801561193857506040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152808516919083169063c455279190602401602060405180830381865afa1580156118ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f2919061376b565b6001600160a01b031614806119385750826001600160a01b03167f000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e6001600160a01b0316145b1561194757600191505061086e565b6001600160a01b0380851660009081526007602090815260408083209387168352929052205460ff165b949350505050565b6008546001600160a01b031633146119d35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b806107d061ffff168160ff166000546119ec91906133e9565b1115611a3a5760405162461bcd60e51b815260206004820152601660248201527f5154595f455843454544535f4d41585f535550504c59000000000000000000006044820152606401610a93565b60008260ff16118015611a5b575060105460ff610100909104811690831611155b611aa75760405162461bcd60e51b815260206004820152601060248201527f524553455256455f4558434545444544000000000000000000000000000000006044820152606401610a93565b611ab4338360ff16612341565b60108054839190600190611ad1908490610100900460ff16613788565b92506101000a81548160ff021916908360ff1602179055505050565b6008546001600160a01b03163314611b475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a93565b6001600160a01b038116611bc35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610a93565b611bcc81612255565b50565b6000611bd9612579565b905090565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611c4157506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061086e57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461086e565b600080548210801561086e575050600090815260046020526040902054600160e01b900460ff161590565b600082815260066020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6009546001600160a01b0384166000908152600b602052604081205490918391611d379086613401565b611d419190613436565b61197191906137ab565b80471015611d9b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a93565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611de8576040519150601f19603f3d011682016040523d82523d6000602084013e611ded565b606091505b5050905080610a1e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a93565b6000611e6f82612120565b9050836001600160a01b031681600001516001600160a01b031614611ec0576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611ede5750611ede8533611831565b80611ef9575033611eee84610906565b6001600160a01b0316145b905080611f32576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038416611f72576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f7e60008487611ca4565b6001600160a01b038581166000908152600560209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff92831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080546001600160e01b031916909417600160a01b42909216919091021783558701808452922080549193909116612054576000548214612054578054602086015167ffffffffffffffff16600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610a1e9084906126a0565b60408051606081018252600080825260208201819052918101919091528160005481101561222357600081815260046020908152604091829020825160608101845290546001600160a01b0381168252600160a01b810467ffffffffffffffff1692820192909252600160e01b90910460ff161515918101829052906122215780516001600160a01b0316156121b7579392505050565b5060001901600081815260046020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820467ffffffffffffffff1693830193909352600160e01b900460ff161515928101929092521561221c579392505050565b6121b7565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061086e6122c1612579565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061232c8585612785565b91509150612339816127f2565b509392505050565b61235b8282604051806020016040528060008152506129ad565b5050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906123949033908990889088906004016137c2565b6020604051808303816000875af19250505080156123cf575060408051601f3d908101601f191682019092526123cc918101906137fe565b60015b61242a573d8080156123fd576040519150601f19603f3d011682016040523d82523d6000602084013e612402565b606091505b508051612422576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60608161248757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156124b1578061249b8161381b565b91506124aa9050600a83613436565b915061248b565b60008167ffffffffffffffff8111156124cc576124cc61324c565b6040519080825280601f01601f1916602001820160405280156124f6576020820181803683370190505b5090505b84156119715761250b6001836137ab565b9150612518600a86613836565b6125239060306133e9565b60f81b818381518110612538576125386134a1565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612572600a86613436565b94506124fa565b6000306001600160a01b037f0000000000000000000000008c282d7654864da8cf43ff0f48e5608f1ddc14f8161480156125d257507f000000000000000000000000000000000000000000000000000000000000000146145b156125fc57507ff2b4c436cd8a49bb1511fbbd5d7116e1976402880d05ff49a3bd3032b90679ba90565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f88d114b17774bf4067823c5d5c1f165a9e9d376dbf19da564fa6fff0e1a50539828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60006126f5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129ba9092919063ffffffff16565b805190915015610a1e5780806020019051810190612713919061384a565b610a1e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610a93565b6000808251604114156127bc5760208301516040840151606085015160001a6127b0878285856129c9565b94509450505050610cb6565b8251604014156127e657602083015160408401516127db868383612ab6565b935093505050610cb6565b50600090506002610cb6565b60008160048111156128065761280661336e565b141561280f5750565b60018160048111156128235761282361336e565b14156128715760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610a93565b60028160048111156128855761288561336e565b14156128d35760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610a93565b60038160048111156128e7576128e761336e565b14156129405760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610a93565b60048160048111156129545761295461336e565b1415611bcc5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610a93565b610a1e8383836001612b08565b60606119718484600085612d0c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612a005750600090506003612aad565b8460ff16601b14158015612a1857508460ff16601c14155b15612a295750600090506004612aad565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612a7d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612aa657600060019250925050612aad565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612aec60ff86901c601b6133e9565b9050612afa878288856129c9565b935093505050935093915050565b6000546001600160a01b038516612b4b576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83612b82576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c01811690920217909155858452600490925290912080546001600160e01b031916909217600160a01b429092169190910217905580808501838015612c3457506001600160a01b0387163b15155b15612cbd575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4612c85600088848060010195508861235f565b612ca2576040516368d2bf6b60e11b815260040160405180910390fd5b80821415612c3a578260005414612cb857600080fd5b612d03565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415612cbe575b50600055612099565b606082471015612d845760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610a93565b6001600160a01b0385163b612ddb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a93565b600080866001600160a01b03168587604051612df79190613867565b60006040518083038185875af1925050503d8060008114612e34576040519150601f19603f3d011682016040523d82523d6000602084013e612e39565b606091505b5091509150612e49828286612e54565b979650505050505050565b60608315612e635750816111fb565b825115612e735782518084602001fd5b8160405162461bcd60e51b8152600401610a939190612fb1565b828054612e999061339e565b90600052602060002090601f016020900481019282612ebb5760008555612f01565b82601f10612ed45782800160ff19823516178555612f01565b82800160010185558215612f01579182015b82811115612f01578235825591602001919060010190612ee6565b50612f0d929150612f11565b5090565b5b80821115612f0d5760008155600101612f12565b6001600160e01b031981168114611bcc57600080fd5b600060208284031215612f4e57600080fd5b81356111fb81612f26565b60005b83811015612f74578181015183820152602001612f5c565b838111156116075750506000910152565b60008151808452612f9d816020860160208601612f59565b601f01601f19169290920160200192915050565b6020815260006111fb6020830184612f85565b600060208284031215612fd657600080fd5b5035919050565b6001600160a01b0381168114611bcc57600080fd5b6000806040838503121561300557600080fd5b823561301081612fdd565b946020939093013593505050565b60006020828403121561303057600080fd5b81356111fb81612fdd565b60008060006060848603121561305057600080fd5b833561305b81612fdd565b9250602084013561306b81612fdd565b929592945050506040919091013590565b8015158114611bcc57600080fd5b60006020828403121561309c57600080fd5b81356111fb8161307c565b600080604083850312156130ba57600080fd5b50508035926020909101359150565b60008083601f8401126130db57600080fd5b50813567ffffffffffffffff8111156130f357600080fd5b602083019150836020828501011115610cb657600080fd5b6000806020838503121561311e57600080fd5b823567ffffffffffffffff81111561313557600080fd5b613141858286016130c9565b90969095509350505050565b60006020828403121561315f57600080fd5b8135600381106111fb57600080fd5b6000806040838503121561318157600080fd5b823561318c81612fdd565b9150602083013561319c81612fdd565b809150509250929050565b600080600083850360808112156131bd57600080fd5b843567ffffffffffffffff8111156131d457600080fd5b6131e0878288016130c9565b9095509350506060601f19820112156131f857600080fd5b506020840190509250925092565b6000806040838503121561321957600080fd5b823561322481612fdd565b9150602083013561319c8161307c565b600060e0828403121561324657600080fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561327857600080fd5b843561328381612fdd565b9350602085013561329381612fdd565b925060408501359150606085013567ffffffffffffffff808211156132b757600080fd5b818701915087601f8301126132cb57600080fd5b8135818111156132dd576132dd61324c565b604051601f8201601f19908116603f011681019083821181831017156133055761330561324c565b816040528281528a602084870101111561331e57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60ff81168114611bcc57600080fd5b60006020828403121561336357600080fd5b81356111fb81613342565b634e487b7160e01b600052602160045260246000fd5b60208101600283106133985761339861336e565b91905290565b600181811c908216806133b257607f821691505b6020821081141561324657634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156133fc576133fc6133d3565b500190565b600081600019048311821515161561341b5761341b6133d3565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261344557613445613420565b500490565b60006020828403121561345c57600080fd5b5051919050565b848152608081016003851061347a5761347a61336e565b84602083015260ff841660408301526001600160a01b038316606083015295945050505050565b634e487b7160e01b600052603260045260246000fd5b60006001600160801b03808316818516818304811182151516156134dd576134dd6133d3565b02949350505050565b6000813561086e81613342565b6000813561ffff8116811461086e57600080fd5b600081356001600160801b038116811461086e57600080fd5b81356002811061352f57600080fd5b815460ff821691508160ff198216178355602084013561354e81613342565b61ff008160081b168361ffff1984161717845550505061358b613573604084016134e6565b825462ff0000191660109190911b62ff000016178255565b6135b661359a606084016134f3565b825464ffff000000191660189190911b64ffff00000016178255565b61360b6135c560808401613507565b82547fffffffffffffffffffffff00000000000000000000000000000000ffffffffff1660289190911b74ffffffffffffffffffffffffffffffff000000000016178255565b6001810161364461361e60a08501613507565b82546fffffffffffffffffffffffffffffffff19166001600160801b0391909116178255565b610a1e61365360c08501613507565b82546001600160801b031660809190911b6fffffffffffffffffffffffffffffffff1916178255565b6000815161368e818560208601612f59565b9290920192915050565b600080845481600182811c9150808316806136b457607f831692505b60208084108214156136d457634e487b7160e01b86526022600452602486fd5b8180156136e857600181146136f957613726565b60ff19861689528489019650613726565b60008b81526020902060005b8681101561371e5781548b820152908501908301613705565b505084890196505b505050505050613762613739828661367c565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b60006020828403121561377d57600080fd5b81516111fb81612fdd565b600060ff821660ff8416808210156137a2576137a26133d3565b90039392505050565b6000828210156137bd576137bd6133d3565b500390565b60006001600160a01b038087168352808616602084015250836040830152608060608301526137f46080830184612f85565b9695505050505050565b60006020828403121561381057600080fd5b81516111fb81612f26565b600060001982141561382f5761382f6133d3565b5060010190565b60008261384557613845613420565b500690565b60006020828403121561385c57600080fd5b81516111fb8161307c565b60008251613879818460208701612f59565b919091019291505056fea26469706673582212200fc9827bdc24385bd8718661e4080903f2786f33cf3e4b88be7e575c4cac720b64736f6c634300080b0033

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

00000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000006a94d74f43000000000000000000000000000000000000000000000000000000470de4df820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036904611ffac41c1a9f3209b7de539d94472c849000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f373000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e0000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000001a547269616e67756c756d206279204661726d6f6f726520417274000000000000000000000000000000000000000000000000000000000000000000000000000354524900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000435cd3902d1b4f4e842f2c0fd5028eee71dd099c000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f3730000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000002e68747470733a2f2f747269616e67756c756d2e6170692e746f70646f6773747564696f732e696f2f746f6b656e2f000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name (string): Triangulum by Farmoore Art
Arg [1] : symbol (string): TRI
Arg [2] : payees (address[]): 0x435Cd3902d1b4f4E842F2C0fd5028EEE71dd099C,0xCC967646FBa540e560c46Cc4a7b7C5831899f373
Arg [3] : shares (uint256[]): 10,90
Arg [4] : saleConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [5] : addresses (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [6] : baseTokenURI (string): https://triangulum.api.topdogstudios.io/token/

-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000240
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [3] : 00000000000000000000000000000000000000000000000000000000000002e0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [7] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [8] : 000000000000000000000000000000000000000000000000006a94d74f430000
Arg [9] : 00000000000000000000000000000000000000000000000000470de4df820000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 00000000000000000000000036904611ffac41c1a9f3209b7de539d94472c849
Arg [12] : 000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f373
Arg [13] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [14] : 000000000000000000000000f42aa99f011a1fa7cda90e5e98b277e306bca83e
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [16] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [17] : 547269616e67756c756d206279204661726d6f6f726520417274000000000000
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [19] : 5452490000000000000000000000000000000000000000000000000000000000
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [21] : 000000000000000000000000435cd3902d1b4f4e842f2c0fd5028eee71dd099c
Arg [22] : 000000000000000000000000cc967646fba540e560c46cc4a7b7c5831899f373
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [24] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [25] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [26] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [27] : 68747470733a2f2f747269616e67756c756d2e6170692e746f70646f67737475
Arg [28] : 64696f732e696f2f746f6b656e2f000000000000000000000000000000000000


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.