ETH Price: $2,972.36 (+3.75%)
Gas: 1 Gwei

Contract

0xBf5cbdfc6ef9b56501edF1d4aC97bF021e595340
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Update Merkle Ro...170773252023-04-19 1:12:23444 days ago1681866743IN
0xBf5cbdfc...21e595340
0 ETH0.0141894647.05228746
Update Merkle Ro...170768892023-04-18 23:44:23444 days ago1681861463IN
0xBf5cbdfc...21e595340
0 ETH0.004368150
Update Merkle Ro...170742852023-04-18 14:55:35444 days ago1681829735IN
0xBf5cbdfc...21e595340
0 ETH0.0021358550
Claim168727472023-03-21 1:27:47473 days ago1679362067IN
0xBf5cbdfc...21e595340
0 ETH0.0016799916.07969255
Claim168725432023-03-21 0:46:35473 days ago1679359595IN
0xBf5cbdfc...21e595340
0 ETH0.0012511514.31383597
Claim168703392023-03-20 17:21:47473 days ago1679332907IN
0xBf5cbdfc...21e595340
0 ETH0.0026672730.23260849
Claim And Stake168702452023-03-20 17:02:47473 days ago1679331767IN
0xBf5cbdfc...21e595340
0 ETH0.0095522745.11218632
Claim And Stake168677172023-03-20 8:32:35473 days ago1679301155IN
0xBf5cbdfc...21e595340
0 ETH0.0031033813.61639563
Claim168673962023-03-20 7:28:11473 days ago1679297291IN
0xBf5cbdfc...21e595340
0 ETH0.0016270615.44366142
Claim168662992023-03-20 3:46:47474 days ago1679284007IN
0xBf5cbdfc...21e595340
0 ETH0.0012470814.13332841
Claim168647772023-03-19 22:38:35474 days ago1679265515IN
0xBf5cbdfc...21e595340
0 ETH0.0017813120.3911849
Claim And Stake168621902023-03-19 13:53:59474 days ago1679234039IN
0xBf5cbdfc...21e595340
0 ETH0.0029518713.93821861
Claim168588402023-03-19 2:36:59475 days ago1679193419IN
0xBf5cbdfc...21e595340
0 ETH0.0009093512.93888557
Claim168461232023-03-17 7:42:35476 days ago1679038955IN
0xBf5cbdfc...21e595340
0 ETH0.0016574515.73299585
Claim168366022023-03-15 23:38:23478 days ago1678923503IN
0xBf5cbdfc...21e595340
0 ETH0.0023229226.31879799
Claim168365882023-03-15 23:35:35478 days ago1678923335IN
0xBf5cbdfc...21e595340
0 ETH0.0025929929.37941395
Claim And Stake168297082023-03-15 0:19:59479 days ago1678839599IN
0xBf5cbdfc...21e595340
0 ETH0.0077122927.52494927
Claim And Stake167893522023-03-09 8:06:23484 days ago1678349183IN
0xBf5cbdfc...21e595340
0 ETH0.0052241124.67499234
Claim167819962023-03-08 7:16:11485 days ago1678259771IN
0xBf5cbdfc...21e595340
0 ETH0.0016794219.03700469
Claim And Stake167666342023-03-06 3:25:47488 days ago1678073147IN
0xBf5cbdfc...21e595340
0 ETH0.0065639731
Claim167641162023-03-05 18:57:11488 days ago1678042631IN
0xBf5cbdfc...21e595340
0 ETH0.0023261232.69922792
Claim And Stake167641142023-03-05 18:56:47488 days ago1678042607IN
0xBf5cbdfc...21e595340
0 ETH0.0072405934.19746439
Claim And Stake167636842023-03-05 17:29:23488 days ago1678037363IN
0xBf5cbdfc...21e595340
0 ETH0.0093647744.22246361
Claim And Stake167479022023-03-03 12:12:11490 days ago1677845531IN
0xBf5cbdfc...21e595340
0 ETH0.005243824.76330105
Claim167434792023-03-02 21:16:35491 days ago1677791795IN
0xBf5cbdfc...21e595340
0 ETH0.0021552330.66246836
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerkleDistributorSEV

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion, MIT license
File 1 of 24 : MerkleDistributorSEV.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/IMerkleDistributorSEV.sol";
import "./interfaces/IGovernance.sol";
import "./interfaces/IEdenNetwork.sol";
import "./lib/AccessControlEnumerable.sol";
import "./lib/MerkleProof.sol";
import "./lib/ERC721Enumerable.sol";

/**
 * @title MerkleDistributorSEV
 * @dev Distributes staker extractable value to stakers in the network. NFT serves as proof of distribution.
 * This is a modified version of the MerkleDistributor contract where the balance of tokens is forward-funded
 * rather than minted.
 */
