ETH Price: $3,413.50 (-6.53%)
Gas: 8.09 Gwei

Token

PARTICIPANTS (PARTICIPANTS)
 

Overview

Max Total Supply

416 PARTICIPANTS

Holders

387

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
playwithmekid.eth
Balance
1 PARTICIPANTS
0xa53a7e1e00b0bbfdd58a21449e2fe606f58b9fae
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:
Participants

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : Participants.sol
// SPDX-License-Identifier: GPL-3.0
// Author: Participants; Developed by Modern People, 2022

pragma solidity ^0.8.12;
import "./extensions/ERC721Enum.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "./ParticipantsRoyaltySplitter.sol";
import "./interfaces/IParticipantsERC20Tokens.sol";

contract Participants is
    ERC721Enum,
    Ownable,
    ReentrancyGuard,
    IERC2981,
    IParticipantsERC20Tokens
{
    using Strings for uint256;

    uint256 public constant MAX_SUPPLY = 3333;
    uint256 internal constant ROYALTY_BASE = 10000;
    uint256 internal constant ROYALTY_PERC = 500;

    bool public isMintingActive = false;
    string internal _baseTokenURI;
    address public participantsRoyaltyContract;

    address[] internal _erc20Tokens;

    // bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a
    bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a;

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _initBaseURI,
        address[] memory _recipients, //comm,mp,dd
        uint256[] memory _splits,
        address[] memory _tokens
    ) ERC721P(_name, _symbol) {
        setBaseURI(_initBaseURI);
        _erc20Tokens = _tokens;
        participantsRoyaltyContract = address(
            new ParticipantsRoyaltySplitter(_recipients, _splits, address(this))
        );
    }

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

    // public minting
    function mint() external {
        require(isMintingActive, "MintingNotActive");
        require(balanceOf(msg.sender) == 0, "OnePerWallet.");

        uint256 _totalSupply = totalSupply();
        require(_totalSupply + 1 <= MAX_SUPPLY, "Sold Out");

        _mint(msg.sender, _totalSupply + 1);
        delete _totalSupply;
    }

    function reserve() external onlyOwner {
        uint256 _totalSupply = totalSupply();
        uint256 _amount = 33;
        for (uint256 i = 0; i < _amount; ++i) {
            _mint(msg.sender, _totalSupply + i);
        }
    }

    function royaltyInfo(uint256, uint256 _salePrice)
        public
        view
        override(IERC2981)
        returns (address receiver, uint256 royaltyAmount)
    {
        return (
            participantsRoyaltyContract,
            (_salePrice * ROYALTY_PERC) / ROYALTY_BASE
        );
    }

    // admin functionality

    function tokenURI(uint256 tokenId)
        public
        view
        virtual
        override
        returns (string memory)
    {
        require(_exists(tokenId), "NonexistentToken");
        string memory currentBaseURI = _baseURI();
        return
            bytes(currentBaseURI).length > 0
                ? string(
                    abi.encodePacked(
                        currentBaseURI,
                        tokenId.toString(),
                        ".json"
                    )
                )
                : "";
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        _baseTokenURI = _newBaseURI;
    }

    function setMintingStatus(bool _status) external onlyOwner {
        isMintingActive = _status;
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Enum, IERC165)
        returns (bool)
    {
        return
            interfaceId == _INTERFACE_ID_ERC2981 ||
            super.supportsInterface(interfaceId);
    }

    function setRoyaltyERC20Tokens(address[] calldata _tokens)
        public
        onlyOwner
    {
        _erc20Tokens = _tokens;
    }

    function getRoyaltyERC20Tokens()
        public
        view
        returns (address[] memory tokens)
    {
        return _erc20Tokens;
    }

    function withdraw() external payable {
        for (uint256 index = 0; index < _erc20Tokens.length; index++) {
            IERC20 token = IERC20(_erc20Tokens[index]);
            uint256 balance = token.balanceOf(address(this));
            if (balance > 0) {
                bool _success = token.transfer(
                    payable(participantsRoyaltyContract),
                    balance
                );
                require(_success, "ERC20TransferFailed.");
            }
        }

        (bool success, ) = payable(participantsRoyaltyContract).call{
            value: address(this).balance
        }("");
        require(success, "ETHTransferFailed");
    }

    receive() external payable {}
}

File 2 of 21 : IParticipantsERC20Tokens.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

interface IParticipantsERC20Tokens {
    function getRoyaltyERC20Tokens() external view returns (address[] memory);
}

File 3 of 21 : ERC721P.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;
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/introspection/ERC165.sol";

abstract contract ERC721P is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    string private _name;
    string private _symbol;
    address[] internal _owners;
    mapping(uint256 => address) private _tokenApprovals;
    mapping(address => mapping(address => bool)) private _operatorApprovals;     
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }     
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        uint count = 0;
        uint length = _owners.length;
        for( uint i = 0; i < length; ++i ){
          if( owner == _owners[i] ){
            ++count;
          }
        }
        delete length;
        return count;
    }
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }
    function name() public view virtual override returns (string memory) {
        return _name;
    }
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721P.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }     
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }
	function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return tokenId < _owners.length && _owners[tokenId] != address(0);
    }
	function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721P.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }
	function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }
	function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }
	function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);
        _owners.push(to);

        emit Transfer(address(0), to, tokenId);
    }
	function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721P.ownerOf(tokenId);

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

        // Clear approvals
        _approve(address(0), tokenId);
        _owners[tokenId] = address(0);

        emit Transfer(owner, address(0), tokenId);
    }
	function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721P.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);
    }
	function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721P.ownerOf(tokenId), to, tokenId);
    }
	function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }
	function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 4 of 21 : ERC721Enum.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.10;
import "./ERC721P.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";

