{"compiler":{"version":"0.8.4+commit.c7e474f2"},"language":"Solidity","output":{"abi":[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"member","type":"address"}],"name":"MemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"member","type":"address"}],"name":"MemberRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldImplementation","type":"address"},{"indexed":false,"internalType":"address","name":"newImplementation","type":"address"}],"name":"NewImplementation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldQuorumVotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorumVotes","type":"uint256"}],"name":"QuorumVotesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"votes","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"inputs":[],"name":"MAX_VOTING_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROPOSAL_MAX_OPERATIONS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"addMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"cancel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"},{"internalType":"uint8","name":"_support","type":"uint8"}],"name":"castVote","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"communityAdmin","outputs":[{"internalType":"contract ICommunityAdmin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityProxyAdmin","outputs":[{"internalType":"contract ProxyAdmin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"execute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"getActions","outputs":[{"internalType":"string[]","name":"signatures","type":"string[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"},{"internalType":"address","name":"_voter","type":"address"}],"name":"getReceipt","outputs":[{"components":[{"internalType":"bool","name":"hasVoted","type":"bool"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint96","name":"votes","type":"uint96"}],"internalType":"struct IImpactMarketCouncil.Receipt","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quorumVotes","type":"uint256"},{"internalType":"contract ICommunityAdmin","name":"_communityAdmin","type":"address"},{"internalType":"address[]","name":"_members","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"latestProposalIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"members","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalCalldatas","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"proposalReceipts","outputs":[{"internalType":"bool","name":"hasVoted","type":"bool"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalSignatures","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposalTargets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"proposals","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"proposer","type":"address"},{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"},{"internalType":"bool","name":"canceled","type":"bool"},{"internalType":"bool","name":"executed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_targets","type":"address[]"},{"internalType":"string[]","name":"_signatures","type":"string[]"},{"internalType":"bytes[]","name":"_calldatas","type":"bytes[]"},{"internalType":"string","name":"_description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"quorumVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_member","type":"address"}],"name":"removeMember","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newQuorumVotes","type":"uint256"}],"name":"setQuorumVotes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum IImpactMarketCouncil.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}],"devdoc":{"events":{"TransferERC20(address,address,uint256)":{"params":{"amount":"Amount of the transaction","to":"Address of the receiver","token":"ERC20 token address"}},"VoteCast(address,uint256,uint8,uint256,string)":{"params":{"proposalId":"The proposal id which was voted on","reason":"The reason given for the vote by the voter","support":"Support value for the vote. 0=against, 1=for, 2=abstain","voter":"The address which casted a vote","votes":"Number of votes which were cast by the voter"}}},"kind":"dev","methods":{"addMember(address)":{"params":{"_member":"Member address."}},"cancel(uint256)":{"params":{"_proposalId":"The id of the proposal to cancel"}},"castVote(uint256,uint8)":{"params":{"_proposalId":"The id of the proposal to vote on","_support":"The support value for the vote. 0=against, 1=for, 2=abstain"}},"execute(uint256)":{"params":{"_proposalId":"The id of the proposal to execute"}},"getActions(uint256)":{"params":{"_proposalId":"Proposal to query."},"returns":{"calldatas":"Calldatas for proposal calls.","signatures":"Function signatures for proposal calls."}},"getReceipt(uint256,address)":{"params":{"_proposalId":"the id of proposal","_voter":"The address of the voter"},"returns":{"_0":"The voting receipt"}},"initialize(uint256,address,address[])":{"params":{"_quorumVotes":"The initial quorum votes"}},"owner()":{"details":"Returns the address of the current owner."},"propose(address[],string[],bytes[],string)":{"params":{"_calldatas":"Calldatas for proposal calls.","_description":"String description of the proposal.","_signatures":"Function signatures for proposal calls.","_targets":"Target addresses for proposal calls."},"returns":{"_0":"Proposal id of new proposal."}},"removeMember(address)":{"params":{"_member":"Member address."}},"renounceOwnership()":{"details":"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."},"setQuorumVotes(uint256)":{"params":{"_newQuorumVotes":"new quorum votes"}},"state(uint256)":{"params":{"_proposalId":"The id of the proposal"},"returns":{"_0":"Proposal state"}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."}},"version":1},"userdoc":{"events":{"MemberAdded(address)":{"notice":"An event emitted when a member is added"},"MemberRemoved(address)":{"notice":"An event emitted when a member is removed"},"NewImplementation(address,address)":{"notice":"Emitted when implementation is changed"},"ProposalCanceled(uint256)":{"notice":"An event emitted when a proposal has been canceled"},"ProposalCreated(uint256,address,address[],string[],bytes[],uint256,string)":{"notice":"An event emitted when a new proposal is created"},"ProposalExecuted(uint256)":{"notice":"An event emitted when a proposal has been executed in the Timelock"},"QuorumVotesSet(uint256,uint256)":{"notice":"An event emitted when the quorum votes is set"},"TransferERC20(address,address,uint256)":{"notice":"Triggered when an amount of an ERC20 has been transferred from this contract to an address"},"VoteCast(address,uint256,uint8,uint256,string)":{"notice":"An event emitted when a vote has been cast on a proposal"}},"kind":"user","methods":{"MAX_VOTING_PERIOD()":{"notice":"The max setable voting period"},"PROPOSAL_MAX_OPERATIONS()":{"notice":"The maximum number of actions that can be included in a proposal"},"addMember(address)":{"notice":"Function used to add new members to the impactMarket Council."},"cancel(uint256)":{"notice":"Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold"},"castVote(uint256,uint8)":{"notice":"Cast a vote for a proposal"},"execute(uint256)":{"notice":"Executes a queued proposal if eta has passed"},"getActions(uint256)":{"notice":"Gets actions of a proposal."},"getReceipt(uint256,address)":{"notice":"Gets the receipt for a voter on a given proposal"},"initialize(uint256,address,address[])":{"notice":"Used to initialize the contract during delegator constructor"},"latestProposalIds(address)":{"notice":"The latest proposal for each proposer"},"members(address)":{"notice":"The council members"},"proposalCalldatas(uint256,uint256)":{"notice":"The official each proposal's calldatas: An ordered list of calldata to be passed to each call"},"proposalCount()":{"notice":"The total number of proposals"},"proposalReceipts(uint256,address)":{"notice":"The official each proposal's receipts: Receipts of ballots for the entire set of voters"},"proposalSignatures(uint256,uint256)":{"notice":"The official each proposal's signatures: An ordered list of function signatures to be called"},"proposalTargets(uint256,uint256)":{"notice":"The official each proposal's targets: An ordered list of target addresses for calls to be made"},"proposals(uint256)":{"notice":"The official record of all proposals ever proposed"},"propose(address[],string[],bytes[],string)":{"notice":"Function used to propose a new proposal. Sender must have delegates above the proposal threshold."},"quorumVotes()":{"notice":"The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed"},"removeMember(address)":{"notice":"Function used to remove members from the impactMarket Council."},"setQuorumVotes(uint256)":{"notice":"Owner function for setting the quorum votes"},"state(uint256)":{"notice":"Gets the state of a proposal"}},"version":1}},"settings":{"compilationTarget":{"contracts/governor/impactMarketCouncil/ImpactMarketCouncilImplementation.sol":"ImpactMarketCouncilImplementation"},"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs","useLiteralContent":true},"optimizer":{"enabled":true,"runs":200},"remappings":[]},"sources":{"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev External interface of AccessControl declared to support ERC165 detection.\n */\ninterface IAccessControlUpgradeable {\n    /**\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\n     *\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\n     * {RoleAdminChanged} not being emitted signaling this.\n     *\n     * _Available since v3.1._\n     */\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\n\n    /**\n     * @dev Emitted when `account` is granted `role`.\n     *\n     * `sender` is the account that originated the contract call, an admin role\n     * bearer except when using {AccessControl-_setupRole}.\n     */\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Emitted when `account` is revoked `role`.\n     *\n     * `sender` is the account that originated the contract call:\n     *   - if using `revokeRole`, it is the admin role bearer\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\n     */\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\n\n    /**\n     * @dev Returns `true` if `account` has been granted `role`.\n     */\n    function hasRole(bytes32 role, address account) external view returns (bool);\n\n    /**\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\n     * {revokeRole}.\n     *\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\n     */\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\n\n    /**\n     * @dev Grants `role` to `account`.\n     *\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function grantRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from `account`.\n     *\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\n     *\n     * Requirements:\n     *\n     * - the caller must have ``role``'s admin role.\n     */\n    function revokeRole(bytes32 role, address account) external;\n\n    /**\n     * @dev Revokes `role` from the calling account.\n     *\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\n     * purpose is to provide a mechanism for accounts to lose their privileges\n     * if they are compromised (such as when a trusted device is misplaced).\n     *\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\n     * event.\n     *\n     * Requirements:\n     *\n     * - the caller must be `account`.\n     */\n    function renounceRole(bytes32 role, address account) external;\n}\n","keccak256":"0xb8f5302f12138c5561362e88a78d061573e6298b7a1a5afe84a1e2c8d4d5aeaa","license":"MIT"},"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/ContextUpgradeable.sol\";\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    function __Ownable_init() internal onlyInitializing {\n        __Context_init_unchained();\n        __Ownable_init_unchained();\n    }\n\n    function __Ownable_init_unchained() internal onlyInitializing {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n    uint256[49] private __gap;\n}\n","keccak256":"0x9ffedb33e192f8821cbaead72596c79ea87fb28a73f8d3a9f5004449799f8e1b","license":"MIT"},"@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the\n * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() initializer {}\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        // If the contract is initializing we ignore whether _initialized is set in order to support multiple\n        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the\n        // contract may have been reentered.\n        require(_initializing ? _isConstructor() : !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} modifier, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n","keccak256":"0x68861bcc80cacbd498efde75aab6c74a486cc48262660d326c8d7530d9752097","license":"MIT"},"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuardUpgradeable is Initializable {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant _NOT_ENTERED = 1;\n    uint256 private constant _ENTERED = 2;\n\n    uint256 private _status;\n\n    function __ReentrancyGuard_init() internal onlyInitializing {\n        __ReentrancyGuard_init_unchained();\n    }\n\n    function __ReentrancyGuard_init_unchained() internal onlyInitializing {\n        _status = _NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        // On the first call to nonReentrant, _notEntered will be true\n        require(_status != _ENTERED, \"ReentrancyGuard: reentrant call\");\n\n        // Any calls to nonReentrant after this point will fail\n        _status = _ENTERED;\n\n        _;\n\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = _NOT_ENTERED;\n    }\n    uint256[49] private __gap;\n}\n","keccak256":"0xf3a9b766b0d0456f79d9402db4b49bb16c414f3f9d65244475c0704b6c66dcf1","license":"MIT"},"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint256 amount\n    ) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n","keccak256":"0x5ca0eb1120133a6d0799752532d4638048391823a2b623c4fe9ff46e262266fb","license":"MIT"},"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n","keccak256":"0x3f0f878c796dfc7feba6d3c4e3e526c14c7deae8b7bfc71088e3f38fab0d77b3","license":"MIT"},"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\nimport \"../proxy/utils/Initializable.sol\";\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract ContextUpgradeable is Initializable {\n    function __Context_init() internal onlyInitializing {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal onlyInitializing {\n    }\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n","keccak256":"0x0b0d548f6381370d394f7a434f994dc678b3ef3e755de106109d61343a685ea7","license":"MIT"},"@openzeppelin/contracts/access/Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n","keccak256":"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9","license":"MIT"},"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Proxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../Proxy.sol\";\nimport \"./ERC1967Upgrade.sol\";\n\n/**\n * @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an\n * implementation address that can be changed. This address is stored in storage in the location specified by\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the\n * implementation behind the proxy.\n */\ncontract ERC1967Proxy is Proxy, ERC1967Upgrade {\n    /**\n     * @dev Initializes the upgradeable proxy with an initial implementation specified by `_logic`.\n     *\n     * If `_data` is nonempty, it's used as data in a delegate call to `_logic`. This will typically be an encoded\n     * function call, and allows initializating the storage of the proxy like a Solidity constructor.\n     */\n    constructor(address _logic, bytes memory _data) payable {\n        assert(_IMPLEMENTATION_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.implementation\")) - 1));\n        _upgradeToAndCall(_logic, _data, false);\n    }\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _implementation() internal view virtual override returns (address impl) {\n        return ERC1967Upgrade._getImplementation();\n    }\n}\n","keccak256":"0x6309f9f39dc6f4f45a24f296543867aa358e32946cd6b2874627a996d606b3a0","license":"MIT"},"@openzeppelin/contracts/proxy/ERC1967/ERC1967Upgrade.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/ERC1967/ERC1967Upgrade.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../beacon/IBeacon.sol\";\nimport \"../../utils/Address.sol\";\nimport \"../../utils/StorageSlot.sol\";\n\n/**\n * @dev This abstract contract provides getters and event emitting update functions for\n * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots.\n *\n * _Available since v4.1._\n *\n * @custom:oz-upgrades-unsafe-allow delegatecall\n */\nabstract contract ERC1967Upgrade {\n    // This is the keccak-256 hash of \"eip1967.proxy.rollback\" subtracted by 1\n    bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143;\n\n    /**\n     * @dev Storage slot with the address of the current implementation.\n     * This is the keccak-256 hash of \"eip1967.proxy.implementation\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n\n    /**\n     * @dev Emitted when the implementation is upgraded.\n     */\n    event Upgraded(address indexed implementation);\n\n    /**\n     * @dev Returns the current implementation address.\n     */\n    function _getImplementation() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 implementation slot.\n     */\n    function _setImplementation(address newImplementation) private {\n        require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n        StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n    }\n\n    /**\n     * @dev Perform implementation upgrade\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeTo(address newImplementation) internal {\n        _setImplementation(newImplementation);\n        emit Upgraded(newImplementation);\n    }\n\n    /**\n     * @dev Perform implementation upgrade with additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCall(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _upgradeTo(newImplementation);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(newImplementation, data);\n        }\n    }\n\n    /**\n     * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call.\n     *\n     * Emits an {Upgraded} event.\n     */\n    function _upgradeToAndCallSecure(\n        address newImplementation,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        address oldImplementation = _getImplementation();\n\n        // Initial upgrade and setup call\n        _setImplementation(newImplementation);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(newImplementation, data);\n        }\n\n        // Perform rollback test if not already in progress\n        StorageSlot.BooleanSlot storage rollbackTesting = StorageSlot.getBooleanSlot(_ROLLBACK_SLOT);\n        if (!rollbackTesting.value) {\n            // Trigger rollback using upgradeTo from the new implementation\n            rollbackTesting.value = true;\n            Address.functionDelegateCall(\n                newImplementation,\n                abi.encodeWithSignature(\"upgradeTo(address)\", oldImplementation)\n            );\n            rollbackTesting.value = false;\n            // Check rollback was effective\n            require(oldImplementation == _getImplementation(), \"ERC1967Upgrade: upgrade breaks further upgrades\");\n            // Finally reset to the new implementation and log the upgrade\n            _upgradeTo(newImplementation);\n        }\n    }\n\n    /**\n     * @dev Storage slot with the admin of the contract.\n     * This is the keccak-256 hash of \"eip1967.proxy.admin\" subtracted by 1, and is\n     * validated in the constructor.\n     */\n    bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;\n\n    /**\n     * @dev Emitted when the admin account has changed.\n     */\n    event AdminChanged(address previousAdmin, address newAdmin);\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _getAdmin() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_ADMIN_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new address in the EIP1967 admin slot.\n     */\n    function _setAdmin(address newAdmin) private {\n        require(newAdmin != address(0), \"ERC1967: new admin is the zero address\");\n        StorageSlot.getAddressSlot(_ADMIN_SLOT).value = newAdmin;\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     */\n    function _changeAdmin(address newAdmin) internal {\n        emit AdminChanged(_getAdmin(), newAdmin);\n        _setAdmin(newAdmin);\n    }\n\n    /**\n     * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.\n     * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor.\n     */\n    bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;\n\n    /**\n     * @dev Emitted when the beacon is upgraded.\n     */\n    event BeaconUpgraded(address indexed beacon);\n\n    /**\n     * @dev Returns the current beacon.\n     */\n    function _getBeacon() internal view returns (address) {\n        return StorageSlot.getAddressSlot(_BEACON_SLOT).value;\n    }\n\n    /**\n     * @dev Stores a new beacon in the EIP1967 beacon slot.\n     */\n    function _setBeacon(address newBeacon) private {\n        require(Address.isContract(newBeacon), \"ERC1967: new beacon is not a contract\");\n        require(\n            Address.isContract(IBeacon(newBeacon).implementation()),\n            \"ERC1967: beacon implementation is not a contract\"\n        );\n        StorageSlot.getAddressSlot(_BEACON_SLOT).value = newBeacon;\n    }\n\n    /**\n     * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does\n     * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that).\n     *\n     * Emits a {BeaconUpgraded} event.\n     */\n    function _upgradeBeaconToAndCall(\n        address newBeacon,\n        bytes memory data,\n        bool forceCall\n    ) internal {\n        _setBeacon(newBeacon);\n        emit BeaconUpgraded(newBeacon);\n        if (data.length > 0 || forceCall) {\n            Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);\n        }\n    }\n}\n","keccak256":"0x5f4c3eed093dfb0e4e20c1c102d2f2c6894a972f454adb308511a0afb37e6f79","license":"MIT"},"@openzeppelin/contracts/proxy/Proxy.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/Proxy.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM\n * instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to\n * be specified by overriding the virtual {_implementation} function.\n *\n * Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a\n * different contract through the {_delegate} function.\n *\n * The success and return data of the delegated call will be returned back to the caller of the proxy.\n */\nabstract contract Proxy {\n    /**\n     * @dev Delegates the current call to `implementation`.\n     *\n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _delegate(address implementation) internal virtual {\n        assembly {\n            // Copy msg.data. We take full control of memory in this inline assembly\n            // block because it will not return to Solidity code. We overwrite the\n            // Solidity scratch pad at memory position 0.\n            calldatacopy(0, 0, calldatasize())\n\n            // Call the implementation.\n            // out and outsize are 0 because we don't know the size yet.\n            let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\n\n            // Copy the returned data.\n            returndatacopy(0, 0, returndatasize())\n\n            switch result\n            // delegatecall returns 0 on error.\n            case 0 {\n                revert(0, returndatasize())\n            }\n            default {\n                return(0, returndatasize())\n            }\n        }\n    }\n\n    /**\n     * @dev This is a virtual function that should be overriden so it returns the address to which the fallback function\n     * and {_fallback} should delegate.\n     */\n    function _implementation() internal view virtual returns (address);\n\n    /**\n     * @dev Delegates the current call to the address returned by `_implementation()`.\n     *\n     * This function does not return to its internall call site, it will return directly to the external caller.\n     */\n    function _fallback() internal virtual {\n        _beforeFallback();\n        _delegate(_implementation());\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other\n     * function in the contract matches the call data.\n     */\n    fallback() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data\n     * is empty.\n     */\n    receive() external payable virtual {\n        _fallback();\n    }\n\n    /**\n     * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback`\n     * call, or as part of the Solidity `fallback` or `receive` functions.\n     *\n     * If overriden should call `super._beforeFallback()`.\n     */\n    function _beforeFallback() internal virtual {}\n}\n","keccak256":"0xab2556b154ceb1a11e456f2827ca8f6f65242b1b2fcc00268ab6d38fc6e64bbd","license":"MIT"},"@openzeppelin/contracts/proxy/beacon/IBeacon.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev This is the interface that {BeaconProxy} expects of its beacon.\n */\ninterface IBeacon {\n    /**\n     * @dev Must return an address that can be used as a delegate call target.\n     *\n     * {BeaconProxy} will check that this address is a contract.\n     */\n    function implementation() external view returns (address);\n}\n","keccak256":"0xd50a3421ac379ccb1be435fa646d66a65c986b4924f0849839f08692f39dde61","license":"MIT"},"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/ProxyAdmin.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./TransparentUpgradeableProxy.sol\";\nimport \"../../access/Ownable.sol\";\n\n/**\n * @dev This is an auxiliary contract meant to be assigned as the admin of a {TransparentUpgradeableProxy}. For an\n * explanation of why you would want to use this see the documentation for {TransparentUpgradeableProxy}.\n */\ncontract ProxyAdmin is Ownable {\n    /**\n     * @dev Returns the current implementation of `proxy`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function getProxyImplementation(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n        // We need to manually run the static call since the getter cannot be flagged as view\n        // bytes4(keccak256(\"implementation()\")) == 0x5c60da1b\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"5c60da1b\");\n        require(success);\n        return abi.decode(returndata, (address));\n    }\n\n    /**\n     * @dev Returns the current admin of `proxy`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function getProxyAdmin(TransparentUpgradeableProxy proxy) public view virtual returns (address) {\n        // We need to manually run the static call since the getter cannot be flagged as view\n        // bytes4(keccak256(\"admin()\")) == 0xf851a440\n        (bool success, bytes memory returndata) = address(proxy).staticcall(hex\"f851a440\");\n        require(success);\n        return abi.decode(returndata, (address));\n    }\n\n    /**\n     * @dev Changes the admin of `proxy` to `newAdmin`.\n     *\n     * Requirements:\n     *\n     * - This contract must be the current admin of `proxy`.\n     */\n    function changeProxyAdmin(TransparentUpgradeableProxy proxy, address newAdmin) public virtual onlyOwner {\n        proxy.changeAdmin(newAdmin);\n    }\n\n    /**\n     * @dev Upgrades `proxy` to `implementation`. See {TransparentUpgradeableProxy-upgradeTo}.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function upgrade(TransparentUpgradeableProxy proxy, address implementation) public virtual onlyOwner {\n        proxy.upgradeTo(implementation);\n    }\n\n    /**\n     * @dev Upgrades `proxy` to `implementation` and calls a function on the new implementation. See\n     * {TransparentUpgradeableProxy-upgradeToAndCall}.\n     *\n     * Requirements:\n     *\n     * - This contract must be the admin of `proxy`.\n     */\n    function upgradeAndCall(\n        TransparentUpgradeableProxy proxy,\n        address implementation,\n        bytes memory data\n    ) public payable virtual onlyOwner {\n        proxy.upgradeToAndCall{value: msg.value}(implementation, data);\n    }\n}\n","keccak256":"0x33b8603bfbef7f33d9308b79c79aa3db7eb19525fd1addd764285e834ca275d7","license":"MIT"},"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (proxy/transparent/TransparentUpgradeableProxy.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../ERC1967/ERC1967Proxy.sol\";\n\n/**\n * @dev This contract implements a proxy that is upgradeable by an admin.\n *\n * To avoid https://medium.com/nomic-labs-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357[proxy selector\n * clashing], which can potentially be used in an attack, this contract uses the\n * https://blog.openzeppelin.com/the-transparent-proxy-pattern/[transparent proxy pattern]. This pattern implies two\n * things that go hand in hand:\n *\n * 1. If any account other than the admin calls the proxy, the call will be forwarded to the implementation, even if\n * that call matches one of the admin functions exposed by the proxy itself.\n * 2. If the admin calls the proxy, it can access the admin functions, but its calls will never be forwarded to the\n * implementation. If the admin tries to call a function on the implementation it will fail with an error that says\n * \"admin cannot fallback to proxy target\".\n *\n * These properties mean that the admin account can only be used for admin actions like upgrading the proxy or changing\n * the admin, so it's best if it's a dedicated account that is not used for anything else. This will avoid headaches due\n * to sudden errors when trying to call a function from the proxy implementation.\n *\n * Our recommendation is for the dedicated account to be an instance of the {ProxyAdmin} contract. If set up this way,\n * you should think of the `ProxyAdmin` instance as the real administrative interface of your proxy.\n */\ncontract TransparentUpgradeableProxy is ERC1967Proxy {\n    /**\n     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and\n     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.\n     */\n    constructor(\n        address _logic,\n        address admin_,\n        bytes memory _data\n    ) payable ERC1967Proxy(_logic, _data) {\n        assert(_ADMIN_SLOT == bytes32(uint256(keccak256(\"eip1967.proxy.admin\")) - 1));\n        _changeAdmin(admin_);\n    }\n\n    /**\n     * @dev Modifier used internally that will delegate the call to the implementation unless the sender is the admin.\n     */\n    modifier ifAdmin() {\n        if (msg.sender == _getAdmin()) {\n            _;\n        } else {\n            _fallback();\n        }\n    }\n\n    /**\n     * @dev Returns the current admin.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyAdmin}.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`\n     */\n    function admin() external ifAdmin returns (address admin_) {\n        admin_ = _getAdmin();\n    }\n\n    /**\n     * @dev Returns the current implementation.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-getProxyImplementation}.\n     *\n     * TIP: To get this value clients can read directly from the storage slot shown below (specified by EIP1967) using the\n     * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.\n     * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`\n     */\n    function implementation() external ifAdmin returns (address implementation_) {\n        implementation_ = _implementation();\n    }\n\n    /**\n     * @dev Changes the admin of the proxy.\n     *\n     * Emits an {AdminChanged} event.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-changeProxyAdmin}.\n     */\n    function changeAdmin(address newAdmin) external virtual ifAdmin {\n        _changeAdmin(newAdmin);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgrade}.\n     */\n    function upgradeTo(address newImplementation) external ifAdmin {\n        _upgradeToAndCall(newImplementation, bytes(\"\"), false);\n    }\n\n    /**\n     * @dev Upgrade the implementation of the proxy, and then call a function from the new implementation as specified\n     * by `data`, which should be an encoded function call. This is useful to initialize new storage variables in the\n     * proxied contract.\n     *\n     * NOTE: Only the admin can call this function. See {ProxyAdmin-upgradeAndCall}.\n     */\n    function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin {\n        _upgradeToAndCall(newImplementation, data, true);\n    }\n\n    /**\n     * @dev Returns the current admin.\n     */\n    function _admin() internal view virtual returns (address) {\n        return _getAdmin();\n    }\n\n    /**\n     * @dev Makes sure the admin cannot access the fallback function. See {Proxy-_beforeFallback}.\n     */\n    function _beforeFallback() internal virtual override {\n        require(msg.sender != _getAdmin(), \"TransparentUpgradeableProxy: admin cannot fallback to proxy target\");\n        super._beforeFallback();\n    }\n}\n","keccak256":"0x140055a64cf579d622e04f5a198595832bf2cb193cd0005f4f2d4d61ca906253","license":"MIT"},"@openzeppelin/contracts/utils/Address.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        assembly {\n            size := extcodesize(account)\n        }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a delegate call.\n     *\n     * _Available since v3.4._\n     */\n    function functionDelegateCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(isContract(target), \"Address: delegate call to non-contract\");\n\n        (bool success, bytes memory returndata) = target.delegatecall(data);\n        return verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n","keccak256":"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4","license":"MIT"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n","keccak256":"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7","license":"MIT"},"@openzeppelin/contracts/utils/StorageSlot.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/StorageSlot.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for reading and writing primitive types to specific storage slots.\n *\n * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.\n * This library helps with reading and writing to such slots without the need for inline assembly.\n *\n * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.\n *\n * Example usage to set ERC1967 implementation slot:\n * ```\n * contract ERC1967 {\n *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\n *\n *     function _getImplementation() internal view returns (address) {\n *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;\n *     }\n *\n *     function _setImplementation(address newImplementation) internal {\n *         require(Address.isContract(newImplementation), \"ERC1967: new implementation is not a contract\");\n *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;\n *     }\n * }\n * ```\n *\n * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._\n */\nlibrary StorageSlot {\n    struct AddressSlot {\n        address value;\n    }\n\n    struct BooleanSlot {\n        bool value;\n    }\n\n    struct Bytes32Slot {\n        bytes32 value;\n    }\n\n    struct Uint256Slot {\n        uint256 value;\n    }\n\n    /**\n     * @dev Returns an `AddressSlot` with member `value` located at `slot`.\n     */\n    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `BooleanSlot` with member `value` located at `slot`.\n     */\n    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Bytes32Slot` with member `value` located at `slot`.\n     */\n    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n\n    /**\n     * @dev Returns an `Uint256Slot` with member `value` located at `slot`.\n     */\n    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {\n        assembly {\n            r.slot := slot\n        }\n    }\n}\n","keccak256":"0xfe1b7a9aa2a530a9e705b220e26cd584e2fbdc9602a3a1066032b12816b46aca","license":"MIT"},"@openzeppelin/contracts/utils/structs/EnumerableSet.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Library for managing\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\n * types.\n *\n * Sets have the following properties:\n *\n * - Elements are added, removed, and checked for existence in constant time\n * (O(1)).\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\n *\n * ```\n * contract Example {\n *     // Add the library methods\n *     using EnumerableSet for EnumerableSet.AddressSet;\n *\n *     // Declare a set state variable\n *     EnumerableSet.AddressSet private mySet;\n * }\n * ```\n *\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\n * and `uint256` (`UintSet`) are supported.\n */\nlibrary EnumerableSet {\n    // To implement this library for multiple types with as little code\n    // repetition as possible, we write it in terms of a generic Set type with\n    // bytes32 values.\n    // The Set implementation uses private functions, and user-facing\n    // implementations (such as AddressSet) are just wrappers around the\n    // underlying Set.\n    // This means that we can only create new EnumerableSets for types that fit\n    // in bytes32.\n\n    struct Set {\n        // Storage of set values\n        bytes32[] _values;\n        // Position of the value in the `values` array, plus 1 because index 0\n        // means a value is not in the set.\n        mapping(bytes32 => uint256) _indexes;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function _add(Set storage set, bytes32 value) private returns (bool) {\n        if (!_contains(set, value)) {\n            set._values.push(value);\n            // The value is stored at length-1, but we add 1 to all indexes\n            // and use 0 as a sentinel value\n            set._indexes[value] = set._values.length;\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function _remove(Set storage set, bytes32 value) private returns (bool) {\n        // We read and store the value's index to prevent multiple reads from the same storage slot\n        uint256 valueIndex = set._indexes[value];\n\n        if (valueIndex != 0) {\n            // Equivalent to contains(set, value)\n            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\n            // the array, and then remove the last element (sometimes called as 'swap and pop').\n            // This modifies the order of the array, as noted in {at}.\n\n            uint256 toDeleteIndex = valueIndex - 1;\n            uint256 lastIndex = set._values.length - 1;\n\n            if (lastIndex != toDeleteIndex) {\n                bytes32 lastvalue = set._values[lastIndex];\n\n                // Move the last value to the index where the value to delete is\n                set._values[toDeleteIndex] = lastvalue;\n                // Update the index for the moved value\n                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex\n            }\n\n            // Delete the slot where the moved value was stored\n            set._values.pop();\n\n            // Delete the index for the deleted slot\n            delete set._indexes[value];\n\n            return true;\n        } else {\n            return false;\n        }\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function _contains(Set storage set, bytes32 value) private view returns (bool) {\n        return set._indexes[value] != 0;\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function _length(Set storage set) private view returns (uint256) {\n        return set._values.length;\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function _at(Set storage set, uint256 index) private view returns (bytes32) {\n        return set._values[index];\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function _values(Set storage set) private view returns (bytes32[] memory) {\n        return set._values;\n    }\n\n    // Bytes32Set\n\n    struct Bytes32Set {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _add(set._inner, value);\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\n        return _remove(set._inner, value);\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\n        return _contains(set._inner, value);\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(Bytes32Set storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\n        return _at(set._inner, index);\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\n        return _values(set._inner);\n    }\n\n    // AddressSet\n\n    struct AddressSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(AddressSet storage set, address value) internal returns (bool) {\n        return _add(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(AddressSet storage set, address value) internal returns (bool) {\n        return _remove(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(AddressSet storage set, address value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(uint256(uint160(value))));\n    }\n\n    /**\n     * @dev Returns the number of values in the set. O(1).\n     */\n    function length(AddressSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(AddressSet storage set, uint256 index) internal view returns (address) {\n        return address(uint160(uint256(_at(set._inner, index))));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(AddressSet storage set) internal view returns (address[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        address[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n\n    // UintSet\n\n    struct UintSet {\n        Set _inner;\n    }\n\n    /**\n     * @dev Add a value to a set. O(1).\n     *\n     * Returns true if the value was added to the set, that is if it was not\n     * already present.\n     */\n    function add(UintSet storage set, uint256 value) internal returns (bool) {\n        return _add(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Removes a value from a set. O(1).\n     *\n     * Returns true if the value was removed from the set, that is if it was\n     * present.\n     */\n    function remove(UintSet storage set, uint256 value) internal returns (bool) {\n        return _remove(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns true if the value is in the set. O(1).\n     */\n    function contains(UintSet storage set, uint256 value) internal view returns (bool) {\n        return _contains(set._inner, bytes32(value));\n    }\n\n    /**\n     * @dev Returns the number of values on the set. O(1).\n     */\n    function length(UintSet storage set) internal view returns (uint256) {\n        return _length(set._inner);\n    }\n\n    /**\n     * @dev Returns the value stored at position `index` in the set. O(1).\n     *\n     * Note that there are no guarantees on the ordering of values inside the\n     * array, and it may change when more values are added or removed.\n     *\n     * Requirements:\n     *\n     * - `index` must be strictly less than {length}.\n     */\n    function at(UintSet storage set, uint256 index) internal view returns (uint256) {\n        return uint256(_at(set._inner, index));\n    }\n\n    /**\n     * @dev Return the entire set in an array\n     *\n     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\n     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\n     * this function has an unbounded cost, and using it as part of a state-changing function may render the function\n     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\n     */\n    function values(UintSet storage set) internal view returns (uint256[] memory) {\n        bytes32[] memory store = _values(set._inner);\n        uint256[] memory result;\n\n        assembly {\n            result := store\n        }\n\n        return result;\n    }\n}\n","keccak256":"0x9772845c886f87a3aab315f8d6b68aa599027c20f441b131cd4afaf65b588900","license":"MIT"},"contracts/ambassadors/interfaces/IAmbassadors.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\ninterface IAmbassadors {\n    function getVersion() external pure returns(uint256);\n    function isAmbassador(address _ambassador) external view returns (bool);\n    function isAmbassadorOf(address _ambassador, address _community) external view returns (bool);\n    function isEntityOf(address _ambassador, address _entityAddress) external view returns (bool);\n    function isAmbassadorAt(address _ambassador, address _entityAddress) external view returns (bool);\n\n    function addEntity(address _entity) external;\n    function removeEntity(address _entity) external;\n    function replaceEntityAccount(address _entity, address _newEntity) external;\n    function addAmbassador(address _ambassador) external;\n    function removeAmbassador(address _ambassador) external;\n    function replaceAmbassadorAccount(address _ambassador, address _newAmbassador) external;\n    function replaceAmbassador(address _oldAmbassador, address _newAmbassador) external;\n    function transferAmbassador(address _ambassador, address _toEntity, bool _keepCommunities) external;\n    function transferCommunityToAmbassador(address _to, address _community) external;\n    function setCommunityToAmbassador(address _ambassador, address _community) external;\n    function removeCommunity(address _community) external;\n}\n","keccak256":"0x18994047358b59b9925a303741d094f0543574874ff716b740a8165172c6ebf5","license":"Apache-2.0"},"contracts/community/interfaces/ICommunity.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol\";\nimport {IERC20Upgradeable as IERC20} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"./ICommunityAdmin.sol\";\n\ninterface ICommunity {\n    enum BeneficiaryState {\n        NONE, //the beneficiary hasn't been added yet\n        Valid,\n        Locked,\n        Removed,\n        AddressChanged,\n        Copied  //the beneficiary has been moved in a copy community\n    }\n\n    struct Beneficiary {\n        BeneficiaryState state;  //beneficiary state\n        uint256 claims;          //total number of claims\n        uint256 claimedAmount;   //total amount of tokens received\n                                 //(based on token ratios when there are more than one token)\n        uint256 lastClaim;       //block number of the last claim\n        mapping(address => uint256) claimedAmounts;\n    }\n\n    struct TokenUpdates {\n        address tokenAddress;    //address of the token\n        uint256 ratio;           //ratio between maxClaim and previous token maxClaim\n        uint256 startBlock;      //the number of the block from which the this token was \"active\"\n    }\n\n    function initialize(\n        address _tokenAddress,\n        address[] memory _managers,\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval,\n        uint256 _minTranche,\n        uint256 _maxTranche,\n        uint256 _maxBeneficiaries,\n        ICommunity _previousCommunity\n    ) external;\n    function getVersion() external pure returns(uint256);\n    function previousCommunity() external view returns(ICommunity);\n    function copyOf() external view returns(ICommunity);\n    function copies() external view returns(address[] memory);\n    function originalClaimAmount() external view returns(uint256);\n    function claimAmount() external view returns(uint256);\n    function baseInterval() external view returns(uint256);\n    function incrementInterval() external view returns(uint256);\n    function maxClaim() external view returns(uint256);\n    function maxTotalClaim() external view returns(uint256);\n    function validBeneficiaryCount() external view returns(uint);\n    function maxBeneficiaries() external view returns(uint);\n    function treasuryFunds() external view returns(uint);\n    function privateFunds() external view returns(uint);\n    function communityAdmin() external view returns(ICommunityAdmin);\n    function cUSD() external view  returns(IERC20);\n    function token() external view  returns(IERC20);\n    function tokenList() external view returns(address[] memory);\n    function locked() external view returns(bool);\n    function beneficiaries(address _beneficiaryAddress) external view returns(\n        BeneficiaryState state,\n        uint256 claims,\n        uint256 claimedAmount,\n        uint256 lastClaim\n    );\n    function beneficiaryClaimedAmounts(address _beneficiaryAddress) external view\n        returns (uint256[] memory claimedAmounts);\n    function decreaseStep() external view returns(uint);\n    function beneficiaryListAt(uint256 _index) external view returns (address);\n    function impactMarketAddress() external pure returns (address);\n    function beneficiaryListLength() external view returns (uint256);\n    function minTranche() external view returns(uint256);\n    function maxTranche() external view returns(uint256);\n    function lastFundRequest() external view returns(uint256);\n    function tokenUpdates(uint256 _index) external view returns (\n        address tokenAddress,\n        uint256 ratio,\n        uint256 startBlock\n    );\n    function tokenUpdatesLength() external view returns (uint256);\n    function isSelfFunding() external view returns (bool);\n    function setBeneficiaryState(address _beneficiaryAddress, BeneficiaryState _state) external;\n    function updateCommunityAdmin(ICommunityAdmin _communityAdmin) external;\n    function updatePreviousCommunity(ICommunity _newPreviousCommunity) external;\n    function updateBeneficiaryParams(\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval\n    ) external;\n    function updateCommunityParams(\n        uint256 _minTranche,\n        uint256 _maxTranche\n    ) external;\n    function updateMaxBeneficiaries(uint256 _newMaxBeneficiaries) external;\n    function updateToken(\n        IERC20 _newToken,\n        address[] calldata _exchangePath,\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval\n    ) external;\n    function donate(address _sender, uint256 _amount) external;\n    function addTreasuryFunds(uint256 _amount) external;\n    function transfer(IERC20 _token, address _to, uint256 _amount) external;\n    function addManager(address _managerAddress) external;\n    function removeManager(address _managerAddress) external;\n    function addBeneficiary(address _beneficiaryAddress) external;\n    function addBeneficiaries(address[] memory _beneficiaryAddresses) external;\n    function addBeneficiariesUsingSignature(\n        address[] memory _beneficiaryAddresses,\n        uint256 _expirationTimestamp,\n        bytes calldata _signature\n    ) external;\n    function copyBeneficiaries(address[] memory _beneficiaryAddresses) external;\n    function lockBeneficiary(address _beneficiaryAddress) external;\n    function lockBeneficiaries(address[] memory _beneficiaryAddresses) external;\n    function lockBeneficiariesUsingSignature(\n        address[] memory _beneficiaryAddresses,\n        uint256 _expirationTimestamp,\n        bytes calldata _signature\n    ) external;\n    function unlockBeneficiary(address _beneficiaryAddress) external;\n    function unlockBeneficiaries(address[] memory _beneficiaryAddresses) external;\n    function unlockBeneficiariesUsingSignature(\n        address[] memory _beneficiaryAddresses,\n        uint256 _expirationTimestamp,\n        bytes calldata _signature\n    ) external;\n    function removeBeneficiary(address _beneficiaryAddress) external;\n    function removeBeneficiaries(address[] memory _beneficiaryAddresses) external;\n    function removeBeneficiariesUsingSignature(\n        address[] memory _beneficiaryAddresses,\n        uint256 _expirationTimestamp,\n        bytes calldata _signature\n    ) external;\n    function changeBeneficiaryAddressByManager(address _oldBeneficiaryAddress, address _newBeneficiaryAddress) external;\n    function changeBeneficiaryAddress(address _newBeneficiaryAddress) external;\n    function claim() external;\n    function lastInterval(address _beneficiaryAddress) external view returns (uint256);\n    function claimCooldown(address _beneficiaryAddress) external view returns (uint256);\n    function lock() external;\n    function unlock() external;\n    function requestFunds() external;\n    function beneficiaryJoinFromMigrated(address _beneficiaryAddress) external;\n    function getInitialMaxClaim() external view returns (uint256);\n    function addCopy(ICommunity _copy) external;\n    function copyCommunityDetails(ICommunity _originalCommunity) external;\n}\n","keccak256":"0x4fc6761473d092fefa3b5ea636141421fa43f9f91cde5ad037fe4900af09bdbf","license":"Apache-2.0"},"contracts/community/interfaces/ICommunityAdmin.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\nimport {IERC20Upgradeable as IERC20} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"./ICommunity.sol\";\nimport \"../../treasury/interfaces/ITreasury.sol\";\nimport \"../../governor/impactMarketCouncil/interfaces/IImpactMarketCouncil.sol\";\nimport \"../../ambassadors/interfaces/IAmbassadors.sol\";\n\ninterface ICommunityAdmin {\n    enum CommunityState {\n        NONE,\n        Valid,\n        Removed,\n        Migrated\n    }\n\n    function getVersion() external pure returns(uint256);\n    function cUSD() external view returns(IERC20);\n    function treasury() external view returns(ITreasury);\n    function impactMarketCouncil() external view returns(IImpactMarketCouncil);\n    function ambassadors() external view returns(IAmbassadors);\n    function communityMiddleProxy() external view returns(address);\n    function authorizedWalletAddress() external view returns(address);\n    function minClaimAmountRatio() external view returns(uint256);\n    function minClaimAmountRatioPrecision() external view returns(uint256);\n    function communities(address _community) external view returns(CommunityState);\n    function communityImplementation() external view returns(ICommunity);\n    function communityProxyAdmin() external view returns(ProxyAdmin);\n    function communityListAt(uint256 _index) external view returns (address);\n    function communityListLength() external view returns (uint256);\n    function treasurySafetyPercentage() external view returns (uint256);\n    function treasuryMinBalance() external view returns (uint256);\n    function isAmbassadorOrEntityOfCommunity(address _community, address _ambassadorOrEntity) external view returns (bool);\n    function updateTreasury(ITreasury _newTreasury) external;\n    function updateImpactMarketCouncil(IImpactMarketCouncil _newImpactMarketCouncil) external;\n    function updateAmbassadors(IAmbassadors _newAmbassadors) external;\n    function updateCommunityMiddleProxy(address _communityMiddleProxy) external;\n    function updateCommunityImplementation(ICommunity _communityImplementation_) external;\n    function updateAuthorizedWalletAddress(address _newSignerAddress) external;\n    function updateMinClaimAmountRatio(uint256 _newMinClaimAmountRatio) external;\n    function updateTreasurySafetyPercentage(uint256 _newTreasurySafetyPercentage) external;\n    function updateTreasuryMinBalance(uint256 _newTreasuryMinBalance) external;\n    function setCommunityToAmbassador(address _ambassador, ICommunity _communityAddress) external;\n    function updateBeneficiaryParams(\n        ICommunity _community,\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval,\n        uint256 _maxBeneficiaries\n    ) external;\n    function updateCommunityParams(\n        ICommunity _community,\n        uint256 _minTranche,\n        uint256 _maxTranche\n    ) external;\n    function updateProxyImplementation(address _communityMiddleProxy, address _newLogic) external;\n    function updateCommunityToken(\n        ICommunity _community,\n        IERC20 _newToken,\n        address[] memory _exchangePath,\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval\n    ) external;\n    function addCommunity(\n        address _tokenAddress,\n        address[] memory _managers,\n        address _ambassador,\n        uint256 _claimAmount,\n        uint256 _maxClaim,\n        uint256 _decreaseStep,\n        uint256 _baseInterval,\n        uint256 _incrementInterval,\n        uint256 _minTranche,\n        uint256 _maxTranche,\n        uint256 _maxBeneficiaries\n    ) external;\n    function migrateCommunity(\n        address[] memory _managers,\n        ICommunity _previousCommunity\n    ) external;\n    function splitCommunity(\n        ICommunity _community,\n        uint256 _numberOfCopies,\n        address _ambassador,\n        address[] memory _managers\n    ) external;\n    function removeCommunity(ICommunity _community) external;\n    function fundCommunity() external returns(uint256);\n    function calculateCommunityTrancheAmount(ICommunity _community) external view returns (uint256);\n    function transfer(IERC20 _token, address _to, uint256 _amount) external;\n    function transferFromCommunity(\n        ICommunity _community,\n        IERC20 _token,\n        address _to,\n        uint256 _amount\n    ) external;\n    function getCommunityProxyImplementation(address _communityProxyAddress) external view returns(address);\n}\n","keccak256":"0x528e15a75c6063ebe77e954d015d254569665fad2cdf97c6b01c14faa14ee486","license":"Apache-2.0"},"contracts/governor/impactMarketCouncil/ImpactMarketCouncilImplementation.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol\";\nimport \"@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol\";\nimport \"@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol\";\nimport \"./interfaces/ImpactMarketCouncilStorageV1.sol\";\n\ncontract ImpactMarketCouncilImplementation is\n    Initializable,\n    OwnableUpgradeable,\n    ReentrancyGuardUpgradeable,\n    ImpactMarketCouncilStorageV1\n{\n    /// @notice The max setable voting period\n    uint256 public constant MAX_VOTING_PERIOD = 518400; // About 30 days\n\n    /// @notice The maximum number of actions that can be included in a proposal\n    uint256 public constant PROPOSAL_MAX_OPERATIONS = 10; // 10 actions\n\n    /// @notice An event emitted when a new proposal is created\n    event ProposalCreated(\n        uint256 id,\n        address proposer,\n        address[] targets,\n        string[] signatures,\n        bytes[] calldatas,\n        uint256 endBlock,\n        string description\n    );\n\n    /// @notice An event emitted when a vote has been cast on a proposal\n    /// @param voter The address which casted a vote\n    /// @param proposalId The proposal id which was voted on\n    /// @param support Support value for the vote. 0=against, 1=for, 2=abstain\n    /// @param votes Number of votes which were cast by the voter\n    /// @param reason The reason given for the vote by the voter\n    event VoteCast(\n        address indexed voter,\n        uint256 proposalId,\n        uint8 support,\n        uint256 votes,\n        string reason\n    );\n\n    /// @notice An event emitted when a proposal has been canceled\n    event ProposalCanceled(uint256 id);\n\n    /// @notice An event emitted when a proposal has been executed in the Timelock\n    event ProposalExecuted(uint256 id);\n\n    /// @notice Emitted when implementation is changed\n    event NewImplementation(address oldImplementation, address newImplementation);\n\n    /// @notice An event emitted when the quorum votes is set\n    event QuorumVotesSet(uint256 oldQuorumVotes, uint256 newQuorumVotes);\n\n    /// @notice An event emitted when a member is added\n    event MemberAdded(address member);\n\n    /// @notice An event emitted when a member is removed\n    event MemberRemoved(address member);\n\n    /**\n     * @notice Triggered when an amount of an ERC20 has been transferred from this contract to an address\n     *\n     * @param token               ERC20 token address\n     * @param to                  Address of the receiver\n     * @param amount              Amount of the transaction\n     */\n    event TransferERC20(address indexed token, address indexed to, uint256 amount);\n\n    modifier onlyMember() {\n        require(members[msg.sender] == true, \"PACT:: Not a member\");\n        _;\n    }\n\n    /**\n     * @notice Used to initialize the contract during delegator constructor\n     * @param _quorumVotes The initial quorum votes\n     */\n    function initialize(\n        uint256 _quorumVotes,\n        ICommunityAdmin _communityAdmin,\n        address[] calldata _members\n    ) public initializer {\n        require(_quorumVotes >= 1, \"PACT::initialize: invalid proposal threshold\");\n        require(_quorumVotes <= _members.length, \"PACT::initialize: params mismatch\");\n\n        __Ownable_init();\n        __ReentrancyGuard_init();\n\n        communityProxyAdmin = new ProxyAdmin();\n        communityAdmin = _communityAdmin;\n        quorumVotes = _quorumVotes;\n\n        // Create dummy proposal\n        Proposal memory _dummyProposal = Proposal({\n            id: proposalCount,\n            proposer: address(this),\n            endBlock: 0,\n            forVotes: 0,\n            againstVotes: 0,\n            abstainVotes: 0,\n            canceled: true,\n            executed: false\n        });\n        proposalCount++;\n\n        proposals[_dummyProposal.id] = _dummyProposal;\n        latestProposalIds[_dummyProposal.proposer] = _dummyProposal.id;\n\n        uint256 _index;\n        uint256 _numberOfMembers = _members.length;\n        for (; _index < _numberOfMembers; _index++) {\n            members[_members[_index]] = true;\n            emit MemberAdded(_members[_index]);\n        }\n\n        emit ProposalCreated(\n            _dummyProposal.id,\n            address(this),\n            proposalTargets[_dummyProposal.id],\n            proposalSignatures[_dummyProposal.id],\n            proposalCalldatas[_dummyProposal.id],\n            0,\n            \"\"\n        );\n    }\n\n    /**\n     * @notice Function used to add new members to the impactMarket Council.\n     * @param _member Member address.\n     */\n    function addMember(address _member) external onlyOwner {\n        require(members[_member] == false, \"PACT::addMember: already a member\");\n\n        members[_member] = true;\n\n        emit MemberAdded(_member);\n    }\n\n    /**\n     * @notice Function used to remove members from the impactMarket Council.\n     * @param _member Member address.\n     */\n    function removeMember(address _member) external onlyOwner {\n        require(members[_member] == true, \"PACT::removeMember: not a member\");\n\n        members[_member] = false;\n\n        emit MemberRemoved(_member);\n    }\n\n    /**\n     * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold.\n     * @param _targets Target addresses for proposal calls.\n     * @param _signatures Function signatures for proposal calls.\n     * @param _calldatas Calldatas for proposal calls.\n     * @param _description String description of the proposal.\n     * @return Proposal id of new proposal.\n     */\n    function propose(\n        address[] memory _targets,\n        string[] memory _signatures,\n        bytes[] memory _calldatas,\n        string memory _description\n    ) external onlyMember returns (uint256) {\n        require(\n            _targets.length == _calldatas.length &&\n            _signatures.length == _calldatas.length,\n            \"PACT::propose: proposal function information arity mismatch\"\n        );\n        require(_signatures.length != 0, \"PACT::propose: must provide actions\");\n        require(_signatures.length <= PROPOSAL_MAX_OPERATIONS, \"PACT::propose: too many actions\");\n\n        uint256 _endBlock = add256(block.number, MAX_VOTING_PERIOD); // (518400) 30 days\n\n        Proposal memory _newProposal = Proposal({\n            id: proposalCount,\n            proposer: msg.sender,\n            endBlock: _endBlock,\n            forVotes: 0,\n            againstVotes: 0,\n            abstainVotes: 0,\n            canceled: false,\n            executed: false\n        });\n        proposalCount++;\n\n        proposals[_newProposal.id] = _newProposal;\n        proposalTargets[_newProposal.id] = _targets;\n        proposalSignatures[_newProposal.id] = _signatures;\n        proposalCalldatas[_newProposal.id] = _calldatas;\n        latestProposalIds[_newProposal.proposer] = _newProposal.id;\n\n        emit ProposalCreated(\n            _newProposal.id,\n            msg.sender,\n            _targets,\n            _signatures,\n            _calldatas,\n            _endBlock,\n            _description\n        );\n        return _newProposal.id;\n    }\n\n    /**\n     * @notice Executes a queued proposal if eta has passed\n     * @param _proposalId The id of the proposal to execute\n     */\n    function execute(uint256 _proposalId) external onlyMember payable {\n        require(\n            state(_proposalId) == ProposalState.Succeeded,\n            \"PACT::execute: proposal can only be executed if it is succeeded\"\n        );\n        Proposal storage _proposal = proposals[_proposalId];\n        _proposal.executed = true;\n        uint256 _i;\n        uint256 _numberOfActions = proposalCalldatas[_proposalId].length;\n        for (; _i < _numberOfActions; _i++) {\n            bytes memory _callData;\n            if (bytes(proposalSignatures[_proposalId][_i]).length == 0) {\n                _callData = proposalCalldatas[_proposalId][_i];\n            } else {\n                _callData = abi.encodePacked(\n                    bytes4(keccak256(bytes(proposalSignatures[_proposalId][_i]))),\n                    proposalCalldatas[_proposalId][_i]\n                );\n            }\n\n            // solium-disable-next-line security/no-call-value\n            (bool _success, ) = proposalTargets[_proposalId][_i].call{value: 0}(_callData);\n            require(_success, \"PACT::execute: Transaction execution reverted.\");\n        }\n        emit ProposalExecuted(_proposalId);\n    }\n\n    /**\n     * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold\n     * @param _proposalId The id of the proposal to cancel\n     */\n    function cancel(uint256 _proposalId) external onlyMember {\n        require(\n            state(_proposalId) != ProposalState.Executed,\n            \"PACT::cancel: cannot cancel executed proposal\"\n        );\n\n        Proposal storage _proposal = proposals[_proposalId];\n        require(msg.sender == _proposal.proposer, \"PACT::cancel: proposer not allowed\");\n\n        _proposal.canceled = true;\n\n        emit ProposalCanceled(_proposalId);\n    }\n\n    /**\n     * @notice Gets actions of a proposal.\n     * @param _proposalId Proposal to query.\n     * @return signatures Function signatures for proposal calls.\n     * @return calldatas Calldatas for proposal calls.\n     */\n    function getActions(uint256 _proposalId)\n        external\n        view\n        returns (string[] memory signatures, bytes[] memory calldatas)\n    {\n        return (proposalSignatures[_proposalId], proposalCalldatas[_proposalId]);\n    }\n\n    /**\n     * @notice Gets the receipt for a voter on a given proposal\n     * @param _proposalId the id of proposal\n     * @param _voter The address of the voter\n     * @return The voting receipt\n     */\n    function getReceipt(uint256 _proposalId, address _voter)\n        external\n        view\n        returns (Receipt memory)\n    {\n        return proposalReceipts[_proposalId][_voter];\n    }\n\n    /**\n     * @notice Gets the state of a proposal\n     * @param _proposalId The id of the proposal\n     * @return Proposal state\n     */\n    function state(uint256 _proposalId) public view returns (ProposalState) {\n        require(proposalCount > _proposalId, \"PACT::state: invalid proposal id\");\n        Proposal storage _proposal = proposals[_proposalId];\n\n        if (_proposal.canceled) {\n            return ProposalState.Canceled;\n        } else if (_proposal.executed) {\n            return ProposalState.Executed;\n        } else if (block.number > _proposal.endBlock) {\n            return ProposalState.Expired;\n        } else if (\n            _proposal.forVotes > _proposal.againstVotes && _proposal.forVotes >= quorumVotes\n        ) {\n            return ProposalState.Succeeded;\n        } else {\n            return ProposalState.Active;\n        }\n    }\n\n    /**\n     * @notice Cast a vote for a proposal\n     * @param _proposalId The id of the proposal to vote on\n     * @param _support The support value for the vote. 0=against, 1=for, 2=abstain\n     */\n    function castVote(uint256 _proposalId, uint8 _support) external onlyMember {\n        emit VoteCast(\n            msg.sender,\n            _proposalId,\n            _support,\n            castVoteInternal(msg.sender, _proposalId, _support),\n            \"\"\n        );\n    }\n\n    /**\n     * @notice Internal function that caries out voting logic\n     * @param _voter The voter that is casting their vote\n     * @param _proposalId The id of the proposal to vote on\n     * @param _support The support value for the vote. 0=against, 1=for, 2=abstain\n     * @return The number of votes cast\n     */\n    function castVoteInternal(\n        address _voter,\n        uint256 _proposalId,\n        uint8 _support\n    ) internal returns (uint96) {\n        require(\n            state(_proposalId) == ProposalState.Active,\n            \"PACT::castVoteInternal: voting is closed\"\n        );\n        require(_support <= 2, \"PACT::castVoteInternal: invalid vote type\");\n        Proposal storage _proposal = proposals[_proposalId];\n        Receipt storage _receipt = proposalReceipts[_proposalId][_voter];\n        require(_receipt.hasVoted == false, \"PACT::castVoteInternal: voter already voted\");\n        uint96 _votes = 1;\n\n        if (_support == 0) {\n            _proposal.againstVotes = add256(_proposal.againstVotes, _votes);\n        } else if (_support == 1) {\n            _proposal.forVotes = add256(_proposal.forVotes, _votes);\n        } else if (_support == 2) {\n            _proposal.abstainVotes = add256(_proposal.abstainVotes, _votes);\n        }\n\n        _receipt.hasVoted = true;\n        _receipt.support = _support;\n        _receipt.votes = _votes;\n\n        return _votes;\n    }\n\n    /**\n     * @notice Owner function for setting the quorum votes\n     * @param _newQuorumVotes new quorum votes\n     */\n    function setQuorumVotes(uint256 _newQuorumVotes) external onlyOwner {\n        require(_newQuorumVotes >= 1, \"PACT::_setQuorumVotes: invalid quorum votes\");\n\n        emit QuorumVotesSet(quorumVotes, _newQuorumVotes);\n        quorumVotes = _newQuorumVotes;\n\n    }\n\n    function add256(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        uint256 _c = _a + _b;\n        require(_c >= _a, \"addition overflow\");\n        return _c;\n    }\n\n    function sub256(uint256 _a, uint256 _b) internal pure returns (uint256) {\n        require(_b <= _a, \"subtraction underflow\");\n        return _a - _b;\n    }\n\n    function add96(\n        uint96 _a,\n        uint96 _b,\n        string memory _errorMessage\n    ) internal pure returns (uint96) {\n        uint96 _c = _a + _b;\n        require(_c >= _a, _errorMessage);\n        return _c;\n    }\n}\n","keccak256":"0x7886e239c1f4c332bb77e5da4595b92f14aa4d47d1b8e088395c1f95374f69bd","license":"Apache-2.0"},"contracts/governor/impactMarketCouncil/interfaces/IImpactMarketCouncil.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\n\ninterface IImpactMarketCouncil {\n    struct Proposal {\n        // Unique id for looking up a proposal\n        uint256 id;\n        // Creator of the proposal\n        address proposer;\n        // The block at which voting ends: votes must be cast prior to this block\n        uint256 endBlock;\n        // Current number of votes in favor of this proposal\n        uint256 forVotes;\n        // Current number of votes in opposition to this proposal\n        uint256 againstVotes;\n        // Current number of votes for abstaining for this proposal\n        uint256 abstainVotes;\n        // Flag marking whether the proposal has been canceled\n        bool canceled;\n        // Flag marking whether the proposal has been executed\n        bool executed;\n    }\n\n    /// @notice Ballot receipt record for a voter\n    struct Receipt {\n        // Whether or not a vote has been cast\n        bool hasVoted;\n        // Whether or not the voter supports the proposal or abstains\n        uint8 support;\n        // The number of votes the voter had, which were cast\n        uint96 votes;\n    }\n\n    /// @notice Possible states that a proposal may be in\n    enum ProposalState {\n        Pending,\n        Active,\n        Canceled,\n        Expired,\n        Succeeded,\n        Executed\n    }\n}\n","keccak256":"0x9a183c6fc7ec7760170d887fcf026824090dc2f6c4e682b32a4c12ec91fc1667","license":"Apache-2.0"},"contracts/governor/impactMarketCouncil/interfaces/ImpactMarketCouncilStorageV1.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport \"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\";\nimport \"@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol\";\nimport \"../../../community/interfaces/ICommunityAdmin.sol\";\nimport \"./IImpactMarketCouncil.sol\";\n\nabstract contract ImpactMarketCouncilStorageV1 is IImpactMarketCouncil {\n    ProxyAdmin public communityProxyAdmin;\n    ICommunityAdmin public communityAdmin;\n\n    /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed\n    uint256 public quorumVotes;\n\n    /// @notice The total number of proposals\n    uint256 public proposalCount;\n\n    /// @notice The council members\n    mapping(address => bool) public members;\n\n    /// @notice The official record of all proposals ever proposed\n    mapping(uint256 => Proposal) public proposals;\n    /// @notice The official each proposal's signatures:\n    /// An ordered list of function signatures to be called\n    mapping(uint256 => string[]) public proposalSignatures;\n    /// @notice The official each proposal's calldatas:\n    /// An ordered list of calldata to be passed to each call\n    mapping(uint256 => bytes[]) public proposalCalldatas;\n    /// @notice The official each proposal's receipts:\n    /// Receipts of ballots for the entire set of voters\n    mapping(uint256 => mapping(address => Receipt)) public proposalReceipts;\n\n    /// @notice The latest proposal for each proposer\n    mapping(address => uint256) public latestProposalIds;\n\n    /// @notice The official each proposal's targets:\n    /// An ordered list of target addresses for calls to be made\n    mapping(uint256 => address[]) public proposalTargets;\n}\n","keccak256":"0xa50be592d73d2c948611c1e26346ef0b07b585af214b5d8866dab4ebb4a1aa18","license":"Apache-2.0"},"contracts/treasury/interfaces/ITreasury.sol":{"content":"//SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\nimport {IERC20Upgradeable as IERC20} from \"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol\";\nimport \"../../community/interfaces/ICommunityAdmin.sol\";\nimport \"./IUniswapV2Router.sol\";\n\ninterface ITreasury {\n    struct Token {\n        uint256 rate;\n        address[] exchangePath;\n    }\n\n    function getVersion() external pure returns(uint256);\n    function communityAdmin() external view returns(ICommunityAdmin);\n    function uniswapRouter() external view returns(IUniswapV2Router);\n    function updateCommunityAdmin(ICommunityAdmin _communityAdmin) external;\n    function updateUniswapRouter(IUniswapV2Router _uniswapRouter) external;\n    function transfer(IERC20 _token, address _to, uint256 _amount) external;\n    function isToken(address _tokenAddress) external view returns (bool);\n    function tokenListLength() external view returns (uint256);\n    function tokenListAt(uint256 _index) external view returns (address);\n    function tokens(address _tokenAddress) external view returns (uint256 rate, address[] memory exchangePath);\n    function setToken(address _tokenAddress, uint256 _rate, address[] calldata _exchangePath) external;\n    function removeToken(address _tokenAddress) external;\n    function getConvertedAmount(address _tokenAddress, uint256 _amount) external view returns (uint256);\n    function convertAmount(\n        address _tokenAddress,\n        uint256 _amountIn,\n        uint256 _amountOutMin,\n        address[] memory _exchangePath,\n        uint256 _deadline\n    ) external;\n}\n","keccak256":"0xf6337bae44d111efee8edc831b1dd11379e5c5b11dff89404a4d4eecf83bc156","license":"Apache-2.0"},"contracts/treasury/interfaces/IUniswapV2Router.sol":{"content":"// SPDX-License-Identifier: Apache-2.0\npragma solidity 0.8.4;\n\ninterface IUniswapV2Router {\n    function factory() external pure returns (address);\n\n    function addLiquidity(\n        address tokenA,\n        address tokenB,\n        uint amountADesired,\n        uint amountBDesired,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountA, uint amountB, uint liquidity);\n    function removeLiquidity(\n        address tokenA,\n        address tokenB,\n        uint liquidity,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline\n    ) external returns (uint amountA, uint amountB);\n    function removeLiquidityWithPermit(\n        address tokenA,\n        address tokenB,\n        uint liquidity,\n        uint amountAMin,\n        uint amountBMin,\n        address to,\n        uint deadline,\n        bool approveMax, uint8 v, bytes32 r, bytes32 s\n    ) external returns (uint amountA, uint amountB);\n    function swapExactTokensForTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external returns (uint[] memory amounts);\n    function swapTokensForExactTokens(\n        uint amountOut,\n        uint amountInMax,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external returns (uint[] memory amounts);\n\n    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n\n    function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n        uint amountIn,\n        uint amountOutMin,\n        address[] calldata path,\n        address to,\n        uint deadline\n    ) external;\n\n    function pairFor(address tokenA, address tokenB) external view returns (address);\n}\n","keccak256":"0x5a12eebf4cf3741e1b1a30a4315096ae6d545af2e07a92e544d05739ceb811e9","license":"Apache-2.0"}},"version":1}