contract MerkleDistributorSEV is IMerkleDistributorSEV, AccessControlEnumerable, ERC721Enumerable {

    /// @notice Role allowing the merkle root to be updated
    bytes32 public constant UPDATER_ROLE = keccak256("UPDATER_ROLE");

    /// @notice Role to slash earned rewards
    bytes32 public constant SLASHER_ROLE = keccak256("SLASHER_ROLE");

    /// @notice Token distributed by this contract
    IERC20Mintable public immutable override token;

    /// @notice Eden Network contract
    IEdenNetwork public edenNetwork;

    /// @notice Root of a merkle tree containing total earned amounts
    bytes32 public override merkleRoot;

    /// @notice Total number of distributions, also token id of the current distribution
    uint256 public override distributionCount;

    /// @notice Number of votes from updaters needed to apply a new root
    uint256 public updateThreshold;

    /// @notice Sum of all tokens in the distribution
    uint256 public tokenTotal;

    /// @notice Sum of all tokens still needing to be distributed
    uint256 public debtTotal;

    /// @notice Properties of each account -- totalEarned is stored in merkle tree
    struct AccountState {
        uint256 totalClaimed;
        uint256 totalSlashed;
    }

    /// @notice Account state
    mapping(address => AccountState) public override accountState;

    /// @notice Historical merkle roots
    mapping(bytes32 => bool) public override previousMerkleRoot;

    /// @dev Path to distribution metadata (including proofs)
    mapping(uint256 => string) private _tokenURI;

    /// @dev Votes for a new merkle root
    mapping(bytes32 => uint256) private _updateVotes;

    /// @dev Vote for new merkle root for each distribution
    mapping(address => mapping(uint256 => bytes32)) private _updaterVotes;

    /// @dev Modifier to restrict functions to only updaters
    modifier onlyUpdaters() {
        require(hasRole(UPDATER_ROLE, msg.sender), "MerkleDistributorSEV: Caller must have UPDATER_ROLE");
        _;
    }

    /// @dev Modifier to restrict functions to only slashers
    modifier onlySlashers() {
        require(hasRole(SLASHER_ROLE, msg.sender), "MerkleDistributorSEV: Caller must have SLASHER_ROLE");
        _;
    }

    /// @dev Modifier to restrict functions to only admins
    modifier onlyAdmins() {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "MerkleDistributorSEV: Caller must have DEFAULT_ADMIN_ROLE");
        _;
    }

    /**
     * @notice Create new MerkleDistributorSEV
     * @param _token Token address
     * @param _edenNetworkProxy Eden Network Proxy contract
     * @param _admin Admin address
     * @param _updateThreshold Number of updaters required to update
     * @param _updaters Initial updaters
     * @param _slashers Initial slashers
     */
    constructor(
        IERC20Mintable _token, 
        IEdenNetwork _edenNetworkProxy,
        address _admin, 
        uint8 _updateThreshold,
        address[] memory _updaters, 
        address[] memory _slashers
    ) ERC721("Eden Network SEV Distribution", "EDENSEVD") {
        token = _token;
        previousMerkleRoot[merkleRoot] = true;
        edenNetwork = _edenNetworkProxy;

        for(uint i; i< _updaters.length; i++) {
            _setupRole(UPDATER_ROLE, _updaters[i]);
        }

        _setUpdateThreshold(_updateThreshold);

        for(uint i; i< _slashers.length; i++) {
            _setupRole(SLASHER_ROLE, _slashers[i]);
        }

        _setupRole(DEFAULT_ADMIN_ROLE, _admin);

        emit DebtChanged(0, 0);
    }

    /**
     * @notice Add updaters and modify threshold
     * @dev The caller must have the `DEFAULT_ADMIN_ROLE`
     * @param newUpdaters New updater addresses
     * @param newThreshold New threshold
     */
    function addUpdaters(address[] memory newUpdaters, uint256 newThreshold) onlyAdmins external override {
        for(uint i; i< newUpdaters.length; i++) {
            _setupRole(UPDATER_ROLE, newUpdaters[i]);
        }
        _setUpdateThreshold(newThreshold);
    }

    /**
     * @notice Remove updaters and modify threshold
     * @dev The caller must have the `DEFAULT_ADMIN_ROLE`
     * @param existingUpdaters Existing updater addresses
     * @param newThreshold New threshold
     */
    function removeUpdaters(address[] memory existingUpdaters, uint256 newThreshold) onlyAdmins external override {
        for(uint i; i< existingUpdaters.length; i++) {
            _revokeRole(UPDATER_ROLE, existingUpdaters[i]);
        }
        _setUpdateThreshold(newThreshold);
    }

    /**
     * @notice Change the update threshold
     * @dev The caller must have the `DEFAULT_ADMIN_ROLE`
     * @param to New threshold
     */
    function setUpdateThreshold(uint256 to) onlyAdmins external override {
        _setUpdateThreshold(to);
    }

    /**
     * @notice Claim all unclaimed tokens
     * @dev Given a merkle proof of (index, account, totalEarned), claim all
     * unclaimed tokens. Unclaimed tokens are the difference between the total
     * earned tokens (provided in the merkle tree) and those that have been
     * either claimed or slashed.
     *
     * If no tokens are claimable, this function will revert.
     * 
     * @param index Claim index
     * @param account Account for claim
     * @param totalEarned Total lifetime amount of tokens earned by account
     * @param merkleProof Merkle proof
     */
    function claim(uint256 index, address account, uint256 totalEarned, bytes32[] calldata merkleProof) external override {
        require(msg.sender == account, "MerkleDistributorSEV: Cannot collect rewards");

        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, totalEarned));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), "MerkleDistributorSEV: Invalid proof");

        // Calculate the claimable balance
        uint256 alreadyDistributed = accountState[account].totalClaimed + accountState[account].totalSlashed;
        require(totalEarned > alreadyDistributed, "MerkleDistributorSEV: Nothing claimable");
        uint256 claimable = totalEarned - alreadyDistributed;
        emit Claimed(index, totalEarned, account, claimable);

        // Apply account changes and transfer unclaimed tokens
        _increaseAccount(account, claimable, 0);
        require(token.transfer(msg.sender, claimable), "MerkleDistributorSEV: Transfer failed");
    }

    /**
     * @notice Claim all unclaimed tokens + stake them
     * @dev Given a merkle proof of (index, account, totalEarned), claim all
     * unclaimed tokens. Unclaimed tokens are the difference between the total
     * earned tokens (provided in the merkle tree) and those that have been
     * either claimed or slashed.
     *
     * If no tokens are claimable, this function will revert.
     * 
     * @param index Claim index
     * @param account Account for claim
     * @param totalEarned Total lifetime amount of tokens earned by account
     * @param merkleProof Merkle proof
     */
    function claimAndStake(uint256 index, address account, uint256 totalEarned, bytes32[] calldata merkleProof) external override {
        require(msg.sender == account, "MerkleDistributorSEV: Cannot collect rewards");
        require(token.allowance(address(this), address(edenNetwork)) == 0, "MerkleDistributorSEV: allowance > 0");

        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, totalEarned));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), "MerkleDistributorSEV: Invalid proof");

        // Calculate the claimable balance
        uint256 alreadyDistributed = accountState[account].totalClaimed + accountState[account].totalSlashed;
        require(totalEarned > alreadyDistributed, "MerkleDistributorSEV: Nothing claimable");
        uint256 claimable = totalEarned - alreadyDistributed;
        emit Claimed(index, totalEarned, account, claimable);

        // Apply account changes and stake unclaimed tokens
        _increaseAccount(account, claimable, 0);
        token.approve(address(edenNetwork), claimable);
        edenNetwork.stakeFor(msg.sender, uint128(claimable));
    }

    /**
     * @notice Set a new merkle root and mints NFT with metadata URI to retreive the full tree
     * @dev The caller must have `UPDATER_ROLE`
     * @param newMerkleRoot Merkle root
     * @param uri NFT uri
     * @param newDistributionNumber Number of distribution
     * @param newTokenTotal Sum of all tokens, by convention the zero-key (0x0) in the merkle tree
     */
    function updateMerkleRoot(bytes32 newMerkleRoot, string calldata uri, uint256 newDistributionNumber, uint256 newTokenTotal) external override onlyUpdaters returns (uint256) {
        require(!previousMerkleRoot[newMerkleRoot], "MerkleDistributorSEV: Cannot update to a previous merkle root");
        uint256 distributionNumber = distributionCount + 1;
        require(distributionNumber == newDistributionNumber, "MerkleDistributorSEV: Can only update next distribution");
        require(_updaterVotes[msg.sender][distributionNumber] == bytes32(0), "MerkleDistributorSEV: Updater already submitted new root");

        require(newTokenTotal >= tokenTotal, "MerkleDistributorSEV: Total tokens cannot decrease");
        uint256 debtIncrease = newTokenTotal - tokenTotal;
        require(token.balanceOf(address(this)) >= debtTotal + debtIncrease, "MerkleDistributorSEV: Distribution would leave contract underfunded");

        _updaterVotes[msg.sender][distributionNumber] = newMerkleRoot;
        uint256 votes = _updateVotes[newMerkleRoot] + 1;
        _updateVotes[newMerkleRoot] = votes;

        if (votes == updateThreshold) {
            merkleRoot = newMerkleRoot;
            previousMerkleRoot[newMerkleRoot] = true;
            distributionCount = distributionNumber;
            _tokenURI[distributionNumber] = uri;
            tokenTotal = newTokenTotal;
            uint256 oldDebt = debtTotal;
            debtTotal += debtIncrease;

            _mint(msg.sender, distributionNumber);
            emit PermanentURI(uri, distributionNumber);
            emit MerkleRootUpdated(newMerkleRoot, distributionNumber, uri, newTokenTotal);
            emit DebtChanged(oldDebt, oldDebt + debtIncrease);

            return distributionNumber;
        }
        else {
            return distributionCount;
        }
    }

    /**
     * @notice Slash `account` for `amount` tokens.
     * @dev The caller must have `SLASHERS_ROLE`.
     * @param account Account to slash
     * @param amount Amount to slash
     */
    function slash(address account, uint256 amount) external override onlySlashers {
        emit Slashed(account, amount);
        _increaseAccount(account, 0, amount);
    }

    /**
     * @notice Returns true if this contract implements the interface defined by
     * `interfaceId`. 
     * @dev 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.
     *
     * @param interfaceId ID of interface
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, IERC165, ERC721Enumerable) returns (bool) {
        return interfaceId == type(IERC721).interfaceId
            || interfaceId == type(IERC721Metadata).interfaceId
            || interfaceId == type(IERC721Enumerable).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @notice Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     * @param tokenId ID of token
     */
    function tokenURI(uint256 tokenId) public view virtual override(ERC721, IERC721Metadata) returns (string memory) {
        require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token");

        string memory uri = _tokenURI[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return uri;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(uri).length > 0) {
            return string(abi.encodePacked(base, uri));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @notice Apply a threshold change
     * @param to New threshold
     */
    function _setUpdateThreshold(uint256 to) private {
        require(to != 0, "MerkleDistributorSEV: Update threshold must be non-zero");
        require(to <= getRoleMemberCount(UPDATER_ROLE), "MerkleDistributorSEV: threshold > updaters");
        emit UpdateThresholdChanged(to);
        updateThreshold = to;
    }

    /**
     * @notice Increase claimed and account amounts for `account`
     * @param account Account to increase
     * @param claimed Claimed amount
     * @param slashed Slashed amount
     */
    function _increaseAccount(address account, uint256 claimed, uint256 slashed) private {
        uint256 oldDebt = debtTotal;
        // Increase balances
        if (claimed != 0) {
            accountState[account].totalClaimed += claimed;
            debtTotal -= claimed;
        }

        if (slashed != 0) {
            accountState[account].totalSlashed += slashed;
            debtTotal -= slashed;
        }

        if (claimed != 0 || slashed != 0) {
            emit AccountUpdated(account, accountState[account].totalClaimed, accountState[account].totalSlashed);
            emit DebtChanged(oldDebt, oldDebt - claimed - slashed);
        }
    }

    function balance() public view returns (uint256) {
        uint256 myBalance = token.balanceOf(address(this));
        return myBalance >= debtTotal ? myBalance - debtTotal : 0;
    }
}

File 2 of 24 : IAccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);

    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    function grantRole(bytes32 role, address account) external;

    function revokeRole(bytes32 role, address account) external;

    function renounceRole(bytes32 role, address account) external;
}

