Address Details
contract

0x02c79D1d360732e23Cf135996E91E10fC0C5e23e

Contract Name
CommunityImplementation
Creator
0xa34737–43edab at 0x3f8434–068fe5
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
18746684
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
CommunityImplementation




Optimization enabled
true
Compiler version
v0.8.4+commit.c7e474f2




Optimization runs
200
EVM Version
istanbul




Verified at
2023-05-31T13:39:13.301511Z

contracts/community/CommunityImplementation.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./interfaces/ICommunity.sol";
import "./interfaces/ICommunityAdmin.sol";
import "./interfaces/CommunityStorageV3.sol";

import "hardhat/console.sol";

/**
 * @notice Welcome to the Community contract. For each community
 * there will be one proxy contract deployed by CommunityAdmin.
 * The implementation of the proxy is this contract. This enable
 * us to save tokens on the contract itself, and avoid the problems
 * of having everything in one single contract.
 *Each community has it's own members and and managers.
 */
contract CommunityImplementation is
    Initializable,
    AccessControlUpgradeable,
    OwnableUpgradeable,
    ReentrancyGuardUpgradeable,
    CommunityStorageV3
{
    using SafeERC20Upgradeable for IERC20;
    using EnumerableSet for EnumerableSet.AddressSet;
    using ECDSA for bytes32;

    bytes32 private constant MANAGER_ROLE = keccak256("MANAGER_ROLE");
    uint256 private constant DEFAULT_AMOUNT = 1e16;
    uint256 private constant MAX_TOKEN_LIST_LENGTH = 10;

    /**
     * @notice Triggered when a manager has been added
     *
     * @param manager           Address of the manager that triggered the event
     *                          or address of the CommunityAdmin if it's first manager
     * @param account           Address of the manager that has been added
     */
    event ManagerAdded(address indexed manager, address indexed account);

    /**
     * @notice Triggered when a manager has been removed
     *
     * @param manager           Address of the manager that triggered the event
     * @param account           Address of the manager that has been removed
     */
    event ManagerRemoved(address indexed manager, address indexed account);

    /**
     * @notice Triggered when a beneficiary has been added
     *
     * @param manager           Address of the manager that triggered the event
     * @param beneficiary       Address of the beneficiary that has been added
     */
    event BeneficiaryAdded(address indexed manager, address indexed beneficiary);

    /**
     * @notice Triggered when a beneficiary has been locked
     *
     * @param manager           Address of the manager that triggered the event
     * @param beneficiary       Address of the beneficiary that has been locked
     */
    event BeneficiaryLocked(address indexed manager, address indexed beneficiary);

    /**
     * @notice Triggered when a beneficiary has been unlocked
     *
     * @param manager           Address of the manager that triggered the event
     * @param beneficiary       Address of the beneficiary that has been unlocked
     */
    event BeneficiaryUnlocked(address indexed manager, address indexed beneficiary);

    /**
     * @notice Triggered when a beneficiary has been removed
     *
     * @param manager           Address of the manager that triggered the event
     * @param beneficiary       Address of the beneficiary that has been removed
     */
    event BeneficiaryRemoved(address indexed manager, address indexed beneficiary);

    /**
     * @notice Triggered when a beneficiary has claimed
     *
     * @param beneficiary       Address of the beneficiary that has claimed
     * @param amount            Amount of the claim
     */
    event BeneficiaryClaim(address indexed beneficiary, uint256 amount);

    /**
     * @notice Triggered when a community has been locked
     *
     * @param manager           Address of the manager that triggered the event
     */
    event CommunityLocked(address indexed manager);

    /**
     * @notice Triggered when a community has been unlocked
     *
     * @param manager           Address of the manager that triggered the event
     */
    event CommunityUnlocked(address indexed manager);

    /**
     * @notice Triggered when a manager has requested funds for community
     *
     * @param manager           Address of the manager that triggered the event
     */
    event FundsRequested(address indexed manager);

    /**
     * @notice Triggered when someone has donated token
     *
     * @param donor             Address of the donor
     * @param amount            Amount of the donation
     */
    event Donate(address indexed donor, uint256 amount);

    /**
     * @notice Triggered when a beneficiary from previous community has joined in the current community
     *
     * @param beneficiary       Address of the beneficiary
     */
    event BeneficiaryJoined(address indexed beneficiary);

    /**
     * @notice Triggered when beneficiary params has been updated
     *
     * @param oldOriginalClaimAmount    Old originalClaimAmount value
     * @param oldMaxTotalClaim          Old maxTotalClaim value
     * @param oldDecreaseStep           Old decreaseStep value
     * @param oldBaseInterval           Old baseInterval value
     * @param oldIncrementInterval      Old incrementInterval value
     * @param newOriginalClaimAmount    New originalClaimAmount value
     * @param newMaxTotalClaim          New maxTotalClaim value
     * @param newDecreaseStep           New decreaseStep value
     * @param newBaseInterval           New baseInterval value
     * @param newIncrementInterval      New incrementInterval value
     *
     * For further information regarding each parameter, see
     * *Community* smart contract initialize method.
     */
    event BeneficiaryParamsUpdated(
        uint256 oldOriginalClaimAmount,
        uint256 oldMaxTotalClaim,
        uint256 oldDecreaseStep,
        uint256 oldBaseInterval,
        uint256 oldIncrementInterval,
        uint256 newOriginalClaimAmount,
        uint256 newMaxTotalClaim,
        uint256 newDecreaseStep,
        uint256 newBaseInterval,
        uint256 newIncrementInterval
    );

    /**
     * @notice Triggered when community params has been updated
     *
     * @param oldMinTranche        Old minTranche value
     * @param oldMaxTranche        Old maxTranche value
     * @param newMinTranche        New minTranche value
     * @param newMaxTranche        New maxTranche value
     *
     * For further information regarding each parameter, see
     * *Community* smart contract initialize method.
     */
    event CommunityParamsUpdated(
        uint256 oldMinTranche,
        uint256 oldMaxTranche,
        uint256 newMinTranche,
        uint256 newMaxTranche
    );

    /**
     * @notice Triggered when communityAdmin has been updated
     *
     * @param oldCommunityAdmin   Old communityAdmin address
     * @param newCommunityAdmin   New communityAdmin address
     */
    event CommunityAdminUpdated(
        address indexed oldCommunityAdmin,
        address indexed newCommunityAdmin
    );

    /**
     * @notice Triggered when previousCommunity has been updated
     *
     * @param oldPreviousCommunity   Old previousCommunity address
     * @param newPreviousCommunity   New previousCommunity address
     */
    event PreviousCommunityUpdated(
        address indexed oldPreviousCommunity,
        address indexed newPreviousCommunity
    );

    /**
     * @notice Triggered when maxBeneficiaries has been updated
     *
     * @param oldMaxBeneficiaries   Old maxBeneficiaries value
     * @param newMaxBeneficiaries   New maxBeneficiaries value
     */
    event MaxBeneficiariesUpdated(uint256 oldMaxBeneficiaries, uint256 newMaxBeneficiaries);

    /**
     * @notice Triggered when token address has been updated
     *
     * @param oldTokenAddress   Old token address
     * @param newTokenAddress   New token address
     */
    event TokenUpdated(address indexed oldTokenAddress, address indexed newTokenAddress);

    /**
     * @notice Triggered when an amount of an ERC20 has been transferred from this contract to an address
     *
     * @param token               ERC20 token address
     * @param to                  Address of the receiver
     * @param amount              Amount of the transaction
     */
    event TransferERC20(address indexed token, address indexed to, uint256 amount);

    /**
     * @notice Triggered when claimAmount has been changed
     *
     * @param oldClaimAmount   Old claimAmount value
     * @param newClaimAmount   New claimAmount value
     */
    event ClaimAmountUpdated(uint256 oldClaimAmount, uint256 newClaimAmount);

    /**
     * @notice Enforces sender to be a valid beneficiary
     */
    modifier onlyValidBeneficiary() {
        require(
            _beneficiaries[msg.sender].state == BeneficiaryState.Valid,
            "Community: NOT_VALID_BENEFICIARY"
        );
        _;
    }

    /**
     * @notice Enforces sender to have manager role
     */
    modifier onlyManagers() {
        require(hasRole(MANAGER_ROLE, msg.sender), "Community: NOT_MANAGER");
        _;
    }

    /**
     * @notice Enforces sender to be the community ambassador or entity ambassador responsible
     */
    modifier onlyAmbassadorOrEntity() {
        require(
            communityAdmin.isAmbassadorOrEntityOfCommunity(address(this), msg.sender),
            "Community: NOT_AMBASSADOR_OR_ENTITY"
        );
        _;
    }

    /**
     * @notice Enforces sender to be the owner or community ambassador or entity ambassador responsible
     */
    modifier onlyOwnerOrAmbassadorOrEntity() {
        require(
            msg.sender == owner() ||
                communityAdmin.isAmbassadorOrEntityOfCommunity(address(this), msg.sender),
            "Community: NOT_OWNER_OR_AMBASSADOR_OR_ENTITY"
        );
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not locked
     *
     * Requirements:
     *
     * - The contract must not be locked.
     */
    modifier whenNotLocked() {
        require(!locked, "Community: locked");
        _;
    }

    /**
     * @notice Used to initialize a new Community contract
     *
     * @param _tokenAddress        Address of the token used by the community
     * @param _managers            Community's initial managers
     *                             Will be able to add others
     * @param _originalClaimAmount      Maximum base amount to be claim by the beneficiary
     * @param _maxTotalClaim       Limit that a beneficiary can claim in total
     * @param _decreaseStep        Value decreased from maxTotalClaim each time a beneficiary is added
     * @param _baseInterval        Base interval to start claiming
     * @param _incrementInterval   Increment interval used in each claim
     * @param _minTranche          Minimum amount that the community will receive when requesting funds
     * @param _maxTranche          Maximum amount that the community will receive when requesting funds
     * @param _maxBeneficiaries    Maximum valid beneficiaries number
     * @param _previousCommunity   Previous smart contract address of community
     */
    function initialize(
        address _tokenAddress,
        address[] memory _managers,
        uint256 _originalClaimAmount,
        uint256 _maxTotalClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval,
        uint256 _minTranche,
        uint256 _maxTranche,
        uint256 _maxBeneficiaries,
        ICommunity _previousCommunity
    ) external override initializer {
        require(
            _baseInterval > _incrementInterval,
            "Community::initialize: baseInterval must be greater than incrementInterval"
        );

        require(
            _maxTotalClaim >= _originalClaimAmount,
            "Community::initialize: originalClaimAmount to big"
        );

        require(
            _minTranche <= _maxTranche,
            "Community::initialize: minTranche should not be greater than maxTranche"
        );

        communityAdmin = ICommunityAdmin(msg.sender);

        __AccessControl_init();
        __Ownable_init();
        __ReentrancyGuard_init();

        _token = IERC20(_tokenAddress);
        originalClaimAmount = _originalClaimAmount;
        claimAmount = _originalClaimAmount;
        baseInterval = _baseInterval;
        incrementInterval = _incrementInterval;
        maxTotalClaim = _maxTotalClaim;
        minTranche = _minTranche;
        maxTranche = _maxTranche;
        previousCommunity = _previousCommunity;
        decreaseStep = _decreaseStep;
        maxBeneficiaries = _maxBeneficiaries;
        locked = false;

        transferOwnership(msg.sender);

        // MANAGER_ROLE is the admin for the MANAGER_ROLE
        // so every manager is able to add or remove other managers
        _setRoleAdmin(MANAGER_ROLE, MANAGER_ROLE);

        _setupRole(MANAGER_ROLE, msg.sender);
        emit ManagerAdded(msg.sender, msg.sender);

        uint256 _i;
        uint256 _numberOfManagers = _managers.length;
        for (; _i < _numberOfManagers; _i++) {
            _addManager(_managers[_i]);
        }
    }

    /**
     * @notice Returns the current implementation version
     */
    function getVersion() external pure override returns (uint256) {
        return 3;
    }

    /**
     * @notice Returns the cUSD contract address
     * todo: to be removed, use token() instead
     */
    function cUSD() public view override returns (IERC20) {
        return address(_token) != address(0) ? _token : communityAdmin.cUSD();
    }

    /**
     * @notice Returns the address of the token used by this community
     */
    function token() public view override returns (IERC20) {
        return address(_token) != address(0) ? _token : communityAdmin.cUSD();
    }

    /**
     * @notice Returns the length of the beneficiaryList
     */
    function beneficiaryListLength() external view override returns (uint256) {
        return beneficiaryList.length();
    }

    /**
     * @notice Returns an address from the beneficiaryList
     *
     * @param index_ index value
     * @return address of the beneficiary
     */
    function beneficiaryListAt(uint256 index_) external view override returns (address) {
        return beneficiaryList.at(index_);
    }

    /**
     * @notice Returns the 0 address
     * only used for backwards compatibility
     */
    function impactMarketAddress() public pure override returns (address) {
        return address(0);
    }

    /**
     * @notice Returns the data of a beneficiary
     *
     * @param _beneficiaryAddress    address of the beneficiary
     * @return state                 the status of the beneficiary
     * @return claims                how many times the beneficiary has claimed
     * @return claimedAmount         the amount he has claimed
     * @return lastClaim             block number of the last claim
     */
    function beneficiaries(address _beneficiaryAddress)
        external
        view
        override
        returns (
            BeneficiaryState state,
            uint256 claims,
            uint256 claimedAmount,
            uint256 lastClaim
        )
    {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        return (
            _beneficiary.state,
            _beneficiary.claims,
            _beneficiaryClaimedAmount(_beneficiary),
            _beneficiary.lastClaim
        );
    }

    /**
     * @notice Returns the beneficiary's claimed amounts for each token
     *
     * @param _beneficiaryAddress    address of the beneficiary
     * @return claimedAmounts        a uint256 array with all claimed amounts in the same order as tokenList array
     */
    function beneficiaryClaimedAmounts(address _beneficiaryAddress)
        external
        view
        override
        returns (uint256[] memory claimedAmounts)
    {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        uint256[] memory _claimedAmounts = new uint256[](_tokenList.length());
        uint256 _length = _tokenList.length();

        for (uint256 _index = 0; _index < _length; _index++) {
            _claimedAmounts[_index] = _beneficiary.claimedAmounts[_tokenList.at(_index)];
        }

        if (_claimedAmounts.length == 0) {
            _claimedAmounts = new uint256[](1);
            _claimedAmounts[0] = _beneficiary.claimedAmount;
        }

        return _claimedAmounts;
    }

    /**
     * @notice Returns the length of the tokenList
     */
    function tokensLength() external view override returns (uint256) {
        return tokens.length;
    }

    function tokenList() public view override returns (address[] memory) {
        address[] memory _tokenListArray = new address[](_tokenList.length());
        uint256 _length = _tokenList.length();

        for (uint256 _index = 0; _index < _length; _index++) {
            _tokenListArray[_index] = _tokenList.at(_index);
        }

        if (_tokenListArray.length == 0) {
            _tokenListArray = new address[](1);
            _tokenListArray[0] = address(token());
        }

        return _tokenListArray;
    }

    /**
     * @notice Returns the amount that can be claimed by a beneficiary in total
     * todo: remove it after the frontend is updated to the new function: maxTotalClaim()
     */
    function maxClaim() external view override returns (uint256) {
        return maxTotalClaim;
    }

    function isSelfFunding() public view override returns (bool) {
        return maxTranche == 0;
    }

    /** Updates the address of the communityAdmin
     *
     * @param _newCommunityAdmin address of the new communityAdmin
     */
    function updateCommunityAdmin(ICommunityAdmin _newCommunityAdmin) external override onlyOwner {
        emit CommunityAdminUpdated(address(communityAdmin), address(_newCommunityAdmin));
        communityAdmin = _newCommunityAdmin;

        _addManager(address(communityAdmin));
    }

    /** Updates the address of the previousCommunity
     *
     * @param _newPreviousCommunity address of the new previousCommunity
     */
    function updatePreviousCommunity(ICommunity _newPreviousCommunity) external override onlyOwner {
        emit PreviousCommunityUpdated(address(previousCommunity), address(_newPreviousCommunity));
        previousCommunity = _newPreviousCommunity;
    }

    /** Updates beneficiary params
     *
     * @param _originalClaimAmount maximum base amount to be claim by the beneficiary
     * @param _maxTotalClaim limit that a beneficiary can claim  in total
     * @param _decreaseStep value decreased from maxTotalClaim each time a is beneficiary added
     * @param _baseInterval base interval to start claiming
     * @param _incrementInterval increment interval used in each claim
     *
     * @notice be aware that max claim will not be the same with the value you've provided
     *             maxTotalClaim = _maxTotalClaim - validBeneficiaryCount * _decreaseStep
     */
    function updateBeneficiaryParams(
        uint256 _originalClaimAmount,
        uint256 _maxTotalClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval
    ) public override onlyOwner {
        require(
            _baseInterval > _incrementInterval,
            "Community::updateBeneficiaryParams: baseInterval must be greater than incrementInterval"
        );
        require(
            _maxTotalClaim >= _originalClaimAmount + validBeneficiaryCount * _decreaseStep,
            "Community::updateBeneficiaryParams: originalClaimAmount too big"
        );

        emit BeneficiaryParamsUpdated(
            originalClaimAmount,
            maxTotalClaim,
            decreaseStep,
            baseInterval,
            incrementInterval,
            _originalClaimAmount,
            _maxTotalClaim,
            _decreaseStep,
            _baseInterval,
            _incrementInterval
        );

        originalClaimAmount = _originalClaimAmount;
        maxTotalClaim = _maxTotalClaim - validBeneficiaryCount * _decreaseStep;
        decreaseStep = _decreaseStep;
        baseInterval = _baseInterval;
        incrementInterval = _incrementInterval;

        _updateClaimAmount();
    }

    /** @notice Updates params of a community
     *
     * @param _minTranche minimum amount that the community will receive when requesting funds
     * @param _maxTranche maximum amount that the community will receive when requesting funds
     */
    function updateCommunityParams(uint256 _minTranche, uint256 _maxTranche)
        external
        override
        onlyOwner
    {
        require(
            _minTranche <= _maxTranche,
            "Community::updateCommunityParams: minTranche should not be greater than maxTranche"
        );

        emit CommunityParamsUpdated(minTranche, maxTranche, _minTranche, _maxTranche);

        minTranche = _minTranche;
        maxTranche = _maxTranche;
    }

    /** @notice Updates maxBeneficiaries
     *
     * @param _newMaxBeneficiaries new _maxBeneficiaries value
     */
    function updateMaxBeneficiaries(uint256 _newMaxBeneficiaries)
        external
        override
        onlyOwnerOrAmbassadorOrEntity
    {
        emit MaxBeneficiariesUpdated(maxBeneficiaries, _newMaxBeneficiaries);
        maxBeneficiaries = _newMaxBeneficiaries;
    }

    /** @notice Updates token address
     *   !!!!!! you must be careful about _maxTotalClaim value. This value determines all beneficiaries claimedAmounts
     */
    function updateToken(
        IERC20 _newToken,
        address[] calldata _exchangePath,
        uint256 _originalClaimAmount,
        uint256 _maxTotalClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval
    ) external override onlyOwner {
        ITreasury _treasury = communityAdmin.treasury();

        require(
            tokens.length < MAX_TOKEN_LIST_LENGTH,
            "Community::updateToken: Token list length too big"
        );

        require(
            _newToken != token(),
            "Community::updateToken: New token cannot be the same as the current token"
        );

        require(
            _newToken == communityAdmin.cUSD() || _treasury.isToken(address(_newToken)),
            "Community::updateToken: Invalid token"
        );

        require(
            _exchangePath.length > 1 &&
                _exchangePath[0] == address(token()) &&
                _exchangePath[_exchangePath.length - 1] == address(_newToken),
            "Community::updateToken: invalid exchangePath"
        );

        //for communities already deployed, we need to add the current token before changing
        if (tokens.length == 0) {
            tokens.push(Token(address(token()), 1e18, 0));
            _tokenList.add(address(token()));
        }

        uint256 _conversionRatio = (1e18 * _maxTotalClaim) / getInitialMaxTotalClaim();

        tokens.push(Token(address(_newToken), _conversionRatio, block.number));
        _tokenList.add(address(_newToken));

        IUniswapV2Router _uniswap = _treasury.uniswapRouter();

        uint256 _balance = token().balanceOf(address(this));
        token().approve(address(_uniswap), _balance);
        _uniswap.swapExactTokensForTokensSupportingFeeOnTransferTokens(
            _balance,
            0,
            _exchangePath,
            address(this),
            block.timestamp + 3600
        );

        emit TokenUpdated(address(_token), address(_newToken));
        _token = _newToken;

        updateBeneficiaryParams(
            _originalClaimAmount,
            _maxTotalClaim,
            _decreaseStep,
            _baseInterval,
            _incrementInterval
        );
    }

    /**
     * @notice Adds a new manager
     *
     * @param _account address of the manager to be added
     */
    function addManager(address _account) public override onlyAmbassadorOrEntity {
        _addManager(_account);
    }

    /**
     * @notice Remove an existing manager
     *
     * @param _account address of the manager to be removed
     */
    function removeManager(address _account) external override onlyAmbassadorOrEntity {
        require(
            hasRole(MANAGER_ROLE, _account),
            "Community::removeManager: This account doesn't have manager role"
        );
        require(
            _account != address(communityAdmin),
            "Community::removeManager: You are not allow to remove communityAdmin"
        );
        super._revokeRole(MANAGER_ROLE, _account);
        emit ManagerRemoved(msg.sender, _account);
    }

    /**
     * @notice Enforces managers to use addManager method
     */
    function grantRole(bytes32, address) public pure override {
        require(false, "Community::grantRole: You are not allow to use this method");
    }

    /**
     * @notice Enforces managers to use removeManager method
     */
    function revokeRole(bytes32, address) public pure override {
        require(false, "Community::revokeRole: You are not allow to use this method");
    }

    /**
     * @notice Adds a new beneficiary
     *
     * @param _beneficiaryAddress address of the beneficiary to be added
     */
    function addBeneficiary(address _beneficiaryAddress)
        external
        override
        whenNotLocked
        onlyManagers
        nonReentrant
    {
        _addBeneficiary(_beneficiaryAddress);

        emit BeneficiaryAdded(msg.sender, _beneficiaryAddress);
    }

    /**
     * @notice Adds new beneficiaries
     *
     * @param _beneficiaryAddresses addresses of the beneficiaries to be added
     */
    function addBeneficiaries(address[] memory _beneficiaryAddresses)
        external
        override
        whenNotLocked
        onlyManagers
        nonReentrant
    {
        _addBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Adds new beneficiaries using a manager signature
     *
     * @param _beneficiaryAddresses addresses of the beneficiaries to be added
     * @param _expirationTimestamp  timestamp when the signature will expire/expired
     * @param _signature            the signature of a manager
     */
    function addBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external override whenNotLocked nonReentrant {
        _checkManagerSignature(_expirationTimestamp, _signature);

        _addBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Locks a valid beneficiary
     *
     * @param _beneficiaryAddress address of the beneficiary to be locked
     */
    function lockBeneficiary(address _beneficiaryAddress)
        external
        override
        whenNotLocked
        onlyManagers
    {
        _lockBeneficiary(_beneficiaryAddress);
    }

    /**
     * @notice Locks a list of beneficiaries
     *
     * @param _beneficiaryAddresses       addresses of the beneficiaries to be locked
     */
    function lockBeneficiaries(address[] memory _beneficiaryAddresses)
        external
        override
        whenNotLocked
        onlyManagers
    {
        _lockBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Locks a list of beneficiaries using a manager signature
     *
     * @param _beneficiaryAddresses addresses of the beneficiaries to be locked
     * @param _expirationTimestamp  timestamp when the signature will expire/expired
     * @param _signature            the signature of a manager
     */
    function lockBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external override whenNotLocked {
        _checkManagerSignature(_expirationTimestamp, _signature);
        _lockBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice  Unlocks a locked beneficiary
     *
     * @param _beneficiaryAddress address of the beneficiary to be unlocked
     */
    function unlockBeneficiary(address _beneficiaryAddress)
        external
        override
        whenNotLocked
        onlyManagers
    {
        _unlockBeneficiary(_beneficiaryAddress);
    }

    /**
     * @notice Unlocks a list of beneficiaries
     *
     * @param _beneficiaryAddresses       addresses of the beneficiaries to be unlocked
     */
    function unlockBeneficiaries(address[] memory _beneficiaryAddresses)
        external
        override
        whenNotLocked
        onlyManagers
    {
        _unlockBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Unlocks a list of beneficiaries using a manager signature
     *
     * @param _beneficiaryAddresses addresses of the beneficiaries to be unlocked
     * @param _expirationTimestamp  timestamp when the signature will expire/expired
     * @param _signature            the signature of a manager
     */
    function unlockBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external override whenNotLocked {
        _checkManagerSignature(_expirationTimestamp, _signature);
        _unlockBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Remove an existing beneficiary
     *
     * @param _beneficiaryAddress address of the beneficiary to be removed
     */
    function removeBeneficiary(address _beneficiaryAddress) external override onlyManagers {
        _removeBeneficiary(_beneficiaryAddress);
    }

    /**
     * @notice Removes a list of beneficiaries
     *
     * @param _beneficiaryAddresses       addresses of the beneficiaries to be removed
     */
    function removeBeneficiaries(address[] memory _beneficiaryAddresses)
        external
        override
        onlyManagers
    {
        _removeBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @notice Removes a list of beneficiaries using a manager signature
     *
     * @param _beneficiaryAddresses addresses of the beneficiaries to be removed
     * @param _expirationTimestamp  timestamp when the signature will expire/expired
     * @param _signature            the signature of a manager
     */
    function removeBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external override {
        _checkManagerSignature(_expirationTimestamp, _signature);
        _removeBeneficiaries(_beneficiaryAddresses);
    }

    /**
     * @dev Transfers tokens to a valid beneficiary
     */
    function claim() external override whenNotLocked onlyValidBeneficiary nonReentrant {
        Beneficiary storage _beneficiary = _beneficiaries[msg.sender];

        uint256 _totalClaimedAmount = _beneficiaryClaimedAmount(_beneficiary);

        require(claimCooldown(msg.sender) <= block.number, "Community::claim: NOT_YET");
        require(
            _totalClaimedAmount < maxTotalClaim,
            "Community::claim: Already claimed everything"
        );

        uint256 _claimAmount = claimAmount > 0 ? claimAmount : originalClaimAmount;

        uint256 _toClaim = _claimAmount <= maxTotalClaim - _totalClaimedAmount
            ? _claimAmount
            : maxTotalClaim - _totalClaimedAmount;

        //this is necessary for communities with version < 3
        //and for beneficiaries that haven't claimed after updating to v3
        if (tokens.length > 1 && _beneficiary.lastClaim < tokens[1].startBlock) {
            _beneficiary.claimedAmounts[tokens[0].tokenAddress] = _beneficiary.claimedAmount;
        }

        _beneficiary.claimedAmount = _totalClaimedAmount + _toClaim;
        _beneficiary.claims++;
        _beneficiary.lastClaim = block.number;

        if (tokens.length > 1) {
            _beneficiary.claimedAmounts[address(token())] += _toClaim;
        }

        IERC20Upgradeable(address(token())).safeTransfer(msg.sender, _toClaim);
        emit BeneficiaryClaim(msg.sender, _toClaim);
    }

    /**
     * @notice Returns the number of blocks that a beneficiary have to wait between claims
     *
     * @param _beneficiaryAddress address of the beneficiary
     * @return uint256 number of blocks for the lastInterval
     */
    function lastInterval(address _beneficiaryAddress) public view override returns (uint256) {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];
        if (_beneficiary.claims == 0) {
            return 0;
        }
        return baseInterval + (_beneficiary.claims - 1) * incrementInterval;
    }

    /**
     * @notice Returns the block number when a beneficiary can claim again
     *
     * @param _beneficiaryAddress address of the beneficiary
     * @return uint256 number of block when the beneficiary can claim
     */
    function claimCooldown(address _beneficiaryAddress) public view override returns (uint256) {
        return _beneficiaries[_beneficiaryAddress].lastClaim + lastInterval(_beneficiaryAddress);
    }

    /**
     * @notice Locks the community
     */
    function lock() external override onlyAmbassadorOrEntity {
        locked = true;
        emit CommunityLocked(msg.sender);
    }

    /**
     * @notice Unlocks the community
     */
    function unlock() external override onlyAmbassadorOrEntity {
        locked = false;
        emit CommunityUnlocked(msg.sender);
    }

    /**
     * @notice Requests treasury funds from the communityAdmin
     */
    function requestFunds() external override whenNotLocked onlyManagers {
        require(!isSelfFunding(), "Community::requestFunds: This community is self-funding");

        communityAdmin.fundCommunity();

        lastFundRequest = block.number;

        _updateClaimAmount();

        emit FundsRequested(msg.sender);
    }

    /**
     * @notice Transfers tokens from donor to this community
     * Used by donationToCommunity method from DonationMiner contract
     *
     * @param _sender address of the sender
     * @param _amount amount to be donated
     */
    function donate(address _sender, uint256 _amount) external override nonReentrant {
        IERC20Upgradeable(address(token())).safeTransferFrom(_sender, address(this), _amount);
        privateFunds += _amount;

        _updateClaimAmount();

        emit Donate(msg.sender, _amount);
    }

    /**
     * @notice Increases the treasuryFunds value
     * Used by communityAdmin after an amount of tokens are sent from the treasury
     *
     * @param _amount amount to be added to treasuryFunds
     */
    function addTreasuryFunds(uint256 _amount) external override onlyOwner {
        treasuryFunds += _amount;
    }

    /**
     * @notice Transfers an amount of an ERC20 from this contract to an address
     *
     * @param _token address of the ERC20 token
     * @param _to address of the receiver
     * @param _amount amount of the transaction
     */
    function transfer(
        IERC20 _token,
        address _to,
        uint256 _amount
    ) external override onlyOwner nonReentrant {
        IERC20Upgradeable(address(_token)).safeTransfer(_to, _amount);

        if (address(_token) == address(token())) {
            _updateClaimAmount();
        }

        emit TransferERC20(address(_token), _to, _amount);
    }

    /**
     * @notice Allows a beneficiary from the previousCommunity to join in this community
     */
    function beneficiaryJoinFromMigrated(address _beneficiaryAddress) external override {
        // no need to check if it's a beneficiary, as the state is copied
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        require(
            _beneficiary.state == BeneficiaryState.NONE,
            "Community::beneficiaryJoinFromMigrated: Beneficiary exists"
        );

        (
            BeneficiaryState _oldBeneficiaryState,
            uint256 _oldBeneficiaryClaims,
            uint256 _oldBeneficiaryClaimedAmount,
            uint256 _oldBeneficiaryLastClaim
        ) = previousCommunity.beneficiaries(_beneficiaryAddress);

        _changeBeneficiaryState(_beneficiary, _oldBeneficiaryState);
        _beneficiary.claims = _oldBeneficiaryClaims;
        _beneficiary.lastClaim = _oldBeneficiaryLastClaim;
        _beneficiary.claimedAmount = _oldBeneficiaryClaimedAmount;

        beneficiaryList.add(_beneficiaryAddress);

        emit BeneficiaryJoined(_beneficiaryAddress);
    }

    /**
     * @notice Returns the initial maxTotalClaim
     * todo: do be deleted after updating all communities to v3
     */
    function getInitialMaxClaim() public view override returns (uint256) {
        return maxTotalClaim + validBeneficiaryCount * decreaseStep;
    }

    /**
     * @notice Returns the initial maxTotalClaim
     */
    function getInitialMaxTotalClaim() public view returns (uint256) {
        return maxTotalClaim + validBeneficiaryCount * decreaseStep;
    }

    /**
     * @notice Changes the state of a beneficiary
     *
     * @param _beneficiary address of the beneficiary
     * @param _newState new state
     */
    function _changeBeneficiaryState(Beneficiary storage _beneficiary, BeneficiaryState _newState)
        internal
    {
        if (_beneficiary.state == _newState) {
            return;
        }

        if (_newState == BeneficiaryState.Valid) {
            require(
                maxTotalClaim - decreaseStep >= originalClaimAmount,
                "Community::_changeBeneficiaryState: Max claim too low"
            );
            require(
                maxBeneficiaries == 0 || validBeneficiaryCount < maxBeneficiaries,
                "Community::_changeBeneficiaryState: This community has reached the maximum number of valid beneficiaries"
            );
            validBeneficiaryCount++;
            maxTotalClaim -= decreaseStep;
        } else if (_beneficiary.state == BeneficiaryState.Valid) {
            validBeneficiaryCount--;
            maxTotalClaim += decreaseStep;
        }

        _beneficiary.state = _newState;
    }

    /**
     * @notice Adds a new beneficiary
     *
     * @param _beneficiaryAddress address of the beneficiary to be added
     */
    function _addBeneficiary(address _beneficiaryAddress) internal {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        if (_beneficiary.state != BeneficiaryState.NONE) {
            return;
        }

        _changeBeneficiaryState(_beneficiary, BeneficiaryState.Valid);
        _beneficiary.lastClaim = block.number;

        beneficiaryList.add(_beneficiaryAddress);

        // send default amount when adding a new beneficiary
        IERC20Upgradeable(address(token())).safeTransfer(_beneficiaryAddress, DEFAULT_AMOUNT);
    }

    /**
     * @notice Adds new beneficiaries
     *
     * @param _beneficiaryAddresses addresses of beneficiaries to be added
     */
    function _addBeneficiaries(address[] memory _beneficiaryAddresses) internal {
        uint256 _index;
        uint256 _numberOfBeneficiaries = _beneficiaryAddresses.length;
        for (; _index < _numberOfBeneficiaries; _index++) {
            _addBeneficiary(_beneficiaryAddresses[_index]);
            emit BeneficiaryAdded(msg.sender, _beneficiaryAddresses[_index]);
        }
    }

    /**
     * @notice Locks beneficiary
     *
     * @param _beneficiaryAddress address of beneficiary to be locked
     */
    function _lockBeneficiary(address _beneficiaryAddress) internal {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        if (_beneficiary.state == BeneficiaryState.Valid) {
            _changeBeneficiaryState(_beneficiary, BeneficiaryState.Locked);
            emit BeneficiaryLocked(msg.sender, _beneficiaryAddress);
        }
    }

    /**
     * @notice Locks beneficiaries
     *
     * @param _beneficiaryAddresses addresses of beneficiaries to be locked
     */
    function _lockBeneficiaries(address[] memory _beneficiaryAddresses) internal {
        uint256 _index;
        uint256 _numberOfBeneficiaries = _beneficiaryAddresses.length;

        for (; _index < _numberOfBeneficiaries; _index++) {
            _lockBeneficiary(_beneficiaryAddresses[_index]);
        }
    }

    /**
     * @notice Unlocks beneficiary
     *
     * @param _beneficiaryAddress address of beneficiary to be unlocked
     */
    function _unlockBeneficiary(address _beneficiaryAddress) internal {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        if (_beneficiary.state == BeneficiaryState.Locked) {
            _changeBeneficiaryState(_beneficiary, BeneficiaryState.Valid);
            emit BeneficiaryUnlocked(msg.sender, _beneficiaryAddress);
        }
    }

    /**
     * @notice Unlocks beneficiaries
     *
     * @param _beneficiaryAddresses addresses of beneficiaries to be unlocked
     */
    function _unlockBeneficiaries(address[] memory _beneficiaryAddresses) internal {
        uint256 _index;
        uint256 _numberOfBeneficiaries = _beneficiaryAddresses.length;

        for (; _index < _numberOfBeneficiaries; _index++) {
            _unlockBeneficiary(_beneficiaryAddresses[_index]);
        }
    }

    /**
     * @notice Removes beneficiary
     *
     * @param _beneficiaryAddress address of beneficiary to be removed
     */
    function _removeBeneficiary(address _beneficiaryAddress) internal {
        Beneficiary storage _beneficiary = _beneficiaries[_beneficiaryAddress];

        if (
            _beneficiary.state == BeneficiaryState.Valid ||
            _beneficiary.state == BeneficiaryState.Locked
        ) {
            _changeBeneficiaryState(_beneficiary, BeneficiaryState.Removed);
            emit BeneficiaryRemoved(msg.sender, _beneficiaryAddress);
        }
    }

    /**
     * @notice Removes beneficiaries
     *
     * @param _beneficiaryAddresses addresses of beneficiaries to be removed
     */
    function _removeBeneficiaries(address[] memory _beneficiaryAddresses) internal {
        uint256 _index;
        uint256 _numberOfBeneficiaries = _beneficiaryAddresses.length;

        for (; _index < _numberOfBeneficiaries; _index++) {
            _removeBeneficiary(_beneficiaryAddresses[_index]);
        }
    }

    /**
     * @notice Checks a manager signature
     *
     * @param _expirationTimestamp  timestamp when the signature will expire/expired
     * @param _signature            the signature of a manager
     */
    function _checkManagerSignature(uint256 _expirationTimestamp, bytes calldata _signature)
        internal
    {
        require(
            msg.sender == communityAdmin.authorizedWalletAddress(),
            "Community: Sender must be the backend wallet"
        );
        require(_expirationTimestamp >= block.timestamp, "Community: Signature too old");

        bytes32 _messageHash = keccak256(
            abi.encodePacked(msg.sender, address(this), _expirationTimestamp)
        );

        address _signerAddress = _messageHash.toEthSignedMessageHash().recover(_signature);
        require(hasRole(MANAGER_ROLE, _signerAddress), "Community: Invalid signature");
    }

    function _beneficiaryClaimedAmount(Beneficiary storage _beneficiary)
        internal
        view
        returns (uint256)
    {
        uint256 _tokensLength = tokens.length;
        if (_tokensLength < 2) {
            return _beneficiary.claimedAmount;
        }

        uint256 _computedClaimAmount = _beneficiary.claimedAmount;

        //if beneficiary didn't claim for a long time and the token has been changed,
        //we multiply the claimed amount with all token ratios that user haven't claimed
        for (
            uint256 _index = _tokensLength - 1;
            tokens[_index].startBlock > _beneficiary.lastClaim;
            _index--
        ) {
            _computedClaimAmount = (_computedClaimAmount * tokens[_index].ratio) / 1e18;
        }

        return _computedClaimAmount;
    }

    /**
     * @notice Adds a new manager
     *
     * @param _account address of the manager to be added
     */
    function _addManager(address _account) internal {
        if (!hasRole(MANAGER_ROLE, _account)) {
            super._grantRole(MANAGER_ROLE, _account);
            emit ManagerAdded(msg.sender, _account);
        }
    }

    function _updateClaimAmount() internal {
        uint256 _newClaimAmount;
        uint256 _minClaimAmountRatio = communityAdmin.minClaimAmountRatio();
        uint256 _minClaimAmountRatioPrecision = communityAdmin.minClaimAmountRatioPrecision();

        if (
            validBeneficiaryCount == 0 ||
            isSelfFunding() ||
            _minClaimAmountRatio <= _minClaimAmountRatioPrecision
        ) {
            _newClaimAmount = originalClaimAmount;
        } else {
            _newClaimAmount = token().balanceOf(address(this)) / validBeneficiaryCount;

            uint256 _minimumClaimAmount = (originalClaimAmount * _minClaimAmountRatioPrecision) /
                _minClaimAmountRatio;

            if (_newClaimAmount < _minimumClaimAmount) {
                _newClaimAmount = _minimumClaimAmount;
            } else if (_newClaimAmount > originalClaimAmount) {
                _newClaimAmount = originalClaimAmount;
            }
        }

        if (_newClaimAmount != claimAmount) {
            emit ClaimAmountUpdated(claimAmount, _newClaimAmount);
            claimAmount = _newClaimAmount;
        }
    }
}
        

/_openzeppelin/contracts/access/Ownable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

/_openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)

pragma solidity ^0.8.0;

import "../Proxy.sol";
import "./ERC1967Upgrade.sol";

/**
 * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
 * implementation address that can be changed. This address is stored in storage in the location specified by
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
 * implementation behind the proxy.
 */
contract ERC1967Proxy is Proxy, ERC1967Upgrade {
    /**
     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.
     *
     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded
     * function call, and allows initializating the storage of the proxy like a Solidity constructor.
     */
    constructor(address _logic, bytes memory _data) payable {
        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1));
        _upgradeToAndCall(_logic, _data, false);
    }

    /**
     * @dev Returns the current implementation address.
     */
    function _implementation() internal view virtual override returns (address impl) {
        return ERC1967Upgrade._getImplementation();
    }
}
          

/_openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)

pragma solidity ^0.8.2;

import "../beacon/IBeacon.sol";
import "../../utils/Address.sol";
import "../../utils/StorageSlot.sol";

/**
 * @dev This abstract contract provides getters and event emitting update functions for
 * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.
 *
 * _Available since v4.1._
 *
 * @custom:oz-upgrades-unsafe-allow delegatecall
 */
abstract contract ERC1967Upgrade {
    // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1
    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;

    /**
     * @dev Storage slot with the address of the current implementation.
     * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;

    /**
     * @dev Emitted when the implementation is upgraded.
     */
    event Upgraded(address indexed implementation);

    /**
     * @dev Returns the current implementation address.
     */
    function _getImplementation() internal view returns (address) {
        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 implementation slot.
     */
    function _setImplementation(address newImplementation) private {
        require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
    }

    /**
     * @dev Perform implementation upgrade
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
    }

    /**
     * @dev Perform implementation upgrade with additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCall(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        _upgradeTo(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }
    }

    /**
     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.
     *
     * Emits an {Upgraded} event.
     */
    function _upgradeToAndCallSecure(
        address newImplementation,
        bytes memory data,
        bool forceCall
    ) internal {
        address oldImplementation = _getImplementation();

        // Initial upgrade and setup call
        _setImplementation(newImplementation);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(newImplementation, data);
        }

        // Perform rollback test if not already in progress
        StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);
        if (!rollbackTesting.value) {
            // Trigger rollback using upgradeTo from the new implementation
            rollbackTesting.value = true;
            Address.functionDelegateCall(
                newImplementation,
                abi.encodeWithSignature("upgradeTo(address)", oldImplementation)
            );
            rollbackTesting.value = false;
            // Check rollback was effective
            require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades");
            // Finally reset to the new implementation and log the upgrade
            _upgradeTo(newImplementation);
        }
    }

    /**
     * @dev Storage slot with the admin of the contract.
     * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
     * validated in the constructor.
     */
    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /**
     * @dev Emitted when the admin account has changed.
     */
    event AdminChanged(address previousAdmin, address newAdmin);

    /**
     * @dev Returns the current admin.
     */
    function _getAdmin() internal view returns (address) {
        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;
    }

    /**
     * @dev Stores a new address in the EIP1967 admin slot.
     */
    function _setAdmin(address newAdmin) private {
        require(newAdmin != address(0), "ERC1967: new admin is the zero address");
        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     */
    function _changeAdmin(address newAdmin) internal {
        emit AdminChanged(_getAdmin(), newAdmin);
        _setAdmin(newAdmin);
    }

    /**
     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.
     */
    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;

    /**
     * @dev Emitted when the beacon is upgraded.
     */
    event BeaconUpgraded(address indexed beacon);

    /**
     * @dev Returns the current beacon.
     */
    function _getBeacon() internal view returns (address) {
        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;
    }

    /**
     * @dev Stores a new beacon in the EIP1967 beacon slot.
     */
    function _setBeacon(address newBeacon) private {
        require(Address.isContract(newBeacon), "ERC1967: new beacon is not a contract");
        require(
            Address.isContract(IBeacon(newBeacon).implementation()),
            "ERC1967: beacon implementation is not a contract"
        );
        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;
    }

    /**
     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does
     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).
     *
     * Emits a {BeaconUpgraded} event.
     */
    function _upgradeBeaconToAndCall(
        address newBeacon,
        bytes memory data,
        bool forceCall
    ) internal {
        _setBeacon(newBeacon);
        emit BeaconUpgraded(newBeacon);
        if (data.length > 0 || forceCall) {
            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
        }
    }
}
          

/_openzeppelin/contracts/proxy/Proxy.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/Proxy.sol)

pragma solidity ^0.8.0;

/**
 * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
 * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
 * be specified by overriding the virtual {_implementation} function.
 *
 * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
 * different contract through the {_delegate} function.
 *
 * The success and return data of the delegated call will be returned back to the caller of the proxy.
 */
abstract contract Proxy {
    /**
     * @dev Delegates the current call to `implementation`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _delegate(address implementation) internal virtual {
        assembly {
            // Copy msg.data. We take full control of memory in this inline assembly
            // block because it will not return to Solidity code. We overwrite the
            // Solidity scratch pad at memory position 0.
            calldatacopy(0, 0, calldatasize())

            // Call the implementation.
            // out and outsize are 0 because we don't know the size yet.
            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)

            // Copy the returned data.
            returndatacopy(0, 0, returndatasize())

            switch result
            // delegatecall returns 0 on error.
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    /**
     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function
     * and {_fallback} should delegate.
     */
    function _implementation() internal view virtual returns (address);

    /**
     * @dev Delegates the current call to the address returned by `_implementation()`.
     *
     * This function does not return to its internall call site, it will return directly to the external caller.
     */
    function _fallback() internal virtual {
        _beforeFallback();
        _delegate(_implementation());
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other
     * function in the contract matches the call data.
     */
    fallback() external payable virtual {
        _fallback();
    }

    /**
     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data
     * is empty.
     */
    receive() external payable virtual {
        _fallback();
    }

    /**
     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`
     * call, or as part of the Solidity `fallback` or `receive` functions.
     *
     * If overriden should call `super._beforeFallback()`.
     */
    function _beforeFallback() internal virtual {}
}
          

/_openzeppelin/contracts/proxy/beacon/IBeacon.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is the interface that {BeaconProxy} expects of its beacon.
 */
interface IBeacon {
    /**
     * @dev Must return an address that can be used as a delegate call target.
     *
     * {BeaconProxy} will check that this address is a contract.
     */
    function implementation() external view returns (address);
}
          

/_openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)

pragma solidity ^0.8.0;

import "./TransparentUpgradeableProxy.sol";
import "../../access/Ownable.sol";

/**
 * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an
 * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.
 */
contract ProxyAdmin is Ownable {
    /**
     * @dev Returns the current implementation of `proxy`.
     *
     * Requirements:
     *
     * - This contract must be the admin of `proxy`.
     */
    function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {
        // We need to manually run the static call since the getter cannot be flagged as view
        // bytes4(keccak256("implementation()")) == 0x5c60da1b
        (bool success, bytes memory returndata) = address(proxy).staticcall(hex"5c60da1b");
        require(success);
        return abi.decode(returndata, (address));
    }

    /**
     * @dev Returns the current admin of `proxy`.
     *
     * Requirements:
     *
     * - This contract must be the admin of `proxy`.
     */
    function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {
        // We need to manually run the static call since the getter cannot be flagged as view
        // bytes4(keccak256("admin()")) == 0xf851a440
        (bool success, bytes memory returndata) = address(proxy).staticcall(hex"f851a440");
        require(success);
        return abi.decode(returndata, (address));
    }

    /**
     * @dev Changes the admin of `proxy` to `newAdmin`.
     *
     * Requirements:
     *
     * - This contract must be the current admin of `proxy`.
     */
    function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {
        proxy.changeAdmin(newAdmin);
    }

    /**
     * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.
     *
     * Requirements:
     *
     * - This contract must be the admin of `proxy`.
     */
    function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {
        proxy.upgradeTo(implementation);
    }

    /**
     * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See
     * {TransparentUpgradeableProxy-upgradeToAndCall}.
     *
     * Requirements:
     *
     * - This contract must be the admin of `proxy`.
     */
    function upgradeAndCall(
        TransparentUpgradeableProxy proxy,
        address implementation,
        bytes memory data
    ) public payable virtual onlyOwner {
        proxy.upgradeToAndCall{value: msg.value}(implementation, data);
    }
}
          

/_openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)

pragma solidity ^0.8.0;

import "../ERC1967/ERC1967Proxy.sol";

/**
 * @dev This contract implements a proxy that is upgradeable by an admin.
 *
 * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector
 * clashing], which can potentially be used in an attack, this contract uses the
 * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two
 * things that go hand in hand:
 *
 * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if
 * that call matches one of the admin functions exposed by the proxy itself.
 * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the
 * implementation. If the admin tries to call a function on the implementation it will fail with an error that says
 * "admin cannot fallback to proxy target".
 *
 * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing
 * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due
 * to sudden errors when trying to call a function from the proxy implementation.
 *
 * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,
 * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.
 */
contract TransparentUpgradeableProxy is ERC1967Proxy {
    /**
     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
     */
    constructor(
        address _logic,
        address admin_,
        bytes memory _data
    ) payable ERC1967Proxy(_logic, _data) {
        assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
        _changeAdmin(admin_);
    }

    /**
     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.
     */
    modifier ifAdmin() {
        if (msg.sender == _getAdmin()) {
            _;
        } else {
            _fallback();
        }
    }

    /**
     * @dev Returns the current admin.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
     */
    function admin() external ifAdmin returns (address admin_) {
        admin_ = _getAdmin();
    }

    /**
     * @dev Returns the current implementation.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.
     *
     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the
     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
     */
    function implementation() external ifAdmin returns (address implementation_) {
        implementation_ = _implementation();
    }

    /**
     * @dev Changes the admin of the proxy.
     *
     * Emits an {AdminChanged} event.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.
     */
    function changeAdmin(address newAdmin) external virtual ifAdmin {
        _changeAdmin(newAdmin);
    }

    /**
     * @dev Upgrade the implementation of the proxy.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.
     */
    function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeToAndCall(newImplementation, bytes(""), false);
    }

    /**
     * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified
     * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the
     * proxied contract.
     *
     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.
     */
    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {
        _upgradeToAndCall(newImplementation, data, true);
    }

    /**
     * @dev Returns the current admin.
     */
    function _admin() internal view virtual returns (address) {
        return _getAdmin();
    }

    /**
     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.
     */
    function _beforeFallback() internal virtual override {
        require(msg.sender != _getAdmin(), "TransparentUpgradeableProxy: admin cannot fallback to proxy target");
        super._beforeFallback();
    }
}
          