abstract contract ERC721Enum is ERC721P, IERC721Enumerable {
    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165, ERC721P)
        returns (bool)
    {
        return
            interfaceId == type(IERC721Enumerable).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function tokenOfOwnerByIndex(address owner, uint256 index)
        public
        view
        override
        returns (uint256 tokenId)
    {
        require(index < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
        uint256 count;
        for (uint256 i; i < _owners.length; ++i) {
            if (owner == _owners[i]) {
                if (count == index) return i;
                else ++count;
            }
        }
        require(false, "ERC721Enum: owner ioob");
    }

    function tokensOfOwner(address owner)
        public
        view
        returns (uint256[] memory)
    {
        require(0 < ERC721P.balanceOf(owner), "ERC721Enum: owner ioob");
        uint256 tokenCount = balanceOf(owner);
        uint256[] memory tokenIds = new uint256[](tokenCount);
        for (uint256 i = 0; i < tokenCount; i++) {
            tokenIds[i] = tokenOfOwnerByIndex(owner, i);
        }
        return tokenIds;
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _owners.length;
    }

    function tokenByIndex(uint256 index)
        public
        view
        virtual
        override
        returns (uint256)
    {
        require(index < ERC721Enum.totalSupply(), "ERC721Enum: global ioob");
        return index;
    }
}

File 5 of 21 : ParticipantsRoyaltySplitter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "./interfaces/IParticipantsERC20Tokens.sol";

contract ParticipantsRoyaltySplitter is PaymentSplitter {
    event PaymentReceivedOnRC(address from, uint256 amount);
    uint256 internal _payeesCount;
    IParticipantsERC20Tokens internal immutable _erc20TokensInterface;

    constructor(
        address[] memory payees,
        uint256[] memory shares_,
        address prtcAddress
    ) PaymentSplitter(payees, shares_) {
        require(payees.length == shares_.length, "LengthMismatch");
        require(payees.length > 0, "NoPayees");

        _payeesCount = payees.length;
        _erc20TokensInterface = IParticipantsERC20Tokens(prtcAddress);
    }

    function releaseAll() public payable {
        address[] memory erc20Tokens = _erc20TokensInterface
            .getRoyaltyERC20Tokens();
        for (uint256 index = 0; index < erc20Tokens.length; index++) {
            IERC20 token = IERC20(erc20Tokens[index]);
            if (token.balanceOf(address(this)) > 0) {
                for (
                    uint256 payeeIndex = 0;
                    payeeIndex < _payeesCount;
                    payeeIndex++
                ) {
                    //release erc20 tokens
                    address _payee = payee(payeeIndex);
                    release(token, payable(_payee));
                }
            }
        }

        uint256 ethBalance = address(this).balance;
        if (ethBalance > 0) {
            for (
                uint256 payeeIndex = 0;
                payeeIndex < _payeesCount;
                payeeIndex++
            ) {
                address _payee = payee(payeeIndex);
                release(payable(_payee));
            }
        }
    }

    // Function to receive ether, msg.data must be empty
    receive() external payable override {
        releaseAll();
        emit PaymentReceivedOnRC(msg.sender, msg.value);
    }
}

File 6 of 21 : 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 7 of 21 : 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 8 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 9 of 21 : 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 10 of 21 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 11 of 21 : 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 12 of 21 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 13 of 21 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 14 of 21 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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`.
     *
     * 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;

    /**
     * @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 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 15 of 21 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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 16 of 21 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

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

File 18 of 21 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/introspection/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 paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 20 of 21 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `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 Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @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 payment = releasable(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 payment = releasable(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 21 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_initBaseURI","type":"string"},{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint256[]","name":"_splits","type":"uint256[]"},{"internalType":"address[]","name":"_tokens","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoyaltyERC20Tokens","outputs":[{"internalType":"address[]","name":"tokens","type":"address[]"}],"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":[],"name":"isMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"participantsRoyaltyContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"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":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_status","type":"bool"}],"name":"setMintingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokens","type":"address[]"}],"name":"setRoyaltyERC20Tokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"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":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","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":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040526007805460ff191690553480156200001b57600080fd5b5060405162003f5b38038062003f5b8339810160408190526200003e916200045c565b858560006200004e8382620005f2565b5060016200005d8282620005f2565b5050506200007a620000746200010a60201b60201c565b6200010e565b60016006556200008a8462000160565b80516200009f90600a906020840190620001dd565b50828230604051620000b19062000247565b620000bf93929190620006be565b604051809103906000f080158015620000dc573d6000803e3d6000fd5b50600980546001600160a01b0319166001600160a01b0392909216919091179055506200075d945050505050565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200016a6200017c565b6008620001788282620005f2565b5050565b6005546001600160a01b03163314620001db5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640160405180910390fd5b565b82805482825590600052602060002090810192821562000235579160200282015b828111156200023557825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620001fe565b506200024392915062000255565b5090565b61157f80620029dc83390190565b5b8082111562000243576000815560010162000256565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002ad57620002ad6200026c565b604052919050565b600082601f830112620002c757600080fd5b81516001600160401b03811115620002e357620002e36200026c565b6020620002f9601f8301601f1916820162000282565b82815285828487010111156200030e57600080fd5b60005b838110156200032e57858101830151828201840152820162000311565b83811115620003405760008385840101525b5095945050505050565b60006001600160401b038211156200036657620003666200026c565b5060051b60200190565b600082601f8301126200038257600080fd5b815160206200039b62000395836200034a565b62000282565b82815260059290921b84018101918181019086841115620003bb57600080fd5b8286015b84811015620003ef5780516001600160a01b0381168114620003e15760008081fd5b8352918301918301620003bf565b509695505050505050565b600082601f8301126200040c57600080fd5b815160206200041f62000395836200034a565b82815260059290921b840181019181810190868411156200043f57600080fd5b8286015b84811015620003ef578051835291830191830162000443565b60008060008060008060c087890312156200047657600080fd5b86516001600160401b03808211156200048e57600080fd5b6200049c8a838b01620002b5565b97506020890151915080821115620004b357600080fd5b620004c18a838b01620002b5565b96506040890151915080821115620004d857600080fd5b620004e68a838b01620002b5565b95506060890151915080821115620004fd57600080fd5b6200050b8a838b0162000370565b945060808901519150808211156200052257600080fd5b620005308a838b01620003fa565b935060a08901519150808211156200054757600080fd5b506200055689828a0162000370565b9150509295509295509295565b600181811c908216806200057857607f821691505b6020821081036200059957634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620005ed57600081815260208120601f850160051c81016020861015620005c85750805b601f850160051c820191505b81811015620005e957828155600101620005d4565b5050505b505050565b81516001600160401b038111156200060e576200060e6200026c565b62000626816200061f845462000563565b846200059f565b602080601f8311600181146200065e5760008415620006455750858301515b600019600386901b1c1916600185901b178555620005e9565b600085815260208120601f198616915b828110156200068f578886015182559484019460019091019084016200066e565b5085821015620006ae5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b606080825284519082018190526000906020906080840190828801845b82811015620007025781516001600160a01b031684529284019290840190600101620006db565b5050508381038285015285518082528683019183019060005b8181101562000739578351835292840192918401916001016200071b565b50506001600160a01b0386166040860152925062000755915050565b949350505050565b61226f806200076d6000396000f3fe6080604052600436106101dc5760003560e01c806355f804b31161010257806395d89b4111610095578063c87b56dd11610064578063c87b56dd1461055b578063cd3293de1461057b578063e985e9c514610590578063f2fde38b146105d957600080fd5b806395d89b41146104e4578063a22cb465146104f9578063aaf6d56d14610519578063b88d4fde1461053b57600080fd5b8063715018a6116100d1578063715018a6146104645780637420aa36146104795780638462151c146104995780638da5cb5b146104c657600080fd5b806355f804b3146103ea5780636352211e1461040a5780636ac437b01461042a57806370a082311461044457600080fd5b80632a55205a1161017a5780633ccfd60b116101495780633ccfd60b1461038257806342842e0e1461038a5780634a8ac6ce146103aa5780634f6ccce7146103ca57600080fd5b80632a55205a146102ed5780632f745c591461032c578063321824031461034c57806332cb6b0c1461036c57600080fd5b8063095ea7b3116101b6578063095ea7b3146102775780631249c58b1461029957806318160ddd146102ae57806323b872dd146102cd57600080fd5b806301ffc9a7146101e857806306fdde031461021d578063081812fc1461023f57600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611a3e565b6105f9565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b50610232610624565b6040516102149190611ab3565b34801561024b57600080fd5b5061025f61025a366004611ac6565b6106b6565b6040516001600160a01b039091168152602001610214565b34801561028357600080fd5b50610297610292366004611afb565b610743565b005b3480156102a557600080fd5b50610297610858565b3480156102ba57600080fd5b506002545b604051908152602001610214565b3480156102d957600080fd5b506102976102e8366004611b25565b61094e565b3480156102f957600080fd5b5061030d610308366004611b61565b61097f565b604080516001600160a01b039093168352602083019190915201610214565b34801561033857600080fd5b506102bf610347366004611afb565b6109b4565b34801561035857600080fd5b5060095461025f906001600160a01b031681565b34801561037857600080fd5b506102bf610d0581565b610297610a62565b34801561039657600080fd5b506102976103a5366004611b25565b610c71565b3480156103b657600080fd5b506102976103c5366004611b83565b610c8c565b3480156103d657600080fd5b506102bf6103e5366004611ac6565b610ca0565b3480156103f657600080fd5b50610297610405366004611c84565b610cfd565b34801561041657600080fd5b5061025f610425366004611ac6565b610d15565b34801561043657600080fd5b506007546102089060ff1681565b34801561045057600080fd5b506102bf61045f366004611ccd565b610da1565b34801561047057600080fd5b50610297610e73565b34801561048557600080fd5b50610297610494366004611cf6565b610e87565b3480156104a557600080fd5b506104b96104b4366004611ccd565b610ea2565b6040516102149190611d13565b3480156104d257600080fd5b506005546001600160a01b031661025f565b3480156104f057600080fd5b50610232610f6c565b34801561050557600080fd5b50610297610514366004611d57565b610f7b565b34801561052557600080fd5b5061052e61103f565b6040516102149190611d8e565b34801561054757600080fd5b50610297610556366004611dcf565b6110a0565b34801561056757600080fd5b50610232610576366004611ac6565b6110d8565b34801561058757600080fd5b5061029761117e565b34801561059c57600080fd5b506102086105ab366004611e4b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b3480156105e557600080fd5b506102976105f4366004611ccd565b6111be565b60006001600160e01b0319821663152a902d60e11b148061061e575061061e82611234565b92915050565b60606000805461063390611e7e565b80601f016020809104026020016040519081016040528092919081815260200182805461065f90611e7e565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b5050505050905090565b60006106c182611259565b6107275760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061074e82610d15565b9050806001600160a01b0316836001600160a01b0316036107bb5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161071e565b336001600160a01b03821614806107d757506107d781336105ab565b6108495760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161071e565b61085383836112a3565b505050565b60075460ff1661089d5760405162461bcd60e51b815260206004820152601060248201526f4d696e74696e674e6f7441637469766560801b604482015260640161071e565b6108a633610da1565b156108e35760405162461bcd60e51b815260206004820152600d60248201526c27b732a832b92bb0b63632ba1760991b604482015260640161071e565b60006108ee60025490565b9050610d056108fe826001611ece565b11156109375760405162461bcd60e51b815260206004820152600860248201526714dbdb190813dd5d60c21b604482015260640161071e565b61094b33610946836001611ece565b611311565b50565b6109583382611439565b6109745760405162461bcd60e51b815260040161071e90611ee6565b610853838383611523565b60095460009081906001600160a01b031661271061099f6101f486611f37565b6109a99190611f6c565b915091509250929050565b60006109bf83610da1565b82106109dd5760405162461bcd60e51b815260040161071e90611f80565b6000805b600254811015610a4957600281815481106109fe576109fe611fb0565b6000918252602090912001546001600160a01b0390811690861603610a3957838203610a2d57915061061e9050565b610a3682611fc6565b91505b610a4281611fc6565b90506109e1565b5060405162461bcd60e51b815260040161071e90611f80565b60005b600a54811015610bd9576000600a8281548110610a8457610a84611fb0565b60009182526020822001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190611fdf565b90508015610bc45760095460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905260009184169063a9059cbb906044016020604051808303816000875af1158015610b58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7c9190611ff8565b905080610bc25760405162461bcd60e51b815260206004820152601460248201527322a92199182a3930b739b332b92330b4b632b21760611b604482015260640161071e565b505b50508080610bd190611fc6565b915050610a65565b506009546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610c27576040519150601f19603f3d011682016040523d82523d6000602084013e610c2c565b606091505b505090508061094b5760405162461bcd60e51b8152602060048201526011602482015270115512151c985b9cd9995c91985a5b1959607a1b604482015260640161071e565b610853838383604051806020016040528060008152506110a0565b610c94611679565b610853600a83836119b9565b6000610cab60025490565b8210610cf95760405162461bcd60e51b815260206004820152601760248201527f455243373231456e756d3a20676c6f62616c20696f6f62000000000000000000604482015260640161071e565b5090565b610d05611679565b6008610d118282612063565b5050565b60008060028381548110610d2b57610d2b611fb0565b6000918252602090912001546001600160a01b031690508061061e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161071e565b60006001600160a01b038216610e0c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161071e565b600254600090815b81811015610e6a5760028181548110610e2f57610e2f611fb0565b6000918252602090912001546001600160a01b0390811690861603610e5a57610e5783611fc6565b92505b610e6381611fc6565b9050610e14565b50909392505050565b610e7b611679565b610e8560006116d3565b565b610e8f611679565b6007805460ff1916911515919091179055565b6060610ead82610da1565b600010610ecc5760405162461bcd60e51b815260040161071e90611f80565b6000610ed783610da1565b905060008167ffffffffffffffff811115610ef457610ef4611bf8565b604051908082528060200260200182016040528015610f1d578160200160208202803683370190505b50905060005b82811015610f6457610f3585826109b4565b828281518110610f4757610f47611fb0565b602090810291909101015280610f5c81611fc6565b915050610f23565b509392505050565b60606001805461063390611e7e565b336001600160a01b03831603610fd35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161071e565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060600a8054806020026020016040519081016040528092919081815260200182805480156106ac57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611079575050505050905090565b6110aa3383611439565b6110c65760405162461bcd60e51b815260040161071e90611ee6565b6110d284848484611725565b50505050565b60606110e382611259565b6111225760405162461bcd60e51b815260206004820152601060248201526f2737b732bc34b9ba32b73a2a37b5b2b760811b604482015260640161071e565b600061112c611758565b9050600081511161114c5760405180602001604052806000815250611177565b8061115684611767565b604051602001611167929190612123565b6040516020818303038152906040525b9392505050565b611186611679565b600061119160025490565b9050602160005b81811015610853576111ae336109468386611ece565b6111b781611fc6565b9050611198565b6111c6611679565b6001600160a01b03811661122b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071e565b61094b816116d3565b60006001600160e01b0319821663780e9d6360e01b148061061e575061061e82611868565b6002546000908210801561061e575060006001600160a01b03166002838154811061128657611286611fb0565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112d882610d15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166113675760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161071e565b61137081611259565b156113bd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161071e565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061144482611259565b6114a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161071e565b60006114b083610d15565b9050806001600160a01b0316846001600160a01b031614806114eb5750836001600160a01b03166114e0846106b6565b6001600160a01b0316145b8061151b57506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661153682610d15565b6001600160a01b03161461159e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161071e565b6001600160a01b0382166116005760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161071e565b61160b6000826112a3565b816002828154811061161f5761161f611fb0565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6005546001600160a01b03163314610e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161071e565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611730848484611523565b61173c848484846118b8565b6110d25760405162461bcd60e51b815260040161071e90612162565b60606008805461063390611e7e565b60608160000361178e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156117b857806117a281611fc6565b91506117b19050600a83611f6c565b9150611792565b60008167ffffffffffffffff8111156117d3576117d3611bf8565b6040519080825280601f01601f1916602001820160405280156117fd576020820181803683370190505b5090505b841561151b576118126001836121b4565b915061181f600a866121cb565b61182a906030611ece565b60f81b81838151811061183f5761183f611fb0565b60200101906001600160f81b031916908160001a905350611861600a86611f6c565b9450611801565b60006001600160e01b031982166380ac58cd60e01b148061189957506001600160e01b03198216635b5e139f60e01b145b8061061e57506301ffc9a760e01b6001600160e01b031983161461061e565b60006001600160a01b0384163b156119ae57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906118fc9033908990889088906004016121df565b6020604051808303816000875af1925050508015611937575060408051601f3d908101601f191682019092526119349181019061221c565b60015b611994573d808015611965576040519150601f19603f3d011682016040523d82523d6000602084013e61196a565b606091505b50805160000361198c5760405162461bcd60e51b815260040161071e90612162565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061151b565b506001949350505050565b828054828255906000526020600020908101928215611a0c579160200282015b82811115611a0c5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906119d9565b50610cf99291505b80821115610cf95760008155600101611a14565b6001600160e01b03198116811461094b57600080fd5b600060208284031215611a5057600080fd5b813561117781611a28565b60005b83811015611a76578181015183820152602001611a5e565b838111156110d25750506000910152565b60008151808452611a9f816020860160208601611a5b565b601f01601f19169290920160200192915050565b6020815260006111776020830184611a87565b600060208284031215611ad857600080fd5b5035919050565b80356001600160a01b0381168114611af657600080fd5b919050565b60008060408385031215611b0e57600080fd5b611b1783611adf565b946020939093013593505050565b600080600060608486031215611b3a57600080fd5b611b4384611adf565b9250611b5160208501611adf565b9150604084013590509250925092565b60008060408385031215611b7457600080fd5b50508035926020909101359150565b60008060208385031215611b9657600080fd5b823567ffffffffffffffff80821115611bae57600080fd5b818501915085601f830112611bc257600080fd5b813581811115611bd157600080fd5b8660208260051b8501011115611be657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611c2957611c29611bf8565b604051601f8501601f19908116603f01168101908282118183101715611c5157611c51611bf8565b81604052809350858152868686011115611c6a57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611c9657600080fd5b813567ffffffffffffffff811115611cad57600080fd5b8201601f81018413611cbe57600080fd5b61151b84823560208401611c0e565b600060208284031215611cdf57600080fd5b61117782611adf565b801515811461094b57600080fd5b600060208284031215611d0857600080fd5b813561117781611ce8565b6020808252825182820181905260009190848201906040850190845b81811015611d4b57835183529284019291840191600101611d2f565b50909695505050505050565b60008060408385031215611d6a57600080fd5b611d7383611adf565b91506020830135611d8381611ce8565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611d4b5783516001600160a01b031683529284019291840191600101611daa565b60008060008060808587031215611de557600080fd5b611dee85611adf565b9350611dfc60208601611adf565b925060408501359150606085013567ffffffffffffffff811115611e1f57600080fd5b8501601f81018713611e3057600080fd5b611e3f87823560208401611c0e565b91505092959194509250565b60008060408385031215611e5e57600080fd5b611e6783611adf565b9150611e7560208401611adf565b90509250929050565b600181811c90821680611e9257607f821691505b602082108103611eb257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ee157611ee1611eb8565b500190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000816000190483118215151615611f5157611f51611eb8565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611f7b57611f7b611f56565b500490565b60208082526016908201527522a9219b9918a2b73ab69d1037bbb732b91034b7b7b160511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060018201611fd857611fd8611eb8565b5060010190565b600060208284031215611ff157600080fd5b5051919050565b60006020828403121561200a57600080fd5b815161117781611ce8565b601f82111561085357600081815260208120601f850160051c8101602086101561203c5750805b601f850160051c820191505b8181101561205b57828155600101612048565b505050505050565b815167ffffffffffffffff81111561207d5761207d611bf8565b6120918161208b8454611e7e565b84612015565b602080601f8311600181146120c657600084156120ae5750858301515b600019600386901b1c1916600185901b17855561205b565b600085815260208120601f198616915b828110156120f5578886015182559484019460019091019084016120d6565b50858210156121135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351612135818460208801611a5b565b835190830190612149818360208801611a5b565b64173539b7b760d91b9101908152600501949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000828210156121c6576121c6611eb8565b500390565b6000826121da576121da611f56565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061221290830184611a87565b9695505050505050565b60006020828403121561222e57600080fd5b815161117781611a2856fea2646970667358221220cfa1974865d27388d3e5389d2c08e4bfd832fcb773c4d2aa08f13f7847396bd064736f6c634300080f003360a06040523480156200001157600080fd5b506040516200157f3803806200157f8339810160408190526200003491620004ef565b82828051825114620000a85760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000fb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200009f565b60005b8251811015620001675762000152838281518110620001215762000121620005d1565b60200260200101518383815181106200013e576200013e620005d1565b60200260200101516200020460201b60201c565b806200015e81620005fd565b915050620000fe565b5050508151835114620001ae5760405162461bcd60e51b815260206004820152600e60248201526d098cadccee8d09ad2e6dac2e8c6d60931b60448201526064016200009f565b6000835111620001ec5760405162461bcd60e51b81526020600482015260086024820152674e6f50617965657360c01b60448201526064016200009f565b9151600755506001600160a01b031660805262000634565b6001600160a01b038216620002715760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200009f565b60008111620002c35760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200009f565b6001600160a01b038216600090815260026020526040902054156200033f5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200009f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b038416908117909155600090815260026020526040812082905554620003a790829062000619565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620004315762000431620003f0565b604052919050565b60006001600160401b03821115620004555762000455620003f0565b5060051b60200190565b80516001600160a01b03811681146200047757600080fd5b919050565b600082601f8301126200048e57600080fd5b81516020620004a7620004a18362000439565b62000406565b82815260059290921b84018101918181019086841115620004c757600080fd5b8286015b84811015620004e45780518352918301918301620004cb565b509695505050505050565b6000806000606084860312156200050557600080fd5b83516001600160401b03808211156200051d57600080fd5b818601915086601f8301126200053257600080fd5b8151602062000545620004a18362000439565b82815260059290921b8401810191818101908a8411156200056557600080fd5b948201945b838610156200058e576200057e866200045f565b825294820194908201906200056a565b91890151919750909350505080821115620005a857600080fd5b50620005b7868287016200047c565b925050620005c8604085016200045f565b90509250925092565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201620006125762000612620005e7565b5060010190565b600082198211156200062f576200062f620005e7565b500190565b608051610f2f6200065060003960006102de0152610f2f6000f3fe6080604052600436106100ab5760003560e01c80639852595c116100645780639852595c146101e3578063a3f8eace14610219578063c45ac05014610239578063ce7c2ac214610259578063d79779b21461028f578063e33b7de3146102c557600080fd5b806319165587146100f75780633a98ef3914610119578063406072a91461013d57806348b75044146101835780635be7fde8146101a35780638b83209b146101ab57600080fd5b366100f2576100b86102da565b604080513381523460208201527f6697ed6847d2dc788fba4a9fd0b1a0715d0c93b4ea473a108985641b4b4c2896910160405180910390a1005b600080fd5b34801561010357600080fd5b50610117610112366004610b9f565b610493565b005b34801561012557600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014957600080fd5b5061012a610158366004610bbc565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b34801561018f57600080fd5b5061011761019e366004610bbc565b610595565b6101176102da565b3480156101b757600080fd5b506101cb6101c6366004610bf5565b6106b8565b6040516001600160a01b039091168152602001610134565b3480156101ef57600080fd5b5061012a6101fe366004610b9f565b6001600160a01b031660009081526003602052604090205490565b34801561022557600080fd5b5061012a610234366004610b9f565b6106e8565b34801561024557600080fd5b5061012a610254366004610bbc565b610730565b34801561026557600080fd5b5061012a610274366004610b9f565b6001600160a01b031660009081526002602052604090205490565b34801561029b57600080fd5b5061012a6102aa366004610b9f565b6001600160a01b031660009081526005602052604090205490565b3480156102d157600080fd5b5060015461012a565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663aaf6d56d6040518163ffffffff1660e01b8152600401600060405180830381865afa15801561033a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103629190810190610c34565b905060005b815181101561044f57600082828151811061038457610384610cf9565b60209081029190910101516040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa1580156103d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fd9190610d0f565b111561043c5760005b60075481101561043a57600061041b826106b8565b90506104278382610595565b508061043281610d3e565b915050610406565b505b508061044781610d3e565b915050610367565b5047801561048f5760005b60075481101561048d57600061046f826106b8565b905061047a81610493565b508061048581610d3e565b91505061045a565b505b5050565b6001600160a01b0381166000908152600260205260409020546104d15760405162461bcd60e51b81526004016104c890610d57565b60405180910390fd5b60006104dc826106e8565b9050806000036104fe5760405162461bcd60e51b81526004016104c890610d9d565b6001600160a01b03821660009081526003602052604081208054839290610526908490610de8565b92505081905550806001600082825461053f9190610de8565b9091555061054f905082826107fb565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b6001600160a01b0381166000908152600260205260409020546105ca5760405162461bcd60e51b81526004016104c890610d57565b60006105d68383610730565b9050806000036105f85760405162461bcd60e51b81526004016104c890610d9d565b6001600160a01b0380841660009081526006602090815260408083209386168352929052908120805483929061062f908490610de8565b90915550506001600160a01b0383166000908152600560205260408120805483929061065c908490610de8565b9091555061066d9050838383610914565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b6000600482815481106106cd576106cd610cf9565b6000918252602090912001546001600160a01b031692915050565b6000806106f460015490565b6106fe9047610de8565b90506107298382610724866001600160a01b031660009081526003602052604090205490565b610966565b9392505050565b6001600160a01b03821660009081526005602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa15801561078f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b39190610d0f565b6107bd9190610de8565b6001600160a01b038086166000908152600660209081526040808320938816835292905220549091506107f39084908390610966565b949350505050565b8047101561084b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016104c8565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610898576040519150601f19603f3d011682016040523d82523d6000602084013e61089d565b606091505b505090508061048d5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016104c8565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261048d9084906109a1565b600080546001600160a01b03851682526002602052604082205483919061098d9086610e00565b6109979190610e1f565b6107f39190610e41565b60006109f6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610a739092919063ffffffff16565b80519091501561048d5780806020019051810190610a149190610e58565b61048d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104c8565b60606107f38484600085856001600160a01b0385163b610ad55760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104c8565b600080866001600160a01b03168587604051610af19190610eaa565b60006040518083038185875af1925050503d8060008114610b2e576040519150601f19603f3d011682016040523d82523d6000602084013e610b33565b606091505b5091509150610b43828286610b4e565b979650505050505050565b60608315610b5d575081610729565b825115610b6d5782518084602001fd5b8160405162461bcd60e51b81526004016104c89190610ec6565b6001600160a01b0381168114610b9c57600080fd5b50565b600060208284031215610bb157600080fd5b813561072981610b87565b60008060408385031215610bcf57600080fd5b8235610bda81610b87565b91506020830135610bea81610b87565b809150509250929050565b600060208284031215610c0757600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b8051610c2f81610b87565b919050565b60006020808385031215610c4757600080fd5b825167ffffffffffffffff80821115610c5f57600080fd5b818501915085601f830112610c7357600080fd5b815181811115610c8557610c85610c0e565b8060051b604051601f19603f83011681018181108582111715610caa57610caa610c0e565b604052918252848201925083810185019188831115610cc857600080fd5b938501935b82851015610ced57610cde85610c24565b84529385019392850192610ccd565b98975050505050505050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215610d2157600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600060018201610d5057610d50610d28565b5060010190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60008219821115610dfb57610dfb610d28565b500190565b6000816000190483118215151615610e1a57610e1a610d28565b500290565b600082610e3c57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015610e5357610e53610d28565b500390565b600060208284031215610e6a57600080fd5b8151801515811461072957600080fd5b60005b83811015610e95578181015183820152602001610e7d565b83811115610ea4576000848401525b50505050565b60008251610ebc818460208701610e7a565b9190910192915050565b6020815260008251806020840152610ee5816040850160208701610e7a565b601f01601f1916919091016040019291505056fea26469706673582212201f0b41d215ee6025d5d0cb2a9697fa3e9c5d19802468f8a435c45db0363c894064736f6c634300080f003300000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000c5041525449434950414e54530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c5041525449434950414e5453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e7f7001cdad37ff79e79617d9219296c23270080000000000000000000000000059f0f7a644a813f2c716e64f3ed23fa0e8e3d6d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106101dc5760003560e01c806355f804b31161010257806395d89b4111610095578063c87b56dd11610064578063c87b56dd1461055b578063cd3293de1461057b578063e985e9c514610590578063f2fde38b146105d957600080fd5b806395d89b41146104e4578063a22cb465146104f9578063aaf6d56d14610519578063b88d4fde1461053b57600080fd5b8063715018a6116100d1578063715018a6146104645780637420aa36146104795780638462151c146104995780638da5cb5b146104c657600080fd5b806355f804b3146103ea5780636352211e1461040a5780636ac437b01461042a57806370a082311461044457600080fd5b80632a55205a1161017a5780633ccfd60b116101495780633ccfd60b1461038257806342842e0e1461038a5780634a8ac6ce146103aa5780634f6ccce7146103ca57600080fd5b80632a55205a146102ed5780632f745c591461032c578063321824031461034c57806332cb6b0c1461036c57600080fd5b8063095ea7b3116101b6578063095ea7b3146102775780631249c58b1461029957806318160ddd146102ae57806323b872dd146102cd57600080fd5b806301ffc9a7146101e857806306fdde031461021d578063081812fc1461023f57600080fd5b366101e357005b600080fd5b3480156101f457600080fd5b50610208610203366004611a3e565b6105f9565b60405190151581526020015b60405180910390f35b34801561022957600080fd5b50610232610624565b6040516102149190611ab3565b34801561024b57600080fd5b5061025f61025a366004611ac6565b6106b6565b6040516001600160a01b039091168152602001610214565b34801561028357600080fd5b50610297610292366004611afb565b610743565b005b3480156102a557600080fd5b50610297610858565b3480156102ba57600080fd5b506002545b604051908152602001610214565b3480156102d957600080fd5b506102976102e8366004611b25565b61094e565b3480156102f957600080fd5b5061030d610308366004611b61565b61097f565b604080516001600160a01b039093168352602083019190915201610214565b34801561033857600080fd5b506102bf610347366004611afb565b6109b4565b34801561035857600080fd5b5060095461025f906001600160a01b031681565b34801561037857600080fd5b506102bf610d0581565b610297610a62565b34801561039657600080fd5b506102976103a5366004611b25565b610c71565b3480156103b657600080fd5b506102976103c5366004611b83565b610c8c565b3480156103d657600080fd5b506102bf6103e5366004611ac6565b610ca0565b3480156103f657600080fd5b50610297610405366004611c84565b610cfd565b34801561041657600080fd5b5061025f610425366004611ac6565b610d15565b34801561043657600080fd5b506007546102089060ff1681565b34801561045057600080fd5b506102bf61045f366004611ccd565b610da1565b34801561047057600080fd5b50610297610e73565b34801561048557600080fd5b50610297610494366004611cf6565b610e87565b3480156104a557600080fd5b506104b96104b4366004611ccd565b610ea2565b6040516102149190611d13565b3480156104d257600080fd5b506005546001600160a01b031661025f565b3480156104f057600080fd5b50610232610f6c565b34801561050557600080fd5b50610297610514366004611d57565b610f7b565b34801561052557600080fd5b5061052e61103f565b6040516102149190611d8e565b34801561054757600080fd5b50610297610556366004611dcf565b6110a0565b34801561056757600080fd5b50610232610576366004611ac6565b6110d8565b34801561058757600080fd5b5061029761117e565b34801561059c57600080fd5b506102086105ab366004611e4b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b3480156105e557600080fd5b506102976105f4366004611ccd565b6111be565b60006001600160e01b0319821663152a902d60e11b148061061e575061061e82611234565b92915050565b60606000805461063390611e7e565b80601f016020809104026020016040519081016040528092919081815260200182805461065f90611e7e565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b5050505050905090565b60006106c182611259565b6107275760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600360205260409020546001600160a01b031690565b600061074e82610d15565b9050806001600160a01b0316836001600160a01b0316036107bb5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161071e565b336001600160a01b03821614806107d757506107d781336105ab565b6108495760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161071e565b61085383836112a3565b505050565b60075460ff1661089d5760405162461bcd60e51b815260206004820152601060248201526f4d696e74696e674e6f7441637469766560801b604482015260640161071e565b6108a633610da1565b156108e35760405162461bcd60e51b815260206004820152600d60248201526c27b732a832b92bb0b63632ba1760991b604482015260640161071e565b60006108ee60025490565b9050610d056108fe826001611ece565b11156109375760405162461bcd60e51b815260206004820152600860248201526714dbdb190813dd5d60c21b604482015260640161071e565b61094b33610946836001611ece565b611311565b50565b6109583382611439565b6109745760405162461bcd60e51b815260040161071e90611ee6565b610853838383611523565b60095460009081906001600160a01b031661271061099f6101f486611f37565b6109a99190611f6c565b915091509250929050565b60006109bf83610da1565b82106109dd5760405162461bcd60e51b815260040161071e90611f80565b6000805b600254811015610a4957600281815481106109fe576109fe611fb0565b6000918252602090912001546001600160a01b0390811690861603610a3957838203610a2d57915061061e9050565b610a3682611fc6565b91505b610a4281611fc6565b90506109e1565b5060405162461bcd60e51b815260040161071e90611f80565b60005b600a54811015610bd9576000600a8281548110610a8457610a84611fb0565b60009182526020822001546040516370a0823160e01b81523060048201526001600160a01b03909116925082906370a0823190602401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190611fdf565b90508015610bc45760095460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810183905260009184169063a9059cbb906044016020604051808303816000875af1158015610b58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7c9190611ff8565b905080610bc25760405162461bcd60e51b815260206004820152601460248201527322a92199182a3930b739b332b92330b4b632b21760611b604482015260640161071e565b505b50508080610bd190611fc6565b915050610a65565b506009546040516000916001600160a01b03169047908381818185875af1925050503d8060008114610c27576040519150601f19603f3d011682016040523d82523d6000602084013e610c2c565b606091505b505090508061094b5760405162461bcd60e51b8152602060048201526011602482015270115512151c985b9cd9995c91985a5b1959607a1b604482015260640161071e565b610853838383604051806020016040528060008152506110a0565b610c94611679565b610853600a83836119b9565b6000610cab60025490565b8210610cf95760405162461bcd60e51b815260206004820152601760248201527f455243373231456e756d3a20676c6f62616c20696f6f62000000000000000000604482015260640161071e565b5090565b610d05611679565b6008610d118282612063565b5050565b60008060028381548110610d2b57610d2b611fb0565b6000918252602090912001546001600160a01b031690508061061e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161071e565b60006001600160a01b038216610e0c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161071e565b600254600090815b81811015610e6a5760028181548110610e2f57610e2f611fb0565b6000918252602090912001546001600160a01b0390811690861603610e5a57610e5783611fc6565b92505b610e6381611fc6565b9050610e14565b50909392505050565b610e7b611679565b610e8560006116d3565b565b610e8f611679565b6007805460ff1916911515919091179055565b6060610ead82610da1565b600010610ecc5760405162461bcd60e51b815260040161071e90611f80565b6000610ed783610da1565b905060008167ffffffffffffffff811115610ef457610ef4611bf8565b604051908082528060200260200182016040528015610f1d578160200160208202803683370190505b50905060005b82811015610f6457610f3585826109b4565b828281518110610f4757610f47611fb0565b602090810291909101015280610f5c81611fc6565b915050610f23565b509392505050565b60606001805461063390611e7e565b336001600160a01b03831603610fd35760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161071e565b3360008181526004602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060600a8054806020026020016040519081016040528092919081815260200182805480156106ac57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611079575050505050905090565b6110aa3383611439565b6110c65760405162461bcd60e51b815260040161071e90611ee6565b6110d284848484611725565b50505050565b60606110e382611259565b6111225760405162461bcd60e51b815260206004820152601060248201526f2737b732bc34b9ba32b73a2a37b5b2b760811b604482015260640161071e565b600061112c611758565b9050600081511161114c5760405180602001604052806000815250611177565b8061115684611767565b604051602001611167929190612123565b6040516020818303038152906040525b9392505050565b611186611679565b600061119160025490565b9050602160005b81811015610853576111ae336109468386611ece565b6111b781611fc6565b9050611198565b6111c6611679565b6001600160a01b03811661122b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161071e565b61094b816116d3565b60006001600160e01b0319821663780e9d6360e01b148061061e575061061e82611868565b6002546000908210801561061e575060006001600160a01b03166002838154811061128657611286611fb0565b6000918252602090912001546001600160a01b0316141592915050565b600081815260036020526040902080546001600160a01b0319166001600160a01b03841690811790915581906112d882610d15565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166113675760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161071e565b61137081611259565b156113bd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161071e565b6002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b0385169081179091556040518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600061144482611259565b6114a55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161071e565b60006114b083610d15565b9050806001600160a01b0316846001600160a01b031614806114eb5750836001600160a01b03166114e0846106b6565b6001600160a01b0316145b8061151b57506001600160a01b0380821660009081526004602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661153682610d15565b6001600160a01b03161461159e5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161071e565b6001600160a01b0382166116005760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161071e565b61160b6000826112a3565b816002828154811061161f5761161f611fb0565b6000918252602082200180546001600160a01b0319166001600160a01b03938416179055604051839285811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9190a4505050565b6005546001600160a01b03163314610e855760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161071e565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611730848484611523565b61173c848484846118b8565b6110d25760405162461bcd60e51b815260040161071e90612162565b60606008805461063390611e7e565b60608160000361178e5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156117b857806117a281611fc6565b91506117b19050600a83611f6c565b9150611792565b60008167ffffffffffffffff8111156117d3576117d3611bf8565b6040519080825280601f01601f1916602001820160405280156117fd576020820181803683370190505b5090505b841561151b576118126001836121b4565b915061181f600a866121cb565b61182a906030611ece565b60f81b81838151811061183f5761183f611fb0565b60200101906001600160f81b031916908160001a905350611861600a86611f6c565b9450611801565b60006001600160e01b031982166380ac58cd60e01b148061189957506001600160e01b03198216635b5e139f60e01b145b8061061e57506301ffc9a760e01b6001600160e01b031983161461061e565b60006001600160a01b0384163b156119ae57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906118fc9033908990889088906004016121df565b6020604051808303816000875af1925050508015611937575060408051601f3d908101601f191682019092526119349181019061221c565b60015b611994573d808015611965576040519150601f19603f3d011682016040523d82523d6000602084013e61196a565b606091505b50805160000361198c5760405162461bcd60e51b815260040161071e90612162565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061151b565b506001949350505050565b828054828255906000526020600020908101928215611a0c579160200282015b82811115611a0c5781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906119d9565b50610cf99291505b80821115610cf95760008155600101611a14565b6001600160e01b03198116811461094b57600080fd5b600060208284031215611a5057600080fd5b813561117781611a28565b60005b83811015611a76578181015183820152602001611a5e565b838111156110d25750506000910152565b60008151808452611a9f816020860160208601611a5b565b601f01601f19169290920160200192915050565b6020815260006111776020830184611a87565b600060208284031215611ad857600080fd5b5035919050565b80356001600160a01b0381168114611af657600080fd5b919050565b60008060408385031215611b0e57600080fd5b611b1783611adf565b946020939093013593505050565b600080600060608486031215611b3a57600080fd5b611b4384611adf565b9250611b5160208501611adf565b9150604084013590509250925092565b60008060408385031215611b7457600080fd5b50508035926020909101359150565b60008060208385031215611b9657600080fd5b823567ffffffffffffffff80821115611bae57600080fd5b818501915085601f830112611bc257600080fd5b813581811115611bd157600080fd5b8660208260051b8501011115611be657600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611c2957611c29611bf8565b604051601f8501601f19908116603f01168101908282118183101715611c5157611c51611bf8565b81604052809350858152868686011115611c6a57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215611c9657600080fd5b813567ffffffffffffffff811115611cad57600080fd5b8201601f81018413611cbe57600080fd5b61151b84823560208401611c0e565b600060208284031215611cdf57600080fd5b61117782611adf565b801515811461094b57600080fd5b600060208284031215611d0857600080fd5b813561117781611ce8565b6020808252825182820181905260009190848201906040850190845b81811015611d4b57835183529284019291840191600101611d2f565b50909695505050505050565b60008060408385031215611d6a57600080fd5b611d7383611adf565b91506020830135611d8381611ce8565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b81811015611d4b5783516001600160a01b031683529284019291840191600101611daa565b60008060008060808587031215611de557600080fd5b611dee85611adf565b9350611dfc60208601611adf565b925060408501359150606085013567ffffffffffffffff811115611e1f57600080fd5b8501601f81018713611e3057600080fd5b611e3f87823560208401611c0e565b91505092959194509250565b60008060408385031215611e5e57600080fd5b611e6783611adf565b9150611e7560208401611adf565b90509250929050565b600181811c90821680611e9257607f821691505b602082108103611eb257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611ee157611ee1611eb8565b500190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000816000190483118215151615611f5157611f51611eb8565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611f7b57611f7b611f56565b500490565b60208082526016908201527522a9219b9918a2b73ab69d1037bbb732b91034b7b7b160511b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600060018201611fd857611fd8611eb8565b5060010190565b600060208284031215611ff157600080fd5b5051919050565b60006020828403121561200a57600080fd5b815161117781611ce8565b601f82111561085357600081815260208120601f850160051c8101602086101561203c5750805b601f850160051c820191505b8181101561205b57828155600101612048565b505050505050565b815167ffffffffffffffff81111561207d5761207d611bf8565b6120918161208b8454611e7e565b84612015565b602080601f8311600181146120c657600084156120ae5750858301515b600019600386901b1c1916600185901b17855561205b565b600085815260208120601f198616915b828110156120f5578886015182559484019460019091019084016120d6565b50858210156121135787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008351612135818460208801611a5b565b835190830190612149818360208801611a5b565b64173539b7b760d91b9101908152600501949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000828210156121c6576121c6611eb8565b500390565b6000826121da576121da611f56565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061221290830184611a87565b9695505050505050565b60006020828403121561222e57600080fd5b815161117781611a2856fea2646970667358221220cfa1974865d27388d3e5389d2c08e4bfd832fcb773c4d2aa08f13f7847396bd064736f6c634300080f0033

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

00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000c5041525449434950414e54530000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c5041525449434950414e5453000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000e7f7001cdad37ff79e79617d9219296c23270080000000000000000000000000059f0f7a644a813f2c716e64f3ed23fa0e8e3d6d00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000007d00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _name (string): PARTICIPANTS
Arg [1] : _symbol (string): PARTICIPANTS
Arg [2] : _initBaseURI (string):
Arg [3] : _recipients (address[]): 0xe7F7001CDAD37ff79e79617d9219296C23270080,0x059f0F7A644a813F2C716E64F3eD23fA0E8e3d6D
Arg [4] : _splits (uint256[]): 8000,2000
Arg [5] : _tokens (address[]): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [7] : 5041525449434950414e54530000000000000000000000000000000000000000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [9] : 5041525449434950414e54530000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [12] : 000000000000000000000000e7f7001cdad37ff79e79617d9219296c23270080
Arg [13] : 000000000000000000000000059f0f7a644a813f2c716e64f3ed23fa0e8e3d6d
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [15] : 0000000000000000000000000000000000000000000000000000000000001f40
Arg [16] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


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.