File 3 of 24 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable {
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

File 4 of 24 : IERC165.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

File 5 of 24 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 6 of 24 : IERC20Mintable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IERC20Mintable is IERC20 {
    function mint(address dst, uint256 amount) external returns (bool);
}

File 7 of 24 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

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

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

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

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

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

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

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

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

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

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

File 8 of 24 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 tokenId);

    /**
     * @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 9 of 24 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";

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

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

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

File 10 of 24 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 11 of 24 : IEdenNetwork.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IEdenNetwork {
    function stakeFor(address recipient, uint128 amount) external;
}

File 12 of 24 : IGovernance.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IGovernance {
    struct RewardScheduleEntry {
        uint64 startTime;
        uint64 epochDuration;
        uint128 rewardsPerEpoch; 
    }

    function rewardCollector(address producer) external view returns (address);
    function blockProducer(address producer) external view returns (bool);
    function rewardScheduleEntries() external view returns (uint256);
    function rewardScheduleEntry(uint256 index) external view returns (RewardScheduleEntry memory);

    event BlockProducerAdded(address indexed producer);
    event BlockProducerRemoved(address indexed producer);
    event BlockProducerRewardCollectorChanged(address indexed producer, address indexed collector);
    event RewardScheduleChanged();
}

File 13 of 24 : IMerkleDistributorBase.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./IERC20Mintable.sol";

interface IMerkleDistributorBase is IERC721Metadata, IERC721Enumerable {
    function token() external view returns (IERC20Mintable);
    function distributionCount() external view returns (uint256);
    function merkleRoot() external view returns (bytes32);
    function previousMerkleRoot(bytes32 merkleRoot) external view returns (bool);
    function accountState(address account) external view returns (uint256 totalClaimed, uint256 totalSlashed);
    function claim(uint256 index, address account, uint256 totalEarned, bytes32[] calldata merkleProof) external;
    function slash(address account, uint256 amount) external;
    function addUpdaters(address[] memory newUpdaters, uint256 newThreshold) external;
    function removeUpdaters(address[] memory existingUpdaters, uint256 newThreshold) external;
    function setUpdateThreshold(uint256 to) external;
    event Claimed(uint256 index, uint256 totalEarned, address indexed account, uint256 claimed);
    event Slashed(address indexed account, uint256 slashed);
    event AccountUpdated(address indexed account, uint256 totalClaimed, uint256 totalSlashed);
    event PermanentURI(string value, uint256 indexed id);
    event UpdateThresholdChanged(uint256 updateThreshold);
}

File 14 of 24 : IMerkleDistributorSEV.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IMerkleDistributorBase.sol";

interface IMerkleDistributorSEV is IMerkleDistributorBase {
    function claimAndStake(uint256 index, address account, uint256 totalEarned, bytes32[] calldata merkleProof) external;
    function updateMerkleRoot(bytes32 newMerkleRoot, string calldata uri, uint256 newDistributionNumber, uint256 tokenTotal) external returns (uint256);
    event MerkleRootUpdated(bytes32 merkleRoot, uint256 distributionNumber, string metadataURI, uint256 tokenTotal);
    event DebtChanged(uint256 oldDebt, uint256 newDebt);
}

File 15 of 24 : AccessControl.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "../interfaces/IAccessControl.sol";
import "./Context.sol";
import "./Strings.sol";
import "./ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) internal {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 16 of 24 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../interfaces/IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "./EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {grantRole} to track enumerable memberships
     */
    function grantRole(bytes32 role, address account) public virtual override {
        super.grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {revokeRole} to track enumerable memberships
     */
    function revokeRole(bytes32 role, address account) public virtual override {
        super.revokeRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {renounceRole} to track enumerable memberships
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        super.renounceRole(role, account);
        _roleMembers[role].remove(account);
    }

    /**
     * @dev Overload {_setupRole} to track enumerable memberships
     */
    function _setupRole(bytes32 role, address account) internal virtual override {
        super._setupRole(role, account);
        _roleMembers[role].add(account);
    }
}

File 17 of 24 : Address.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 18 of 24 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

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

File 19 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../interfaces/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 20 of 24 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../interfaces/IERC721.sol";
import "../interfaces/IERC721Receiver.sol";
import "../interfaces/IERC721Metadata.sol";
import "./Address.sol";
import "./Context.sol";
import "./Strings.sol";
import "./ERC165.sol";

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

File 21 of 24 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC721.sol";
import "../interfaces/IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 22 of 24 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

File 23 of 24 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        bytes32 computedHash = leaf;

        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];

            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }

        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