/_openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/_openzeppelin/contracts/utils/Context.sol

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

pragma solidity ^0.8.0;

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

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

/_openzeppelin/contracts/utils/StorageSlot.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC1967 implementation slot:
 * ```
 * contract ERC1967 {
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly {
            r.slot := slot
        }
    }
}
          

/_openzeppelin/contracts/utils/Strings.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

/_openzeppelin/contracts/utils/cryptography/ECDSA.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

/_openzeppelin/contracts/utils/structs/EnumerableSet.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

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];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

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

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}
          

/_openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControlUpgradeable.sol";
import "../utils/ContextUpgradeable.sol";
import "../utils/StringsUpgradeable.sol";
import "../utils/introspection/ERC165Upgradeable.sol";
import "../proxy/utils/Initializable.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 AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable {
    function __AccessControl_init() internal onlyInitializing {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __AccessControl_init_unchained();
    }

    function __AccessControl_init_unchained() internal onlyInitializing {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @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(IAccessControlUpgradeable).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 ",
                        StringsUpgradeable.toHexString(uint160(account), 20),
                        " is missing role ",
                        StringsUpgradeable.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 revoked `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}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    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);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
    uint256[49] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControlUpgradeable {
    /**
     * @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 {AccessControl-_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 Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

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

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

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

/_openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

/_openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}
          

/_openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

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

    uint256 private _status;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

/_openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

/_openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol

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

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.sol";

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

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

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

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

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

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

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

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

/_openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

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

/_openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol

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

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

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

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol

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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    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);
    }
}
          

/_openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";
import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal onlyInitializing {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal onlyInitializing {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}
          

/_openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @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);
}
          

/contracts/ambassadors/interfaces/IAmbassadors.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

interface IAmbassadors {
    function getVersion() external pure returns(uint256);
    function isAmbassador(address _ambassador) external view returns (bool);
    function isAmbassadorOf(address _ambassador, address _community) external view returns (bool);
    function isEntityOf(address _ambassador, address _entityAddress) external view returns (bool);
    function isAmbassadorAt(address _ambassador, address _entityAddress) external view returns (bool);

    function addEntity(address _entity) external;
    function removeEntity(address _entity) external;
    function replaceEntityAccount(address _entity, address _newEntity) external;
    function addAmbassador(address _ambassador) external;
    function removeAmbassador(address _ambassador) external;
    function replaceAmbassadorAccount(address _ambassador, address _newAmbassador) external;
    function replaceAmbassador(address _oldAmbassador, address _newAmbassador) external;
    function transferAmbassador(address _ambassador, address _toEntity, bool _keepCommunities) external;
    function transferCommunityToAmbassador(address _to, address _community) external;
    function setCommunityToAmbassador(address _ambassador, address _community) external;
    function removeCommunity(address _community) external;
}
          

/contracts/community/interfaces/CommunityStorageV1.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "./ICommunity.sol";
import "./ICommunityAdmin.sol";

/**
 * @title Storage for Community
 * @notice For future upgrades, do not change CommunityStorageV1. Create a new
 * contract which implements CommunityStorageV1 and following the naming convention
 * CommunityStorageVX.
 */
abstract contract CommunityStorageV1 is ICommunity {
    bool public override locked;
    uint256 public override originalClaimAmount; //the maximum amount that can be claimed by a beneficiary once
    uint256 public override baseInterval;
    uint256 public override incrementInterval;
    uint256 public override maxTotalClaim; //the total amount that can be claimed by a beneficiary over time
    uint256 public override validBeneficiaryCount;
    uint256 public override treasuryFunds;
    uint256 public override privateFunds;
    uint256 public override decreaseStep;
    uint256 public override minTranche;
    uint256 public override maxTranche;
    uint256 public override lastFundRequest;

    ICommunity public override previousCommunity;
    ICommunityAdmin public override communityAdmin;

    mapping(address => Beneficiary) internal _beneficiaries;
    EnumerableSet.AddressSet internal beneficiaryList;
}
          

/contracts/community/interfaces/CommunityStorageV2.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "./CommunityStorageV1.sol";

/**
 * @title Storage for Community
 * @notice For future upgrades, do not change CommunityStorageV2. Create a new
 * contract which implements CommunityStorageV2 and following the naming convention
 * CommunityStorageVX.
 */
abstract contract CommunityStorageV2 is CommunityStorageV1 {
    IERC20 public _token;
    uint256 public override maxBeneficiaries;
}
          

/contracts/community/interfaces/CommunityStorageV3.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "./CommunityStorageV2.sol";

/**
 * @title Storage for Community
 * @notice For future upgrades, do not change CommunityStorageV3. Create a new
 * contract which implements CommunityStorageV3 and following the naming convention
 * CommunityStorageVX.
 */
abstract contract CommunityStorageV3 is CommunityStorageV2 {
    Token[] public override tokens;
    EnumerableSet.AddressSet internal _tokenList;
    uint256 public override claimAmount;
}
          

/contracts/community/interfaces/ICommunity.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ICommunityAdmin.sol";

interface ICommunity {
    enum BeneficiaryState {
        NONE, //the beneficiary hasn't been added yet
        Valid,
        Locked,
        Removed
    }

    struct Beneficiary {
        BeneficiaryState state;  //beneficiary state
        uint256 claims;          //total number of claims
        uint256 claimedAmount;   //total amount of tokens received
                                 //(based on token ratios when there are more than one token)
        uint256 lastClaim;       //block number of the last claim
        mapping(address => uint256) claimedAmounts;
    }

    struct Token {
        address tokenAddress;    //address of the token
        uint256 ratio;           //ratio between maxClaim and previous token maxClaim
        uint256 startBlock;      //the number of the block from which the this token was "active"
    }

    function initialize(
        address _tokenAddress,
        address[] memory _managers,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval,
        uint256 _minTranche,
        uint256 _maxTranche,
        uint256 _maxBeneficiaries,
        ICommunity _previousCommunity
    ) external;
    function getVersion() external pure returns(uint256);
    function previousCommunity() external view returns(ICommunity);
    function originalClaimAmount() external view returns(uint256);
    function claimAmount() external view returns(uint256);
    function baseInterval() external view returns(uint256);
    function incrementInterval() external view returns(uint256);
    function maxClaim() external view returns(uint256);
    function maxTotalClaim() external view returns(uint256);
    function validBeneficiaryCount() external view returns(uint);
    function maxBeneficiaries() external view returns(uint);
    function treasuryFunds() external view returns(uint);
    function privateFunds() external view returns(uint);
    function communityAdmin() external view returns(ICommunityAdmin);
    function cUSD() external view  returns(IERC20);
    function token() external view  returns(IERC20);
    function tokenList() external view returns(address[] memory);
    function locked() external view returns(bool);
    function beneficiaries(address _beneficiaryAddress) external view returns(
        BeneficiaryState state,
        uint256 claims,
        uint256 claimedAmount,
        uint256 lastClaim
    );
    function beneficiaryClaimedAmounts(address _beneficiaryAddress) external view
        returns (uint256[] memory claimedAmounts);
    function decreaseStep() external view returns(uint);
    function beneficiaryListAt(uint256 _index) external view returns (address);
    function impactMarketAddress() external pure returns (address);
    function beneficiaryListLength() external view returns (uint256);
    function minTranche() external view returns(uint256);
    function maxTranche() external view returns(uint256);
    function lastFundRequest() external view returns(uint256);
    function tokens(uint256 _index) external view returns (
        address tokenAddress,
        uint256 ratio,
        uint256 startBlock
    );
    function tokensLength() external view returns (uint256);
    function isSelfFunding() external view returns (bool);
    function updateCommunityAdmin(ICommunityAdmin _communityAdmin) external;
    function updatePreviousCommunity(ICommunity _newPreviousCommunity) external;
    function updateBeneficiaryParams(
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval
    ) external;
    function updateCommunityParams(
        uint256 _minTranche,
        uint256 _maxTranche
    ) external;
    function updateMaxBeneficiaries(uint256 _newMaxBeneficiaries) external;
    function updateToken(
        IERC20 _newToken,
        address[] calldata _exchangePath,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval
    ) external;
    function donate(address _sender, uint256 _amount) external;
    function addTreasuryFunds(uint256 _amount) external;
    function transfer(IERC20 _token, address _to, uint256 _amount) external;
    function addManager(address _managerAddress) external;
    function removeManager(address _managerAddress) external;
    function addBeneficiary(address _beneficiaryAddress) external;
    function addBeneficiaries(address[] memory _beneficiaryAddresses) external;
    function addBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external;
    function lockBeneficiary(address _beneficiaryAddress) external;
    function lockBeneficiaries(address[] memory _beneficiaryAddresses) external;
    function lockBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external;
    function unlockBeneficiary(address _beneficiaryAddress) external;
    function unlockBeneficiaries(address[] memory _beneficiaryAddresses) external;
    function unlockBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external;
    function removeBeneficiary(address _beneficiaryAddress) external;
    function removeBeneficiaries(address[] memory _beneficiaryAddresses) external;
    function removeBeneficiariesUsingSignature(
        address[] memory _beneficiaryAddresses,
        uint256 _expirationTimestamp,
        bytes calldata _signature
    ) external;
    function claim() external;
    function lastInterval(address _beneficiaryAddress) external view returns (uint256);
    function claimCooldown(address _beneficiaryAddress) external view returns (uint256);
    function lock() external;
    function unlock() external;
    function requestFunds() external;
    function beneficiaryJoinFromMigrated(address _beneficiaryAddress) external;
    function getInitialMaxClaim() external view returns (uint256);
}
          

/contracts/community/interfaces/ICommunityAdmin.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "./ICommunity.sol";
import "../../treasury/interfaces/ITreasury.sol";
import "../../governor/impactMarketCouncil/interfaces/IImpactMarketCouncil.sol";
import "../../ambassadors/interfaces/IAmbassadors.sol";

interface ICommunityAdmin {
    enum CommunityState {
        NONE,
        Valid,
        Removed,
        Migrated
    }

    function getVersion() external pure returns(uint256);
    function cUSD() external view returns(IERC20);
    function treasury() external view returns(ITreasury);
    function impactMarketCouncil() external view returns(IImpactMarketCouncil);
    function ambassadors() external view returns(IAmbassadors);
    function communityMiddleProxy() external view returns(address);
    function authorizedWalletAddress() external view returns(address);
    function minClaimAmountRatio() external view returns(uint256);
    function minClaimAmountRatioPrecision() external view returns(uint256);
    function communities(address _community) external view returns(CommunityState);
    function communityImplementation() external view returns(ICommunity);
    function communityProxyAdmin() external view returns(ProxyAdmin);
    function communityListAt(uint256 _index) external view returns (address);
    function communityListLength() external view returns (uint256);
    function treasurySafetyPercentage() external view returns (uint256);
    function treasuryMinBalance() external view returns (uint256);
    function isAmbassadorOrEntityOfCommunity(address _community, address _ambassadorOrEntity) external view returns (bool);
    function updateTreasury(ITreasury _newTreasury) external;
    function updateImpactMarketCouncil(IImpactMarketCouncil _newImpactMarketCouncil) external;
    function updateAmbassadors(IAmbassadors _newAmbassadors) external;
    function updateCommunityMiddleProxy(address _communityMiddleProxy) external;
    function updateCommunityImplementation(ICommunity _communityImplementation_) external;
    function updateAuthorizedWalletAddress(address _newSignerAddress) external;
    function updateMinClaimAmountRatio(uint256 _newMinClaimAmountRatio) external;
    function updateTreasurySafetyPercentage(uint256 _newTreasurySafetyPercentage) external;
    function updateTreasuryMinBalance(uint256 _newTreasuryMinBalance) external;
    function setCommunityToAmbassador(address _ambassador, ICommunity _communityAddress) external;
    function updateBeneficiaryParams(
        ICommunity _community,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval,
        uint256 _maxBeneficiaries
    ) external;
    function updateCommunityParams(
        ICommunity _community,
        uint256 _minTranche,
        uint256 _maxTranche
    ) external;
    function updateProxyImplementation(address _communityMiddleProxy, address _newLogic) external;
    function updateCommunityToken(
        ICommunity _community,
        IERC20 _newToken,
        address[] memory _exchangePath,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval
    ) external;
    function addCommunity(
        address _tokenAddress,
        address[] memory _managers,
        address _ambassador,
        uint256 _claimAmount,
        uint256 _maxClaim,
        uint256 _decreaseStep,
        uint256 _baseInterval,
        uint256 _incrementInterval,
        uint256 _minTranche,
        uint256 _maxTranche,
        uint256 _maxBeneficiaries
    ) external;
    function migrateCommunity(
        address[] memory _managers,
        ICommunity _previousCommunity
    ) external;
    function removeCommunity(ICommunity _community) external;
    function fundCommunity() external;
    function calculateCommunityTrancheAmount(ICommunity _community) external view returns (uint256);
    function transfer(IERC20 _token, address _to, uint256 _amount) external;
    function transferFromCommunity(
        ICommunity _community,
        IERC20 _token,
        address _to,
        uint256 _amount
    ) external;
    function getCommunityProxyImplementation(address _communityProxyAddress) external view returns(address);
}
          

/contracts/governor/impactMarketCouncil/interfaces/IImpactMarketCouncil.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";

interface IImpactMarketCouncil {
    //
}
          

/contracts/treasury/interfaces/ITreasury.sol

//SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

import {IERC20Upgradeable as IERC20} from "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "../../community/interfaces/ICommunityAdmin.sol";
import "./IUniswapV2Router.sol";

interface ITreasury {
    struct Token {
        uint256 rate;
        address[] exchangePath;
    }

    function getVersion() external pure returns(uint256);
    function communityAdmin() external view returns(ICommunityAdmin);
    function uniswapRouter() external view returns(IUniswapV2Router);
    function updateCommunityAdmin(ICommunityAdmin _communityAdmin) external;
    function updateUniswapRouter(IUniswapV2Router _uniswapRouter) external;
    function transfer(IERC20 _token, address _to, uint256 _amount) external;
    function isToken(address _tokenAddress) external view returns (bool);
    function tokenListLength() external view returns (uint256);
    function tokenListAt(uint256 _index) external view returns (address);
    function tokens(address _tokenAddress) external view returns (uint256 rate, address[] memory exchangePath);
    function setToken(address _tokenAddress, uint256 _rate, address[] calldata _exchangePath) external;
    function removeToken(address _tokenAddress) external;
    function getConvertedAmount(address _tokenAddress, uint256 _amount) external view returns (uint256);
    function convertAmount(
        address _tokenAddress,
        uint256 _amountIn,
        uint256 _amountOutMin,
        address[] memory _exchangePath,
        uint256 _deadline
    ) external;
}
          

/contracts/treasury/interfaces/IUniswapV2Router.sol

// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.4;

interface IUniswapV2Router {
    function factory() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function pairFor(address tokenA, address tokenB) external view returns (address);
}
          

/hardhat/console.sol

// SPDX-License-Identifier: MIT
pragma solidity >= 0.4.22 <0.9.0;

library console {
	address constant CONSOLE_ADDRESS = address(0x000000000000000000636F6e736F6c652e6c6f67);

	function _sendLogPayload(bytes memory payload) private view {
		uint256 payloadLength = payload.length;
		address consoleAddress = CONSOLE_ADDRESS;
		assembly {
			let payloadStart := add(payload, 32)
			let r := staticcall(gas(), consoleAddress, payloadStart, payloadLength, 0, 0)
		}
	}

	function log() internal view {
		_sendLogPayload(abi.encodeWithSignature("log()"));
	}

	function logInt(int p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(int)", p0));
	}

	function logUint(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function logString(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function logBool(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function logAddress(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function logBytes(bytes memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
	}

	function logBytes1(bytes1 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
	}

	function logBytes2(bytes2 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
	}

	function logBytes3(bytes3 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
	}

	function logBytes4(bytes4 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
	}

	function logBytes5(bytes5 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
	}

	function logBytes6(bytes6 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
	}

	function logBytes7(bytes7 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
	}

	function logBytes8(bytes8 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
	}

	function logBytes9(bytes9 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
	}

	function logBytes10(bytes10 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
	}

	function logBytes11(bytes11 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
	}

	function logBytes12(bytes12 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
	}

	function logBytes13(bytes13 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
	}

	function logBytes14(bytes14 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
	}

	function logBytes15(bytes15 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
	}

	function logBytes16(bytes16 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
	}

	function logBytes17(bytes17 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
	}

	function logBytes18(bytes18 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
	}

	function logBytes19(bytes19 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
	}

	function logBytes20(bytes20 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
	}

	function logBytes21(bytes21 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
	}

	function logBytes22(bytes22 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
	}

	function logBytes23(bytes23 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
	}

	function logBytes24(bytes24 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
	}

	function logBytes25(bytes25 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
	}

	function logBytes26(bytes26 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
	}

	function logBytes27(bytes27 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
	}

	function logBytes28(bytes28 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
	}

	function logBytes29(bytes29 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
	}

	function logBytes30(bytes30 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
	}

	function logBytes31(bytes31 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
	}

	function logBytes32(bytes32 p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
	}

	function log(uint p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint)", p0));
	}

	function log(string memory p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string)", p0));
	}

	function log(bool p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
	}

	function log(address p0) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address)", p0));
	}

	function log(uint p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint)", p0, p1));
	}

	function log(uint p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string)", p0, p1));
	}

	function log(uint p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool)", p0, p1));
	}

	function log(uint p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address)", p0, p1));
	}

	function log(string memory p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint)", p0, p1));
	}

	function log(string memory p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
	}

	function log(string memory p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
	}

	function log(string memory p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
	}

	function log(bool p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint)", p0, p1));
	}

	function log(bool p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
	}

	function log(bool p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
	}

	function log(bool p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
	}

	function log(address p0, uint p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint)", p0, p1));
	}

	function log(address p0, string memory p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
	}

	function log(address p0, bool p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
	}

	function log(address p0, address p1) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
	}

	function log(uint p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint)", p0, p1, p2));
	}

	function log(uint p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string)", p0, p1, p2));
	}

	function log(uint p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool)", p0, p1, p2));
	}

	function log(uint p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool)", p0, p1, p2));
	}

	function log(uint p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address)", p0, p1, p2));
	}

	function log(uint p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint)", p0, p1, p2));
	}

	function log(uint p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string)", p0, p1, p2));
	}

	function log(uint p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool)", p0, p1, p2));
	}

	function log(uint p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address)", p0, p1, p2));
	}

	function log(uint p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint)", p0, p1, p2));
	}

	function log(uint p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string)", p0, p1, p2));
	}

	function log(uint p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool)", p0, p1, p2));
	}

	function log(uint p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool)", p0, p1, p2));
	}

	function log(string memory p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
	}

	function log(string memory p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
	}

	function log(string memory p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
	}

	function log(string memory p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint)", p0, p1, p2));
	}

	function log(string memory p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
	}

	function log(string memory p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
	}

	function log(string memory p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
	}

	function log(bool p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint)", p0, p1, p2));
	}

	function log(bool p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string)", p0, p1, p2));
	}

	function log(bool p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool)", p0, p1, p2));
	}

	function log(bool p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
	}

	function log(bool p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
	}

	function log(bool p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint)", p0, p1, p2));
	}

	function log(bool p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
	}

	function log(bool p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
	}

	function log(bool p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
	}

	function log(bool p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint)", p0, p1, p2));
	}

	function log(bool p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
	}

	function log(bool p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
	}

	function log(bool p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
	}

	function log(address p0, uint p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint)", p0, p1, p2));
	}

	function log(address p0, uint p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string)", p0, p1, p2));
	}

	function log(address p0, uint p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool)", p0, p1, p2));
	}

	function log(address p0, uint p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address)", p0, p1, p2));
	}

	function log(address p0, string memory p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint)", p0, p1, p2));
	}

	function log(address p0, string memory p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
	}

	function log(address p0, string memory p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
	}

	function log(address p0, string memory p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
	}

	function log(address p0, bool p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint)", p0, p1, p2));
	}

	function log(address p0, bool p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
	}

	function log(address p0, bool p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
	}

	function log(address p0, bool p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
	}

	function log(address p0, address p1, uint p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint)", p0, p1, p2));
	}

	function log(address p0, address p1, string memory p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
	}

	function log(address p0, address p1, bool p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
	}

	function log(address p0, address p1, address p2) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
	}

	function log(uint p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,uint,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,string,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,bool,address,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,uint,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,string,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,bool,address)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,uint)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,string)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,bool)", p0, p1, p2, p3));
	}

	function log(uint p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(uint,address,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,uint,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,uint,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
	}

	function log(string memory p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,uint,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,uint,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
	}

	function log(bool p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, uint p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,uint,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, string memory p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, bool p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, uint p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,uint,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, string memory p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, bool p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, uint p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, string memory p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, bool p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
	}

	function log(address p0, address p1, address p2, address p3) internal view {
		_sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
	}

}
          