Settings
{
  "evmVersion": "berlin",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20Mintable","name":"_token","type":"address"},{"internalType":"contract IEdenNetwork","name":"_edenNetworkProxy","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"uint8","name":"_updateThreshold","type":"uint8"},{"internalType":"address[]","name":"_updaters","type":"address[]"},{"internalType":"address[]","name":"_slashers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalClaimed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSlashed","type":"uint256"}],"name":"AccountUpdated","type":"event"},{"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":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalEarned","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"claimed","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldDebt","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDebt","type":"uint256"}],"name":"DebtChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"distributionNumber","type":"uint256"},{"indexed":false,"internalType":"string","name":"metadataURI","type":"string"},{"indexed":false,"internalType":"uint256","name":"tokenTotal","type":"uint256"}],"name":"MerkleRootUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"slashed","type":"uint256"}],"name":"Slashed","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"updateThreshold","type":"uint256"}],"name":"UpdateThresholdChanged","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SLASHER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"accountState","outputs":[{"internalType":"uint256","name":"totalClaimed","type":"uint256"},{"internalType":"uint256","name":"totalSlashed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"newUpdaters","type":"address[]"},{"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"addUpdaters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalEarned","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalEarned","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claimAndStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"debtTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributionCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"edenNetwork","outputs":[{"internalType":"contract IEdenNetwork","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"previousMerkleRoot","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"existingUpdaters","type":"address[]"},{"internalType":"uint256","name":"newThreshold","type":"uint256"}],"name":"removeUpdaters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"to","type":"uint256"}],"name":"setUpdateThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"slash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Mintable","name":"","type":"address"}],"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":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenTotal","outputs":[{"internalType":"uint256","name":"","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":[],"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":"bytes32","name":"newMerkleRoot","type":"bytes32"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint256","name":"newDistributionNumber","type":"uint256"},{"internalType":"uint256","name":"newTokenTotal","type":"uint256"}],"name":"updateMerkleRoot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a06040523480156200001157600080fd5b50604051620056493803806200564983398101604081905262000034916200064a565b604080518082018252601d81527f4564656e204e6574776f726b2053455620446973747269627574696f6e0000006020808301918252835180850190945260088452671151115394d1559160c21b9084015281519192916200009991600091620004df565b508051620000af906001906020840190620004df565b5050506001600160601b0319606087901b16608052600d546000908152601360205260408120805460ff19166001179055600c80546001600160a01b0388166001600160a01b03199091161790555b82518110156200015a57620001456000805160206200562983398151915284838151811062000131576200013162000775565b60200260200101516200021860201b60201c565b8062000151816200074b565b915050620000fe565b506200016960ff84166200025b565b60005b8151811015620001c557620001b07f12b42e8a160f6064dc959c6f251e3af0750ad213dbecf573b4710d67d6c28e3983838151811062000131576200013162000775565b80620001bc816200074b565b9150506200016c565b50620001d360008562000218565b60408051600080825260208201527f9ad874aacbaa905813a0a2c9812df59969335e5c0f5fbd99d98575597fbfad08910160405180910390a1505050505050620007ba565b6200022f82826200038a60201b620028971760201c565b600082815260076020908152604090912062000256918390620028a16200039a821b17901c565b505050565b80620002d45760405162461bcd60e51b815260206004820152603760248201527f4d65726b6c654469737472696275746f725345563a205570646174652074687260448201527f6573686f6c64206d757374206265206e6f6e2d7a65726f00000000000000000060648201526084015b60405180910390fd5b620002ee60008051602062005629833981519152620003ba565b811115620003525760405162461bcd60e51b815260206004820152602a60248201527f4d65726b6c654469737472696275746f725345563a207468726573686f6c64206044820152693e20757064617465727360b01b6064820152608401620002cb565b6040518181527f4a3f39b792c062592e6c20d41d18331563a8de4ba398cd40ef7c9afffd6234959060200160405180910390a1600f55565b620003968282620003de565b5050565b6000620003b1836001600160a01b03841662000482565b90505b92915050565b60008181526007602090815260408220620003b491620028c3620004d4821b17901c565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620003965760008281526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200043e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054620004cb57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003b4565b506000620003b4565b6000620003b4825490565b828054620004ed906200070e565b90600052602060002090601f0160209004810192826200051157600085556200055c565b82601f106200052c57805160ff19168380011785556200055c565b828001600101855582156200055c579182015b828111156200055c5782518255916020019190600101906200053f565b506200056a9291506200056e565b5090565b5b808211156200056a57600081556001016200056f565b80516200059281620007a1565b919050565b600082601f830112620005a957600080fd5b815160206001600160401b0380831115620005c857620005c86200078b565b8260051b604051601f19603f83011681018181108482111715620005f057620005f06200078b565b604052848152838101925086840182880185018910156200061057600080fd5b600092505b858310156200063e57620006298162000585565b84529284019260019290920191840162000615565b50979650505050505050565b60008060008060008060c087890312156200066457600080fd5b86516200067181620007a1565b60208801519096506200068481620007a1565b60408801519095506200069781620007a1565b606088015190945060ff81168114620006af57600080fd5b60808801519093506001600160401b0380821115620006cd57600080fd5b620006db8a838b0162000597565b935060a0890151915080821115620006f257600080fd5b506200070189828a0162000597565b9150509295509295509295565b600181811c908216806200072357607f821691505b602082108114156200074557634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200076e57634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620007b757600080fd5b50565b60805160601c614e2d620007fc600039600081816106e201528181610ff5015281816116d201528181611a9001528181611d1301526124dc0152614e2d6000f3fe608060405234801561001057600080fd5b50600436106102e95760003560e01c80639010d07c11610191578063c65c3d95116100e3578063decbfda511610097578063e985e9c511610071578063e985e9c514610674578063f6a7fb58146106bd578063fc0c546a146106dd57600080fd5b8063decbfda514610645578063e1e92a6714610658578063e7e7e3871461066b57600080fd5b8063ca15c873116100c8578063ca15c873146105fc578063cd170ce71461060f578063d547741f1461063257600080fd5b8063c65c3d95146105e0578063c87b56dd146105e957600080fd5b8063a217fddf11610145578063b69ef8a81161011f578063b69ef8a8146105b2578063b88d4fde146105ba578063c18d86c0146105cd57600080fd5b8063a217fddf1461058e578063a22cb46514610596578063b1437e27146105a957600080fd5b80639407f5cb116101765780639407f5cb1461056a57806395d89b41146105735780639e05537b1461057b57600080fd5b80639010d07c1461051157806391d148541461052457600080fd5b80632eb4a7ab1161024a57806342842e0e116101fe5780635095af64116101d85780635095af64146104c45780636352211e146104eb57806370a08231146104fe57600080fd5b806342842e0e1461047757806347e633801461048a5780634f6ccce7146104b157600080fd5b80632f745c591161022f5780632f745c591461043e57806335dc395c1461045157806336568abe1461046457600080fd5b80632eb4a7ab146104225780632f2ff15d1461042b57600080fd5b80630ec4c601116102a157806323b872dd1161028657806323b872dd146103d9578063248a9ca3146103ec5780632e7ba6ef1461040f57600080fd5b80630ec4c6011461038b57806318160ddd146103c757600080fd5b806306fdde03116102d257806306fdde031461032b578063081812fc14610340578063095ea7b31461037857600080fd5b806301ffc9a7146102ee57806302fb4d8514610316575b600080fd5b6103016102fc366004614830565b610704565b60405190151581526020015b60405180910390f35b610329610324366004614646565b6107f8565b005b61033361091b565b60405161030d9190614aec565b61035361034e366004614747565b6109ad565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b610329610386366004614646565b610a87565b6103b26103993660046144a7565b6012602052600090815260409020805460019091015482565b6040805192835260208301919091520161030d565b600a545b60405190815260200161030d565b6103296103e73660046144f5565b610c14565b6103cb6103fa366004614747565b60009081526006602052604090206001015490565b61032961041d366004614883565b610cb5565b6103cb600d5481565b610329610439366004614760565b61111c565b6103cb61044c366004614646565b61113e565b61032961045f366004614670565b61120d565b610329610472366004614760565b611336565b6103296104853660046144f5565b611358565b6103cb7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab81565b6103cb6104bf366004614747565b611373565b6103cb7f12b42e8a160f6064dc959c6f251e3af0750ad213dbecf573b4710d67d6c28e3981565b6103536104f9366004614747565b611431565b6103cb61050c3660046144a7565b6114e3565b61035361051f36600461480e565b6115b1565b610301610532366004614760565b600091825260066020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6103cb600f5481565b6103336115d0565b610329610589366004614883565b6115df565b6103cb600081565b6103296105a436600461460f565b611bb4565b6103cb60105481565b6103cb611ccb565b6103296105c8366004614531565b611db3565b6103296105db366004614670565b611e5b565b6103cb600e5481565b6103336105f7366004614747565b611f7a565b6103cb61060a366004614747565b612134565b61030161061d366004614747565b60136020526000908152604090205460ff1681565b610329610640366004614760565b61214b565b6103cb610653366004614783565b612155565b610329610666366004614747565b6127cd565b6103cb60115481565b6103016106823660046144c2565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c546103539073ffffffffffffffffffffffffffffffffffffffff1681565b6103537f000000000000000000000000000000000000000000000000000000000000000081565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061079757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107e357507fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000145b806107f257506107f2826128cd565b92915050565b3360009081527f1dfbce58931a94262c3b9c5acee9dafa864324624ff5446cf599e6b0e53aa0ac602052604090205460ff166108bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f74206861766520534c41534845525f524f4c450000000000000000000000000060648201526084015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f4ed05e9673c26d2ed44f7ef6a7f2942df0ee3b5e1e17db4b99f9dcd261a339cd8260405161090391815260200190565b60405180910390a261091782600083612923565b5050565b60606000805461092a90614c2f565b80601f016020809104026020016040519081016040528092919081815260200182805461095690614c2f565b80156109a35780601f10610978576101008083540402835291602001916109a3565b820191906000526020600020905b81548152906001019060200180831161098657829003601f168201915b5050505050905090565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16610a5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108b2565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a9282611431565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b3373ffffffffffffffffffffffffffffffffffffffff82161480610b795750610b798133610682565b610c05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108b2565b610c0f8383612ab0565b505050565b610c1e3382612b50565b610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108b2565b610c0f838383612cbc565b3373ffffffffffffffffffffffffffffffffffffffff851614610d5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f7420636f6c60448201527f6c6563742072657761726473000000000000000000000000000000000000000060648201526084016108b2565b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b169181019190915260548101849052600090607401604051602081830303815290604052805190602001209050610df983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150849050612f2e565b610e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20496e76616c696420707260448201527f6f6f66000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260126020526040812060018101549054610ebb9190614b4e565b9050808511610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c654469737472696275746f725345563a204e6f7468696e6720636c60448201527f61696d61626c650000000000000000000000000000000000000000000000000060648201526084016108b2565b6000610f588287614bb7565b604080518a81526020810189905290810182905290915073ffffffffffffffffffffffffffffffffffffffff8816907fb94bf7f9302edf52a596286915a69b4b0685574cffdedd0712e3c62f2550f0ba9060600160405180910390a2610fc087826000612923565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb90604401602060405180830381600087803b15801561104e57600080fd5b505af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611086919061472a565b611112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c654469737472696275746f725345563a205472616e73666572206660448201527f61696c656400000000000000000000000000000000000000000000000000000060648201526084016108b2565b5050505050505050565b6111268282612fdd565b6000828152600760205260409020610c0f90826128a1565b6000611149836114e3565b82106111d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016108b2565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205490565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b60005b825181101561132c5761131a7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab84838151811061130d5761130d614d5d565b6020026020010151613003565b8061132481614c83565b9150506112ce565b50610917816130be565b611340828261323b565b6000828152600760205260409020610c0f90826132ea565b610c0f83838360405180602001604052806000815250611db3565b600061137e600a5490565b821061140c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016108b2565b600a828154811061141f5761141f614d5d565b90600052602060002001549050919050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806107f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108b2565b600073ffffffffffffffffffffffffffffffffffffffff8216611588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016108b2565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60008281526007602052604081206115c9908361330c565b9392505050565b60606001805461092a90614c2f565b3373ffffffffffffffffffffffffffffffffffffffff851614611684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f7420636f6c60448201527f6c6563742072657761726473000000000000000000000000000000000000000060648201526084016108b2565b600c546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91821660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063dd62ed3e9060440160206040518083038186803b15801561171657600080fd5b505afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e919061486a565b156117db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20616c6c6f77616e63652060448201527f3e2030000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16918101919091526054810184905260009060740160405160208183030381529060405280519060200120905061187a83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150849050612f2e565b611906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20496e76616c696420707260448201527f6f6f66000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff851660009081526012602052604081206001810154905461193c9190614b4e565b90508085116119cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c654469737472696275746f725345563a204e6f7468696e6720636c60448201527f61696d61626c650000000000000000000000000000000000000000000000000060648201526084016108b2565b60006119d98287614bb7565b604080518a81526020810189905290810182905290915073ffffffffffffffffffffffffffffffffffffffff8816907fb94bf7f9302edf52a596286915a69b4b0685574cffdedd0712e3c62f2550f0ba9060600160405180910390a2611a4187826000612923565b600c546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b390604401602060405180830381600087803b158015611ad657600080fd5b505af1158015611aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0e919061472a565b50600c546040517f70458d850000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff909116906370458d8590604401600060405180830381600087803b158015611b9257600080fd5b505af1158015611ba6573d6000803e3d6000fd5b505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216331415611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108b2565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906370a082319060240160206040518083038186803b158015611d5557600080fd5b505afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d919061486a565b9050601154811015611da0576000611dad565b601154611dad9082614bb7565b91505090565b611dbd3383612b50565b611e49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108b2565b611e5584848484613318565b50505050565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff16611f19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b60005b825181101561132c57611f687f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab848381518110611f5b57611f5b614d5d565b60200260200101516133bb565b80611f7281614c83565b915050611f1c565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661202e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e00000000000000000000000000000060648201526084016108b2565b6000828152601460205260408120805461204790614c2f565b80601f016020809104026020016040519081016040528092919081815260200182805461207390614c2f565b80156120c05780601f10612095576101008083540402835291602001916120c0565b820191906000526020600020905b8154815290600101906020018083116120a357829003601f168201915b5050505050905060006120de60408051602081019091526000815290565b90508051600014156120f1575092915050565b81511561212357808260405160200161210b9291906149ad565b60405160208183030381529060405292505050919050565b61212c846133c5565b949350505050565b60008181526007602052604081206107f2906128c3565b61134082826134e1565b3360009081527f72e6a9b491581b344add3f7be10265867e64fdd874e84e97031c08ad09aea58c602052604081205460ff16612213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f74206861766520555044415445525f524f4c450000000000000000000000000060648201526084016108b2565b60008681526013602052604090205460ff16156122b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f742075706460448201527f61746520746f20612070726576696f7573206d65726b6c6520726f6f7400000060648201526084016108b2565b6000600e5460016122c39190614b4e565b9050838114612354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4d65726b6c654469737472696275746f725345563a2043616e206f6e6c79207560448201527f7064617465206e65787420646973747269627574696f6e00000000000000000060648201526084016108b2565b336000908152601660209081526040808320848452909152902054156123fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4d65726b6c654469737472696275746f725345563a205570646174657220616c60448201527f7265616479207375626d6974746564206e657720726f6f74000000000000000060648201526084016108b2565b60105483101561248e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c654469737472696275746f725345563a20546f74616c20746f6b6560448201527f6e732063616e6e6f74206465637265617365000000000000000000000000000060648201526084016108b2565b60006010548461249e9190614bb7565b9050806011546124ae9190614b4e565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561253357600080fd5b505afa158015612547573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256b919061486a565b101561261f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4d65726b6c654469737472696275746f725345563a204469737472696275746960448201527f6f6e20776f756c64206c6561766520636f6e747261637420756e64657266756e60648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016108b2565b33600090815260166020908152604080832085845282528083208b90558a83526015909152812054612652906001614b4e565b60008a8152601560205260409020819055600f549091508114156127bb57600d899055600089815260136020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600e869055858352601490915290206126c99089896143c7565b5060108590556011805490839060006126e28385614b4e565b909155506126f290503385613507565b837fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572078a8a604051612724929190614ad8565b60405180910390a27f57d8ecbe7b76b58585d8a965c3b1f5d9ea66801b41232f59f154f9b2873277be8a858b8b8a604051612763959493929190614aa6565b60405180910390a17f9ad874aacbaa905813a0a2c9812df59969335e5c0f5fbd99d98575597fbfad08816127978582614b4e565b6040805192835260208301919091520160405180910390a1839450505050506127c4565b600e5493505050505b95945050505050565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff1661288b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b612894816130be565b50565b61091782826136d5565b60006115c98373ffffffffffffffffffffffffffffffffffffffff84166137c9565b60006107f2825490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806107f257506107f282613818565b60115482156129805773ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081208054859290612961908490614b4e565b92505081905550826011600082825461297a9190614bb7565b90915550505b81156129dd5773ffffffffffffffffffffffffffffffffffffffff8416600090815260126020526040812060010180548492906129be908490614b4e565b9250508190555081601160008282546129d79190614bb7565b90915550505b821515806129ea57508115155b15611e555773ffffffffffffffffffffffffffffffffffffffff841660008181526012602052604090819020805460019091015491517f4510314558259843825372fc84b1ae19cb70b8c44805daf4808354e78a05cf6b92612a53928252602082015260400190565b60405180910390a27f9ad874aacbaa905813a0a2c9812df59969335e5c0f5fbd99d98575597fbfad088183612a888683614bb7565b612a929190614bb7565b6040805192835260208301919091520160405180910390a150505050565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612b0a82611431565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16612c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108b2565b6000612c0c83611431565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612c7b57508373ffffffffffffffffffffffffffffffffffffffff16612c63846109ad565b73ffffffffffffffffffffffffffffffffffffffff16145b8061212c575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff1661212c565b8273ffffffffffffffffffffffffffffffffffffffff16612cdc82611431565b73ffffffffffffffffffffffffffffffffffffffff1614612d7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff8216612e21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108b2565b612e2c83838361386e565b612e37600082612ab0565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120805460019290612e6d908490614bb7565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290612ea8908490614b4e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b8551811015612fd2576000868281518110612f5057612f50614d5d565b60200260200101519050808311612f92576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612fbf565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612fca81614c83565b915050612f33565b509092149392505050565b600082815260066020526040902060010154612ff98133613974565b610c0f83836136d5565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561091757600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8061314b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4d65726b6c654469737472696275746f725345563a205570646174652074687260448201527f6573686f6c64206d757374206265206e6f6e2d7a65726f00000000000000000060648201526084016108b2565b6131747f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab612134565b811115613203576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4d65726b6c654469737472696275746f725345563a207468726573686f6c642060448201527f3e2075706461746572730000000000000000000000000000000000000000000060648201526084016108b2565b6040518181527f4a3f39b792c062592e6c20d41d18331563a8de4ba398cd40ef7c9afffd6234959060200160405180910390a1600f55565b73ffffffffffffffffffffffffffffffffffffffff811633146132e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108b2565b6109178282613003565b60006115c98373ffffffffffffffffffffffffffffffffffffffff8416613a46565b60006115c98383613b39565b613323848484612cbc565b61332f84848484613b63565b611e55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016108b2565b6111268282612897565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016108b2565b600061349060408051602081019091526000815290565b905060008151116134b057604051806020016040528060008152506115c9565b806134ba84613d62565b6040516020016134cb9291906149ad565b6040516020818303038152906040529392505050565b6000828152600660205260409020600101546134fd8133613974565b610c0f8383613003565b73ffffffffffffffffffffffffffffffffffffffff8216613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b2565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613610576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b2565b61361c6000838361386e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613652908490614b4e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661091757600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561376b3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054613810575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107f2565b5060006107f2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806107f257506107f282613e94565b73ffffffffffffffffffffffffffffffffffffffff83166138d6576138d181600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b613913565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613913576139138382613eea565b73ffffffffffffffffffffffffffffffffffffffff821661393757610c0f81613fa1565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610c0f57610c0f8282614050565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610917576139cc8173ffffffffffffffffffffffffffffffffffffffff1660146140a1565b6139d78360206140a1565b6040516020016139e89291906149dc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108b291600401614aec565b60008181526001830160205260408120548015613b2f576000613a6a600183614bb7565b8554909150600090613a7e90600190614bb7565b9050818114613ae3576000866000018281548110613a9e57613a9e614d5d565b9060005260206000200154905080876000018481548110613ac157613ac1614d5d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613af457613af4614d2e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107f2565b60009150506107f2565b6000826000018281548110613b5057613b50614d5d565b9060005260206000200154905092915050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613d57576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613bda903390899088908890600401614a5d565b602060405180830381600087803b158015613bf457600080fd5b505af1925050508015613c42575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613c3f9181019061484d565b60015b613d0c573d808015613c70576040519150601f19603f3d011682016040523d82523d6000602084013e613c75565b606091505b508051613d04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016108b2565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061212c565b506001949350505050565b606081613da257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613dcc5780613db681614c83565b9150613dc59050600a83614b66565b9150613da6565b60008167ffffffffffffffff811115613de757613de7614d8c565b6040519080825280601f01601f191660200182016040528015613e11576020820181803683370190505b5090505b841561212c57613e26600183614bb7565b9150613e33600a86614cbc565b613e3e906030614b4e565b60f81b818381518110613e5357613e53614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613e8d600a86614b66565b9450613e15565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107f257506107f2826142e4565b60006001613ef7846114e3565b613f019190614bb7565b600083815260096020526040902054909150808214613f615773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b50600091825260096020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600881528383209183525290812055565b600a54600090613fb390600190614bb7565b6000838152600b6020526040812054600a8054939450909284908110613fdb57613fdb614d5d565b9060005260206000200154905080600a8381548110613ffc57613ffc614d5d565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061403457614034614d2e565b6001900381819060005260206000200160009055905550505050565b600061405b836114e3565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b606060006140b0836002614b7a565b6140bb906002614b4e565b67ffffffffffffffff8111156140d3576140d3614d8c565b6040519080825280601f01601f1916602001820160405280156140fd576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061413457614134614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061419757614197614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006141d3846002614b7a565b6141de906001614b4e565b90505b600181111561427b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061421f5761421f614d5d565b1a60f81b82828151811061423557614235614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361427481614bfa565b90506141e1565b5083156115c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108b2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061437757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107f257507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107f2565b8280546143d390614c2f565b90600052602060002090601f0160209004810192826143f55760008555614459565b82601f1061442c578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555614459565b82800160010185558215614459579182015b8281111561445957823582559160200191906001019061443e565b50614465929150614469565b5090565b5b80821115614465576000815560010161446a565b803573ffffffffffffffffffffffffffffffffffffffff811681146144a257600080fd5b919050565b6000602082840312156144b957600080fd5b6115c98261447e565b600080604083850312156144d557600080fd5b6144de8361447e565b91506144ec6020840161447e565b90509250929050565b60008060006060848603121561450a57600080fd5b6145138461447e565b92506145216020850161447e565b9150604084013590509250925092565b6000806000806080858703121561454757600080fd5b6145508561447e565b9350602061455f81870161447e565b935060408601359250606086013567ffffffffffffffff8082111561458357600080fd5b818801915088601f83011261459757600080fd5b8135818111156145a9576145a9614d8c565b6145d9847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614aff565b915080825289848285010111156145ef57600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806040838503121561462257600080fd5b61462b8361447e565b9150602083013561463b81614dbb565b809150509250929050565b6000806040838503121561465957600080fd5b6146628361447e565b946020939093013593505050565b6000806040838503121561468357600080fd5b823567ffffffffffffffff8082111561469b57600080fd5b818501915085601f8301126146af57600080fd5b81356020828211156146c3576146c3614d8c565b8160051b92506146d4818401614aff565b8281528181019085830185870184018b10156146ef57600080fd5b600096505b84871015614719576147058161447e565b8352600196909601959183019183016146f4565b509997909101359750505050505050565b60006020828403121561473c57600080fd5b81516115c981614dbb565b60006020828403121561475957600080fd5b5035919050565b6000806040838503121561477357600080fd5b823591506144ec6020840161447e565b60008060008060006080868803121561479b57600080fd5b85359450602086013567ffffffffffffffff808211156147ba57600080fd5b818801915088601f8301126147ce57600080fd5b8135818111156147dd57600080fd5b8960208285010111156147ef57600080fd5b9699602092909201985095966040810135965060600135945092505050565b6000806040838503121561482157600080fd5b50508035926020909101359150565b60006020828403121561484257600080fd5b81356115c981614dc9565b60006020828403121561485f57600080fd5b81516115c981614dc9565b60006020828403121561487c57600080fd5b5051919050565b60008060008060006080868803121561489b57600080fd5b853594506148ab6020870161447e565b935060408601359250606086013567ffffffffffffffff808211156148cf57600080fd5b818801915088601f8301126148e357600080fd5b8135818111156148f257600080fd5b8960208260051b850101111561490757600080fd5b9699959850939650602001949392505050565b60008151808452614932816020860160208601614bce565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600083516149bf818460208801614bce565b8351908301906149d3818360208801614bce565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614a14816017850160208801614bce565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614a51816028840160208801614bce565b01602801949350505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614a9c608083018461491a565b9695505050505050565b858152846020820152608060408201526000614ac6608083018587614964565b90508260608301529695505050505050565b60208152600061212c602083018486614964565b6020815260006115c9602083018461491a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614b4657614b46614d8c565b604052919050565b60008219821115614b6157614b61614cd0565b500190565b600082614b7557614b75614cff565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614bb257614bb2614cd0565b500290565b600082821015614bc957614bc9614cd0565b500390565b60005b83811015614be9578181015183820152602001614bd1565b83811115611e555750506000910152565b600081614c0957614c09614cd0565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614c4357607f821691505b60208210811415614c7d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cb557614cb5614cd0565b5060010190565b600082614ccb57614ccb614cff565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461289457600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461289457600080fdfea2646970667358221220f6980c9c77371e5537c18221e16146a1189699d64e2c9f7225ec98165f205f7764736f6c6343000806003373e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d15590000000000000000000000009e3382ca57f4404ac7bf435475eae37e87d1c4530000000000000000000000008f48fe27f68a86786fbbd5d38ea53c2748b234b6000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e0590000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a700000000000000000000000000000000000000000000000000000000000000030000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e0590000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a7

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102e95760003560e01c80639010d07c11610191578063c65c3d95116100e3578063decbfda511610097578063e985e9c511610071578063e985e9c514610674578063f6a7fb58146106bd578063fc0c546a146106dd57600080fd5b8063decbfda514610645578063e1e92a6714610658578063e7e7e3871461066b57600080fd5b8063ca15c873116100c8578063ca15c873146105fc578063cd170ce71461060f578063d547741f1461063257600080fd5b8063c65c3d95146105e0578063c87b56dd146105e957600080fd5b8063a217fddf11610145578063b69ef8a81161011f578063b69ef8a8146105b2578063b88d4fde146105ba578063c18d86c0146105cd57600080fd5b8063a217fddf1461058e578063a22cb46514610596578063b1437e27146105a957600080fd5b80639407f5cb116101765780639407f5cb1461056a57806395d89b41146105735780639e05537b1461057b57600080fd5b80639010d07c1461051157806391d148541461052457600080fd5b80632eb4a7ab1161024a57806342842e0e116101fe5780635095af64116101d85780635095af64146104c45780636352211e146104eb57806370a08231146104fe57600080fd5b806342842e0e1461047757806347e633801461048a5780634f6ccce7146104b157600080fd5b80632f745c591161022f5780632f745c591461043e57806335dc395c1461045157806336568abe1461046457600080fd5b80632eb4a7ab146104225780632f2ff15d1461042b57600080fd5b80630ec4c601116102a157806323b872dd1161028657806323b872dd146103d9578063248a9ca3146103ec5780632e7ba6ef1461040f57600080fd5b80630ec4c6011461038b57806318160ddd146103c757600080fd5b806306fdde03116102d257806306fdde031461032b578063081812fc14610340578063095ea7b31461037857600080fd5b806301ffc9a7146102ee57806302fb4d8514610316575b600080fd5b6103016102fc366004614830565b610704565b60405190151581526020015b60405180910390f35b610329610324366004614646565b6107f8565b005b61033361091b565b60405161030d9190614aec565b61035361034e366004614747565b6109ad565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161030d565b610329610386366004614646565b610a87565b6103b26103993660046144a7565b6012602052600090815260409020805460019091015482565b6040805192835260208301919091520161030d565b600a545b60405190815260200161030d565b6103296103e73660046144f5565b610c14565b6103cb6103fa366004614747565b60009081526006602052604090206001015490565b61032961041d366004614883565b610cb5565b6103cb600d5481565b610329610439366004614760565b61111c565b6103cb61044c366004614646565b61113e565b61032961045f366004614670565b61120d565b610329610472366004614760565b611336565b6103296104853660046144f5565b611358565b6103cb7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab81565b6103cb6104bf366004614747565b611373565b6103cb7f12b42e8a160f6064dc959c6f251e3af0750ad213dbecf573b4710d67d6c28e3981565b6103536104f9366004614747565b611431565b6103cb61050c3660046144a7565b6114e3565b61035361051f36600461480e565b6115b1565b610301610532366004614760565b600091825260066020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b6103cb600f5481565b6103336115d0565b610329610589366004614883565b6115df565b6103cb600081565b6103296105a436600461460f565b611bb4565b6103cb60105481565b6103cb611ccb565b6103296105c8366004614531565b611db3565b6103296105db366004614670565b611e5b565b6103cb600e5481565b6103336105f7366004614747565b611f7a565b6103cb61060a366004614747565b612134565b61030161061d366004614747565b60136020526000908152604090205460ff1681565b610329610640366004614760565b61214b565b6103cb610653366004614783565b612155565b610329610666366004614747565b6127cd565b6103cb60115481565b6103016106823660046144c2565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260056020908152604080832093909416825291909152205460ff1690565b600c546103539073ffffffffffffffffffffffffffffffffffffffff1681565b6103537f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d155981565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061079757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107e357507fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d6300000000000000000000000000000000000000000000000000000000145b806107f257506107f2826128cd565b92915050565b3360009081527f1dfbce58931a94262c3b9c5acee9dafa864324624ff5446cf599e6b0e53aa0ac602052604090205460ff166108bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f74206861766520534c41534845525f524f4c450000000000000000000000000060648201526084015b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff167f4ed05e9673c26d2ed44f7ef6a7f2942df0ee3b5e1e17db4b99f9dcd261a339cd8260405161090391815260200190565b60405180910390a261091782600083612923565b5050565b60606000805461092a90614c2f565b80601f016020809104026020016040519081016040528092919081815260200182805461095690614c2f565b80156109a35780601f10610978576101008083540402835291602001916109a3565b820191906000526020600020905b81548152906001019060200180831161098657829003601f168201915b5050505050905090565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16610a5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108b2565b5060009081526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b6000610a9282611431565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b3373ffffffffffffffffffffffffffffffffffffffff82161480610b795750610b798133610682565b610c05576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016108b2565b610c0f8383612ab0565b505050565b610c1e3382612b50565b610caa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108b2565b610c0f838383612cbc565b3373ffffffffffffffffffffffffffffffffffffffff851614610d5a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f7420636f6c60448201527f6c6563742072657761726473000000000000000000000000000000000000000060648201526084016108b2565b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b169181019190915260548101849052600090607401604051602081830303815290604052805190602001209050610df983838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150849050612f2e565b610e85576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20496e76616c696420707260448201527f6f6f66000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff8516600090815260126020526040812060018101549054610ebb9190614b4e565b9050808511610f4c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c654469737472696275746f725345563a204e6f7468696e6720636c60448201527f61696d61626c650000000000000000000000000000000000000000000000000060648201526084016108b2565b6000610f588287614bb7565b604080518a81526020810189905290810182905290915073ffffffffffffffffffffffffffffffffffffffff8816907fb94bf7f9302edf52a596286915a69b4b0685574cffdedd0712e3c62f2550f0ba9060600160405180910390a2610fc087826000612923565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290527f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d155973ffffffffffffffffffffffffffffffffffffffff169063a9059cbb90604401602060405180830381600087803b15801561104e57600080fd5b505af1158015611062573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611086919061472a565b611112576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f4d65726b6c654469737472696275746f725345563a205472616e73666572206660448201527f61696c656400000000000000000000000000000000000000000000000000000060648201526084016108b2565b5050505050505050565b6111268282612fdd565b6000828152600760205260409020610c0f90826128a1565b6000611149836114e3565b82106111d7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016108b2565b5073ffffffffffffffffffffffffffffffffffffffff919091166000908152600860209081526040808320938352929052205490565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff166112cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b60005b825181101561132c5761131a7f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab84838151811061130d5761130d614d5d565b6020026020010151613003565b8061132481614c83565b9150506112ce565b50610917816130be565b611340828261323b565b6000828152600760205260409020610c0f90826132ea565b610c0f83838360405180602001604052806000815250611db3565b600061137e600a5490565b821061140c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016108b2565b600a828154811061141f5761141f614d5d565b90600052602060002001549050919050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16806107f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108b2565b600073ffffffffffffffffffffffffffffffffffffffff8216611588576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016108b2565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b60008281526007602052604081206115c9908361330c565b9392505050565b60606001805461092a90614c2f565b3373ffffffffffffffffffffffffffffffffffffffff851614611684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f7420636f6c60448201527f6c6563742072657761726473000000000000000000000000000000000000000060648201526084016108b2565b600c546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91821660248201527f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d15599091169063dd62ed3e9060440160206040518083038186803b15801561171657600080fd5b505afa15801561172a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174e919061486a565b156117db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20616c6c6f77616e63652060448201527f3e2030000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16918101919091526054810184905260009060740160405160208183030381529060405280519060200120905061187a83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150849050612f2e565b611906576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f725345563a20496e76616c696420707260448201527f6f6f66000000000000000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff851660009081526012602052604081206001810154905461193c9190614b4e565b90508085116119cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f4d65726b6c654469737472696275746f725345563a204e6f7468696e6720636c60448201527f61696d61626c650000000000000000000000000000000000000000000000000060648201526084016108b2565b60006119d98287614bb7565b604080518a81526020810189905290810182905290915073ffffffffffffffffffffffffffffffffffffffff8816907fb94bf7f9302edf52a596286915a69b4b0685574cffdedd0712e3c62f2550f0ba9060600160405180910390a2611a4187826000612923565b600c546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9182166004820152602481018390527f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d15599091169063095ea7b390604401602060405180830381600087803b158015611ad657600080fd5b505af1158015611aea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0e919061472a565b50600c546040517f70458d850000000000000000000000000000000000000000000000000000000081523360048201526fffffffffffffffffffffffffffffffff8316602482015273ffffffffffffffffffffffffffffffffffffffff909116906370458d8590604401600060405180830381600087803b158015611b9257600080fd5b505af1158015611ba6573d6000803e3d6000fd5b505050505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216331415611c34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108b2565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090819073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d155916906370a082319060240160206040518083038186803b158015611d5557600080fd5b505afa158015611d69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d8d919061486a565b9050601154811015611da0576000611dad565b601154611dad9082614bb7565b91505090565b611dbd3383612b50565b611e49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016108b2565b611e5584848484613318565b50505050565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff16611f19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b60005b825181101561132c57611f687f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab848381518110611f5b57611f5b614d5d565b60200260200101516133bb565b80611f7281614c83565b915050611f1c565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff1661202e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f722060448201527f6e6f6e6578697374656e7420746f6b656e00000000000000000000000000000060648201526084016108b2565b6000828152601460205260408120805461204790614c2f565b80601f016020809104026020016040519081016040528092919081815260200182805461207390614c2f565b80156120c05780601f10612095576101008083540402835291602001916120c0565b820191906000526020600020905b8154815290600101906020018083116120a357829003601f168201915b5050505050905060006120de60408051602081019091526000815290565b90508051600014156120f1575092915050565b81511561212357808260405160200161210b9291906149ad565b60405160208183030381529060405292505050919050565b61212c846133c5565b949350505050565b60008181526007602052604081206107f2906128c3565b61134082826134e1565b3360009081527f72e6a9b491581b344add3f7be10265867e64fdd874e84e97031c08ad09aea58c602052604081205460ff16612213576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f74206861766520555044415445525f524f4c450000000000000000000000000060648201526084016108b2565b60008681526013602052604090205460ff16156122b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4d65726b6c654469737472696275746f725345563a2043616e6e6f742075706460448201527f61746520746f20612070726576696f7573206d65726b6c6520726f6f7400000060648201526084016108b2565b6000600e5460016122c39190614b4e565b9050838114612354576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4d65726b6c654469737472696275746f725345563a2043616e206f6e6c79207560448201527f7064617465206e65787420646973747269627574696f6e00000000000000000060648201526084016108b2565b336000908152601660209081526040808320848452909152902054156123fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4d65726b6c654469737472696275746f725345563a205570646174657220616c60448201527f7265616479207375626d6974746564206e657720726f6f74000000000000000060648201526084016108b2565b60105483101561248e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4d65726b6c654469737472696275746f725345563a20546f74616c20746f6b6560448201527f6e732063616e6e6f74206465637265617365000000000000000000000000000060648201526084016108b2565b60006010548461249e9190614bb7565b9050806011546124ae9190614b4e565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201527f0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d155973ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561253357600080fd5b505afa158015612547573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061256b919061486a565b101561261f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f4d65726b6c654469737472696275746f725345563a204469737472696275746960448201527f6f6e20776f756c64206c6561766520636f6e747261637420756e64657266756e60648201527f6465640000000000000000000000000000000000000000000000000000000000608482015260a4016108b2565b33600090815260166020908152604080832085845282528083208b90558a83526015909152812054612652906001614b4e565b60008a8152601560205260409020819055600f549091508114156127bb57600d899055600089815260136020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055600e869055858352601490915290206126c99089896143c7565b5060108590556011805490839060006126e28385614b4e565b909155506126f290503385613507565b837fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572078a8a604051612724929190614ad8565b60405180910390a27f57d8ecbe7b76b58585d8a965c3b1f5d9ea66801b41232f59f154f9b2873277be8a858b8b8a604051612763959493929190614aa6565b60405180910390a17f9ad874aacbaa905813a0a2c9812df59969335e5c0f5fbd99d98575597fbfad08816127978582614b4e565b6040805192835260208301919091520160405180910390a1839450505050506127c4565b600e5493505050505b95945050505050565b3360009081527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f8602052604090205460ff1661288b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f4d65726b6c654469737472696275746f725345563a2043616c6c6572206d757360448201527f7420686176652044454641554c545f41444d494e5f524f4c450000000000000060648201526084016108b2565b612894816130be565b50565b61091782826136d5565b60006115c98373ffffffffffffffffffffffffffffffffffffffff84166137c9565b60006107f2825490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d630000000000000000000000000000000000000000000000000000000014806107f257506107f282613818565b60115482156129805773ffffffffffffffffffffffffffffffffffffffff841660009081526012602052604081208054859290612961908490614b4e565b92505081905550826011600082825461297a9190614bb7565b90915550505b81156129dd5773ffffffffffffffffffffffffffffffffffffffff8416600090815260126020526040812060010180548492906129be908490614b4e565b9250508190555081601160008282546129d79190614bb7565b90915550505b821515806129ea57508115155b15611e555773ffffffffffffffffffffffffffffffffffffffff841660008181526012602052604090819020805460019091015491517f4510314558259843825372fc84b1ae19cb70b8c44805daf4808354e78a05cf6b92612a53928252602082015260400190565b60405180910390a27f9ad874aacbaa905813a0a2c9812df59969335e5c0f5fbd99d98575597fbfad088183612a888683614bb7565b612a929190614bb7565b6040805192835260208301919091520160405180910390a150505050565b600081815260046020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091558190612b0a82611431565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008181526002602052604081205473ffffffffffffffffffffffffffffffffffffffff16612c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016108b2565b6000612c0c83611431565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480612c7b57508373ffffffffffffffffffffffffffffffffffffffff16612c63846109ad565b73ffffffffffffffffffffffffffffffffffffffff16145b8061212c575073ffffffffffffffffffffffffffffffffffffffff80821660009081526005602090815260408083209388168352929052205460ff1661212c565b8273ffffffffffffffffffffffffffffffffffffffff16612cdc82611431565b73ffffffffffffffffffffffffffffffffffffffff1614612d7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016108b2565b73ffffffffffffffffffffffffffffffffffffffff8216612e21576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108b2565b612e2c83838361386e565b612e37600082612ab0565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120805460019290612e6d908490614bb7565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290612ea8908490614b4e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600081815b8551811015612fd2576000868281518110612f5057612f50614d5d565b60200260200101519050808311612f92576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250612fbf565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080612fca81614c83565b915050612f33565b509092149392505050565b600082815260066020526040902060010154612ff98133613974565b610c0f83836136d5565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff161561091757600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b8061314b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4d65726b6c654469737472696275746f725345563a205570646174652074687260448201527f6573686f6c64206d757374206265206e6f6e2d7a65726f00000000000000000060648201526084016108b2565b6131747f73e573f9566d61418a34d5de3ff49360f9c51fec37f7486551670290f6285dab612134565b811115613203576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4d65726b6c654469737472696275746f725345563a207468726573686f6c642060448201527f3e2075706461746572730000000000000000000000000000000000000000000060648201526084016108b2565b6040518181527f4a3f39b792c062592e6c20d41d18331563a8de4ba398cd40ef7c9afffd6234959060200160405180910390a1600f55565b73ffffffffffffffffffffffffffffffffffffffff811633146132e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016108b2565b6109178282613003565b60006115c98373ffffffffffffffffffffffffffffffffffffffff8416613a46565b60006115c98383613b39565b613323848484612cbc565b61332f84848484613b63565b611e55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016108b2565b6111268282612897565b60008181526002602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16613479576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016108b2565b600061349060408051602081019091526000815290565b905060008151116134b057604051806020016040528060008152506115c9565b806134ba84613d62565b6040516020016134cb9291906149ad565b6040516020818303038152906040529392505050565b6000828152600660205260409020600101546134fd8133613974565b610c0f8383613003565b73ffffffffffffffffffffffffffffffffffffffff8216613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108b2565b60008181526002602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613610576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108b2565b61361c6000838361386e565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805460019290613652908490614b4e565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1661091757600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561376b3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054613810575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107f2565b5060006107f2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f5a05180f0000000000000000000000000000000000000000000000000000000014806107f257506107f282613e94565b73ffffffffffffffffffffffffffffffffffffffff83166138d6576138d181600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b613913565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614613913576139138382613eea565b73ffffffffffffffffffffffffffffffffffffffff821661393757610c0f81613fa1565b8273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610c0f57610c0f8282614050565b600082815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610917576139cc8173ffffffffffffffffffffffffffffffffffffffff1660146140a1565b6139d78360206140a1565b6040516020016139e89291906149dc565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526108b291600401614aec565b60008181526001830160205260408120548015613b2f576000613a6a600183614bb7565b8554909150600090613a7e90600190614bb7565b9050818114613ae3576000866000018281548110613a9e57613a9e614d5d565b9060005260206000200154905080876000018481548110613ac157613ac1614d5d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613af457613af4614d2e565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107f2565b60009150506107f2565b6000826000018281548110613b5057613b50614d5d565b9060005260206000200154905092915050565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613d57576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613bda903390899088908890600401614a5d565b602060405180830381600087803b158015613bf457600080fd5b505af1925050508015613c42575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613c3f9181019061484d565b60015b613d0c573d808015613c70576040519150601f19603f3d011682016040523d82523d6000602084013e613c75565b606091505b508051613d04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016108b2565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061212c565b506001949350505050565b606081613da257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613dcc5780613db681614c83565b9150613dc59050600a83614b66565b9150613da6565b60008167ffffffffffffffff811115613de757613de7614d8c565b6040519080825280601f01601f191660200182016040528015613e11576020820181803683370190505b5090505b841561212c57613e26600183614bb7565b9150613e33600a86614cbc565b613e3e906030614b4e565b60f81b818381518110613e5357613e53614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613e8d600a86614b66565b9450613e15565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b0000000000000000000000000000000000000000000000000000000014806107f257506107f2826142e4565b60006001613ef7846114e3565b613f019190614bb7565b600083815260096020526040902054909150808214613f615773ffffffffffffffffffffffffffffffffffffffff841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b50600091825260096020908152604080842084905573ffffffffffffffffffffffffffffffffffffffff9094168352600881528383209183525290812055565b600a54600090613fb390600190614bb7565b6000838152600b6020526040812054600a8054939450909284908110613fdb57613fdb614d5d565b9060005260206000200154905080600a8381548110613ffc57613ffc614d5d565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061403457614034614d2e565b6001900381819060005260206000200160009055905550505050565b600061405b836114e3565b73ffffffffffffffffffffffffffffffffffffffff9093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b606060006140b0836002614b7a565b6140bb906002614b4e565b67ffffffffffffffff8111156140d3576140d3614d8c565b6040519080825280601f01601f1916602001820160405280156140fd576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061413457614134614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061419757614197614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006141d3846002614b7a565b6141de906001614b4e565b90505b600181111561427b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061421f5761421f614d5d565b1a60f81b82828151811061423557614235614d5d565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c9361427481614bfa565b90506141e1565b5083156115c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108b2565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061437757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806107f257507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316146107f2565b8280546143d390614c2f565b90600052602060002090601f0160209004810192826143f55760008555614459565b82601f1061442c578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555614459565b82800160010185558215614459579182015b8281111561445957823582559160200191906001019061443e565b50614465929150614469565b5090565b5b80821115614465576000815560010161446a565b803573ffffffffffffffffffffffffffffffffffffffff811681146144a257600080fd5b919050565b6000602082840312156144b957600080fd5b6115c98261447e565b600080604083850312156144d557600080fd5b6144de8361447e565b91506144ec6020840161447e565b90509250929050565b60008060006060848603121561450a57600080fd5b6145138461447e565b92506145216020850161447e565b9150604084013590509250925092565b6000806000806080858703121561454757600080fd5b6145508561447e565b9350602061455f81870161447e565b935060408601359250606086013567ffffffffffffffff8082111561458357600080fd5b818801915088601f83011261459757600080fd5b8135818111156145a9576145a9614d8c565b6145d9847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601614aff565b915080825289848285010111156145ef57600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806040838503121561462257600080fd5b61462b8361447e565b9150602083013561463b81614dbb565b809150509250929050565b6000806040838503121561465957600080fd5b6146628361447e565b946020939093013593505050565b6000806040838503121561468357600080fd5b823567ffffffffffffffff8082111561469b57600080fd5b818501915085601f8301126146af57600080fd5b81356020828211156146c3576146c3614d8c565b8160051b92506146d4818401614aff565b8281528181019085830185870184018b10156146ef57600080fd5b600096505b84871015614719576147058161447e565b8352600196909601959183019183016146f4565b509997909101359750505050505050565b60006020828403121561473c57600080fd5b81516115c981614dbb565b60006020828403121561475957600080fd5b5035919050565b6000806040838503121561477357600080fd5b823591506144ec6020840161447e565b60008060008060006080868803121561479b57600080fd5b85359450602086013567ffffffffffffffff808211156147ba57600080fd5b818801915088601f8301126147ce57600080fd5b8135818111156147dd57600080fd5b8960208285010111156147ef57600080fd5b9699602092909201985095966040810135965060600135945092505050565b6000806040838503121561482157600080fd5b50508035926020909101359150565b60006020828403121561484257600080fd5b81356115c981614dc9565b60006020828403121561485f57600080fd5b81516115c981614dc9565b60006020828403121561487c57600080fd5b5051919050565b60008060008060006080868803121561489b57600080fd5b853594506148ab6020870161447e565b935060408601359250606086013567ffffffffffffffff808211156148cf57600080fd5b818801915088601f8301126148e357600080fd5b8135818111156148f257600080fd5b8960208260051b850101111561490757600080fd5b9699959850939650602001949392505050565b60008151808452614932816020860160208601614bce565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b600083516149bf818460208801614bce565b8351908301906149d3818360208801614bce565b01949350505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614a14816017850160208801614bce565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351614a51816028840160208801614bce565b01602801949350505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525083604083015260806060830152614a9c608083018461491a565b9695505050505050565b858152846020820152608060408201526000614ac6608083018587614964565b90508260608301529695505050505050565b60208152600061212c602083018486614964565b6020815260006115c9602083018461491a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614b4657614b46614d8c565b604052919050565b60008219821115614b6157614b61614cd0565b500190565b600082614b7557614b75614cff565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614bb257614bb2614cd0565b500290565b600082821015614bc957614bc9614cd0565b500390565b60005b83811015614be9578181015183820152602001614bd1565b83811115611e555750506000910152565b600081614c0957614c09614cd0565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614c4357607f821691505b60208210811415614c7d577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cb557614cb5614cd0565b5060010190565b600082614ccb57614ccb614cff565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461289457600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461289457600080fdfea2646970667358221220f6980c9c77371e5537c18221e16146a1189699d64e2c9f7225ec98165f205f7764736f6c63430008060033

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

0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d15590000000000000000000000009e3382ca57f4404ac7bf435475eae37e87d1c4530000000000000000000000008f48fe27f68a86786fbbd5d38ea53c2748b234b6000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e0590000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a700000000000000000000000000000000000000000000000000000000000000030000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e0590000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a7

-----Decoded View---------------
Arg [0] : _token (address): 0x1559FA1b8F28238FD5D76D9f434ad86FD20D1559
Arg [1] : _edenNetworkProxy (address): 0x9E3382cA57F4404AC7Bf435475EAe37e87D1c453
Arg [2] : _admin (address): 0x8F48fe27f68a86786fbBD5D38Ea53C2748B234B6
Arg [3] : _updateThreshold (uint8): 2
Arg [4] : _updaters (address[]): 0x0A300e1D1Ad1eb5ff464395a2f4baA9faa90eE52,0xc70c5eEeF6FbE1e3eFB3a76F31C5d2AE7c49e059,0x7d549358b38c9a2c8622c35337010f5CaEb5e5a7
Arg [5] : _slashers (address[]): 0x0A300e1D1Ad1eb5ff464395a2f4baA9faa90eE52,0xc70c5eEeF6FbE1e3eFB3a76F31C5d2AE7c49e059,0x7d549358b38c9a2c8622c35337010f5CaEb5e5a7

-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000001559fa1b8f28238fd5d76d9f434ad86fd20d1559
Arg [1] : 0000000000000000000000009e3382ca57f4404ac7bf435475eae37e87d1c453
Arg [2] : 0000000000000000000000008f48fe27f68a86786fbbd5d38ea53c2748b234b6
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 0000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52
Arg [8] : 000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e059
Arg [9] : 0000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a7
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [11] : 0000000000000000000000000a300e1d1ad1eb5ff464395a2f4baa9faa90ee52
Arg [12] : 000000000000000000000000c70c5eeef6fbe1e3efb3a76f31c5d2ae7c49e059
Arg [13] : 0000000000000000000000007d549358b38c9a2c8622c35337010f5caeb5e5a7


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.