Contract ABI

[{"type":"event","name":"BeneficiaryAdded","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"beneficiary","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"BeneficiaryClaim","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BeneficiaryJoined","inputs":[{"type":"address","name":"beneficiary","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"BeneficiaryLocked","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"beneficiary","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"BeneficiaryParamsUpdated","inputs":[{"type":"uint256","name":"oldOriginalClaimAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldMaxTotalClaim","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldDecreaseStep","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldBaseInterval","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldIncrementInterval","internalType":"uint256","indexed":false},{"type":"uint256","name":"newOriginalClaimAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newMaxTotalClaim","internalType":"uint256","indexed":false},{"type":"uint256","name":"newDecreaseStep","internalType":"uint256","indexed":false},{"type":"uint256","name":"newBaseInterval","internalType":"uint256","indexed":false},{"type":"uint256","name":"newIncrementInterval","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"BeneficiaryRemoved","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"beneficiary","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"BeneficiaryUnlocked","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"beneficiary","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ClaimAmountUpdated","inputs":[{"type":"uint256","name":"oldClaimAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"newClaimAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CommunityAdminUpdated","inputs":[{"type":"address","name":"oldCommunityAdmin","internalType":"address","indexed":true},{"type":"address","name":"newCommunityAdmin","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"CommunityLocked","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"CommunityParamsUpdated","inputs":[{"type":"uint256","name":"oldMinTranche","internalType":"uint256","indexed":false},{"type":"uint256","name":"oldMaxTranche","internalType":"uint256","indexed":false},{"type":"uint256","name":"newMinTranche","internalType":"uint256","indexed":false},{"type":"uint256","name":"newMaxTranche","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CommunityUnlocked","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Donate","inputs":[{"type":"address","name":"donor","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"FundsRequested","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ManagerAdded","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ManagerRemoved","inputs":[{"type":"address","name":"manager","internalType":"address","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"MaxBeneficiariesUpdated","inputs":[{"type":"uint256","name":"oldMaxBeneficiaries","internalType":"uint256","indexed":false},{"type":"uint256","name":"newMaxBeneficiaries","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"PreviousCommunityUpdated","inputs":[{"type":"address","name":"oldPreviousCommunity","internalType":"address","indexed":true},{"type":"address","name":"newPreviousCommunity","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleAdminChanged","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"previousAdminRole","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"newAdminRole","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokenUpdated","inputs":[{"type":"address","name":"oldTokenAddress","internalType":"address","indexed":true},{"type":"address","name":"newTokenAddress","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TransferERC20","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"DEFAULT_ADMIN_ROLE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Upgradeable"}],"name":"_token","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addBeneficiaries","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addBeneficiariesUsingSignature","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"},{"type":"uint256","name":"_expirationTimestamp","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addBeneficiary","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addManager","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addTreasuryFunds","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"baseInterval","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"state","internalType":"enum ICommunity.BeneficiaryState"},{"type":"uint256","name":"claims","internalType":"uint256"},{"type":"uint256","name":"claimedAmount","internalType":"uint256"},{"type":"uint256","name":"lastClaim","internalType":"uint256"}],"name":"beneficiaries","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"claimedAmounts","internalType":"uint256[]"}],"name":"beneficiaryClaimedAmounts","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"beneficiaryJoinFromMigrated","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"beneficiaryListAt","inputs":[{"type":"uint256","name":"index_","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"beneficiaryListLength","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Upgradeable"}],"name":"cUSD","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"claimCooldown","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICommunityAdmin"}],"name":"communityAdmin","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"decreaseStep","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"donate","inputs":[{"type":"address","name":"_sender","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getInitialMaxClaim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getInitialMaxTotalClaim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getRoleAdmin","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getVersion","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"pure","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"impactMarketAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"incrementInterval","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_tokenAddress","internalType":"address"},{"type":"address[]","name":"_managers","internalType":"address[]"},{"type":"uint256","name":"_originalClaimAmount","internalType":"uint256"},{"type":"uint256","name":"_maxTotalClaim","internalType":"uint256"},{"type":"uint256","name":"_decreaseStep","internalType":"uint256"},{"type":"uint256","name":"_baseInterval","internalType":"uint256"},{"type":"uint256","name":"_incrementInterval","internalType":"uint256"},{"type":"uint256","name":"_minTranche","internalType":"uint256"},{"type":"uint256","name":"_maxTranche","internalType":"uint256"},{"type":"uint256","name":"_maxBeneficiaries","internalType":"uint256"},{"type":"address","name":"_previousCommunity","internalType":"contract ICommunity"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isSelfFunding","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastFundRequest","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastInterval","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lock","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockBeneficiaries","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockBeneficiariesUsingSignature","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"},{"type":"uint256","name":"_expirationTimestamp","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"lockBeneficiary","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"locked","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxBeneficiaries","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxClaim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxTotalClaim","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxTranche","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minTranche","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"originalClaimAmount","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ICommunity"}],"name":"previousCommunity","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"privateFunds","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeBeneficiaries","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeBeneficiariesUsingSignature","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"},{"type":"uint256","name":"_expirationTimestamp","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeBeneficiary","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeManager","inputs":[{"type":"address","name":"_account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceRole","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"},{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"requestFunds","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"","internalType":"bytes32"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20Upgradeable"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address[]","name":"","internalType":"address[]"}],"name":"tokenList","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"tokenAddress","internalType":"address"},{"type":"uint256","name":"ratio","internalType":"uint256"},{"type":"uint256","name":"startBlock","internalType":"uint256"}],"name":"tokens","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokensLength","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transfer","inputs":[{"type":"address","name":"_token","internalType":"contract IERC20Upgradeable"},{"type":"address","name":"_to","internalType":"address"},{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"treasuryFunds","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlock","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlockBeneficiaries","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlockBeneficiariesUsingSignature","inputs":[{"type":"address[]","name":"_beneficiaryAddresses","internalType":"address[]"},{"type":"uint256","name":"_expirationTimestamp","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unlockBeneficiary","inputs":[{"type":"address","name":"_beneficiaryAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateBeneficiaryParams","inputs":[{"type":"uint256","name":"_originalClaimAmount","internalType":"uint256"},{"type":"uint256","name":"_maxTotalClaim","internalType":"uint256"},{"type":"uint256","name":"_decreaseStep","internalType":"uint256"},{"type":"uint256","name":"_baseInterval","internalType":"uint256"},{"type":"uint256","name":"_incrementInterval","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateCommunityAdmin","inputs":[{"type":"address","name":"_newCommunityAdmin","internalType":"contract ICommunityAdmin"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateCommunityParams","inputs":[{"type":"uint256","name":"_minTranche","internalType":"uint256"},{"type":"uint256","name":"_maxTranche","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateMaxBeneficiaries","inputs":[{"type":"uint256","name":"_newMaxBeneficiaries","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updatePreviousCommunity","inputs":[{"type":"address","name":"_newPreviousCommunity","internalType":"contract ICommunity"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateToken","inputs":[{"type":"address","name":"_newToken","internalType":"contract IERC20Upgradeable"},{"type":"address[]","name":"_exchangePath","internalType":"address[]"},{"type":"uint256","name":"_originalClaimAmount","internalType":"uint256"},{"type":"uint256","name":"_maxTotalClaim","internalType":"uint256"},{"type":"uint256","name":"_decreaseStep","internalType":"uint256"},{"type":"uint256","name":"_baseInterval","internalType":"uint256"},{"type":"uint256","name":"_incrementInterval","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"validBeneficiaryCount","inputs":[]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b5061523d806100206000396000f3fe608060405234801561001057600080fd5b50600436106104335760003560e01c806391d1485411610236578063c51fab3c1161013b578063d92fc67b116100c3578063ecd0c0c311610087578063ecd0c0c3146108c3578063f2fde38b146108d7578063f83d08ba146108ea578063fb7b0a0c146108f2578063fc0c546a146104d757600080fd5b8063d92fc67b14610882578063dd4414bb1461088b578063e25c25f314610895578063e69d849d146108a8578063eb0376b1146108bb57600080fd5b8063d10f51071161010a578063d10f510714610837578063d33d4ec61461084a578063d4938db31461085d578063d547741f14610865578063d6dbd9721461087857600080fd5b8063c51fab3c146107fa578063c76a890c14610804578063cf30901214610817578063d04c41b61461082457600080fd5b8063a57e08ca116101be578063b026ba571161018d578063b026ba57146107b2578063b809ee82146107ba578063beabacc8146107cd578063c041fdc5146107e0578063c0e27b6b146107e757600080fd5b8063a57e08ca14610771578063a69df4b514610784578063a8f3e0631461078c578063ac18de431461079f57600080fd5b80639e2c58ca116102055780639e2c58ca1461072e578063a0f93a1714610743578063a217fddf1461074d578063a38540ee14610755578063a3c6e4111461075e57600080fd5b806391d14854146106eb57806394e13748146106fe5780639c01a401146107115780639cecf5721461071b57600080fd5b80633a578a0c1161033c5780635fac917a116102c457806378ba280f1161029357806378ba280f146106115780637e2959dc146106aa578063830953ab146106bd57806389554f17146106c75780638da5cb5b146106da57600080fd5b80635fac917a1461065b5780636b31f2ad1461066f578063715018a61461068f578063785393db1461069757600080fd5b806357c363271161030b57806357c3632714610611578063590411da146106195780635926651d1461062c57806359633a1c1461063f578063597be18b1461065257600080fd5b80633a578a0c146105b3578063431a801a146105c75780634e71d92d146105d15780634f64b2be146105d957600080fd5b80632b271117116103bf578063300c12fe1161038e578063300c12fe1461055d578063305ff6541461056757806336568abe1461057a5780633783946a1461058d57806337e556dd146105a057600080fd5b80632b2711171461051a5780632d06177a146105245780632f2ff15d146105375780632fd791031461054a57600080fd5b80630d8e6e2c116104065780630d8e6e2c146104b45780630e5b7c53146104bb5780631912cdb4146104c45780631fccf672146104d7578063248a9ca3146104f757600080fd5b8063015677391461043857806301ffc9a71461046457806309c338c3146104875780630b4e78171461049f575b600080fd5b61044b6104463660046149f4565b6108fb565b60405161045b9493929190614ea1565b60405180910390f35b610477610472366004614c39565b610945565b604051901515815260200161045b565b6104916101065481565b60405190815260200161045b565b6104b26104ad366004614a2c565b61097c565b005b6003610491565b61049160fd5481565b6104b26104d2366004614da5565b610d0e565b6104df610e26565b6040516001600160a01b03909116815260200161045b565b610491610505366004614bf2565b60009081526065602052604090206001015490565b6104916101055481565b6104b26105323660046149f4565b610ed7565b6104b2610545366004614c0a565b610f81565b6104b2610558366004614dc6565b610ff3565b6101055415610477565b6104b2610575366004614bf2565b611207565b6104b2610588366004614c0a565b611341565b6104b261059b366004614ca1565b6113bb565b6104b26105ae366004614b3d565b611c0b565b610107546104df906001600160a01b031681565b6104916101005481565b6104b2611c25565b6105ec6105e7366004614bf2565b611f97565b604080516001600160a01b03909416845260208401929092529082015260600161045b565b610491611fd5565b6104b2610627366004614b0a565b611ff6565b6104b261063a3660046149f4565b612086565b6104b261064d3660046149f4565b61214c565b61049160fe5481565b610108546104df906001600160a01b031681565b61068261067d3660046149f4565b612189565b60405161045b9190614e69565b6104b26122ee565b6104df6106a5366004614bf2565b612324565b6104b26106b83660046149f4565b612332565b6104916101115481565b6104b26106d5366004614b0a565b6123ba565b6097546001600160a01b03166104df565b6104776106f9366004614c0a565b61241a565b6104b261070c366004614b3d565b612445565b6104916101015481565b6104916107293660046149f4565b61247c565b6107366124ae565b60405161045b9190614e1c565b61049161010d5481565b610491600081565b61049160ff5481565b6104b261076c366004614b3d565b6125f6565b6104b261077f3660046149f4565b61262d565b6104b26127d3565b61049161079a3660046149f4565b6128a8565b6104b26107ad3660046149f4565b612905565b6104b2612b13565b6104b26107c8366004614bf2565b612c84565b6104b26107db366004614c61565b612cc9565b60006104df565b6104b26107f53660046149f4565b612daf565b6104916101035481565b6104b2610812366004614b0a565b612e0f565b60fb546104779060ff1681565b6104b2610832366004614b0a565b612e4c565b6104b26108453660046149f4565b612eac565b6104b26108583660046149f4565b612f0c565b60ff54610491565b6104b2610873366004614c0a565b612f99565b6104916101025481565b61010e54610491565b6104916101045481565b6104b26108a3366004614b3d565b613007565b6104b26108b6366004614adf565b613071565b610491613117565b61010c546104df906001600160a01b031681565b6104b26108e53660046149f4565b613124565b6104b26131bc565b61049160fc5481565b6001600160a01b0381166000908152610109602052604081208054600182015483928392839260ff9091169061093083613294565b83600301549450945094509450509193509193565b60006001600160e01b03198216637965db0b60e01b148061097657506301ffc9a760e01b6001600160e01b03198316145b92915050565b600054610100900460ff166109975760005460ff161561099b565b303b155b610a035760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015610a25576000805461ffff19166101011790555b858711610aad5760405162461bcd60e51b815260206004820152604a60248201527f436f6d6d756e6974793a3a696e697469616c697a653a2062617365496e74657260448201527f76616c206d7573742062652067726561746572207468616e20696e6372656d656064820152691b9d125b9d195c9d985b60b21b608482015260a4016109fa565b89891015610b175760405162461bcd60e51b815260206004820152603160248201527f436f6d6d756e6974793a3a696e697469616c697a653a206f726967696e616c436044820152706c61696d416d6f756e7420746f2062696760781b60648201526084016109fa565b83851115610b9d5760405162461bcd60e51b815260206004820152604760248201527f436f6d6d756e6974793a3a696e697469616c697a653a206d696e5472616e636860448201527f652073686f756c64206e6f742062652067726561746572207468616e206d61786064820152665472616e63686560c81b608482015260a4016109fa565b61010880546001600160a01b03191633179055610bb8613367565b610bc06133a6565b610bc86133dd565b61010c80546001600160a01b03808f166001600160a01b03199283161790925560fc8c90556101118c905560fd89905560fe88905560ff8b905561010487905561010586905561010780549285169290911691909117905561010388905561010d83905560fb805460ff19169055610c3f33613124565b610c576000805160206151e88339815191528061340c565b610c6f6000805160206151e883398151915233613457565b604051339081907f05a4006f300442cf8b7fdb885f5ee958812020bffb5c5a8e655fde64e5f987ed90600090a38a516000905b80821015610cec57610cda8d8381518110610ccd57634e487b7160e01b600052603260045260246000fd5b6020026020010151613461565b81610ce48161518b565b925050610ca2565b50508015610d00576000805461ff00191690555b505050505050505050505050565b6097546001600160a01b03163314610d385760405162461bcd60e51b81526004016109fa90614f80565b80821115610dc95760405162461bcd60e51b815260206004820152605260248201527f436f6d6d756e6974793a3a757064617465436f6d6d756e697479506172616d7360448201527f3a206d696e5472616e6368652073686f756c64206e6f742062652067726561746064820152716572207468616e206d61785472616e63686560701b608482015260a4016109fa565b61010454610105546040805192835260208301919091528101839052606081018290527fcd922a6f0ad842d84e08eb5df24c029b63c60167fb37cff24adf95c4832e32589060800160405180910390a16101049190915561010555565b61010c546000906001600160a01b0316610ec65761010860009054906101000a90046001600160a01b03166001600160a01b0316631fccf6726040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8957600080fd5b505afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec19190614a10565b905090565b5061010c546001600160a01b031690565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f599190614bd2565b610f755760405162461bcd60e51b81526004016109fa90614f3d565b610f7e81613461565b50565b60405162461bcd60e51b815260206004820152603a60248201527f436f6d6d756e6974793a3a6772616e74526f6c653a20596f7520617265206e6f60448201527f7420616c6c6f7720746f207573652074686973206d6574686f6400000000000060648201526084016109fa565b5050565b6097546001600160a01b0316331461101d5760405162461bcd60e51b81526004016109fa90614f80565b8082116110b85760405162461bcd60e51b815260206004820152605760248201527f436f6d6d756e6974793a3a75706461746542656e65666963696172795061726160448201527f6d733a2062617365496e74657276616c206d757374206265206772656174657260648201527f207468616e20696e6372656d656e74496e74657276616c000000000000000000608482015260a4016109fa565b82610100546110c79190615112565b6110d190866150da565b8410156111465760405162461bcd60e51b815260206004820152603f60248201527f436f6d6d756e6974793a3a75706461746542656e65666963696172795061726160448201527f6d733a206f726967696e616c436c61696d416d6f756e7420746f6f206269670060648201526084016109fa565b60fc5460ff546101035460fd5460fe54604080519586526020860194909452848401929092526060840152608083015260a0820187905260c0820186905260e0820185905261010082018490526101208201839052517fa19f450cd68c70f728b0c4b75befd202ea5ebb1ae78b6aca47365934b5008750918190036101400190a160fc859055610100546111db908490615112565b6111e59085615131565b60ff5561010383905560fd82905560fe8190556112006134ce565b5050505050565b6097546001600160a01b031633148061129d575061010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561126557600080fd5b505afa158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190614bd2565b6112fe5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a204e4f545f4f574e45525f4f525f414d42415353414460448201526b4f525f4f525f454e5449545960a01b60648201526084016109fa565b61010d5460408051918252602082018390527f6672b7064fe522fa09a8078f6d967272e0a379beb2270817417c9f023251b657910160405180910390a161010d55565b6001600160a01b03811633146113b15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109fa565b610fef8282613735565b6097546001600160a01b031633146113e55760405162461bcd60e51b81526004016109fa90614f80565b61010854604080516361d027b360e01b815290516000926001600160a01b0316916361d027b3916004808301926020929190829003018186803b15801561142b57600080fd5b505afa15801561143f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114639190614a10565b61010e54909150600a116114d35760405162461bcd60e51b815260206004820152603160248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20546f6b656e206c696044820152707374206c656e67746820746f6f2062696760781b60648201526084016109fa565b6114db610e26565b6001600160a01b0316896001600160a01b031614156115745760405162461bcd60e51b815260206004820152604960248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a204e657720746f6b6560448201527f6e2063616e6e6f74206265207468652073616d6520617320746865206375727260648201526832b73a103a37b5b2b760b91b608482015260a4016109fa565b61010860009054906101000a90046001600160a01b03166001600160a01b0316631fccf6726040518163ffffffff1660e01b815260040160206040518083038186803b1580156115c357600080fd5b505afa1580156115d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fb9190614a10565b6001600160a01b0316896001600160a01b0316148061168e57506040516319f3736160e01b81526001600160a01b038a811660048301528216906319f373619060240160206040518083038186803b15801561165657600080fd5b505afa15801561166a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168e9190614bd2565b6116e85760405162461bcd60e51b815260206004820152602560248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20496e76616c6964206044820152643a37b5b2b760d91b60648201526084016109fa565b60018711801561174557506116fb610e26565b6001600160a01b03168888600081811061172557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061173a91906149f4565b6001600160a01b0316145b80156117a057506001600160a01b0389168888611763600182615131565b81811061178057634e487b7160e01b600052603260045260246000fd5b905060200201602081019061179591906149f4565b6001600160a01b0316145b6118015760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20696e76616c69642060448201526b0caf0c6d0c2dccecaa0c2e8d60a31b60648201526084016109fa565b61010e5461189b5761010e604051806060016040528061181f610e26565b6001600160a01b039081168252670de0b6b3a76400006020808401919091526000604093840181905285546001808201885596825290829020855160039092020180546001600160a01b03191691909316178255830151938101939093550151600290910155611899611890610e26565b61010f9061379c565b505b60006118a5611fd5565b6118b787670de0b6b3a7640000615112565b6118c191906150f2565b604080516060810182526001600160a01b038d81168252602082018481524393830193845261010e805460018101825560009190915292517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f4805600390940293840180546001600160a01b0319169190931617909155517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f480682015590517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f480790910155905061199061010f8b61379c565b506000826001600160a01b031663735de9f76040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cc57600080fd5b505afa1580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a049190614a10565b90506000611a10610e26565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015611a5157600080fd5b505afa158015611a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a899190614d8d565b9050611a93610e26565b60405163095ea7b360e01b81526001600160a01b03848116600483015260248201849052919091169063095ea7b390604401602060405180830381600087803b158015611adf57600080fd5b505af1158015611af3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b179190614bd2565b506001600160a01b038216635c11d7958260008e8e30611b3942610e106150da565b6040518763ffffffff1660e01b8152600401611b5a96959493929190615067565b600060405180830381600087803b158015611b7457600080fd5b505af1158015611b88573d6000803e3d6000fd5b505050508b6001600160a01b031661010c60009054906101000a90046001600160a01b03166001600160a01b03167f0b1186973f810894b87ab0bfbee422fddcaad21b46dc705a561451bbb6bac11760405160405180910390a361010c80546001600160a01b0319166001600160a01b038e16179055610d008989898989610ff3565b611c168383836137b1565b611c1f846139fc565b50505050565b60fb5460ff1615611c485760405162461bcd60e51b81526004016109fa90614f12565b6001336000908152610109602052604090205460ff166003811115611c7d57634e487b7160e01b600052602160045260246000fd5b14611cca5760405162461bcd60e51b815260206004820181905260248201527f436f6d6d756e6974793a204e4f545f56414c49445f42454e454649434941525960448201526064016109fa565b600260c9541415611ced5760405162461bcd60e51b81526004016109fa90615030565b600260c9553360009081526101096020526040812090611d0c82613294565b905043611d183361247c565b1115611d665760405162461bcd60e51b815260206004820152601960248201527f436f6d6d756e6974793a3a636c61696d3a204e4f545f5945540000000000000060448201526064016109fa565b60ff548110611dcc5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a3a636c61696d3a20416c726561647920636c61696d6560448201526b642065766572797468696e6760a01b60648201526084016109fa565b6000806101115411611de05760fc54611de5565b610111545b905060008260ff54611df79190615131565b821115611e11578260ff54611e0c9190615131565b611e13565b815b61010e549091506001108015611e60575061010e600181548110611e4757634e487b7160e01b600052603260045260246000fd5b9060005260206000209060030201600201548460030154105b15611ebe57836002015484600401600061010e600081548110611e9357634e487b7160e01b600052603260045260246000fd5b600091825260208083206003909202909101546001600160a01b031683528201929092526040019020555b611ec881846150da565b6002850155600184018054906000611edf8361518b565b909155505043600385015561010e5460011015611f3a5780846004016000611f05610e26565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254611f3491906150da565b90915550505b611f573382611f47610e26565b6001600160a01b03169190613a4c565b60405181815233907fd54e03b214b3e8c17e98044f98554b6f1b18dd2a3163a2619afea7e9b2a6eb979060200160405180910390a25050600160c9555050565b61010e8181548110611fa857600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b60006101035461010054611fe99190615112565b60ff54610ec191906150da565b60fb5460ff16156120195760405162461bcd60e51b81526004016109fa90614f12565b6120316000805160206151e88339815191523361241a565b61204d5760405162461bcd60e51b81526004016109fa90614fb5565b600260c95414156120705760405162461bcd60e51b81526004016109fa90615030565b600260c95561207e81613aaf565b50600160c955565b60fb5460ff16156120a95760405162461bcd60e51b81526004016109fa90614f12565b6120c16000805160206151e88339815191523361241a565b6120dd5760405162461bcd60e51b81526004016109fa90614fb5565b600260c95414156121005760405162461bcd60e51b81526004016109fa90615030565b600260c95561210e81613b66565b6040516001600160a01b0382169033907fbb39c36a7502b7256e1a687254146a9a2ea7b146c77cb9e40eb0e2b8793781e190600090a350600160c955565b6121646000805160206151e88339815191523361241a565b6121805760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613bdf565b6001600160a01b0381166000908152610109602052604081206060916121b061010f613c97565b67ffffffffffffffff8111156121d657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121ff578160200160208202803683370190505b509050600061220f61010f613c97565b905060005b8181101561228c5760048401600061222e61010f84613ca1565b6001600160a01b03166001600160a01b031681526020019081526020016000205483828151811061226f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806122848161518b565b915050612214565b5081516122e65760408051600180825281830190925290602080830190803683370190505091508260020154826000815181106122d957634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b509392505050565b6097546001600160a01b031633146123185760405162461bcd60e51b81526004016109fa90614f80565b6123226000613cad565b565b600061097661010a83613ca1565b6097546001600160a01b0316331461235c5760405162461bcd60e51b81526004016109fa90614f80565b610107546040516001600160a01b038084169216907f0d6a84e94da4b619dd0d993b5689ec82db4b1095da99ee0f3e7bb046c647e6ad90600090a361010780546001600160a01b0319166001600160a01b0392909216919091179055565b60fb5460ff16156123dd5760405162461bcd60e51b81526004016109fa90614f12565b6123f56000805160206151e88339815191523361241a565b6124115760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613cff565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60fb5460ff16156124685760405162461bcd60e51b81526004016109fa90614f12565b6124738383836137b1565b611c1f84613d4f565b6000612487826128a8565b6001600160a01b0383166000908152610109602052604090206003015461097691906150da565b606060006124bd61010f613c97565b67ffffffffffffffff8111156124e357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561250c578160200160208202803683370190505b509050600061251c61010f613c97565b905060005b8181101561257f5761253561010f82613ca1565b83828151811061255557634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806125778161518b565b915050612521565b5081516125f05760408051600180825281830190925290602080830190803683370190505091506125ae610e26565b826000815181106125cf57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b50919050565b60fb5460ff16156126195760405162461bcd60e51b81526004016109fa90614f12565b6126248383836137b1565b611c1f84613cff565b6001600160a01b03811660009081526101096020526040812090815460ff16600381111561266b57634e487b7160e01b600052602160045260246000fd5b146126de5760405162461bcd60e51b815260206004820152603a60248201527f436f6d6d756e6974793a3a62656e65666963696172794a6f696e46726f6d4d6960448201527f6772617465643a2042656e65666963696172792065786973747300000000000060648201526084016109fa565b61010754604051630156773960e01b81526001600160a01b038481166004830152600092839283928392169063015677399060240160806040518083038186803b15801561272b57600080fd5b505afa15801561273f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127639190614d4c565b93509350935093506127758585613d9f565b60018501839055600385018190556002850182905561279661010a8761379c565b506040516001600160a01b038716907f505fe088fef0d1fb451ccfed842b55a86af1ee6208502f4bc3327dcb9032082990600090a2505050505050565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561281d57600080fd5b505afa158015612831573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128559190614bd2565b6128715760405162461bcd60e51b81526004016109fa90614f3d565b60fb805460ff1916905560405133907f4e50048c25972c85ad169c2302967f1e633e8dc6108d6aca51a90d2a59d4934d90600090a2565b6001600160a01b03811660009081526101096020526040812060018101546128d35750600092915050565b60fe54600182600101546128e79190615131565b6128f19190615112565b60fd546128fe91906150da565b9392505050565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561294f57600080fd5b505afa158015612963573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129879190614bd2565b6129a35760405162461bcd60e51b81526004016109fa90614f3d565b6129bb6000805160206151e88339815191528261241a565b612a2f576040805162461bcd60e51b81526020600482015260248101919091527f436f6d6d756e6974793a3a72656d6f76654d616e616765723a2054686973206160448201527f63636f756e7420646f65736e27742068617665206d616e6167657220726f6c6560648201526084016109fa565b610108546001600160a01b0382811691161415612ac25760405162461bcd60e51b8152602060048201526044602482018190527f436f6d6d756e6974793a3a72656d6f76654d616e616765723a20596f75206172908201527f65206e6f7420616c6c6f7720746f2072656d6f766520636f6d6d756e697479416064820152633236b4b760e11b608482015260a4016109fa565b612ada6000805160206151e883398151915282613735565b6040516001600160a01b0382169033907f3e902a6ee93dd5b2d48bd1009c7701a481be512b1ef73dbed2f95ea44c59ea8890600090a350565b60fb5460ff1615612b365760405162461bcd60e51b81526004016109fa90614f12565b612b4e6000805160206151e88339815191523361241a565b612b6a5760405162461bcd60e51b81526004016109fa90614fb5565b61010554612be05760405162461bcd60e51b815260206004820152603760248201527f436f6d6d756e6974793a3a7265717565737446756e64733a205468697320636f60448201527f6d6d756e6974792069732073656c662d66756e64696e6700000000000000000060648201526084016109fa565b61010860009054906101000a90046001600160a01b03166001600160a01b031663174a71d76040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c3157600080fd5b505af1158015612c45573d6000803e3d6000fd5b5050436101065550612c5790506134ce565b60405133907f16a8b794d4e2ed6ffef50d78af3d4372ce4bfe8a399bfc23f59b7832ee47539090600090a2565b6097546001600160a01b03163314612cae5760405162461bcd60e51b81526004016109fa90614f80565b806101016000828254612cc191906150da565b909155505050565b6097546001600160a01b03163314612cf35760405162461bcd60e51b81526004016109fa90614f80565b600260c9541415612d165760405162461bcd60e51b81526004016109fa90615030565b600260c955612d2f6001600160a01b0384168383613a4c565b612d37610e26565b6001600160a01b0316836001600160a01b03161415612d5857612d586134ce565b816001600160a01b0316836001600160a01b03167f9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a895683604051612d9d91815260200190565b60405180910390a35050600160c95550565b60fb5460ff1615612dd25760405162461bcd60e51b81526004016109fa90614f12565b612dea6000805160206151e88339815191523361241a565b612e065760405162461bcd60e51b81526004016109fa90614fb5565b610f7e8161401b565b612e276000805160206151e88339815191523361241a565b612e435760405162461bcd60e51b81526004016109fa90614fb5565b610f7e816139fc565b60fb5460ff1615612e6f5760405162461bcd60e51b81526004016109fa90614f12565b612e876000805160206151e88339815191523361241a565b612ea35760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613d4f565b60fb5460ff1615612ecf5760405162461bcd60e51b81526004016109fa90614f12565b612ee76000805160206151e88339815191523361241a565b612f035760405162461bcd60e51b81526004016109fa90614fb5565b610f7e816140a5565b6097546001600160a01b03163314612f365760405162461bcd60e51b81526004016109fa90614f80565b610108546040516001600160a01b038084169216907fdd8d3b7b0badfc5d636d48e71e28015b4b8554b64d2cffba6f0a90bf7693ec0090600090a361010880546001600160a01b0319166001600160a01b038316908117909155610f7e90613461565b60405162461bcd60e51b815260206004820152603b60248201527f436f6d6d756e6974793a3a7265766f6b65526f6c653a20596f7520617265206e60448201527f6f7420616c6c6f7720746f207573652074686973206d6574686f64000000000060648201526084016109fa565b60fb5460ff161561302a5760405162461bcd60e51b81526004016109fa90614f12565b600260c954141561304d5760405162461bcd60e51b81526004016109fa90615030565b600260c95561305d8383836137b1565b61306684613aaf565b5050600160c9555050565b600260c95414156130945760405162461bcd60e51b81526004016109fa90615030565b600260c9556130b88230836130a7610e26565b6001600160a01b031692919061412f565b8061010260008282546130cb91906150da565b909155506130d990506134ce565b60405181815233907f0553260a2e46b0577270d8992db02d30856ca880144c72d6e9503760946aef139060200160405180910390a25050600160c955565b6000610ec161010a613c97565b6097546001600160a01b0316331461314e5760405162461bcd60e51b81526004016109fa90614f80565b6001600160a01b0381166131b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109fa565b610f7e81613cad565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561320657600080fd5b505afa15801561321a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323e9190614bd2565b61325a5760405162461bcd60e51b81526004016109fa90614f3d565b60fb805460ff1916600117905560405133907fe1e6bc10311f2f958d6cd2d0ab7308c32089aa1acb8ab11a2ccb60028e332bd090600090a2565b61010e5460009060028110156132ad5750506002015490565b600283015460006132bf600184615131565b90505b846003015461010e82815481106132e957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015411156122e657670de0b6b3a764000061010e828154811061332c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020160010154836133499190615112565b61335391906150f2565b91508061335f81615174565b9150506132c2565b600054610100900460ff1661338e5760405162461bcd60e51b81526004016109fa90614fe5565b613396614167565b61339e614167565b612322614167565b600054610100900460ff166133cd5760405162461bcd60e51b81526004016109fa90614fe5565b6133d5614167565b61232261418e565b600054610100900460ff166134045760405162461bcd60e51b81526004016109fa90614fe5565b6123226141be565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610fef82826141ec565b6134796000805160206151e88339815191528261241a565b610f7e576134956000805160206151e8833981519152826141ec565b6040516001600160a01b0382169033907f05a4006f300442cf8b7fdb885f5ee958812020bffb5c5a8e655fde64e5f987ed90600090a350565b60008061010860009054906101000a90046001600160a01b03166001600160a01b0316636b68b2ef6040518163ffffffff1660e01b815260040160206040518083038186803b15801561352057600080fd5b505afa158015613534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135589190614d8d565b9050600061010860009054906101000a90046001600160a01b03166001600160a01b031663afae65be6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135ab57600080fd5b505afa1580156135bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135e39190614d8d565b905061010054600014806135f8575061010554155b806136035750808211155b156136125760fc5492506136e2565b6101005461361e610e26565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b15801561365f57600080fd5b505afa158015613673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136979190614d8d565b6136a191906150f2565b92506000828260fc546136b49190615112565b6136be91906150f2565b9050808410156136d0578093506136e0565b60fc548411156136e05760fc5493505b505b610111548314613730576101115460408051918252602082018590527fc22e16deec6f587d0a1aad7275c1621e6c24431fea14dd71e8f3243e9fbc5ca3910160405180910390a16101118390555b505050565b61373f828261241a565b15610fef5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006128fe836001600160a01b038416614272565b61010860009054906101000a90046001600160a01b03166001600160a01b031663af2d77f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561380057600080fd5b505afa158015613814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138389190614a10565b6001600160a01b0316336001600160a01b0316146138ad5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a2053656e646572206d7573742062652074686520626160448201526b18dad95b99081dd85b1b195d60a21b60648201526084016109fa565b428310156138fd5760405162461bcd60e51b815260206004820152601c60248201527f436f6d6d756e6974793a205369676e617475726520746f6f206f6c640000000060448201526064016109fa565b6040516bffffffffffffffffffffffff1933606090811b8216602084015230901b16603482015260488101849052600090606801604051602081830303815290604052805190602001209050600061399684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061399092508691506142c19050565b90614314565b90506139b06000805160206151e88339815191528261241a565b6112005760405162461bcd60e51b815260206004820152601c60248201527f436f6d6d756e6974793a20496e76616c6964207369676e61747572650000000060448201526064016109fa565b80516000905b8082101561373057613a3a838381518110613a2d57634e487b7160e01b600052603260045260246000fd5b6020026020010151613bdf565b81613a448161518b565b925050613a02565b6040516001600160a01b03831660248201526044810182905261373090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614330565b80516000905b8082101561373057613aed838381518110613ae057634e487b7160e01b600052603260045260246000fd5b6020026020010151613b66565b828281518110613b0d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03167fbb39c36a7502b7256e1a687254146a9a2ea7b146c77cb9e40eb0e2b8793781e160405160405180910390a381613b5e8161518b565b925050613ab5565b6001600160a01b03811660009081526101096020526040812090815460ff166003811115613ba457634e487b7160e01b600052602160045260246000fd5b14613bad575050565b613bb8816001613d9f565b436003820155613bca61010a8361379c565b50610fef82662386f26fc10000611f47610e26565b6001600160a01b0381166000908152610109602052604090206001815460ff166003811115613c1e57634e487b7160e01b600052602160045260246000fd5b1480613c4d57506002815460ff166003811115613c4b57634e487b7160e01b600052602160045260246000fd5b145b15610fef57613c5d816003613d9f565b6040516001600160a01b0383169033907f1a6590bd0cabbfcc7c86bef99e1034054e179905cfcc294598fcd426c092244290600090a35050565b6000610976825490565b60006128fe8383614402565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516000905b8082101561373057613d3d838381518110613d3057634e487b7160e01b600052603260045260246000fd5b602002602001015161401b565b81613d478161518b565b925050613d05565b80516000905b8082101561373057613d8d838381518110613d8057634e487b7160e01b600052603260045260246000fd5b60200260200101516140a5565b81613d978161518b565b925050613d55565b806003811115613dbf57634e487b7160e01b600052602160045260246000fd5b825460ff166003811115613de357634e487b7160e01b600052602160045260246000fd5b1415613ded575050565b6001816003811115613e0f57634e487b7160e01b600052602160045260246000fd5b1415613f895760fc546101035460ff54613e299190615131565b1015613e955760405162461bcd60e51b815260206004820152603560248201527f436f6d6d756e6974793a3a5f6368616e676542656e656669636961727953746160448201527474653a204d617820636c61696d20746f6f206c6f7760581b60648201526084016109fa565b61010d541580613eaa575061010d5461010054105b613f535760405162461bcd60e51b815260206004820152606860248201527f436f6d6d756e6974793a3a5f6368616e676542656e656669636961727953746160448201527f74653a205468697320636f6d6d756e697479206861732072656163686564207460648201527f6865206d6178696d756d206e756d626572206f662076616c69642062656e6566608482015267696369617269657360c01b60a482015260c4016109fa565b6101008054906000613f648361518b565b91905055506101035460ff6000828254613f7e9190615131565b90915550613fe69050565b6001825460ff166003811115613faf57634e487b7160e01b600052602160045260246000fd5b1415613fe6576101008054906000613fc683615174565b91905055506101035460ff6000828254613fe091906150da565b90915550505b81548190839060ff1916600183600381111561401257634e487b7160e01b600052602160045260246000fd5b02179055505050565b6001600160a01b0381166000908152610109602052604090206001815460ff16600381111561405a57634e487b7160e01b600052602160045260246000fd5b1415610fef5761406b816002613d9f565b6040516001600160a01b0383169033907f2b9ef93c7856b47a1b624fa3fcc4b651d388dd6d16327f3ad22b05f3da8b0f1590600090a35050565b6001600160a01b0381166000908152610109602052604090206002815460ff1660038111156140e457634e487b7160e01b600052602160045260246000fd5b1415610fef576140f5816001613d9f565b6040516001600160a01b0383169033907fa589fb4f2925123e7a030dd6bbe76be46a03f8ce0ea53a78dbb3383c7797db2c90600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611c1f9085906323b872dd60e01b90608401613a78565b600054610100900460ff166123225760405162461bcd60e51b81526004016109fa90614fe5565b600054610100900460ff166141b55760405162461bcd60e51b81526004016109fa90614fe5565b61232233613cad565b600054610100900460ff166141e55760405162461bcd60e51b81526004016109fa90614fe5565b600160c955565b6141f6828261241a565b610fef5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561422e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008181526001830160205260408120546142b957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610976565b506000610976565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000614323858561443a565b915091506122e6816144aa565b6000614385826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146ab9092919063ffffffff16565b80519091501561373057808060200190518101906143a39190614bd2565b6137305760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109fa565b600082600001828154811061442757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000808251604114156144715760208301516040840151606085015160001a614465878285856146c2565b945094505050506144a3565b82516040141561449b57602083015160408401516144908683836147af565b9350935050506144a3565b506000905060025b9250929050565b60008160048111156144cc57634e487b7160e01b600052602160045260246000fd5b14156144d55750565b60018160048111156144f757634e487b7160e01b600052602160045260246000fd5b14156145455760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109fa565b600281600481111561456757634e487b7160e01b600052602160045260246000fd5b14156145b55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109fa565b60038160048111156145d757634e487b7160e01b600052602160045260246000fd5b14156146305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109fa565b600481600481111561465257634e487b7160e01b600052602160045260246000fd5b1415610f7e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109fa565b60606146ba84846000856147de565b949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156146f957506000905060036147a6565b8460ff16601b1415801561471157508460ff16601c14155b1561472257506000905060046147a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614776573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661479f576000600192509250506147a6565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016147d0878288856146c2565b935093505050935093915050565b60608247101561483f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109fa565b843b61488d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109fa565b600080866001600160a01b031685876040516148a99190614e00565b60006040518083038185875af1925050503d80600081146148e6576040519150601f19603f3d011682016040523d82523d6000602084013e6148eb565b606091505b50915091506148fb828286614906565b979650505050505050565b606083156149155750816128fe565b8251156149255782518084602001fd5b8160405162461bcd60e51b81526004016109fa9190614edf565b803561494a816151d2565b919050565b600082601f83011261495f578081fd5b8135602067ffffffffffffffff8083111561497c5761497c6151bc565b8260051b604051601f19603f830116810181811084821117156149a1576149a16151bc565b604052848152838101925086840182880185018910156149bf578687fd5b8692505b858310156149e8576149d48161493f565b8452928401926001929092019184016149c3565b50979650505050505050565b600060208284031215614a05578081fd5b81356128fe816151d2565b600060208284031215614a21578081fd5b81516128fe816151d2565b60008060008060008060008060008060006101608c8e031215614a4d578687fd5b8b35614a58816151d2565b9a5060208c013567ffffffffffffffff811115614a73578788fd5b614a7f8e828f0161494f565b9a505060408c0135985060608c0135975060808c0135965060a08c0135955060c08c0135945060e08c013593506101008c013592506101208c013591506101408c0135614acb816151d2565b809150509295989b509295989b9093969950565b60008060408385031215614af1578182fd5b8235614afc816151d2565b946020939093013593505050565b600060208284031215614b1b578081fd5b813567ffffffffffffffff811115614b31578182fd5b6146ba8482850161494f565b60008060008060608587031215614b52578384fd5b843567ffffffffffffffff80821115614b69578586fd5b614b758883890161494f565b9550602087013594506040870135915080821115614b91578384fd5b818701915087601f830112614ba4578384fd5b813581811115614bb2578485fd5b886020828501011115614bc3578485fd5b95989497505060200194505050565b600060208284031215614be3578081fd5b815180151581146128fe578182fd5b600060208284031215614c03578081fd5b5035919050565b60008060408385031215614c1c578182fd5b823591506020830135614c2e816151d2565b809150509250929050565b600060208284031215614c4a578081fd5b81356001600160e01b0319811681146128fe578182fd5b600080600060608486031215614c75578081fd5b8335614c80816151d2565b92506020840135614c90816151d2565b929592945050506040919091013590565b60008060008060008060008060e0898b031215614cbc578182fd5b8835614cc7816151d2565b9750602089013567ffffffffffffffff80821115614ce3578384fd5b818b0191508b601f830112614cf6578384fd5b813581811115614d04578485fd5b8c60208260051b8501011115614d18578485fd5b999c6020929092019b50989960408101359950606081013598506080810135975060a0810135965060c00135945092505050565b60008060008060808587031215614d61578182fd5b845160048110614d6f578283fd5b60208601516040870151606090970151919890975090945092505050565b600060208284031215614d9e578081fd5b5051919050565b60008060408385031215614db7578182fd5b50508035926020909101359150565b600080600080600060a08688031215614ddd578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008251614e12818460208701615148565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015614e5d5783516001600160a01b031683529284019291840191600101614e38565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614e5d57835183529284019291840191600101614e85565b6080810160048610614ec357634e487b7160e01b600052602160045260246000fd5b9481526020810193909352604083019190915260609091015290565b6020815260008251806020840152614efe816040850160208701615148565b601f01601f19169190910160400192915050565b60208082526011908201527010dbdb5b5d5b9a5d1e4e881b1bd8dad959607a1b604082015260600190565b60208082526023908201527f436f6d6d756e6974793a204e4f545f414d4241535341444f525f4f525f454e5460408201526249545960e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527521b7b6b6bab734ba3c9d102727aa2fa6a0a720a3a2a960511b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b868152602080820187905260a0604083018190528201859052600090869060c08401835b888110156150b957833561509e816151d2565b6001600160a01b03168252928201929082019060010161508b565b506001600160a01b0396909616606085015250505060800152949350505050565b600082198211156150ed576150ed6151a6565b500190565b60008261510d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561512c5761512c6151a6565b500290565b600082821015615143576151436151a6565b500390565b60005b8381101561516357818101518382015260200161514b565b83811115611c1f5750506000910152565b600081615183576151836151a6565b506000190190565b600060001982141561519f5761519f6151a6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610f7e57600080fdfe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a2646970667358221220444a0eacae9680cb11857602406b626d8db0f66743a730b0dcad741131ad2df564736f6c63430008040033

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106104335760003560e01c806391d1485411610236578063c51fab3c1161013b578063d92fc67b116100c3578063ecd0c0c311610087578063ecd0c0c3146108c3578063f2fde38b146108d7578063f83d08ba146108ea578063fb7b0a0c146108f2578063fc0c546a146104d757600080fd5b8063d92fc67b14610882578063dd4414bb1461088b578063e25c25f314610895578063e69d849d146108a8578063eb0376b1146108bb57600080fd5b8063d10f51071161010a578063d10f510714610837578063d33d4ec61461084a578063d4938db31461085d578063d547741f14610865578063d6dbd9721461087857600080fd5b8063c51fab3c146107fa578063c76a890c14610804578063cf30901214610817578063d04c41b61461082457600080fd5b8063a57e08ca116101be578063b026ba571161018d578063b026ba57146107b2578063b809ee82146107ba578063beabacc8146107cd578063c041fdc5146107e0578063c0e27b6b146107e757600080fd5b8063a57e08ca14610771578063a69df4b514610784578063a8f3e0631461078c578063ac18de431461079f57600080fd5b80639e2c58ca116102055780639e2c58ca1461072e578063a0f93a1714610743578063a217fddf1461074d578063a38540ee14610755578063a3c6e4111461075e57600080fd5b806391d14854146106eb57806394e13748146106fe5780639c01a401146107115780639cecf5721461071b57600080fd5b80633a578a0c1161033c5780635fac917a116102c457806378ba280f1161029357806378ba280f146106115780637e2959dc146106aa578063830953ab146106bd57806389554f17146106c75780638da5cb5b146106da57600080fd5b80635fac917a1461065b5780636b31f2ad1461066f578063715018a61461068f578063785393db1461069757600080fd5b806357c363271161030b57806357c3632714610611578063590411da146106195780635926651d1461062c57806359633a1c1461063f578063597be18b1461065257600080fd5b80633a578a0c146105b3578063431a801a146105c75780634e71d92d146105d15780634f64b2be146105d957600080fd5b80632b271117116103bf578063300c12fe1161038e578063300c12fe1461055d578063305ff6541461056757806336568abe1461057a5780633783946a1461058d57806337e556dd146105a057600080fd5b80632b2711171461051a5780632d06177a146105245780632f2ff15d146105375780632fd791031461054a57600080fd5b80630d8e6e2c116104065780630d8e6e2c146104b45780630e5b7c53146104bb5780631912cdb4146104c45780631fccf672146104d7578063248a9ca3146104f757600080fd5b8063015677391461043857806301ffc9a71461046457806309c338c3146104875780630b4e78171461049f575b600080fd5b61044b6104463660046149f4565b6108fb565b60405161045b9493929190614ea1565b60405180910390f35b610477610472366004614c39565b610945565b604051901515815260200161045b565b6104916101065481565b60405190815260200161045b565b6104b26104ad366004614a2c565b61097c565b005b6003610491565b61049160fd5481565b6104b26104d2366004614da5565b610d0e565b6104df610e26565b6040516001600160a01b03909116815260200161045b565b610491610505366004614bf2565b60009081526065602052604090206001015490565b6104916101055481565b6104b26105323660046149f4565b610ed7565b6104b2610545366004614c0a565b610f81565b6104b2610558366004614dc6565b610ff3565b6101055415610477565b6104b2610575366004614bf2565b611207565b6104b2610588366004614c0a565b611341565b6104b261059b366004614ca1565b6113bb565b6104b26105ae366004614b3d565b611c0b565b610107546104df906001600160a01b031681565b6104916101005481565b6104b2611c25565b6105ec6105e7366004614bf2565b611f97565b604080516001600160a01b03909416845260208401929092529082015260600161045b565b610491611fd5565b6104b2610627366004614b0a565b611ff6565b6104b261063a3660046149f4565b612086565b6104b261064d3660046149f4565b61214c565b61049160fe5481565b610108546104df906001600160a01b031681565b61068261067d3660046149f4565b612189565b60405161045b9190614e69565b6104b26122ee565b6104df6106a5366004614bf2565b612324565b6104b26106b83660046149f4565b612332565b6104916101115481565b6104b26106d5366004614b0a565b6123ba565b6097546001600160a01b03166104df565b6104776106f9366004614c0a565b61241a565b6104b261070c366004614b3d565b612445565b6104916101015481565b6104916107293660046149f4565b61247c565b6107366124ae565b60405161045b9190614e1c565b61049161010d5481565b610491600081565b61049160ff5481565b6104b261076c366004614b3d565b6125f6565b6104b261077f3660046149f4565b61262d565b6104b26127d3565b61049161079a3660046149f4565b6128a8565b6104b26107ad3660046149f4565b612905565b6104b2612b13565b6104b26107c8366004614bf2565b612c84565b6104b26107db366004614c61565b612cc9565b60006104df565b6104b26107f53660046149f4565b612daf565b6104916101035481565b6104b2610812366004614b0a565b612e0f565b60fb546104779060ff1681565b6104b2610832366004614b0a565b612e4c565b6104b26108453660046149f4565b612eac565b6104b26108583660046149f4565b612f0c565b60ff54610491565b6104b2610873366004614c0a565b612f99565b6104916101025481565b61010e54610491565b6104916101045481565b6104b26108a3366004614b3d565b613007565b6104b26108b6366004614adf565b613071565b610491613117565b61010c546104df906001600160a01b031681565b6104b26108e53660046149f4565b613124565b6104b26131bc565b61049160fc5481565b6001600160a01b0381166000908152610109602052604081208054600182015483928392839260ff9091169061093083613294565b83600301549450945094509450509193509193565b60006001600160e01b03198216637965db0b60e01b148061097657506301ffc9a760e01b6001600160e01b03198316145b92915050565b600054610100900460ff166109975760005460ff161561099b565b303b155b610a035760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084015b60405180910390fd5b600054610100900460ff16158015610a25576000805461ffff19166101011790555b858711610aad5760405162461bcd60e51b815260206004820152604a60248201527f436f6d6d756e6974793a3a696e697469616c697a653a2062617365496e74657260448201527f76616c206d7573742062652067726561746572207468616e20696e6372656d656064820152691b9d125b9d195c9d985b60b21b608482015260a4016109fa565b89891015610b175760405162461bcd60e51b815260206004820152603160248201527f436f6d6d756e6974793a3a696e697469616c697a653a206f726967696e616c436044820152706c61696d416d6f756e7420746f2062696760781b60648201526084016109fa565b83851115610b9d5760405162461bcd60e51b815260206004820152604760248201527f436f6d6d756e6974793a3a696e697469616c697a653a206d696e5472616e636860448201527f652073686f756c64206e6f742062652067726561746572207468616e206d61786064820152665472616e63686560c81b608482015260a4016109fa565b61010880546001600160a01b03191633179055610bb8613367565b610bc06133a6565b610bc86133dd565b61010c80546001600160a01b03808f166001600160a01b03199283161790925560fc8c90556101118c905560fd89905560fe88905560ff8b905561010487905561010586905561010780549285169290911691909117905561010388905561010d83905560fb805460ff19169055610c3f33613124565b610c576000805160206151e88339815191528061340c565b610c6f6000805160206151e883398151915233613457565b604051339081907f05a4006f300442cf8b7fdb885f5ee958812020bffb5c5a8e655fde64e5f987ed90600090a38a516000905b80821015610cec57610cda8d8381518110610ccd57634e487b7160e01b600052603260045260246000fd5b6020026020010151613461565b81610ce48161518b565b925050610ca2565b50508015610d00576000805461ff00191690555b505050505050505050505050565b6097546001600160a01b03163314610d385760405162461bcd60e51b81526004016109fa90614f80565b80821115610dc95760405162461bcd60e51b815260206004820152605260248201527f436f6d6d756e6974793a3a757064617465436f6d6d756e697479506172616d7360448201527f3a206d696e5472616e6368652073686f756c64206e6f742062652067726561746064820152716572207468616e206d61785472616e63686560701b608482015260a4016109fa565b61010454610105546040805192835260208301919091528101839052606081018290527fcd922a6f0ad842d84e08eb5df24c029b63c60167fb37cff24adf95c4832e32589060800160405180910390a16101049190915561010555565b61010c546000906001600160a01b0316610ec65761010860009054906101000a90046001600160a01b03166001600160a01b0316631fccf6726040518163ffffffff1660e01b815260040160206040518083038186803b158015610e8957600080fd5b505afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec19190614a10565b905090565b5061010c546001600160a01b031690565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b158015610f2157600080fd5b505afa158015610f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f599190614bd2565b610f755760405162461bcd60e51b81526004016109fa90614f3d565b610f7e81613461565b50565b60405162461bcd60e51b815260206004820152603a60248201527f436f6d6d756e6974793a3a6772616e74526f6c653a20596f7520617265206e6f60448201527f7420616c6c6f7720746f207573652074686973206d6574686f6400000000000060648201526084016109fa565b5050565b6097546001600160a01b0316331461101d5760405162461bcd60e51b81526004016109fa90614f80565b8082116110b85760405162461bcd60e51b815260206004820152605760248201527f436f6d6d756e6974793a3a75706461746542656e65666963696172795061726160448201527f6d733a2062617365496e74657276616c206d757374206265206772656174657260648201527f207468616e20696e6372656d656e74496e74657276616c000000000000000000608482015260a4016109fa565b82610100546110c79190615112565b6110d190866150da565b8410156111465760405162461bcd60e51b815260206004820152603f60248201527f436f6d6d756e6974793a3a75706461746542656e65666963696172795061726160448201527f6d733a206f726967696e616c436c61696d416d6f756e7420746f6f206269670060648201526084016109fa565b60fc5460ff546101035460fd5460fe54604080519586526020860194909452848401929092526060840152608083015260a0820187905260c0820186905260e0820185905261010082018490526101208201839052517fa19f450cd68c70f728b0c4b75befd202ea5ebb1ae78b6aca47365934b5008750918190036101400190a160fc859055610100546111db908490615112565b6111e59085615131565b60ff5561010383905560fd82905560fe8190556112006134ce565b5050505050565b6097546001600160a01b031633148061129d575061010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561126557600080fd5b505afa158015611279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129d9190614bd2565b6112fe5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a204e4f545f4f574e45525f4f525f414d42415353414460448201526b4f525f4f525f454e5449545960a01b60648201526084016109fa565b61010d5460408051918252602082018390527f6672b7064fe522fa09a8078f6d967272e0a379beb2270817417c9f023251b657910160405180910390a161010d55565b6001600160a01b03811633146113b15760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109fa565b610fef8282613735565b6097546001600160a01b031633146113e55760405162461bcd60e51b81526004016109fa90614f80565b61010854604080516361d027b360e01b815290516000926001600160a01b0316916361d027b3916004808301926020929190829003018186803b15801561142b57600080fd5b505afa15801561143f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114639190614a10565b61010e54909150600a116114d35760405162461bcd60e51b815260206004820152603160248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20546f6b656e206c696044820152707374206c656e67746820746f6f2062696760781b60648201526084016109fa565b6114db610e26565b6001600160a01b0316896001600160a01b031614156115745760405162461bcd60e51b815260206004820152604960248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a204e657720746f6b6560448201527f6e2063616e6e6f74206265207468652073616d6520617320746865206375727260648201526832b73a103a37b5b2b760b91b608482015260a4016109fa565b61010860009054906101000a90046001600160a01b03166001600160a01b0316631fccf6726040518163ffffffff1660e01b815260040160206040518083038186803b1580156115c357600080fd5b505afa1580156115d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115fb9190614a10565b6001600160a01b0316896001600160a01b0316148061168e57506040516319f3736160e01b81526001600160a01b038a811660048301528216906319f373619060240160206040518083038186803b15801561165657600080fd5b505afa15801561166a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168e9190614bd2565b6116e85760405162461bcd60e51b815260206004820152602560248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20496e76616c6964206044820152643a37b5b2b760d91b60648201526084016109fa565b60018711801561174557506116fb610e26565b6001600160a01b03168888600081811061172557634e487b7160e01b600052603260045260246000fd5b905060200201602081019061173a91906149f4565b6001600160a01b0316145b80156117a057506001600160a01b0389168888611763600182615131565b81811061178057634e487b7160e01b600052603260045260246000fd5b905060200201602081019061179591906149f4565b6001600160a01b0316145b6118015760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a3a757064617465546f6b656e3a20696e76616c69642060448201526b0caf0c6d0c2dccecaa0c2e8d60a31b60648201526084016109fa565b61010e5461189b5761010e604051806060016040528061181f610e26565b6001600160a01b039081168252670de0b6b3a76400006020808401919091526000604093840181905285546001808201885596825290829020855160039092020180546001600160a01b03191691909316178255830151938101939093550151600290910155611899611890610e26565b61010f9061379c565b505b60006118a5611fd5565b6118b787670de0b6b3a7640000615112565b6118c191906150f2565b604080516060810182526001600160a01b038d81168252602082018481524393830193845261010e805460018101825560009190915292517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f4805600390940293840180546001600160a01b0319169190931617909155517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f480682015590517f44731785622d53a842eeb261a70df6f2b61b9624656157b6168597f0656f480790910155905061199061010f8b61379c565b506000826001600160a01b031663735de9f76040518163ffffffff1660e01b815260040160206040518083038186803b1580156119cc57600080fd5b505afa1580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a049190614a10565b90506000611a10610e26565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b158015611a5157600080fd5b505afa158015611a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a899190614d8d565b9050611a93610e26565b60405163095ea7b360e01b81526001600160a01b03848116600483015260248201849052919091169063095ea7b390604401602060405180830381600087803b158015611adf57600080fd5b505af1158015611af3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b179190614bd2565b506001600160a01b038216635c11d7958260008e8e30611b3942610e106150da565b6040518763ffffffff1660e01b8152600401611b5a96959493929190615067565b600060405180830381600087803b158015611b7457600080fd5b505af1158015611b88573d6000803e3d6000fd5b505050508b6001600160a01b031661010c60009054906101000a90046001600160a01b03166001600160a01b03167f0b1186973f810894b87ab0bfbee422fddcaad21b46dc705a561451bbb6bac11760405160405180910390a361010c80546001600160a01b0319166001600160a01b038e16179055610d008989898989610ff3565b611c168383836137b1565b611c1f846139fc565b50505050565b60fb5460ff1615611c485760405162461bcd60e51b81526004016109fa90614f12565b6001336000908152610109602052604090205460ff166003811115611c7d57634e487b7160e01b600052602160045260246000fd5b14611cca5760405162461bcd60e51b815260206004820181905260248201527f436f6d6d756e6974793a204e4f545f56414c49445f42454e454649434941525960448201526064016109fa565b600260c9541415611ced5760405162461bcd60e51b81526004016109fa90615030565b600260c9553360009081526101096020526040812090611d0c82613294565b905043611d183361247c565b1115611d665760405162461bcd60e51b815260206004820152601960248201527f436f6d6d756e6974793a3a636c61696d3a204e4f545f5945540000000000000060448201526064016109fa565b60ff548110611dcc5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a3a636c61696d3a20416c726561647920636c61696d6560448201526b642065766572797468696e6760a01b60648201526084016109fa565b6000806101115411611de05760fc54611de5565b610111545b905060008260ff54611df79190615131565b821115611e11578260ff54611e0c9190615131565b611e13565b815b61010e549091506001108015611e60575061010e600181548110611e4757634e487b7160e01b600052603260045260246000fd5b9060005260206000209060030201600201548460030154105b15611ebe57836002015484600401600061010e600081548110611e9357634e487b7160e01b600052603260045260246000fd5b600091825260208083206003909202909101546001600160a01b031683528201929092526040019020555b611ec881846150da565b6002850155600184018054906000611edf8361518b565b909155505043600385015561010e5460011015611f3a5780846004016000611f05610e26565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254611f3491906150da565b90915550505b611f573382611f47610e26565b6001600160a01b03169190613a4c565b60405181815233907fd54e03b214b3e8c17e98044f98554b6f1b18dd2a3163a2619afea7e9b2a6eb979060200160405180910390a25050600160c9555050565b61010e8181548110611fa857600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03909116925083565b60006101035461010054611fe99190615112565b60ff54610ec191906150da565b60fb5460ff16156120195760405162461bcd60e51b81526004016109fa90614f12565b6120316000805160206151e88339815191523361241a565b61204d5760405162461bcd60e51b81526004016109fa90614fb5565b600260c95414156120705760405162461bcd60e51b81526004016109fa90615030565b600260c95561207e81613aaf565b50600160c955565b60fb5460ff16156120a95760405162461bcd60e51b81526004016109fa90614f12565b6120c16000805160206151e88339815191523361241a565b6120dd5760405162461bcd60e51b81526004016109fa90614fb5565b600260c95414156121005760405162461bcd60e51b81526004016109fa90615030565b600260c95561210e81613b66565b6040516001600160a01b0382169033907fbb39c36a7502b7256e1a687254146a9a2ea7b146c77cb9e40eb0e2b8793781e190600090a350600160c955565b6121646000805160206151e88339815191523361241a565b6121805760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613bdf565b6001600160a01b0381166000908152610109602052604081206060916121b061010f613c97565b67ffffffffffffffff8111156121d657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156121ff578160200160208202803683370190505b509050600061220f61010f613c97565b905060005b8181101561228c5760048401600061222e61010f84613ca1565b6001600160a01b03166001600160a01b031681526020019081526020016000205483828151811061226f57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152806122848161518b565b915050612214565b5081516122e65760408051600180825281830190925290602080830190803683370190505091508260020154826000815181106122d957634e487b7160e01b600052603260045260246000fd5b6020026020010181815250505b509392505050565b6097546001600160a01b031633146123185760405162461bcd60e51b81526004016109fa90614f80565b6123226000613cad565b565b600061097661010a83613ca1565b6097546001600160a01b0316331461235c5760405162461bcd60e51b81526004016109fa90614f80565b610107546040516001600160a01b038084169216907f0d6a84e94da4b619dd0d993b5689ec82db4b1095da99ee0f3e7bb046c647e6ad90600090a361010780546001600160a01b0319166001600160a01b0392909216919091179055565b60fb5460ff16156123dd5760405162461bcd60e51b81526004016109fa90614f12565b6123f56000805160206151e88339815191523361241a565b6124115760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613cff565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60fb5460ff16156124685760405162461bcd60e51b81526004016109fa90614f12565b6124738383836137b1565b611c1f84613d4f565b6000612487826128a8565b6001600160a01b0383166000908152610109602052604090206003015461097691906150da565b606060006124bd61010f613c97565b67ffffffffffffffff8111156124e357634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561250c578160200160208202803683370190505b509050600061251c61010f613c97565b905060005b8181101561257f5761253561010f82613ca1565b83828151811061255557634e487b7160e01b600052603260045260246000fd5b6001600160a01b0390921660209283029190910190910152806125778161518b565b915050612521565b5081516125f05760408051600180825281830190925290602080830190803683370190505091506125ae610e26565b826000815181106125cf57634e487b7160e01b600052603260045260246000fd5b60200260200101906001600160a01b031690816001600160a01b0316815250505b50919050565b60fb5460ff16156126195760405162461bcd60e51b81526004016109fa90614f12565b6126248383836137b1565b611c1f84613cff565b6001600160a01b03811660009081526101096020526040812090815460ff16600381111561266b57634e487b7160e01b600052602160045260246000fd5b146126de5760405162461bcd60e51b815260206004820152603a60248201527f436f6d6d756e6974793a3a62656e65666963696172794a6f696e46726f6d4d6960448201527f6772617465643a2042656e65666963696172792065786973747300000000000060648201526084016109fa565b61010754604051630156773960e01b81526001600160a01b038481166004830152600092839283928392169063015677399060240160806040518083038186803b15801561272b57600080fd5b505afa15801561273f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127639190614d4c565b93509350935093506127758585613d9f565b60018501839055600385018190556002850182905561279661010a8761379c565b506040516001600160a01b038716907f505fe088fef0d1fb451ccfed842b55a86af1ee6208502f4bc3327dcb9032082990600090a2505050505050565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561281d57600080fd5b505afa158015612831573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128559190614bd2565b6128715760405162461bcd60e51b81526004016109fa90614f3d565b60fb805460ff1916905560405133907f4e50048c25972c85ad169c2302967f1e633e8dc6108d6aca51a90d2a59d4934d90600090a2565b6001600160a01b03811660009081526101096020526040812060018101546128d35750600092915050565b60fe54600182600101546128e79190615131565b6128f19190615112565b60fd546128fe91906150da565b9392505050565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561294f57600080fd5b505afa158015612963573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129879190614bd2565b6129a35760405162461bcd60e51b81526004016109fa90614f3d565b6129bb6000805160206151e88339815191528261241a565b612a2f576040805162461bcd60e51b81526020600482015260248101919091527f436f6d6d756e6974793a3a72656d6f76654d616e616765723a2054686973206160448201527f63636f756e7420646f65736e27742068617665206d616e6167657220726f6c6560648201526084016109fa565b610108546001600160a01b0382811691161415612ac25760405162461bcd60e51b8152602060048201526044602482018190527f436f6d6d756e6974793a3a72656d6f76654d616e616765723a20596f75206172908201527f65206e6f7420616c6c6f7720746f2072656d6f766520636f6d6d756e697479416064820152633236b4b760e11b608482015260a4016109fa565b612ada6000805160206151e883398151915282613735565b6040516001600160a01b0382169033907f3e902a6ee93dd5b2d48bd1009c7701a481be512b1ef73dbed2f95ea44c59ea8890600090a350565b60fb5460ff1615612b365760405162461bcd60e51b81526004016109fa90614f12565b612b4e6000805160206151e88339815191523361241a565b612b6a5760405162461bcd60e51b81526004016109fa90614fb5565b61010554612be05760405162461bcd60e51b815260206004820152603760248201527f436f6d6d756e6974793a3a7265717565737446756e64733a205468697320636f60448201527f6d6d756e6974792069732073656c662d66756e64696e6700000000000000000060648201526084016109fa565b61010860009054906101000a90046001600160a01b03166001600160a01b031663174a71d76040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c3157600080fd5b505af1158015612c45573d6000803e3d6000fd5b5050436101065550612c5790506134ce565b60405133907f16a8b794d4e2ed6ffef50d78af3d4372ce4bfe8a399bfc23f59b7832ee47539090600090a2565b6097546001600160a01b03163314612cae5760405162461bcd60e51b81526004016109fa90614f80565b806101016000828254612cc191906150da565b909155505050565b6097546001600160a01b03163314612cf35760405162461bcd60e51b81526004016109fa90614f80565b600260c9541415612d165760405162461bcd60e51b81526004016109fa90615030565b600260c955612d2f6001600160a01b0384168383613a4c565b612d37610e26565b6001600160a01b0316836001600160a01b03161415612d5857612d586134ce565b816001600160a01b0316836001600160a01b03167f9b035625e569d1d2bf54830a290aefba7ab11610ba8490871dc62b86b63a895683604051612d9d91815260200190565b60405180910390a35050600160c95550565b60fb5460ff1615612dd25760405162461bcd60e51b81526004016109fa90614f12565b612dea6000805160206151e88339815191523361241a565b612e065760405162461bcd60e51b81526004016109fa90614fb5565b610f7e8161401b565b612e276000805160206151e88339815191523361241a565b612e435760405162461bcd60e51b81526004016109fa90614fb5565b610f7e816139fc565b60fb5460ff1615612e6f5760405162461bcd60e51b81526004016109fa90614f12565b612e876000805160206151e88339815191523361241a565b612ea35760405162461bcd60e51b81526004016109fa90614fb5565b610f7e81613d4f565b60fb5460ff1615612ecf5760405162461bcd60e51b81526004016109fa90614f12565b612ee76000805160206151e88339815191523361241a565b612f035760405162461bcd60e51b81526004016109fa90614fb5565b610f7e816140a5565b6097546001600160a01b03163314612f365760405162461bcd60e51b81526004016109fa90614f80565b610108546040516001600160a01b038084169216907fdd8d3b7b0badfc5d636d48e71e28015b4b8554b64d2cffba6f0a90bf7693ec0090600090a361010880546001600160a01b0319166001600160a01b038316908117909155610f7e90613461565b60405162461bcd60e51b815260206004820152603b60248201527f436f6d6d756e6974793a3a7265766f6b65526f6c653a20596f7520617265206e60448201527f6f7420616c6c6f7720746f207573652074686973206d6574686f64000000000060648201526084016109fa565b60fb5460ff161561302a5760405162461bcd60e51b81526004016109fa90614f12565b600260c954141561304d5760405162461bcd60e51b81526004016109fa90615030565b600260c95561305d8383836137b1565b61306684613aaf565b5050600160c9555050565b600260c95414156130945760405162461bcd60e51b81526004016109fa90615030565b600260c9556130b88230836130a7610e26565b6001600160a01b031692919061412f565b8061010260008282546130cb91906150da565b909155506130d990506134ce565b60405181815233907f0553260a2e46b0577270d8992db02d30856ca880144c72d6e9503760946aef139060200160405180910390a25050600160c955565b6000610ec161010a613c97565b6097546001600160a01b0316331461314e5760405162461bcd60e51b81526004016109fa90614f80565b6001600160a01b0381166131b35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016109fa565b610f7e81613cad565b61010854604051636b0de23f60e01b81523060048201523360248201526001600160a01b0390911690636b0de23f9060440160206040518083038186803b15801561320657600080fd5b505afa15801561321a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323e9190614bd2565b61325a5760405162461bcd60e51b81526004016109fa90614f3d565b60fb805460ff1916600117905560405133907fe1e6bc10311f2f958d6cd2d0ab7308c32089aa1acb8ab11a2ccb60028e332bd090600090a2565b61010e5460009060028110156132ad5750506002015490565b600283015460006132bf600184615131565b90505b846003015461010e82815481106132e957634e487b7160e01b600052603260045260246000fd5b90600052602060002090600302016002015411156122e657670de0b6b3a764000061010e828154811061332c57634e487b7160e01b600052603260045260246000fd5b906000526020600020906003020160010154836133499190615112565b61335391906150f2565b91508061335f81615174565b9150506132c2565b600054610100900460ff1661338e5760405162461bcd60e51b81526004016109fa90614fe5565b613396614167565b61339e614167565b612322614167565b600054610100900460ff166133cd5760405162461bcd60e51b81526004016109fa90614fe5565b6133d5614167565b61232261418e565b600054610100900460ff166134045760405162461bcd60e51b81526004016109fa90614fe5565b6123226141be565b600082815260656020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b610fef82826141ec565b6134796000805160206151e88339815191528261241a565b610f7e576134956000805160206151e8833981519152826141ec565b6040516001600160a01b0382169033907f05a4006f300442cf8b7fdb885f5ee958812020bffb5c5a8e655fde64e5f987ed90600090a350565b60008061010860009054906101000a90046001600160a01b03166001600160a01b0316636b68b2ef6040518163ffffffff1660e01b815260040160206040518083038186803b15801561352057600080fd5b505afa158015613534573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135589190614d8d565b9050600061010860009054906101000a90046001600160a01b03166001600160a01b031663afae65be6040518163ffffffff1660e01b815260040160206040518083038186803b1580156135ab57600080fd5b505afa1580156135bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135e39190614d8d565b905061010054600014806135f8575061010554155b806136035750808211155b156136125760fc5492506136e2565b6101005461361e610e26565b6040516370a0823160e01b81523060048201526001600160a01b0391909116906370a082319060240160206040518083038186803b15801561365f57600080fd5b505afa158015613673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136979190614d8d565b6136a191906150f2565b92506000828260fc546136b49190615112565b6136be91906150f2565b9050808410156136d0578093506136e0565b60fc548411156136e05760fc5493505b505b610111548314613730576101115460408051918252602082018590527fc22e16deec6f587d0a1aad7275c1621e6c24431fea14dd71e8f3243e9fbc5ca3910160405180910390a16101118390555b505050565b61373f828261241a565b15610fef5760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60006128fe836001600160a01b038416614272565b61010860009054906101000a90046001600160a01b03166001600160a01b031663af2d77f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561380057600080fd5b505afa158015613814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138389190614a10565b6001600160a01b0316336001600160a01b0316146138ad5760405162461bcd60e51b815260206004820152602c60248201527f436f6d6d756e6974793a2053656e646572206d7573742062652074686520626160448201526b18dad95b99081dd85b1b195d60a21b60648201526084016109fa565b428310156138fd5760405162461bcd60e51b815260206004820152601c60248201527f436f6d6d756e6974793a205369676e617475726520746f6f206f6c640000000060448201526064016109fa565b6040516bffffffffffffffffffffffff1933606090811b8216602084015230901b16603482015260488101849052600090606801604051602081830303815290604052805190602001209050600061399684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061399092508691506142c19050565b90614314565b90506139b06000805160206151e88339815191528261241a565b6112005760405162461bcd60e51b815260206004820152601c60248201527f436f6d6d756e6974793a20496e76616c6964207369676e61747572650000000060448201526064016109fa565b80516000905b8082101561373057613a3a838381518110613a2d57634e487b7160e01b600052603260045260246000fd5b6020026020010151613bdf565b81613a448161518b565b925050613a02565b6040516001600160a01b03831660248201526044810182905261373090849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152614330565b80516000905b8082101561373057613aed838381518110613ae057634e487b7160e01b600052603260045260246000fd5b6020026020010151613b66565b828281518110613b0d57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316336001600160a01b03167fbb39c36a7502b7256e1a687254146a9a2ea7b146c77cb9e40eb0e2b8793781e160405160405180910390a381613b5e8161518b565b925050613ab5565b6001600160a01b03811660009081526101096020526040812090815460ff166003811115613ba457634e487b7160e01b600052602160045260246000fd5b14613bad575050565b613bb8816001613d9f565b436003820155613bca61010a8361379c565b50610fef82662386f26fc10000611f47610e26565b6001600160a01b0381166000908152610109602052604090206001815460ff166003811115613c1e57634e487b7160e01b600052602160045260246000fd5b1480613c4d57506002815460ff166003811115613c4b57634e487b7160e01b600052602160045260246000fd5b145b15610fef57613c5d816003613d9f565b6040516001600160a01b0383169033907f1a6590bd0cabbfcc7c86bef99e1034054e179905cfcc294598fcd426c092244290600090a35050565b6000610976825490565b60006128fe8383614402565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516000905b8082101561373057613d3d838381518110613d3057634e487b7160e01b600052603260045260246000fd5b602002602001015161401b565b81613d478161518b565b925050613d05565b80516000905b8082101561373057613d8d838381518110613d8057634e487b7160e01b600052603260045260246000fd5b60200260200101516140a5565b81613d978161518b565b925050613d55565b806003811115613dbf57634e487b7160e01b600052602160045260246000fd5b825460ff166003811115613de357634e487b7160e01b600052602160045260246000fd5b1415613ded575050565b6001816003811115613e0f57634e487b7160e01b600052602160045260246000fd5b1415613f895760fc546101035460ff54613e299190615131565b1015613e955760405162461bcd60e51b815260206004820152603560248201527f436f6d6d756e6974793a3a5f6368616e676542656e656669636961727953746160448201527474653a204d617820636c61696d20746f6f206c6f7760581b60648201526084016109fa565b61010d541580613eaa575061010d5461010054105b613f535760405162461bcd60e51b815260206004820152606860248201527f436f6d6d756e6974793a3a5f6368616e676542656e656669636961727953746160448201527f74653a205468697320636f6d6d756e697479206861732072656163686564207460648201527f6865206d6178696d756d206e756d626572206f662076616c69642062656e6566608482015267696369617269657360c01b60a482015260c4016109fa565b6101008054906000613f648361518b565b91905055506101035460ff6000828254613f7e9190615131565b90915550613fe69050565b6001825460ff166003811115613faf57634e487b7160e01b600052602160045260246000fd5b1415613fe6576101008054906000613fc683615174565b91905055506101035460ff6000828254613fe091906150da565b90915550505b81548190839060ff1916600183600381111561401257634e487b7160e01b600052602160045260246000fd5b02179055505050565b6001600160a01b0381166000908152610109602052604090206001815460ff16600381111561405a57634e487b7160e01b600052602160045260246000fd5b1415610fef5761406b816002613d9f565b6040516001600160a01b0383169033907f2b9ef93c7856b47a1b624fa3fcc4b651d388dd6d16327f3ad22b05f3da8b0f1590600090a35050565b6001600160a01b0381166000908152610109602052604090206002815460ff1660038111156140e457634e487b7160e01b600052602160045260246000fd5b1415610fef576140f5816001613d9f565b6040516001600160a01b0383169033907fa589fb4f2925123e7a030dd6bbe76be46a03f8ce0ea53a78dbb3383c7797db2c90600090a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611c1f9085906323b872dd60e01b90608401613a78565b600054610100900460ff166123225760405162461bcd60e51b81526004016109fa90614fe5565b600054610100900460ff166141b55760405162461bcd60e51b81526004016109fa90614fe5565b61232233613cad565b600054610100900460ff166141e55760405162461bcd60e51b81526004016109fa90614fe5565b600160c955565b6141f6828261241a565b610fef5760008281526065602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561422e3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008181526001830160205260408120546142b957508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610976565b506000610976565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000614323858561443a565b915091506122e6816144aa565b6000614385826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166146ab9092919063ffffffff16565b80519091501561373057808060200190518101906143a39190614bd2565b6137305760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109fa565b600082600001828154811061442757634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b6000808251604114156144715760208301516040840151606085015160001a614465878285856146c2565b945094505050506144a3565b82516040141561449b57602083015160408401516144908683836147af565b9350935050506144a3565b506000905060025b9250929050565b60008160048111156144cc57634e487b7160e01b600052602160045260246000fd5b14156144d55750565b60018160048111156144f757634e487b7160e01b600052602160045260246000fd5b14156145455760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016109fa565b600281600481111561456757634e487b7160e01b600052602160045260246000fd5b14156145b55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016109fa565b60038160048111156145d757634e487b7160e01b600052602160045260246000fd5b14156146305760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016109fa565b600481600481111561465257634e487b7160e01b600052602160045260246000fd5b1415610f7e5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016109fa565b60606146ba84846000856147de565b949350505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156146f957506000905060036147a6565b8460ff16601b1415801561471157508460ff16601c14155b1561472257506000905060046147a6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614776573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661479f576000600192509250506147a6565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016147d0878288856146c2565b935093505050935093915050565b60608247101561483f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109fa565b843b61488d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109fa565b600080866001600160a01b031685876040516148a99190614e00565b60006040518083038185875af1925050503d80600081146148e6576040519150601f19603f3d011682016040523d82523d6000602084013e6148eb565b606091505b50915091506148fb828286614906565b979650505050505050565b606083156149155750816128fe565b8251156149255782518084602001fd5b8160405162461bcd60e51b81526004016109fa9190614edf565b803561494a816151d2565b919050565b600082601f83011261495f578081fd5b8135602067ffffffffffffffff8083111561497c5761497c6151bc565b8260051b604051601f19603f830116810181811084821117156149a1576149a16151bc565b604052848152838101925086840182880185018910156149bf578687fd5b8692505b858310156149e8576149d48161493f565b8452928401926001929092019184016149c3565b50979650505050505050565b600060208284031215614a05578081fd5b81356128fe816151d2565b600060208284031215614a21578081fd5b81516128fe816151d2565b60008060008060008060008060008060006101608c8e031215614a4d578687fd5b8b35614a58816151d2565b9a5060208c013567ffffffffffffffff811115614a73578788fd5b614a7f8e828f0161494f565b9a505060408c0135985060608c0135975060808c0135965060a08c0135955060c08c0135945060e08c013593506101008c013592506101208c013591506101408c0135614acb816151d2565b809150509295989b509295989b9093969950565b60008060408385031215614af1578182fd5b8235614afc816151d2565b946020939093013593505050565b600060208284031215614b1b578081fd5b813567ffffffffffffffff811115614b31578182fd5b6146ba8482850161494f565b60008060008060608587031215614b52578384fd5b843567ffffffffffffffff80821115614b69578586fd5b614b758883890161494f565b9550602087013594506040870135915080821115614b91578384fd5b818701915087601f830112614ba4578384fd5b813581811115614bb2578485fd5b886020828501011115614bc3578485fd5b95989497505060200194505050565b600060208284031215614be3578081fd5b815180151581146128fe578182fd5b600060208284031215614c03578081fd5b5035919050565b60008060408385031215614c1c578182fd5b823591506020830135614c2e816151d2565b809150509250929050565b600060208284031215614c4a578081fd5b81356001600160e01b0319811681146128fe578182fd5b600080600060608486031215614c75578081fd5b8335614c80816151d2565b92506020840135614c90816151d2565b929592945050506040919091013590565b60008060008060008060008060e0898b031215614cbc578182fd5b8835614cc7816151d2565b9750602089013567ffffffffffffffff80821115614ce3578384fd5b818b0191508b601f830112614cf6578384fd5b813581811115614d04578485fd5b8c60208260051b8501011115614d18578485fd5b999c6020929092019b50989960408101359950606081013598506080810135975060a0810135965060c00135945092505050565b60008060008060808587031215614d61578182fd5b845160048110614d6f578283fd5b60208601516040870151606090970151919890975090945092505050565b600060208284031215614d9e578081fd5b5051919050565b60008060408385031215614db7578182fd5b50508035926020909101359150565b600080600080600060a08688031215614ddd578283fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008251614e12818460208701615148565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015614e5d5783516001600160a01b031683529284019291840191600101614e38565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015614e5d57835183529284019291840191600101614e85565b6080810160048610614ec357634e487b7160e01b600052602160045260246000fd5b9481526020810193909352604083019190915260609091015290565b6020815260008251806020840152614efe816040850160208701615148565b601f01601f19169190910160400192915050565b60208082526011908201527010dbdb5b5d5b9a5d1e4e881b1bd8dad959607a1b604082015260600190565b60208082526023908201527f436f6d6d756e6974793a204e4f545f414d4241535341444f525f4f525f454e5460408201526249545960e81b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526016908201527521b7b6b6bab734ba3c9d102727aa2fa6a0a720a3a2a960511b604082015260600190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b868152602080820187905260a0604083018190528201859052600090869060c08401835b888110156150b957833561509e816151d2565b6001600160a01b03168252928201929082019060010161508b565b506001600160a01b0396909616606085015250505060800152949350505050565b600082198211156150ed576150ed6151a6565b500190565b60008261510d57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561512c5761512c6151a6565b500290565b600082821015615143576151436151a6565b500390565b60005b8381101561516357818101518382015260200161514b565b83811115611c1f5750506000910152565b600081615183576151836151a6565b506000190190565b600060001982141561519f5761519f6151a6565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610f7e57600080fdfe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08a2646970667358221220444a0eacae9680cb11857602406b626d8db0f66743a730b0dcad741131ad2df564736f6c63430008040033