ETH Price: $1,894.23 (-0.86%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Execute218406322025-02-13 22:47:4732 days ago1739486867IN
PoolTogether: Governance Tally Bravo
0 ETH0.000146740.94023675
Queue218263042025-02-11 22:36:1134 days ago1739313371IN
PoolTogether: Governance Tally Bravo
0 ETH0.000132061.24851451
Cast Vote218105022025-02-09 17:38:3536 days ago1739122715IN
PoolTogether: Governance Tally Bravo
0 ETH0.000092851.33034733
Cast Vote218054692025-02-09 0:47:2337 days ago1739062043IN
PoolTogether: Governance Tally Bravo
0 ETH0.000091871.31627333
Cast Vote218053752025-02-09 0:28:3537 days ago1739060915IN
PoolTogether: Governance Tally Bravo
0 ETH0.000070080.80677773
Cast Vote218046532025-02-08 22:03:3537 days ago1739052215IN
PoolTogether: Governance Tally Bravo
0 ETH0.000092091.31942309
Cast Vote218001352025-02-08 6:54:1138 days ago1738997651IN
PoolTogether: Governance Tally Bravo
0 ETH0.000082181.17744617
Cast Vote217989422025-02-08 2:53:3538 days ago1738983215IN
PoolTogether: Governance Tally Bravo
0 ETH0.000100841.44472812
Cast Vote217964152025-02-07 18:27:1138 days ago1738952831IN
PoolTogether: Governance Tally Bravo
0 ETH0.000085281.02403452
Cast Vote217945022025-02-07 12:02:4738 days ago1738929767IN
PoolTogether: Governance Tally Bravo
0 ETH0.000100751.44354535
Cast Vote217900332025-02-06 21:04:2339 days ago1738875863IN
PoolTogether: Governance Tally Bravo
0 ETH0.000166322.38282442
Execute217866662025-02-06 9:48:2340 days ago1738835303IN
PoolTogether: Governance Tally Bravo
0 ETH0.000160031.3
Cast Vote217847272025-02-06 3:18:3540 days ago1738811915IN
PoolTogether: Governance Tally Bravo
0 ETH0.000085730.98658786
Propose217773632025-02-05 2:38:3541 days ago1738723115IN
PoolTogether: Governance Tally Bravo
0 ETH0.000315662.34725346
Queue217720152025-02-04 8:42:3542 days ago1738658555IN
PoolTogether: Governance Tally Bravo
0 ETH0.000189141.78814028
Cast Vote217582142025-02-02 10:25:1144 days ago1738491911IN
PoolTogether: Governance Tally Bravo
0 ETH0.000166632.38774491
Cast Vote217517712025-02-01 12:48:3544 days ago1738414115IN
PoolTogether: Governance Tally Bravo
0 ETH0.000172722.47504208
Cast Vote217466432025-01-31 19:37:5945 days ago1738352279IN
PoolTogether: Governance Tally Bravo
0 ETH0.000428636.14197439
Cast Vote217415952025-01-31 2:41:1146 days ago1738291271IN
PoolTogether: Governance Tally Bravo
0 ETH0.000087811.25827661
Cast Vote217397682025-01-30 20:33:5946 days ago1738269239IN
PoolTogether: Governance Tally Bravo
0 ETH0.000377924.34958495
Propose217299382025-01-29 11:38:2347 days ago1738150703IN
PoolTogether: Governance Tally Bravo
0 ETH0.000933212.49358557
Execute216193532025-01-14 1:10:3563 days ago1736817035IN
PoolTogether: Governance Tally Bravo
0 ETH0.001420947.00426982
Queue216049922025-01-12 1:02:2365 days ago1736643743IN
PoolTogether: Governance Tally Bravo
0 ETH0.000368843.48812638
Cast Vote216009912025-01-11 11:38:1165 days ago1736595491IN
PoolTogether: Governance Tally Bravo
0 ETH0.000218883.13585865
Cast Vote215915742025-01-10 4:04:4767 days ago1736481887IN
PoolTogether: Governance Tally Bravo
0 ETH0.000356125.10205548
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x22C0260E...A03110821
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PoolTogetherGovernor

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 10000000 runs

Other Settings:
paris EvmVersion, GNU AGPLv3 license
File 1 of 36 : PoolTogetherGovernor.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.18;

import {
  Governor, GovernorCountingFractional
} from "flexible-voting/src/GovernorCountingFractional.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {
  ERC20VotesComp,
  GovernorVotesComp
} from "@openzeppelin/contracts/governance/extensions/GovernorVotesComp.sol";
import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol";
import {ICompoundTimelock} from
  "@openzeppelin/contracts/governance/extensions/GovernorTimelockCompound.sol";
import {GovernorSettings} from "@openzeppelin/contracts/governance/extensions/GovernorSettings.sol";

import {IPoolTogetherTimelock} from "src/interfaces/IPoolTogetherTimelock.sol";
import {GovernorTimelockCompound} from "src/lib/GovernorTimelockCompound.sol";

/// @notice The upgraded PoolTogether Governor: Bravo compatible and built with OpenZeppelin.
contract PoolTogetherGovernor is
  GovernorCountingFractional,
  GovernorVotesComp,
  GovernorTimelockCompound,
  GovernorSettings
{
  /// @notice The address of the POOL token on Ethereum mainnet from which this Governor derives
  /// delegated voting weight.
  ERC20VotesComp private constant POOL_TOKEN =
    ERC20VotesComp(0x0cEC1A9154Ff802e7934Fc916Ed7Ca50bDE6844e);

  /// @notice The address of the existing PoolTogether DAO Timelock on Ethereum mainnet through
  /// which
  /// this Governor executes transactions.
  IPoolTogetherTimelock private constant TIMELOCK =
    IPoolTogetherTimelock(payable(0x42cd8312D2BCe04277dD5161832460e95b24262E));

  /// @notice Human readable name of this Governor.
  string private constant GOVERNOR_NAME = "PoolTogether Governor Bravo";

  /// @notice The number of POOL (in "wei") that must participate in a vote for it to meet quorum
  /// threshold.
  ///
  /// TODO: placeholder
  uint256 private constant QUORUM = 100_000e18; // 100,000 POOL

  /// @param _initialVotingDelay The deployment value for the voting delay this Governor will
  /// enforce.
  /// @param _initialVotingPeriod The deployment value for the voting period this Governor will
  /// enforce.
  /// @param _initialProposalThreshold The deployment value for the number of POOL required to
  /// submit
  /// a proposal this Governor will enforce.
  constructor(
    uint256 _initialVotingDelay,
    uint256 _initialVotingPeriod,
    uint256 _initialProposalThreshold
  )
    GovernorVotesComp(POOL_TOKEN)
    GovernorSettings(_initialVotingDelay, _initialVotingPeriod, _initialProposalThreshold)
    GovernorTimelockCompound(TIMELOCK)
    Governor(GOVERNOR_NAME)
  {}

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(Governor, GovernorTimelockCompound)
    returns (bool)
  {
    return GovernorTimelockCompound.supportsInterface(interfaceId);
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function castVoteWithReasonAndParamsBySig(
    uint256 proposalId,
    uint8 support,
    string calldata reason,
    bytes memory params,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) public override(Governor, GovernorCountingFractional, IGovernor) returns (uint256) {
    return GovernorCountingFractional.castVoteWithReasonAndParamsBySig(
      proposalId, support, reason, params, v, r, s
    );
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function proposalThreshold()
    public
    view
    virtual
    override(Governor, GovernorSettings)
    returns (uint256)
  {
    return GovernorSettings.proposalThreshold();
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function state(uint256 proposalId)
    public
    view
    virtual
    override(Governor, GovernorTimelockCompound)
    returns (ProposalState)
  {
    return GovernorTimelockCompound.state(proposalId);
  }

  /// @notice The amount of POOL required to meet the quorum threshold for a proposal
  /// as of a given block.
  /// @dev Our implementation ignores the block number parameter and returns a constant.
  function quorum(uint256) public pure override returns (uint256) {
    return QUORUM;
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function _execute(
    uint256 proposalId,
    address[] memory targets,
    uint256[] memory values,
    bytes[] memory calldatas,
    bytes32 descriptionHash
  ) internal virtual override(Governor, GovernorTimelockCompound) {
    return
      GovernorTimelockCompound._execute(proposalId, targets, values, calldatas, descriptionHash);
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function _cancel(
    address[] memory targets,
    uint256[] memory values,
    bytes[] memory calldatas,
    bytes32 descriptionHash
  ) internal virtual override(Governor, GovernorTimelockCompound) returns (uint256) {
    return GovernorTimelockCompound._cancel(targets, values, calldatas, descriptionHash);
  }

  /// @dev We override this function to resolve ambiguity between inherited contracts.
  function _executor()
    internal
    view
    virtual
    override(Governor, GovernorTimelockCompound)
    returns (address)
  {
    return GovernorTimelockCompound._executor();
  }
}

File 2 of 36 : GovernorCountingFractional.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.X.X (governance/extensions/GovernorCountingFractional.sol)

pragma solidity ^0.8.0;

import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import {Governor} from "@openzeppelin/contracts/governance/Governor.sol";
import {GovernorCompatibilityBravo} from "@openzeppelin/contracts/governance/compatibility/GovernorCompatibilityBravo.sol";
import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";

/**
 * @notice Extension of {Governor} for 3 option fractional vote counting. When
 * voting, a delegate may split their vote weight between Against/For/Abstain.
 * This is most useful when the delegate is itself a contract, implementing its
 * own rules for voting. By allowing a contract-delegate to split its vote
 * weight, the voting preferences of many disparate token holders can be rolled
 * up into a single vote to the Governor itself. Some example use cases include
 * voting with tokens that are held by a DeFi pool, voting from L2 with tokens
 * held by a bridge, or voting privately from a shielded pool using zero
 * knowledge proofs.
 */
abstract contract GovernorCountingFractional is Governor {

    struct ProposalVote {
        uint128 againstVotes;
        uint128 forVotes;
        uint128 abstainVotes;
    }

    /**
     * @dev Mapping from proposal ID to vote tallies for that proposal.
     */
    mapping(uint256 => ProposalVote) private _proposalVotes;

    /**
     * @dev Mapping from proposal ID and address to the weight the address
     * has cast on that proposal, e.g. _proposalVotersWeightCast[42][0xBEEF]
     * would tell you the number of votes that 0xBEEF has cast on proposal 42.
     */
    mapping(uint256 => mapping(address => uint128)) private _proposalVotersWeightCast;

    /**
     * @dev Mapping from voter address to signature-based vote nonce. The
     * voter's nonce increments each time a signature-based vote is cast with
     * fractional voting params and must be included in the `params` as the last
     * 16 bytes when signing for a fractional vote.
     */
    mapping(address => uint128) public fractionalVoteNonce;

    /**
     * @dev See {IGovernor-COUNTING_MODE}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function COUNTING_MODE() public pure virtual override returns (string memory) {
        return "support=bravo&quorum=for,abstain&params=fractional";
    }

    /**
     * @dev See {IGovernor-hasVoted}.
     */
    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {
        return _proposalVotersWeightCast[proposalId][account] > 0;
    }

    /**
     * @dev Get the number of votes cast thus far on proposal `proposalId` by
     * account `account`. Useful for integrations that allow delegates to cast
     * rolling, partial votes.
     */
    function voteWeightCast(uint256 proposalId, address account) public view returns (uint128) {
      return _proposalVotersWeightCast[proposalId][account];
    }

    /**
     * @dev Accessor to the internal vote counts.
     */
    function proposalVotes(uint256 proposalId)
        public
        view
        virtual
        returns (
            uint256 againstVotes,
            uint256 forVotes,
            uint256 abstainVotes
        )
    {
        ProposalVote storage proposalVote = _proposalVotes[proposalId];
        return (proposalVote.againstVotes, proposalVote.forVotes, proposalVote.abstainVotes);
    }

    /**
     * @dev See {Governor-_quorumReached}.
     */
    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalVote storage proposalVote = _proposalVotes[proposalId];

        return quorum(proposalSnapshot(proposalId)) <= proposalVote.forVotes + proposalVote.abstainVotes;
    }

    /**
     * @dev See {Governor-_voteSucceeded}. In this module, forVotes must be > againstVotes.
     */
    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalVote storage proposalVote = _proposalVotes[proposalId];

        return proposalVote.forVotes > proposalVote.againstVotes;
    }

    /**
     * @notice See {Governor-_countVote}.
     *
     * @dev Function that records the delegate's votes.
     *
     * If the `voteData` bytes parameter is empty, then this module behaves
     * identically to GovernorBravo. That is, it assigns the full weight of the
     * delegate to the `support` parameter, which follows the `VoteType` enum
     * from Governor Bravo.
     *
     * If the `voteData` bytes parameter is not zero, then it _must_ be three
     * packed uint128s, totaling 48 bytes, representing the weight the delegate
     * assigns to Against, For, and Abstain respectively, i.e.
     * `abi.encodePacked(againstVotes, forVotes, abstainVotes)`. The sum total of
     * the three decoded vote weights _must_ be less than or equal to the
     * delegate's remaining weight on the proposal, i.e. their checkpointed
     * total weight minus votes already cast on the proposal.
     *
     * See `_countVoteNominal` and `_countVoteFractional` for more details.
     */
    function _countVote(
        uint256 proposalId,
        address account,
        uint8 support,
        uint256 totalWeight,
        bytes memory voteData
    ) internal virtual override {
        require(totalWeight > 0, "GovernorCountingFractional: no weight");
        if (_proposalVotersWeightCast[proposalId][account] >= totalWeight) {
          revert("GovernorCountingFractional: all weight cast");
        }

        uint128 safeTotalWeight = SafeCast.toUint128(totalWeight);

        if (voteData.length == 0) {
            _countVoteNominal(proposalId, account, safeTotalWeight, support);
        } else {
            _countVoteFractional(proposalId, account, safeTotalWeight, voteData);
        }
    }

    /**
     * @dev Record votes with full weight cast for `support`.
     *
     * Because this function votes with the delegate's full weight, it can only
     * be called once per proposal. It will revert if combined with a fractional
     * vote before or after.
     */
    function _countVoteNominal(
        uint256 proposalId,
        address account,
        uint128 totalWeight,
        uint8 support
    ) internal {
        require(
            _proposalVotersWeightCast[proposalId][account] == 0,
            "GovernorCountingFractional: vote would exceed weight"
        );

        _proposalVotersWeightCast[proposalId][account] = totalWeight;

        if (support == uint8(GovernorCompatibilityBravo.VoteType.Against)) {
            _proposalVotes[proposalId].againstVotes += totalWeight;
        } else if (support == uint8(GovernorCompatibilityBravo.VoteType.For)) {
            _proposalVotes[proposalId].forVotes += totalWeight;
        } else if (support == uint8(GovernorCompatibilityBravo.VoteType.Abstain)) {
            _proposalVotes[proposalId].abstainVotes += totalWeight;
        } else {
            revert("GovernorCountingFractional: invalid support value, must be included in VoteType enum");
        }
    }

    /**
     * @dev Count votes with fractional weight.
     *
     * `voteData` is expected to be three packed uint128s, i.e.
     * `abi.encodePacked(againstVotes, forVotes, abstainVotes)`.
     *
     * This function can be called multiple times for the same account and
     * proposal, i.e. partial/rolling votes are allowed. For example, an account
     * with total weight of 10 could call this function three times with the
     * following vote data:
     *   - against: 1, for: 0, abstain: 2
     *   - against: 3, for: 1, abstain: 0
     *   - against: 1, for: 1, abstain: 1
     * The result of these three calls would be that the account casts 5 votes
     * AGAINST, 2 votes FOR, and 3 votes ABSTAIN on the proposal. Though
     * partial, votes are still final once cast and cannot be changed or
     * overridden. Subsequent partial votes simply increment existing totals.
     *
     * Note that if partial votes are cast, all remaining weight must be cast
     * with _countVoteFractional: _countVoteNominal will revert.
     */
    function _countVoteFractional(
        uint256 proposalId,
        address account,
        uint128 totalWeight,
        bytes memory voteData
    ) internal {
        require(voteData.length == 48, "GovernorCountingFractional: invalid voteData");

        (uint128 _againstVotes, uint128 _forVotes, uint128 _abstainVotes) = _decodePackedVotes(voteData);

        uint128 _existingWeight = _proposalVotersWeightCast[proposalId][account];
        uint256 _newWeight = uint256(_againstVotes) + _forVotes + _abstainVotes + _existingWeight;

        require(_newWeight <= totalWeight, "GovernorCountingFractional: vote would exceed weight");

        // It's safe to downcast here because we've just confirmed that
        // _newWeight <= totalWeight, and totalWeight is a uint128.
        _proposalVotersWeightCast[proposalId][account] = uint128(_newWeight);

        ProposalVote memory _proposalVote = _proposalVotes[proposalId];
        _proposalVote = ProposalVote(
            _proposalVote.againstVotes + _againstVotes,
            _proposalVote.forVotes + _forVotes,
            _proposalVote.abstainVotes + _abstainVotes
        );

        _proposalVotes[proposalId] = _proposalVote;
    }

    uint256 constant internal _MASK_HALF_WORD_RIGHT = 0xffffffffffffffffffffffffffffffff; // 128 bits of 0's, 128 bits of 1's

    /**
     * @dev Decodes three packed uint128's. Uses assembly because of a Solidity
     * language limitation which prevents slicing bytes stored in memory, rather
     * than calldata.
     */
    function _decodePackedVotes(bytes memory voteData)
        internal
        pure
        returns (
            uint128 againstVotes,
            uint128 forVotes,
            uint128 abstainVotes
        )
    {
        assembly {
            againstVotes := shr(128, mload(add(voteData, 0x20)))
            forVotes := and(_MASK_HALF_WORD_RIGHT, mload(add(voteData, 0x20)))
            abstainVotes := shr(128, mload(add(voteData, 0x40)))
        }
    }

    /**
     * @notice Cast a vote with a reason and additional encoded parameters using
     * the user's cryptographic signature.
     *
     * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length
     * of params.
     *
     * @dev If casting a fractional vote via `params`, the voter's current nonce
     * must be appended to the `params` as the last 16 bytes and included in the
     * signature. I.e., the params used when constructing the signature would be:
     *
     *   abi.encodePacked(againstVotes, forVotes, abstainVotes, nonce)
     *
     * See {fractionalVoteNonce} and {_castVote} for more information.
     */
    function castVoteWithReasonAndParamsBySig(
        uint256 proposalId,
        uint8 support,
        string calldata reason,
        bytes memory params,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override returns (uint256) {
        // Signature-based fractional voting requires `params` be two full words
        // in length:
        //   16 bytes for againstVotes.
        //   16 bytes for forVotes.
        //   16 bytes for abstainVotes.
        //   16 bytes for the signature nonce.
        // Signature-based nominal voting requires `params` be 0 bytes.
        require(
          params.length == 64 || params.length == 0,
          "GovernorCountingFractional: invalid params for signature-based vote"
        );

        address voter = ECDSA.recover(
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        EXTENDED_BALLOT_TYPEHASH,
                        proposalId,
                        support,
                        keccak256(bytes(reason)),
                        keccak256(params)
                    )
                )
            ),
            v,
            r,
            s
        );

        // If params are zero-length all of the voter's weight will be cast so
        // we don't have to worry about checking/incrementing a nonce.
        if (params.length == 64) {
          // Get the nonce out of the params. It is the last half-word.
          uint128 nonce;
          assembly {
            nonce := and(
              // Perform bitwise AND operation on the data in the second word of
              // `params` with a mask of 128 zeros followed by 128 ones, i.e. take
              // the last 128 bits of `params`.
              _MASK_HALF_WORD_RIGHT,
              // Load the data from memory at the returned address.
              mload(
                // Skip the first 64 bytes (0x40):
                //   32 bytes encoding the length of the bytes array.
                //   32 bytes for the first word in the params
                // Return the memory address for the last word in params.
                add(params, 0x40)
              )
            )
          }

          require(
            fractionalVoteNonce[voter] == nonce,
            "GovernorCountingFractional: signature has already been used"
          );

          fractionalVoteNonce[voter]++;

          // Trim params in place to keep only the first 48 bytes (which are
          // the voting params) and save gas.
          assembly {
            mstore(params, 0x30)
          }
        }

        return _castVote(proposalId, voter, support, reason, params);
    }

}

File 3 of 36 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

File 4 of 36 : GovernorVotesComp.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (governance/extensions/GovernorVotesComp.sol)

pragma solidity ^0.8.0;

import "../Governor.sol";
import "../../token/ERC20/extensions/ERC20VotesComp.sol";

/**
 * @dev Extension of {Governor} for voting weight extraction from a Comp token.
 *
 * _Available since v4.3._
 */
abstract contract GovernorVotesComp is Governor {
    ERC20VotesComp public immutable token;

    constructor(ERC20VotesComp token_) {
        token = token_;
    }

    /**
     * Read the voting weight from the token's built in snapshot mechanism (see {Governor-_getVotes}).
     */
    function _getVotes(
        address account,
        uint256 blockNumber,
        bytes memory /*params*/
    ) internal view virtual override returns (uint256) {
        return token.getPriorVotes(account, blockNumber);
    }
}

File 5 of 36 : IGovernor.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (governance/IGovernor.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface of the {Governor} core.
 *
 * _Available since v4.3._
 */
abstract contract IGovernor is IERC165 {
    enum ProposalState {
        Pending,
        Active,
        Canceled,
        Defeated,
        Succeeded,
        Queued,
        Expired,
        Executed
    }

    /**
     * @dev Emitted when a proposal is created.
     */
    event ProposalCreated(
        uint256 proposalId,
        address proposer,
        address[] targets,
        uint256[] values,
        string[] signatures,
        bytes[] calldatas,
        uint256 startBlock,
        uint256 endBlock,
        string description
    );

    /**
     * @dev Emitted when a proposal is canceled.
     */
    event ProposalCanceled(uint256 proposalId);

    /**
     * @dev Emitted when a proposal is executed.
     */
    event ProposalExecuted(uint256 proposalId);

    /**
     * @dev Emitted when a vote is cast without params.
     *
     * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used.
     */
    event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);

    /**
     * @dev Emitted when a vote is cast with params.
     *
     * Note: `support` values should be seen as buckets. Their interpretation depends on the voting module used.
     * `params` are additional encoded parameters. Their intepepretation also depends on the voting module used.
     */
    event VoteCastWithParams(
        address indexed voter,
        uint256 proposalId,
        uint8 support,
        uint256 weight,
        string reason,
        bytes params
    );

    /**
     * @notice module:core
     * @dev Name of the governor instance (used in building the ERC712 domain separator).
     */
    function name() public view virtual returns (string memory);

    /**
     * @notice module:core
     * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1"
     */
    function version() public view virtual returns (string memory);

    /**
     * @notice module:voting
     * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to
     * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of
     * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`.
     *
     * There are 2 standard keys: `support` and `quorum`.
     *
     * - `support=bravo` refers to the vote options 0 = Against, 1 = For, 2 = Abstain, as in `GovernorBravo`.
     * - `quorum=bravo` means that only For votes are counted towards quorum.
     * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum.
     *
     * If a counting module makes use of encoded `params`, it should  include this under a `params` key with a unique
     * name that describes the behavior. For example:
     *
     * - `params=fractional` might refer to a scheme where votes are divided fractionally between for/against/abstain.
     * - `params=erc721` might refer to a scheme where specific NFTs are delegated to vote.
     *
     * NOTE: The string can be decoded by the standard
     * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`]
     * JavaScript class.
     */
    // solhint-disable-next-line func-name-mixedcase
    function COUNTING_MODE() public pure virtual returns (string memory);

    /**
     * @notice module:core
     * @dev Hashing function used to (re)build the proposal id from the proposal details..
     */
    function hashProposal(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public pure virtual returns (uint256);

    /**
     * @notice module:core
     * @dev Current state of a proposal, following Compound's convention
     */
    function state(uint256 proposalId) public view virtual returns (ProposalState);

    /**
     * @notice module:core
     * @dev Block number used to retrieve user's votes and quorum. As per Compound's Comp and OpenZeppelin's
     * ERC20Votes, the snapshot is performed at the end of this block. Hence, voting for this proposal starts at the
     * beginning of the following block.
     */
    function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256);

    /**
     * @notice module:core
     * @dev Block number at which votes close. Votes close at the end of this block, so it is possible to cast a vote
     * during this block.
     */
    function proposalDeadline(uint256 proposalId) public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev Delay, in number of block, between the proposal is created and the vote starts. This can be increassed to
     * leave time for users to buy voting power, or delegate it, before the voting of a proposal starts.
     */
    function votingDelay() public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev Delay, in number of blocks, between the vote start and vote ends.
     *
     * NOTE: The {votingDelay} can delay the start of the vote. This must be considered when setting the voting
     * duration compared to the voting delay.
     */
    function votingPeriod() public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev Minimum number of cast voted required for a proposal to be successful.
     *
     * Note: The `blockNumber` parameter corresponds to the snapshot used for counting vote. This allows to scale the
     * quorum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).
     */
    function quorum(uint256 blockNumber) public view virtual returns (uint256);

    /**
     * @notice module:reputation
     * @dev Voting power of an `account` at a specific `blockNumber`.
     *
     * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or
     * multiple), {ERC20Votes} tokens.
     */
    function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256);

    /**
     * @notice module:reputation
     * @dev Voting power of an `account` at a specific `blockNumber` given additional encoded parameters.
     */
    function getVotesWithParams(
        address account,
        uint256 blockNumber,
        bytes memory params
    ) public view virtual returns (uint256);

    /**
     * @notice module:voting
     * @dev Returns whether `account` has cast a vote on `proposalId`.
     */
    function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);

    /**
     * @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends
     * {IGovernor-votingPeriod} blocks after the voting starts.
     *
     * Emits a {ProposalCreated} event.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual returns (uint256 proposalId);

    /**
     * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the
     * deadline to be reached.
     *
     * Emits a {ProposalExecuted} event.
     *
     * Note: some module can modify the requirements for execution, for example by adding an additional timelock.
     */
    function execute(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public payable virtual returns (uint256 proposalId);

    /**
     * @dev Cast a vote
     *
     * Emits a {VoteCast} event.
     */
    function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);

    /**
     * @dev Cast a vote with a reason
     *
     * Emits a {VoteCast} event.
     */
    function castVoteWithReason(
        uint256 proposalId,
        uint8 support,
        string calldata reason
    ) public virtual returns (uint256 balance);

    /**
     * @dev Cast a vote with a reason and additional encoded parameters
     *
     * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params.
     */
    function castVoteWithReasonAndParams(
        uint256 proposalId,
        uint8 support,
        string calldata reason,
        bytes memory params
    ) public virtual returns (uint256 balance);

    /**
     * @dev Cast a vote using the user's cryptographic signature.
     *
     * Emits a {VoteCast} event.
     */
    function castVoteBySig(
        uint256 proposalId,
        uint8 support,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual returns (uint256 balance);

    /**
     * @dev Cast a vote with a reason and additional encoded parameters using the user's cryptographic signature.
     *
     * Emits a {VoteCast} or {VoteCastWithParams} event depending on the length of params.
     */
    function castVoteWithReasonAndParamsBySig(
        uint256 proposalId,
        uint8 support,
        string calldata reason,
        bytes memory params,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual returns (uint256 balance);
}

File 6 of 36 : GovernorTimelockCompound.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (governance/extensions/GovernorTimelockCompound.sol)

pragma solidity ^0.8.0;

import "./IGovernorTimelock.sol";
import "../Governor.sol";
import "../../utils/math/SafeCast.sol";
import "../../vendor/compound/ICompoundTimelock.sol";

/**
 * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by
 * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be
 * the admin of the timelock for any operation to be performed. A public, unrestricted,
 * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock.
 *
 * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
 * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
 * inaccessible.
 *
 * _Available since v4.3._
 */
abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
    using SafeCast for uint256;
    using Timers for Timers.Timestamp;

    struct ProposalTimelock {
        Timers.Timestamp timer;
    }

    ICompoundTimelock private _timelock;

    mapping(uint256 => ProposalTimelock) private _proposalTimelocks;

    /**
     * @dev Emitted when the timelock controller used for proposal execution is modified.
     */
    event TimelockChange(address oldTimelock, address newTimelock);

    /**
     * @dev Set the timelock.
     */
    constructor(ICompoundTimelock timelockAddress) {
        _updateTimelock(timelockAddress);
    }

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

    /**
     * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.
     */
    function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {
        ProposalState status = super.state(proposalId);

        if (status != ProposalState.Succeeded) {
            return status;
        }

        uint256 eta = proposalEta(proposalId);
        if (eta == 0) {
            return status;
        } else if (block.timestamp >= eta + _timelock.GRACE_PERIOD()) {
            return ProposalState.Expired;
        } else {
            return ProposalState.Queued;
        }
    }

    /**
     * @dev Public accessor to check the address of the timelock
     */
    function timelock() public view virtual override returns (address) {
        return address(_timelock);
    }

    /**
     * @dev Public accessor to check the eta of a queued proposal
     */
    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {
        return _proposalTimelocks[proposalId].timer.getDeadline();
    }

    /**
     * @dev Function to queue a proposal to the timelock.
     */
    function queue(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public virtual override returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);

        require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful");

        uint256 eta = block.timestamp + _timelock.delay();
        _proposalTimelocks[proposalId].timer.setDeadline(eta.toUint64());
        for (uint256 i = 0; i < targets.length; ++i) {
            require(
                !_timelock.queuedTransactions(keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))),
                "GovernorTimelockCompound: identical proposal action already queued"
            );
            _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta);
        }

        emit ProposalQueued(proposalId, eta);

        return proposalId;
    }

    /**
     * @dev Overridden execute function that run the already queued proposal through the timelock.
     */
    function _execute(
        uint256 proposalId,
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 /*descriptionHash*/
    ) internal virtual override {
        uint256 eta = proposalEta(proposalId);
        require(eta > 0, "GovernorTimelockCompound: proposal not yet queued");
        Address.sendValue(payable(_timelock), msg.value);
        for (uint256 i = 0; i < targets.length; ++i) {
            _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta);
        }
    }

    /**
     * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
     * been queued.
     */
    function _cancel(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) internal virtual override returns (uint256) {
        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);

        uint256 eta = proposalEta(proposalId);
        if (eta > 0) {
            for (uint256 i = 0; i < targets.length; ++i) {
                _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta);
            }
            _proposalTimelocks[proposalId].timer.reset();
        }

        return proposalId;
    }

    /**
     * @dev Address through which the governor executes action. In this case, the timelock.
     */
    function _executor() internal view virtual override returns (address) {
        return address(_timelock);
    }

    /**
     * @dev Accept admin right over the timelock.
     */
    // solhint-disable-next-line private-vars-leading-underscore
    function __acceptAdmin() public {
        _timelock.acceptAdmin();
    }

    /**
     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates
     * must be proposed, scheduled, and executed through governance proposals.
     *
     * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two
     * operations (hand over the timelock) and do the update can be batched in a single proposal.
     *
     * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the
     * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of
     * governance.

     * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals.
     */
    function updateTimelock(ICompoundTimelock newTimelock) external virtual onlyGovernance {
        _updateTimelock(newTimelock);
    }

    function _updateTimelock(ICompoundTimelock newTimelock) private {
        emit TimelockChange(address(_timelock), address(newTimelock));
        _timelock = newTimelock;
    }
}

File 7 of 36 : GovernorSettings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (governance/extensions/GovernorSettings.sol)

pragma solidity ^0.8.0;

import "../Governor.sol";

/**
 * @dev Extension of {Governor} for settings updatable through governance.
 *
 * _Available since v4.4._
 */
abstract contract GovernorSettings is Governor {
    uint256 private _votingDelay;
    uint256 private _votingPeriod;
    uint256 private _proposalThreshold;

    event VotingDelaySet(uint256 oldVotingDelay, uint256 newVotingDelay);
    event VotingPeriodSet(uint256 oldVotingPeriod, uint256 newVotingPeriod);
    event ProposalThresholdSet(uint256 oldProposalThreshold, uint256 newProposalThreshold);

    /**
     * @dev Initialize the governance parameters.
     */
    constructor(
        uint256 initialVotingDelay,
        uint256 initialVotingPeriod,
        uint256 initialProposalThreshold
    ) {
        _setVotingDelay(initialVotingDelay);
        _setVotingPeriod(initialVotingPeriod);
        _setProposalThreshold(initialProposalThreshold);
    }

    /**
     * @dev See {IGovernor-votingDelay}.
     */
    function votingDelay() public view virtual override returns (uint256) {
        return _votingDelay;
    }

    /**
     * @dev See {IGovernor-votingPeriod}.
     */
    function votingPeriod() public view virtual override returns (uint256) {
        return _votingPeriod;
    }

    /**
     * @dev See {Governor-proposalThreshold}.
     */
    function proposalThreshold() public view virtual override returns (uint256) {
        return _proposalThreshold;
    }

    /**
     * @dev Update the voting delay. This operation can only be performed through a governance proposal.
     *
     * Emits a {VotingDelaySet} event.
     */
    function setVotingDelay(uint256 newVotingDelay) public virtual onlyGovernance {
        _setVotingDelay(newVotingDelay);
    }

    /**
     * @dev Update the voting period. This operation can only be performed through a governance proposal.
     *
     * Emits a {VotingPeriodSet} event.
     */
    function setVotingPeriod(uint256 newVotingPeriod) public virtual onlyGovernance {
        _setVotingPeriod(newVotingPeriod);
    }

    /**
     * @dev Update the proposal threshold. This operation can only be performed through a governance proposal.
     *
     * Emits a {ProposalThresholdSet} event.
     */
    function setProposalThreshold(uint256 newProposalThreshold) public virtual onlyGovernance {
        _setProposalThreshold(newProposalThreshold);
    }

    /**
     * @dev Internal setter for the voting delay.
     *
     * Emits a {VotingDelaySet} event.
     */
    function _setVotingDelay(uint256 newVotingDelay) internal virtual {
        emit VotingDelaySet(_votingDelay, newVotingDelay);
        _votingDelay = newVotingDelay;
    }

    /**
     * @dev Internal setter for the voting period.
     *
     * Emits a {VotingPeriodSet} event.
     */
    function _setVotingPeriod(uint256 newVotingPeriod) internal virtual {
        // voting period must be at least one block long
        require(newVotingPeriod > 0, "GovernorSettings: voting period too low");
        emit VotingPeriodSet(_votingPeriod, newVotingPeriod);
        _votingPeriod = newVotingPeriod;
    }

    /**
     * @dev Internal setter for the proposal threshold.
     *
     * Emits a {ProposalThresholdSet} event.
     */
    function _setProposalThreshold(uint256 newProposalThreshold) internal virtual {
        emit ProposalThresholdSet(_proposalThreshold, newProposalThreshold);
        _proposalThreshold = newProposalThreshold;
    }
}

File 8 of 36 : IPoolTogetherTimelock.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

interface IPoolTogetherTimelock {
  event CancelTransaction(
    bytes32 indexed txHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 eta
  );
  event ExecuteTransaction(
    bytes32 indexed txHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 eta
  );
  event NewAdmin(address indexed newAdmin);
  event NewDelay(uint256 indexed newDelay);
  event NewPendingAdmin(address indexed newPendingAdmin);
  event QueueTransaction(
    bytes32 indexed txHash,
    address indexed target,
    uint256 value,
    string signature,
    bytes data,
    uint256 eta
  );

  function acceptAdmin() external;
  function admin() external view returns (address);
  function cancelTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 eta
  ) external;
  function delay() external view returns (uint256);
  function executeTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 eta
  ) external payable returns (bytes memory);
  function gracePeriod() external pure returns (uint256);
  function maximumDelay() external pure returns (uint256);
  function minimumDelay() external pure returns (uint256);
  function pendingAdmin() external view returns (address);
  function queueTransaction(
    address target,
    uint256 value,
    string memory signature,
    bytes memory data,
    uint256 eta
  ) external returns (bytes32);
  function queuedTransactions(bytes32) external view returns (bool);
  function setDelay(uint256 delay_) external;
  function setPendingAdmin(address pendingAdmin_) external;
}

File 9 of 36 : GovernorTimelockCompound.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (governance/extensions/GovernorTimelockCompound.sol)
//
// The PoolTogether Timelock is not compatible with the Governor Alpha Timelock interface. This
// meant we had to fork the contracts that interact with the timelock and replace the Timelock
// interface with the PoolTogether Timelock interface. Also, if PoolTogether decides to change the
// Timelock in the future then it must conform to the PoolTogether Timelock interface.
//
// PoolTogether Timelock interface:
// https://etherscan.io/address/0xB3a87172F555ae2a2AB79Be60B336D2F7D0187f0#code#F1#L306
// Governor Alpha Timelock interface:
// https://github.com/compound-finance/compound-protocol/blob/a3214f67b73310d547e00fc578e8355911c9d376/contracts/Governance/GovernorAlpha.sol#L320
// forgefmt: disable-start

pragma solidity ^0.8.0;

import {Governor} from "flexible-voting/src/GovernorCountingFractional.sol";
import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";
import {IGovernorTimelock} from
  "@openzeppelin/contracts/governance/extensions/IGovernorTimelock.sol";
import {IPoolTogetherTimelock} from "src/interfaces/IPoolTogetherTimelock.sol";
import {Timers} from "@openzeppelin/contracts/utils/Timers.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IGovernor} from "@openzeppelin/contracts/governance/IGovernor.sol";

/**
 * @dev Extension of {Governor} that binds the execution process to a Compound Timelock. This adds a delay, enforced by
 * the external timelock to all successful proposal (in addition to the voting duration). The {Governor} needs to be
 * the admin of the timelock for any operation to be performed. A public, unrestricted,
 * {GovernorTimelockCompound-__acceptAdmin} is available to accept ownership of the timelock.
 *
 * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
 * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
 * inaccessible.
 *
 * _Available since v4.3._
 */
abstract contract GovernorTimelockCompound is IGovernorTimelock, Governor {
  using SafeCast for uint256;
  using Timers for Timers.Timestamp;

  struct ProposalTimelock {
    Timers.Timestamp timer;
  }

  /// @dev The interface for this variable was changed to conform to the PoolTogether Timelock interface.
  ///
  /// Original openzeppelin:
  /// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L31
  IPoolTogetherTimelock private _timelock;

  mapping(uint256 => ProposalTimelock) private _proposalTimelocks;

  /**
   * @dev Emitted when the timelock controller used for proposal execution is modified.
   */
  event TimelockChange(address oldTimelock, address newTimelock);

  /**
   * @dev Set the timelock.
   * @dev The timelock interface was changed from the original Openzeppelin source to conform to the PoolTogether interface.
   *
   * Original Openzeppelin source:
   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L43
   */
  constructor(IPoolTogetherTimelock timelockAddress) {
    _updateTimelock(timelockAddress);
  }

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

  /**
   * @dev Overridden version of the {Governor-state} function with added support for the `Queued` and `Expired` status.
   * @dev The _timelock.gracePeriod() was changed from _timelock.GRACE_PERIOD() in the original Openzeppelin contract.
   *
   * Original Openzeppelin source:
   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L67
   */
  function state(uint256 proposalId)
    public
    view
    virtual
    override(IGovernor, Governor)
    returns (ProposalState)
  {
    ProposalState status = super.state(proposalId);

    if (status != ProposalState.Succeeded) return status;

    uint256 eta = proposalEta(proposalId);
    if (eta == 0) return status;
    else if (block.timestamp >= eta + _timelock.gracePeriod()) return ProposalState.Expired;
    else return ProposalState.Queued;
  }

  /**
   * @dev Public accessor to check the address of the timelock
   */
  function timelock() public view virtual override returns (address) {
    return address(_timelock);
  }

  /**
   * @dev Public accessor to check the eta of a queued proposal
   */
  function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {
    return _proposalTimelocks[proposalId].timer.getDeadline();
  }

  /**
   * @dev Function to queue a proposal to the timelock.
   */
  function queue(
    address[] memory targets,
    uint256[] memory values,
    bytes[] memory calldatas,
    bytes32 descriptionHash
  ) public virtual override returns (uint256) {
    uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);

    require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful");

    uint256 eta = block.timestamp + _timelock.delay();
    _proposalTimelocks[proposalId].timer.setDeadline(eta.toUint64());
    for (uint256 i = 0; i < targets.length; ++i) {
      require(
        !_timelock.queuedTransactions(
          keccak256(abi.encode(targets[i], values[i], "", calldatas[i], eta))
        ),
        "GovernorTimelockCompound: identical proposal action already queued"
      );
      _timelock.queueTransaction(targets[i], values[i], "", calldatas[i], eta);
    }

    emit ProposalQueued(proposalId, eta);

    return proposalId;
  }

  /**
   * @dev Overridden execute function that run the already queued proposal through the timelock.
   */
  function _execute(
    uint256 proposalId,
    address[] memory targets,
    uint256[] memory values,
    bytes[] memory calldatas,
    bytes32 /*descriptionHash*/
  ) internal virtual override {
    uint256 eta = proposalEta(proposalId);
    require(eta > 0, "GovernorTimelockCompound: proposal not yet queued");
    // In the original contract, the _timelock is not casted to an address. Failing to cast it causes a compile error "Explicit type conversion not allowed from "contract IPoolTogetherTimelock" to "address payable".".
    // We explicitly cast to an address to solve this error.
    //
    // Original Openzeppelin line:
    // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L128
    Address.sendValue(payable(address(_timelock)), msg.value);
    for (uint256 i = 0; i < targets.length; ++i) {
      _timelock.executeTransaction(targets[i], values[i], "", calldatas[i], eta);
    }
  }

  /**
   * @dev Overridden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already 
   * been queued.
   */
  function _cancel(
    address[] memory targets,
    uint256[] memory values,
    bytes[] memory calldatas,
    bytes32 descriptionHash
  ) internal virtual override returns (uint256) {
    uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);

    uint256 eta = proposalEta(proposalId);
    if (eta > 0) {
      for (uint256 i = 0; i < targets.length; ++i) {
        _timelock.cancelTransaction(targets[i], values[i], "", calldatas[i], eta);
      }
      _proposalTimelocks[proposalId].timer.reset();
    }

    return proposalId;
  }

  /**
   * @dev Address through which the governor executes action. In this case, the timelock.
   */
  function _executor() internal view virtual override returns (address) {
    return address(_timelock);
  }

  /**
   * @dev Accept admin right over the timelock.
   */
  // solhint-disable-next-line private-vars-leading-underscore
  function __acceptAdmin() public {
    _timelock.acceptAdmin();
  }

  /**
   * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates
   * must be proposed, scheduled, and executed through governance proposals.
   *
   * For security reasons, the timelock must be handed over to another admin before setting up a new one. The two
   * operations (hand over the timelock) and do the update can be batched in a single proposal.
   *
   * Note that if the timelock admin has been handed over in a previous operation, we refuse updates made through the
   * timelock if admin of the timelock has already been accepted and the operation is executed outside the scope of
   * governance.

   * CAUTION: It is not recommended to change the timelock while there are other queued governance proposals.
   * @dev The interface for `newTimelock` was changed to conform to the PoolTogether Timelock interface.
   *
   * Original Openzeppelin source:
   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L185
   */
  function updateTimelock(IPoolTogetherTimelock newTimelock) external virtual onlyGovernance {
    _updateTimelock(newTimelock);
  }


  /**
   * @dev The interface for `newTimelock` was changed to conform to the PoolTogether Timelock interface.
   *
   * Original Openzeppelin source:
   * https://github.com/OpenZeppelin/openzeppelin-contracts/blob/49c0e4370d0cc50ea6090709e3835a3091e33ee2/contracts/governance/extensions/GovernorTimelockCompound.sol#L189
   */
  function _updateTimelock(IPoolTogetherTimelock newTimelock) private {
    emit TimelockChange(address(_timelock), address(newTimelock));
    _timelock = newTimelock;
  }
}

File 10 of 36 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 11 of 36 : Governor.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (governance/Governor.sol)

pragma solidity ^0.8.0;

import "../token/ERC721/IERC721Receiver.sol";
import "../token/ERC1155/IERC1155Receiver.sol";
import "../utils/cryptography/ECDSA.sol";
import "../utils/cryptography/EIP712.sol";
import "../utils/introspection/ERC165.sol";
import "../utils/math/SafeCast.sol";
import "../utils/structs/DoubleEndedQueue.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
import "../utils/Timers.sol";
import "./IGovernor.sol";

/**
 * @dev Core of the governance system, designed to be extended though various modules.
 *
 * This contract is abstract and requires several function to be implemented in various modules:
 *
 * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote}
 * - A voting module must implement {_getVotes}
 * - Additionanly, the {votingPeriod} must also be implemented
 *
 * _Available since v4.3._
 */
abstract contract Governor is Context, ERC165, EIP712, IGovernor, IERC721Receiver, IERC1155Receiver {
    using DoubleEndedQueue for DoubleEndedQueue.Bytes32Deque;
    using SafeCast for uint256;
    using Timers for Timers.BlockNumber;

    bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)");
    bytes32 public constant EXTENDED_BALLOT_TYPEHASH =
        keccak256("ExtendedBallot(uint256 proposalId,uint8 support,string reason,bytes params)");

    struct ProposalCore {
        Timers.BlockNumber voteStart;
        Timers.BlockNumber voteEnd;
        bool executed;
        bool canceled;
    }

    string private _name;

    mapping(uint256 => ProposalCore) private _proposals;

    // This queue keeps track of the governor operating on itself. Calls to functions protected by the
    // {onlyGovernance} modifier needs to be whitelisted in this queue. Whitelisting is set in {_beforeExecute},
    // consumed by the {onlyGovernance} modifier and eventually reset in {_afterExecute}. This ensures that the
    // execution of {onlyGovernance} protected calls can only be achieved through successful proposals.
    DoubleEndedQueue.Bytes32Deque private _governanceCall;

    /**
     * @dev Restricts a function so it can only be executed through governance proposals. For example, governance
     * parameter setters in {GovernorSettings} are protected using this modifier.
     *
     * The governance executing address may be different from the Governor's own address, for example it could be a
     * timelock. This can be customized by modules by overriding {_executor}. The executor is only able to invoke these
     * functions during the execution of the governor's {execute} function, and not under any other circumstances. Thus,
     * for example, additional timelock proposers are not able to change governance parameters without going through the
     * governance protocol (since v4.6).
     */
    modifier onlyGovernance() {
        require(_msgSender() == _executor(), "Governor: onlyGovernance");
        if (_executor() != address(this)) {
            bytes32 msgDataHash = keccak256(_msgData());
            // loop until popping the expected operation - throw if deque is empty (operation not authorized)
            while (_governanceCall.popFront() != msgDataHash) {}
        }
        _;
    }

    /**
     * @dev Sets the value for {name} and {version}
     */
    constructor(string memory name_) EIP712(name_, version()) {
        _name = name_;
    }

    /**
     * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract)
     */
    receive() external payable virtual {
        require(_executor() == address(this));
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
        // In addition to the current interfaceId, also support previous version of the interfaceId that did not
        // include the castVoteWithReasonAndParams() function as standard
        return
            interfaceId ==
            (type(IGovernor).interfaceId ^
                this.castVoteWithReasonAndParams.selector ^
                this.castVoteWithReasonAndParamsBySig.selector ^
                this.getVotesWithParams.selector) ||
            interfaceId == type(IGovernor).interfaceId ||
            interfaceId == type(IERC1155Receiver).interfaceId ||
            super.supportsInterface(interfaceId);
    }

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

    /**
     * @dev See {IGovernor-version}.
     */
    function version() public view virtual override returns (string memory) {
        return "1";
    }

    /**
     * @dev See {IGovernor-hashProposal}.
     *
     * The proposal id is produced by hashing the ABI encoded `targets` array, the `values` array, the `calldatas` array
     * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id
     * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in
     * advance, before the proposal is submitted.
     *
     * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the
     * same proposal (with same operation and same description) will have the same id if submitted on multiple governors
     * across multiple networks. This also means that in order to execute the same operation twice (on the same
     * governor) the proposer will have to change the description in order to avoid proposal id conflicts.
     */
    function hashProposal(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public pure virtual override returns (uint256) {
        return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash)));
    }

    /**
     * @dev See {IGovernor-state}.
     */
    function state(uint256 proposalId) public view virtual override returns (ProposalState) {
        ProposalCore storage proposal = _proposals[proposalId];

        if (proposal.executed) {
            return ProposalState.Executed;
        }

        if (proposal.canceled) {
            return ProposalState.Canceled;
        }

        uint256 snapshot = proposalSnapshot(proposalId);

        if (snapshot == 0) {
            revert("Governor: unknown proposal id");
        }

        if (snapshot >= block.number) {
            return ProposalState.Pending;
        }

        uint256 deadline = proposalDeadline(proposalId);

        if (deadline >= block.number) {
            return ProposalState.Active;
        }

        if (_quorumReached(proposalId) && _voteSucceeded(proposalId)) {
            return ProposalState.Succeeded;
        } else {
            return ProposalState.Defeated;
        }
    }

    /**
     * @dev See {IGovernor-proposalSnapshot}.
     */
    function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) {
        return _proposals[proposalId].voteStart.getDeadline();
    }

    /**
     * @dev See {IGovernor-proposalDeadline}.
     */
    function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) {
        return _proposals[proposalId].voteEnd.getDeadline();
    }

    /**
     * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_.
     */
    function proposalThreshold() public view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Amount of votes already cast passes the threshold limit.
     */
    function _quorumReached(uint256 proposalId) internal view virtual returns (bool);

    /**
     * @dev Is the proposal successful or not.
     */
    function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);

    /**
     * @dev Get the voting weight of `account` at a specific `blockNumber`, for a vote as described by `params`.
     */
    function _getVotes(
        address account,
        uint256 blockNumber,
        bytes memory params
    ) internal view virtual returns (uint256);

    /**
     * @dev Register a vote for `proposalId` by `account` with a given `support`, voting `weight` and voting `params`.
     *
     * Note: Support is generic and can represent various things depending on the voting system used.
     */
    function _countVote(
        uint256 proposalId,
        address account,
        uint8 support,
        uint256 weight,
        bytes memory params
    ) internal virtual;

    /**
     * @dev Default additional encoded parameters used by castVote methods that don't include them
     *
     * Note: Should be overridden by specific implementations to use an appropriate value, the
     * meaning of the additional params, in the context of that implementation
     */
    function _defaultParams() internal view virtual returns (bytes memory) {
        return "";
    }

    /**
     * @dev See {IGovernor-propose}.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual override returns (uint256) {
        require(
            getVotes(_msgSender(), block.number - 1) >= proposalThreshold(),
            "Governor: proposer votes below proposal threshold"
        );

        uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));

        require(targets.length == values.length, "Governor: invalid proposal length");
        require(targets.length == calldatas.length, "Governor: invalid proposal length");
        require(targets.length > 0, "Governor: empty proposal");

        ProposalCore storage proposal = _proposals[proposalId];
        require(proposal.voteStart.isUnset(), "Governor: proposal already exists");

        uint64 snapshot = block.number.toUint64() + votingDelay().toUint64();
        uint64 deadline = snapshot + votingPeriod().toUint64();

        proposal.voteStart.setDeadline(snapshot);
        proposal.voteEnd.setDeadline(deadline);

        emit ProposalCreated(
            proposalId,
            _msgSender(),
            targets,
            values,
            new string[](targets.length),
            calldatas,
            snapshot,
            deadline,
            description
        );

        return proposalId;
    }

    /**
     * @dev See {IGovernor-execute}.
     */
    function execute(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public payable virtual override returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);

        ProposalState status = state(proposalId);
        require(
            status == ProposalState.Succeeded || status == ProposalState.Queued,
            "Governor: proposal not successful"
        );
        _proposals[proposalId].executed = true;

        emit ProposalExecuted(proposalId);

        _beforeExecute(proposalId, targets, values, calldatas, descriptionHash);
        _execute(proposalId, targets, values, calldatas, descriptionHash);
        _afterExecute(proposalId, targets, values, calldatas, descriptionHash);

        return proposalId;
    }

    /**
     * @dev Internal execution mechanism. Can be overridden to implement different execution mechanism
     */
    function _execute(
        uint256, /* proposalId */
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 /*descriptionHash*/
    ) internal virtual {
        string memory errorMessage = "Governor: call reverted without message";
        for (uint256 i = 0; i < targets.length; ++i) {
            (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]);
            Address.verifyCallResult(success, returndata, errorMessage);
        }
    }

    /**
     * @dev Hook before execution is triggered.
     */
    function _beforeExecute(
        uint256, /* proposalId */
        address[] memory targets,
        uint256[] memory, /* values */
        bytes[] memory calldatas,
        bytes32 /*descriptionHash*/
    ) internal virtual {
        if (_executor() != address(this)) {
            for (uint256 i = 0; i < targets.length; ++i) {
                if (targets[i] == address(this)) {
                    _governanceCall.pushBack(keccak256(calldatas[i]));
                }
            }
        }
    }

    /**
     * @dev Hook after execution is triggered.
     */
    function _afterExecute(
        uint256, /* proposalId */
        address[] memory, /* targets */
        uint256[] memory, /* values */
        bytes[] memory, /* calldatas */
        bytes32 /*descriptionHash*/
    ) internal virtual {
        if (_executor() != address(this)) {
            if (!_governanceCall.empty()) {
                _governanceCall.clear();
            }
        }
    }

    /**
     * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as
     * canceled to allow distinguishing it from executed proposals.
     *
     * Emits a {IGovernor-ProposalCanceled} event.
     */
    function _cancel(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) internal virtual returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);
        ProposalState status = state(proposalId);

        require(
            status != ProposalState.Canceled && status != ProposalState.Expired && status != ProposalState.Executed,
            "Governor: proposal not active"
        );
        _proposals[proposalId].canceled = true;

        emit ProposalCanceled(proposalId);

        return proposalId;
    }

    /**
     * @dev See {IGovernor-getVotes}.
     */
    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
        return _getVotes(account, blockNumber, _defaultParams());
    }

    /**
     * @dev See {IGovernor-getVotesWithParams}.
     */
    function getVotesWithParams(
        address account,
        uint256 blockNumber,
        bytes memory params
    ) public view virtual override returns (uint256) {
        return _getVotes(account, blockNumber, params);
    }

    /**
     * @dev See {IGovernor-castVote}.
     */
    function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) {
        address voter = _msgSender();
        return _castVote(proposalId, voter, support, "");
    }

    /**
     * @dev See {IGovernor-castVoteWithReason}.
     */
    function castVoteWithReason(
        uint256 proposalId,
        uint8 support,
        string calldata reason
    ) public virtual override returns (uint256) {
        address voter = _msgSender();
        return _castVote(proposalId, voter, support, reason);
    }

    /**
     * @dev See {IGovernor-castVoteWithReasonAndParams}.
     */
    function castVoteWithReasonAndParams(
        uint256 proposalId,
        uint8 support,
        string calldata reason,
        bytes memory params
    ) public virtual override returns (uint256) {
        address voter = _msgSender();
        return _castVote(proposalId, voter, support, reason, params);
    }

    /**
     * @dev See {IGovernor-castVoteBySig}.
     */
    function castVoteBySig(
        uint256 proposalId,
        uint8 support,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override returns (uint256) {
        address voter = ECDSA.recover(
            _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))),
            v,
            r,
            s
        );
        return _castVote(proposalId, voter, support, "");
    }

    /**
     * @dev See {IGovernor-castVoteWithReasonAndParamsBySig}.
     */
    function castVoteWithReasonAndParamsBySig(
        uint256 proposalId,
        uint8 support,
        string calldata reason,
        bytes memory params,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override returns (uint256) {
        address voter = ECDSA.recover(
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        EXTENDED_BALLOT_TYPEHASH,
                        proposalId,
                        support,
                        keccak256(bytes(reason)),
                        keccak256(params)
                    )
                )
            ),
            v,
            r,
            s
        );

        return _castVote(proposalId, voter, support, reason, params);
    }

    /**
     * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve
     * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. Uses the _defaultParams().
     *
     * Emits a {IGovernor-VoteCast} event.
     */
    function _castVote(
        uint256 proposalId,
        address account,
        uint8 support,
        string memory reason
    ) internal virtual returns (uint256) {
        return _castVote(proposalId, account, support, reason, _defaultParams());
    }

    /**
     * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve
     * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function.
     *
     * Emits a {IGovernor-VoteCast} event.
     */
    function _castVote(
        uint256 proposalId,
        address account,
        uint8 support,
        string memory reason,
        bytes memory params
    ) internal virtual returns (uint256) {
        ProposalCore storage proposal = _proposals[proposalId];
        require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active");

        uint256 weight = _getVotes(account, proposal.voteStart.getDeadline(), params);
        _countVote(proposalId, account, support, weight, params);

        if (params.length == 0) {
            emit VoteCast(account, proposalId, support, weight, reason);
        } else {
            emit VoteCastWithParams(account, proposalId, support, weight, reason, params);
        }

        return weight;
    }

    /**
     * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor
     * is some contract other than the governor itself, like when using a timelock, this function can be invoked
     * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake.
     * Note that if the executor is simply the governor itself, use of `relay` is redundant.
     */
    function relay(
        address target,
        uint256 value,
        bytes calldata data
    ) external payable virtual onlyGovernance {
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        Address.verifyCallResult(success, returndata, "Governor: relay reverted without message");
    }

    /**
     * @dev Address through which the governor executes action. Will be overloaded by module that execute actions
     * through another contract such as a timelock.
     */
    function _executor() internal view virtual returns (address) {
        return address(this);
    }

    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }

    /**
     * @dev See {IERC1155Receiver-onERC1155Received}.
     */
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    /**
     * @dev See {IERC1155Receiver-onERC1155BatchReceived}.
     */
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 12 of 36 : GovernorCompatibilityBravo.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (governance/compatibility/GovernorCompatibilityBravo.sol)

pragma solidity ^0.8.0;

import "../../utils/math/SafeCast.sol";
import "../extensions/IGovernorTimelock.sol";
import "../Governor.sol";
import "./IGovernorCompatibilityBravo.sol";

/**
 * @dev Compatibility layer that implements GovernorBravo compatibility on to of {Governor}.
 *
 * This compatibility layer includes a voting system and requires a {IGovernorTimelock} compatible module to be added
 * through inheritance. It does not include token bindings, not does it include any variable upgrade patterns.
 *
 * NOTE: When using this module, you may need to enable the Solidity optimizer to avoid hitting the contract size limit.
 *
 * _Available since v4.3._
 */
abstract contract GovernorCompatibilityBravo is IGovernorTimelock, IGovernorCompatibilityBravo, Governor {
    enum VoteType {
        Against,
        For,
        Abstain
    }

    struct ProposalDetails {
        address proposer;
        address[] targets;
        uint256[] values;
        string[] signatures;
        bytes[] calldatas;
        uint256 forVotes;
        uint256 againstVotes;
        uint256 abstainVotes;
        mapping(address => Receipt) receipts;
        bytes32 descriptionHash;
    }

    mapping(uint256 => ProposalDetails) private _proposalDetails;

    // solhint-disable-next-line func-name-mixedcase
    function COUNTING_MODE() public pure virtual override returns (string memory) {
        return "support=bravo&quorum=bravo";
    }

    // ============================================== Proposal lifecycle ==============================================
    /**
     * @dev See {IGovernor-propose}.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual override(IGovernor, Governor) returns (uint256) {
        _storeProposal(_msgSender(), targets, values, new string[](calldatas.length), calldatas, description);
        return super.propose(targets, values, calldatas, description);
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-propose}.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        string[] memory signatures,
        bytes[] memory calldatas,
        string memory description
    ) public virtual override returns (uint256) {
        _storeProposal(_msgSender(), targets, values, signatures, calldatas, description);
        return propose(targets, values, _encodeCalldata(signatures, calldatas), description);
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-queue}.
     */
    function queue(uint256 proposalId) public virtual override {
        ProposalDetails storage details = _proposalDetails[proposalId];
        queue(
            details.targets,
            details.values,
            _encodeCalldata(details.signatures, details.calldatas),
            details.descriptionHash
        );
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-execute}.
     */
    function execute(uint256 proposalId) public payable virtual override {
        ProposalDetails storage details = _proposalDetails[proposalId];
        execute(
            details.targets,
            details.values,
            _encodeCalldata(details.signatures, details.calldatas),
            details.descriptionHash
        );
    }

    function cancel(uint256 proposalId) public virtual override {
        ProposalDetails storage details = _proposalDetails[proposalId];

        require(
            _msgSender() == details.proposer || getVotes(details.proposer, block.number - 1) < proposalThreshold(),
            "GovernorBravo: proposer above threshold"
        );

        _cancel(
            details.targets,
            details.values,
            _encodeCalldata(details.signatures, details.calldatas),
            details.descriptionHash
        );
    }

    /**
     * @dev Encodes calldatas with optional function signature.
     */
    function _encodeCalldata(string[] memory signatures, bytes[] memory calldatas)
        private
        pure
        returns (bytes[] memory)
    {
        bytes[] memory fullcalldatas = new bytes[](calldatas.length);

        for (uint256 i = 0; i < signatures.length; ++i) {
            fullcalldatas[i] = bytes(signatures[i]).length == 0
                ? calldatas[i]
                : abi.encodePacked(bytes4(keccak256(bytes(signatures[i]))), calldatas[i]);
        }

        return fullcalldatas;
    }

    /**
     * @dev Store proposal metadata for later lookup
     */
    function _storeProposal(
        address proposer,
        address[] memory targets,
        uint256[] memory values,
        string[] memory signatures,
        bytes[] memory calldatas,
        string memory description
    ) private {
        bytes32 descriptionHash = keccak256(bytes(description));
        uint256 proposalId = hashProposal(targets, values, _encodeCalldata(signatures, calldatas), descriptionHash);

        ProposalDetails storage details = _proposalDetails[proposalId];
        if (details.descriptionHash == bytes32(0)) {
            details.proposer = proposer;
            details.targets = targets;
            details.values = values;
            details.signatures = signatures;
            details.calldatas = calldatas;
            details.descriptionHash = descriptionHash;
        }
    }

    // ==================================================== Views =====================================================
    /**
     * @dev See {IGovernorCompatibilityBravo-proposals}.
     */
    function proposals(uint256 proposalId)
        public
        view
        virtual
        override
        returns (
            uint256 id,
            address proposer,
            uint256 eta,
            uint256 startBlock,
            uint256 endBlock,
            uint256 forVotes,
            uint256 againstVotes,
            uint256 abstainVotes,
            bool canceled,
            bool executed
        )
    {
        id = proposalId;
        eta = proposalEta(proposalId);
        startBlock = proposalSnapshot(proposalId);
        endBlock = proposalDeadline(proposalId);

        ProposalDetails storage details = _proposalDetails[proposalId];
        proposer = details.proposer;
        forVotes = details.forVotes;
        againstVotes = details.againstVotes;
        abstainVotes = details.abstainVotes;

        ProposalState status = state(proposalId);
        canceled = status == ProposalState.Canceled;
        executed = status == ProposalState.Executed;
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-getActions}.
     */
    function getActions(uint256 proposalId)
        public
        view
        virtual
        override
        returns (
            address[] memory targets,
            uint256[] memory values,
            string[] memory signatures,
            bytes[] memory calldatas
        )
    {
        ProposalDetails storage details = _proposalDetails[proposalId];
        return (details.targets, details.values, details.signatures, details.calldatas);
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-getReceipt}.
     */
    function getReceipt(uint256 proposalId, address voter) public view virtual override returns (Receipt memory) {
        return _proposalDetails[proposalId].receipts[voter];
    }

    /**
     * @dev See {IGovernorCompatibilityBravo-quorumVotes}.
     */
    function quorumVotes() public view virtual override returns (uint256) {
        return quorum(block.number - 1);
    }

    // ==================================================== Voting ====================================================
    /**
     * @dev See {IGovernor-hasVoted}.
     */
    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {
        return _proposalDetails[proposalId].receipts[account].hasVoted;
    }

    /**
     * @dev See {Governor-_quorumReached}. In this module, only forVotes count toward the quorum.
     */
    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalDetails storage details = _proposalDetails[proposalId];
        return quorum(proposalSnapshot(proposalId)) <= details.forVotes;
    }

    /**
     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.
     */
    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalDetails storage details = _proposalDetails[proposalId];
        return details.forVotes > details.againstVotes;
    }

    /**
     * @dev See {Governor-_countVote}. In this module, the support follows Governor Bravo.
     */
    function _countVote(
        uint256 proposalId,
        address account,
        uint8 support,
        uint256 weight,
        bytes memory // params
    ) internal virtual override {
        ProposalDetails storage details = _proposalDetails[proposalId];
        Receipt storage receipt = details.receipts[account];

        require(!receipt.hasVoted, "GovernorCompatibilityBravo: vote already cast");
        receipt.hasVoted = true;
        receipt.support = support;
        receipt.votes = SafeCast.toUint96(weight);

        if (support == uint8(VoteType.Against)) {
            details.againstVotes += weight;
        } else if (support == uint8(VoteType.For)) {
            details.forVotes += weight;
        } else if (support == uint8(VoteType.Abstain)) {
            details.abstainVotes += weight;
        } else {
            revert("GovernorCompatibilityBravo: invalid vote type");
        }
    }
}

File 13 of 36 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        require(value <= type(uint248).max, "SafeCast: value doesn't fit in 248 bits");
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        require(value <= type(uint240).max, "SafeCast: value doesn't fit in 240 bits");
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        require(value <= type(uint232).max, "SafeCast: value doesn't fit in 232 bits");
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.2._
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        require(value <= type(uint216).max, "SafeCast: value doesn't fit in 216 bits");
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        require(value <= type(uint208).max, "SafeCast: value doesn't fit in 208 bits");
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        require(value <= type(uint200).max, "SafeCast: value doesn't fit in 200 bits");
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        require(value <= type(uint192).max, "SafeCast: value doesn't fit in 192 bits");
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        require(value <= type(uint184).max, "SafeCast: value doesn't fit in 184 bits");
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        require(value <= type(uint176).max, "SafeCast: value doesn't fit in 176 bits");
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        require(value <= type(uint168).max, "SafeCast: value doesn't fit in 168 bits");
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        require(value <= type(uint160).max, "SafeCast: value doesn't fit in 160 bits");
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        require(value <= type(uint152).max, "SafeCast: value doesn't fit in 152 bits");
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        require(value <= type(uint144).max, "SafeCast: value doesn't fit in 144 bits");
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        require(value <= type(uint136).max, "SafeCast: value doesn't fit in 136 bits");
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v2.5._
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        require(value <= type(uint120).max, "SafeCast: value doesn't fit in 120 bits");
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        require(value <= type(uint112).max, "SafeCast: value doesn't fit in 112 bits");
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        require(value <= type(uint104).max, "SafeCast: value doesn't fit in 104 bits");
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.2._
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        require(value <= type(uint88).max, "SafeCast: value doesn't fit in 88 bits");
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        require(value <= type(uint80).max, "SafeCast: value doesn't fit in 80 bits");
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        require(value <= type(uint72).max, "SafeCast: value doesn't fit in 72 bits");
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v2.5._
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        require(value <= type(uint56).max, "SafeCast: value doesn't fit in 56 bits");
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        require(value <= type(uint48).max, "SafeCast: value doesn't fit in 48 bits");
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        require(value <= type(uint40).max, "SafeCast: value doesn't fit in 40 bits");
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v2.5._
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        require(value <= type(uint24).max, "SafeCast: value doesn't fit in 24 bits");
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v2.5._
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v2.5._
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     *
     * _Available since v3.0._
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     *
     * _Available since v4.7._
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 248 bits");
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     *
     * _Available since v4.7._
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 240 bits");
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     *
     * _Available since v4.7._
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 232 bits");
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     *
     * _Available since v4.7._
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 224 bits");
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     *
     * _Available since v4.7._
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 216 bits");
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     *
     * _Available since v4.7._
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 208 bits");
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     *
     * _Available since v4.7._
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 200 bits");
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     *
     * _Available since v4.7._
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 192 bits");
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     *
     * _Available since v4.7._
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 184 bits");
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     *
     * _Available since v4.7._
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 176 bits");
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     *
     * _Available since v4.7._
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 168 bits");
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     *
     * _Available since v4.7._
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 160 bits");
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     *
     * _Available since v4.7._
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 152 bits");
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     *
     * _Available since v4.7._
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 144 bits");
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     *
     * _Available since v4.7._
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 136 bits");
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 128 bits");
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     *
     * _Available since v4.7._
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 120 bits");
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     *
     * _Available since v4.7._
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 112 bits");
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     *
     * _Available since v4.7._
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 104 bits");
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     *
     * _Available since v4.7._
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 96 bits");
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     *
     * _Available since v4.7._
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 88 bits");
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     *
     * _Available since v4.7._
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 80 bits");
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     *
     * _Available since v4.7._
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 72 bits");
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 64 bits");
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     *
     * _Available since v4.7._
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 56 bits");
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     *
     * _Available since v4.7._
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 48 bits");
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     *
     * _Available since v4.7._
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 40 bits");
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 32 bits");
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     *
     * _Available since v4.7._
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 24 bits");
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 16 bits");
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        require(downcasted == value, "SafeCast: value doesn't fit in 8 bits");
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     *
     * _Available since v3.0._
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

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

pragma solidity ^0.8.0;

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

File 15 of 36 : ERC20VotesComp.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20VotesComp.sol)

pragma solidity ^0.8.0;

import "./ERC20Votes.sol";

/**
 * @dev Extension of ERC20 to support Compound's voting and delegation. This version exactly matches Compound's
 * interface, with the drawback of only supporting supply up to (2^96^ - 1).
 *
 * NOTE: You should use this contract if you need exact compatibility with COMP (for example in order to use your token
 * with Governor Alpha or Bravo) and if you are sure the supply cap of 2^96^ is enough for you. Otherwise, use the
 * {ERC20Votes} variant of this module.
 *
 * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
 * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting
 * power can be queried through the public accessors {getCurrentVotes} and {getPriorVotes}.
 *
 * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it
 * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.
 *
 * _Available since v4.2._
 */
abstract contract ERC20VotesComp is ERC20Votes {
    /**
     * @dev Comp version of the {getVotes} accessor, with `uint96` return type.
     */
    function getCurrentVotes(address account) external view virtual returns (uint96) {
        return SafeCast.toUint96(getVotes(account));
    }

    /**
     * @dev Comp version of the {getPastVotes} accessor, with `uint96` return type.
     */
    function getPriorVotes(address account, uint256 blockNumber) external view virtual returns (uint96) {
        return SafeCast.toUint96(getPastVotes(account, blockNumber));
    }

    /**
     * @dev Maximum token supply. Reduced to `type(uint96).max` (2^96^ - 1) to fit COMP interface.
     */
    function _maxSupply() internal view virtual override returns (uint224) {
        return type(uint96).max;
    }
}

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 17 of 36 : IGovernorTimelock.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (governance/extensions/IGovernorTimelock.sol)

pragma solidity ^0.8.0;

import "../IGovernor.sol";

/**
 * @dev Extension of the {IGovernor} for timelock supporting modules.
 *
 * _Available since v4.3._
 */
abstract contract IGovernorTimelock is IGovernor {
    event ProposalQueued(uint256 proposalId, uint256 eta);

    function timelock() public view virtual returns (address);

    function proposalEta(uint256 proposalId) public view virtual returns (uint256);

    function queue(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public virtual returns (uint256 proposalId);
}

File 18 of 36 : ICompoundTimelock.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (vendor/compound/ICompoundTimelock.sol)

pragma solidity ^0.8.0;

/**
 * https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol[Compound's timelock] interface
 */
interface ICompoundTimelock {
    event NewAdmin(address indexed newAdmin);
    event NewPendingAdmin(address indexed newPendingAdmin);
    event NewDelay(uint256 indexed newDelay);
    event CancelTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event ExecuteTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event QueueTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );

    receive() external payable;

    // solhint-disable-next-line func-name-mixedcase
    function GRACE_PERIOD() external view returns (uint256);

    // solhint-disable-next-line func-name-mixedcase
    function MINIMUM_DELAY() external view returns (uint256);

    // solhint-disable-next-line func-name-mixedcase
    function MAXIMUM_DELAY() external view returns (uint256);

    function admin() external view returns (address);

    function pendingAdmin() external view returns (address);

    function delay() external view returns (uint256);

    function queuedTransactions(bytes32) external view returns (bool);

    function setDelay(uint256) external;

    function acceptAdmin() external;

    function setPendingAdmin(address) external;

    function queueTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) external returns (bytes32);

    function cancelTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) external;

    function executeTransaction(
        address target,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 eta
    ) external payable returns (bytes memory);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Tooling for timepoints, timers and delays
 */
library Timers {
    struct Timestamp {
        uint64 _deadline;
    }

    function getDeadline(Timestamp memory timer) internal pure returns (uint64) {
        return timer._deadline;
    }

    function setDeadline(Timestamp storage timer, uint64 timestamp) internal {
        timer._deadline = timestamp;
    }

    function reset(Timestamp storage timer) internal {
        timer._deadline = 0;
    }

    function isUnset(Timestamp memory timer) internal pure returns (bool) {
        return timer._deadline == 0;
    }

    function isStarted(Timestamp memory timer) internal pure returns (bool) {
        return timer._deadline > 0;
    }

    function isPending(Timestamp memory timer) internal view returns (bool) {
        return timer._deadline > block.timestamp;
    }

    function isExpired(Timestamp memory timer) internal view returns (bool) {
        return isStarted(timer) && timer._deadline <= block.timestamp;
    }

    struct BlockNumber {
        uint64 _deadline;
    }

    function getDeadline(BlockNumber memory timer) internal pure returns (uint64) {
        return timer._deadline;
    }

    function setDeadline(BlockNumber storage timer, uint64 timestamp) internal {
        timer._deadline = timestamp;
    }

    function reset(BlockNumber storage timer) internal {
        timer._deadline = 0;
    }

    function isUnset(BlockNumber memory timer) internal pure returns (bool) {
        return timer._deadline == 0;
    }

    function isStarted(BlockNumber memory timer) internal pure returns (bool) {
        return timer._deadline > 0;
    }

    function isPending(BlockNumber memory timer) internal view returns (bool) {
        return timer._deadline > block.number;
    }

    function isExpired(BlockNumber memory timer) internal view returns (bool) {
        return isStarted(timer) && timer._deadline <= block.number;
    }
}

File 20 of 36 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 21 of 36 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

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

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

File 22 of 36 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 23 of 36 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 24 of 36 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

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

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

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

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

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

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

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

File 25 of 36 : DoubleEndedQueue.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/DoubleEndedQueue.sol)
pragma solidity ^0.8.4;

import "../math/SafeCast.sol";

/**
 * @dev A sequence of items with the ability to efficiently push and pop items (i.e. insert and remove) on both ends of
 * the sequence (called front and back). Among other access patterns, it can be used to implement efficient LIFO and
 * FIFO queues. Storage use is optimized, and all operations are O(1) constant time. This includes {clear}, given that
 * the existing queue contents are left in storage.
 *
 * The struct is called `Bytes32Deque`. Other types can be cast to and from `bytes32`. This data structure can only be
 * used in storage, and not in memory.
 * ```
 * DoubleEndedQueue.Bytes32Deque queue;
 * ```
 *
 * _Available since v4.6._
 */
library DoubleEndedQueue {
    /**
     * @dev An operation (e.g. {front}) couldn't be completed due to the queue being empty.
     */
    error Empty();

    /**
     * @dev An operation (e.g. {at}) couldn't be completed due to an index being out of bounds.
     */
    error OutOfBounds();

    /**
     * @dev Indices are signed integers because the queue can grow in any direction. They are 128 bits so begin and end
     * are packed in a single storage slot for efficient access. Since the items are added one at a time we can safely
     * assume that these 128-bit indices will not overflow, and use unchecked arithmetic.
     *
     * Struct members have an underscore prefix indicating that they are "private" and should not be read or written to
     * directly. Use the functions provided below instead. Modifying the struct manually may violate assumptions and
     * lead to unexpected behavior.
     *
     * Indices are in the range [begin, end) which means the first item is at data[begin] and the last item is at
     * data[end - 1].
     */
    struct Bytes32Deque {
        int128 _begin;
        int128 _end;
        mapping(int128 => bytes32) _data;
    }

    /**
     * @dev Inserts an item at the end of the queue.
     */
    function pushBack(Bytes32Deque storage deque, bytes32 value) internal {
        int128 backIndex = deque._end;
        deque._data[backIndex] = value;
        unchecked {
            deque._end = backIndex + 1;
        }
    }

    /**
     * @dev Removes the item at the end of the queue and returns it.
     *
     * Reverts with `Empty` if the queue is empty.
     */
    function popBack(Bytes32Deque storage deque) internal returns (bytes32 value) {
        if (empty(deque)) revert Empty();
        int128 backIndex;
        unchecked {
            backIndex = deque._end - 1;
        }
        value = deque._data[backIndex];
        delete deque._data[backIndex];
        deque._end = backIndex;
    }

    /**
     * @dev Inserts an item at the beginning of the queue.
     */
    function pushFront(Bytes32Deque storage deque, bytes32 value) internal {
        int128 frontIndex;
        unchecked {
            frontIndex = deque._begin - 1;
        }
        deque._data[frontIndex] = value;
        deque._begin = frontIndex;
    }

    /**
     * @dev Removes the item at the beginning of the queue and returns it.
     *
     * Reverts with `Empty` if the queue is empty.
     */
    function popFront(Bytes32Deque storage deque) internal returns (bytes32 value) {
        if (empty(deque)) revert Empty();
        int128 frontIndex = deque._begin;
        value = deque._data[frontIndex];
        delete deque._data[frontIndex];
        unchecked {
            deque._begin = frontIndex + 1;
        }
    }

    /**
     * @dev Returns the item at the beginning of the queue.
     *
     * Reverts with `Empty` if the queue is empty.
     */
    function front(Bytes32Deque storage deque) internal view returns (bytes32 value) {
        if (empty(deque)) revert Empty();
        int128 frontIndex = deque._begin;
        return deque._data[frontIndex];
    }

    /**
     * @dev Returns the item at the end of the queue.
     *
     * Reverts with `Empty` if the queue is empty.
     */
    function back(Bytes32Deque storage deque) internal view returns (bytes32 value) {
        if (empty(deque)) revert Empty();
        int128 backIndex;
        unchecked {
            backIndex = deque._end - 1;
        }
        return deque._data[backIndex];
    }

    /**
     * @dev Return the item at a position in the queue given by `index`, with the first item at 0 and last item at
     * `length(deque) - 1`.
     *
     * Reverts with `OutOfBounds` if the index is out of bounds.
     */
    function at(Bytes32Deque storage deque, uint256 index) internal view returns (bytes32 value) {
        // int256(deque._begin) is a safe upcast
        int128 idx = SafeCast.toInt128(int256(deque._begin) + SafeCast.toInt256(index));
        if (idx >= deque._end) revert OutOfBounds();
        return deque._data[idx];
    }

    /**
     * @dev Resets the queue back to being empty.
     *
     * NOTE: The current items are left behind in storage. This does not affect the functioning of the queue, but misses
     * out on potential gas refunds.
     */
    function clear(Bytes32Deque storage deque) internal {
        deque._begin = 0;
        deque._end = 0;
    }

    /**
     * @dev Returns the number of items in the queue.
     */
    function length(Bytes32Deque storage deque) internal view returns (uint256) {
        // The interface preserves the invariant that begin <= end so we assume this will not overflow.
        // We also assume there are at most int256.max items in the queue.
        unchecked {
            return uint256(int256(deque._end) - int256(deque._begin));
        }
    }

    /**
     * @dev Returns true if the queue is empty.
     */
    function empty(Bytes32Deque storage deque) internal view returns (bool) {
        return deque._end <= deque._begin;
    }
}

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

pragma solidity ^0.8.0;

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

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

File 27 of 36 : IGovernorCompatibilityBravo.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (governance/compatibility/IGovernorCompatibilityBravo.sol)

pragma solidity ^0.8.0;

import "../IGovernor.sol";

/**
 * @dev Interface extension that adds missing functions to the {Governor} core to provide `GovernorBravo` compatibility.
 *
 * _Available since v4.3._
 */
abstract contract IGovernorCompatibilityBravo is IGovernor {
    /**
     * @dev Proposal structure from Compound Governor Bravo. Not actually used by the compatibility layer, as
     * {{proposal}} returns a very different structure.
     */
    struct Proposal {
        uint256 id;
        address proposer;
        uint256 eta;
        address[] targets;
        uint256[] values;
        string[] signatures;
        bytes[] calldatas;
        uint256 startBlock;
        uint256 endBlock;
        uint256 forVotes;
        uint256 againstVotes;
        uint256 abstainVotes;
        bool canceled;
        bool executed;
        mapping(address => Receipt) receipts;
    }

    /**
     * @dev Receipt structure from Compound Governor Bravo
     */
    struct Receipt {
        bool hasVoted;
        uint8 support;
        uint96 votes;
    }

    /**
     * @dev Part of the Governor Bravo's interface.
     */
    function quorumVotes() public view virtual returns (uint256);

    /**
     * @dev Part of the Governor Bravo's interface: _"The official record of all proposals ever proposed"_.
     */
    function proposals(uint256)
        public
        view
        virtual
        returns (
            uint256 id,
            address proposer,
            uint256 eta,
            uint256 startBlock,
            uint256 endBlock,
            uint256 forVotes,
            uint256 againstVotes,
            uint256 abstainVotes,
            bool canceled,
            bool executed
        );

    /**
     * @dev Part of the Governor Bravo's interface: _"Function used to propose a new proposal"_.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        string[] memory signatures,
        bytes[] memory calldatas,
        string memory description
    ) public virtual returns (uint256);

    /**
     * @dev Part of the Governor Bravo's interface: _"Queues a proposal of state succeeded"_.
     */
    function queue(uint256 proposalId) public virtual;

    /**
     * @dev Part of the Governor Bravo's interface: _"Executes a queued proposal if eta has passed"_.
     */
    function execute(uint256 proposalId) public payable virtual;

    /**
     * @dev Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold.
     */
    function cancel(uint256 proposalId) public virtual;

    /**
     * @dev Part of the Governor Bravo's interface: _"Gets actions of a proposal"_.
     */
    function getActions(uint256 proposalId)
        public
        view
        virtual
        returns (
            address[] memory targets,
            uint256[] memory values,
            string[] memory signatures,
            bytes[] memory calldatas
        );

    /**
     * @dev Part of the Governor Bravo's interface: _"Gets the receipt for a voter on a given proposal"_.
     */
    function getReceipt(uint256 proposalId, address voter) public view virtual returns (Receipt memory);
}

File 28 of 36 : ERC20Votes.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/ERC20Votes.sol)

pragma solidity ^0.8.0;

import "./draft-ERC20Permit.sol";
import "../../../utils/math/Math.sol";
import "../../../governance/utils/IVotes.sol";
import "../../../utils/math/SafeCast.sol";
import "../../../utils/cryptography/ECDSA.sol";

/**
 * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,
 * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.
 *
 * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.
 *
 * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
 * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting
 * power can be queried through the public accessors {getVotes} and {getPastVotes}.
 *
 * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it
 * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.
 *
 * _Available since v4.2._
 */
abstract contract ERC20Votes is IVotes, ERC20Permit {
    struct Checkpoint {
        uint32 fromBlock;
        uint224 votes;
    }

    bytes32 private constant _DELEGATION_TYPEHASH =
        keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    mapping(address => address) private _delegates;
    mapping(address => Checkpoint[]) private _checkpoints;
    Checkpoint[] private _totalSupplyCheckpoints;

    /**
     * @dev Get the `pos`-th checkpoint for `account`.
     */
    function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {
        return _checkpoints[account][pos];
    }

    /**
     * @dev Get number of checkpoints for `account`.
     */
    function numCheckpoints(address account) public view virtual returns (uint32) {
        return SafeCast.toUint32(_checkpoints[account].length);
    }

    /**
     * @dev Get the address `account` is currently delegating to.
     */
    function delegates(address account) public view virtual override returns (address) {
        return _delegates[account];
    }

    /**
     * @dev Gets the current votes balance for `account`
     */
    function getVotes(address account) public view virtual override returns (uint256) {
        uint256 pos = _checkpoints[account].length;
        return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;
    }

    /**
     * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
        require(blockNumber < block.number, "ERC20Votes: block not yet mined");
        return _checkpointsLookup(_checkpoints[account], blockNumber);
    }

    /**
     * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.
     * It is but NOT the sum of all the delegated votes!
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {
        require(blockNumber < block.number, "ERC20Votes: block not yet mined");
        return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);
    }

    /**
     * @dev Lookup a value in a list of (sorted) checkpoints.
     */
    function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {
        // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.
        //
        // Initially we check if the block is recent to narrow the search range.
        // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).
        // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.
        // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)
        // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)
        // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not
        // out of bounds (in which case we're looking too far in the past and the result is 0).
        // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is
        // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out
        // the same.
        uint256 length = ckpts.length;

        uint256 low = 0;
        uint256 high = length;

        if (length > 5) {
            uint256 mid = length - Math.sqrt(length);
            if (_unsafeAccess(ckpts, mid).fromBlock > blockNumber) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        while (low < high) {
            uint256 mid = Math.average(low, high);
            if (_unsafeAccess(ckpts, mid).fromBlock > blockNumber) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        return high == 0 ? 0 : _unsafeAccess(ckpts, high - 1).votes;
    }

    /**
     * @dev Delegate votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) public virtual override {
        _delegate(_msgSender(), delegatee);
    }

    /**
     * @dev Delegates votes from signer to `delegatee`
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= expiry, "ERC20Votes: signature expired");
        address signer = ECDSA.recover(
            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),
            v,
            r,
            s
        );
        require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce");
        _delegate(signer, delegatee);
    }

    /**
     * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).
     */
    function _maxSupply() internal view virtual returns (uint224) {
        return type(uint224).max;
    }

    /**
     * @dev Snapshots the totalSupply after it has been increased.
     */
    function _mint(address account, uint256 amount) internal virtual override {
        super._mint(account, amount);
        require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes");

        _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);
    }

    /**
     * @dev Snapshots the totalSupply after it has been decreased.
     */
    function _burn(address account, uint256 amount) internal virtual override {
        super._burn(account, amount);

        _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);
    }

    /**
     * @dev Move voting power when tokens are transferred.
     *
     * Emits a {IVotes-DelegateVotesChanged} event.
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._afterTokenTransfer(from, to, amount);

        _moveVotingPower(delegates(from), delegates(to), amount);
    }

    /**
     * @dev Change delegation for `delegator` to `delegatee`.
     *
     * Emits events {IVotes-DelegateChanged} and {IVotes-DelegateVotesChanged}.
     */
    function _delegate(address delegator, address delegatee) internal virtual {
        address currentDelegate = delegates(delegator);
        uint256 delegatorBalance = balanceOf(delegator);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveVotingPower(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveVotingPower(
        address src,
        address dst,
        uint256 amount
    ) private {
        if (src != dst && amount > 0) {
            if (src != address(0)) {
                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);
                emit DelegateVotesChanged(src, oldWeight, newWeight);
            }

            if (dst != address(0)) {
                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);
                emit DelegateVotesChanged(dst, oldWeight, newWeight);
            }
        }
    }

    function _writeCheckpoint(
        Checkpoint[] storage ckpts,
        function(uint256, uint256) view returns (uint256) op,
        uint256 delta
    ) private returns (uint256 oldWeight, uint256 newWeight) {
        uint256 pos = ckpts.length;

        Checkpoint memory oldCkpt = pos == 0 ? Checkpoint(0, 0) : _unsafeAccess(ckpts, pos - 1);

        oldWeight = oldCkpt.votes;
        newWeight = op(oldWeight, delta);

        if (pos > 0 && oldCkpt.fromBlock == block.number) {
            _unsafeAccess(ckpts, pos - 1).votes = SafeCast.toUint224(newWeight);
        } else {
            ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));
        }
    }

    function _add(uint256 a, uint256 b) private pure returns (uint256) {
        return a + b;
    }

    function _subtract(uint256 a, uint256 b) private pure returns (uint256) {
        return a - b;
    }

    function _unsafeAccess(Checkpoint[] storage ckpts, uint256 pos) private pure returns (Checkpoint storage result) {
        assembly {
            mstore(0, ckpts.slot)
            result.slot := add(keccak256(0, 0x20), pos)
        }
    }
}

File 29 of 36 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 30 of 36 : draft-ERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)

pragma solidity ^0.8.0;

import "./draft-IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/cryptography/EIP712.sol";
import "../../../utils/Counters.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * _Available since v3.4._
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private constant _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    /**
     * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.
     * However, to ensure consistency with the upgradeable transpiler, we will continue
     * to reserve a slot.
     * @custom:oz-renamed-from _PERMIT_TYPEHASH
     */
    // solhint-disable-next-line var-name-mixedcase
    bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _approve(owner, spender, value);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view virtual override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 31 of 36 : IVotes.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)
pragma solidity ^0.8.0;

/**
 * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.
 *
 * _Available since v4.5._
 */
interface IVotes {
    /**
     * @dev Emitted when an account changes their delegate.
     */
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /**
     * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
     */
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @dev Returns the current amount of votes that `account` has.
     */
    function getVotes(address account) external view returns (uint256);

    /**
     * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).
     */
    function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);

    /**
     * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).
     *
     * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
     * Votes that have not been delegated are still part of total supply, even though they would not participate in a
     * vote.
     */
    function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);

    /**
     * @dev Returns the delegate that `account` has chosen.
     */
    function delegates(address account) external view returns (address);

    /**
     * @dev Delegates votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) external;

    /**
     * @dev Delegates votes from signer to `delegatee`.
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 32 of 36 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

File 33 of 36 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
            // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
            // decrementing then incrementing.
            _balances[to] += amount;
        }

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        unchecked {
            // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
            _balances[account] += amount;
        }
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 34 of 36 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 36 of 36 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

Settings
{
  "remappings": [
    "@openzeppelin/=lib/flexible-voting/lib/openzeppelin-contracts/",
    "@openzeppelin/contracts/=lib/flexible-voting/lib/openzeppelin-contracts/contracts/",
    "aave-v3-core/=lib/flexible-voting/lib/aave-v3-core/",
    "comet/=lib/flexible-voting/lib/comet/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "flexible-voting/=lib/flexible-voting/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/flexible-voting/lib/openzeppelin-contracts/",
    "solmate/=lib/flexible-voting/lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint256","name":"_initialVotingDelay","type":"uint256"},{"internalType":"uint256","name":"_initialVotingPeriod","type":"uint256"},{"internalType":"uint256","name":"_initialProposalThreshold","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Empty","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"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":"proposalId","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldProposalThreshold","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newProposalThreshold","type":"uint256"}],"name":"ProposalThresholdSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":false,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockChange","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":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","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":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"},{"indexed":false,"internalType":"bytes","name":"params","type":"bytes"}],"name":"VoteCastWithParams","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingDelay","type":"uint256"}],"name":"VotingDelaySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldVotingPeriod","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newVotingPeriod","type":"uint256"}],"name":"VotingPeriodSet","type":"event"},{"inputs":[],"name":"BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COUNTING_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"EXTENDED_BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"__acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"}],"name":"castVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"}],"name":"castVoteWithReason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"castVoteWithReasonAndParams","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"},{"internalType":"bytes","name":"params","type":"bytes"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteWithReasonAndParamsBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"execute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"fractionalVoteNonce","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"getVotesWithParams","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"hasVoted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"hashProposal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalEta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalVotes","outputs":[{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"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":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"relay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newProposalThreshold","type":"uint256"}],"name":"setProposalThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVotingDelay","type":"uint256"}],"name":"setVotingDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVotingPeriod","type":"uint256"}],"name":"setVotingPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum IGovernor.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ERC20VotesComp","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IPoolTogetherTimelock","name":"newTimelock","type":"address"}],"name":"updateTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"voteWeightCast","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106102bf5760003560e01c80637d5e81e21161016e578063d33219b4116100cb578063eb9019d41161007f578063f23a6e6111610064578063f23a6e6114610989578063f8ce560a146109ce578063fc0c546a146109f857600080fd5b8063eb9019d414610949578063ece40cc11461096957600080fd5b8063deaaa7cc116100b0578063deaaa7cc146108b6578063df482caf146108ea578063ea0217cf1461092957600080fd5b8063d33219b414610855578063dd4e2ba5146108a157600080fd5b8063b9a6196111610122578063c01f9e3711610107578063c01f9e3714610802578063c28bc2fa14610822578063c59057e41461083557600080fd5b8063b9a61961146107a8578063bc197c81146107bd57600080fd5b8063a890c91011610153578063a890c91014610753578063ab58fb8e14610773578063b58131b01461079357600080fd5b80637d5e81e2146107135780639a802a6d1461073357600080fd5b80633932abb11161021c57806354fd4d50116101d05780635f398a14116101b55780635f398a14146106b357806370b0f660146106d35780637b3c71d3146106f357600080fd5b806354fd4d501461064d578063567813881461069357600080fd5b80633e4f49e6116102015780633e4f49e61461053e578063438596321461056b578063544ffc9c146105cf57600080fd5b80633932abb1146105095780633bccf4fd1461051e57600080fd5b8063160cbed7116102735780632d63f693116102585780632d63f693146104325780632fe3e26114610452578063342cfab61461048657600080fd5b8063160cbed7146103ff5780632656227d1461041f57600080fd5b806303420181116102a4578063034201811461034857806306fdde0314610368578063150b7a021461038a57600080fd5b806301ffc9a7146102f457806302a251a31461032957600080fd5b366102ef57306102cd610a2c565b73ffffffffffffffffffffffffffffffffffffffff16146102ed57600080fd5b005b600080fd5b34801561030057600080fd5b5061031461030f366004613d60565b610a52565b60405190151581526020015b60405180910390f35b34801561033557600080fd5b50600a545b604051908152602001610320565b34801561035457600080fd5b5061033a610363366004613f23565b610a63565b34801561037457600080fd5b5061037d610a82565b6040516103209190614038565b34801561039657600080fd5b506103ce6103a536600461406d565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610320565b34801561040b57600080fd5b5061033a61041a366004614247565b610b14565b61033a61042d366004614247565b610fa8565b34801561043e57600080fd5b5061033a61044d3660046142d7565b611123565b34801561045e57600080fd5b5061033a7fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af8881565b34801561049257600080fd5b506104e86104a13660046142f0565b600091825260056020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684529190529020546fffffffffffffffffffffffffffffffff1690565b6040516fffffffffffffffffffffffffffffffff9091168152602001610320565b34801561051557600080fd5b5060095461033a565b34801561052a57600080fd5b5061033a610539366004614320565b61115c565b34801561054a57600080fd5b5061055e6105593660046142d7565b6111f1565b604051610320919061439d565b34801561057757600080fd5b506103146105863660046142f0565b600091825260056020908152604080842073ffffffffffffffffffffffffffffffffffffffff9390931684529190529020546fffffffffffffffffffffffffffffffff16151590565b3480156105db57600080fd5b506106326105ea3660046142d7565b600090815260046020526040902080546001909101546fffffffffffffffffffffffffffffffff80831693700100000000000000000000000000000000909304811692911690565b60408051938452602084019290925290820152606001610320565b34801561065957600080fd5b5060408051808201909152600181527f3100000000000000000000000000000000000000000000000000000000000000602082015261037d565b34801561069f57600080fd5b5061033a6106ae3660046143de565b6111fc565b3480156106bf57600080fd5b5061033a6106ce36600461440a565b611225565b3480156106df57600080fd5b506102ed6106ee3660046142d7565b61126f565b3480156106ff57600080fd5b5061033a61070e36600461448e565b61136a565b34801561071f57600080fd5b5061033a61072e3660046144e8565b6113bc565b34801561073f57600080fd5b5061033a61074e36600461459d565b611809565b34801561075f57600080fd5b506102ed61076e3660046145f6565b611820565b34801561077f57600080fd5b5061033a61078e3660046142d7565b611918565b34801561079f57600080fd5b5061033a611945565b3480156107b457600080fd5b506102ed611950565b3480156107c957600080fd5b506103ce6107d8366004614613565b7fbc197c810000000000000000000000000000000000000000000000000000000095945050505050565b34801561080e57600080fd5b5061033a61081d3660046142d7565b6119d4565b6102ed6108303660046146a7565b611a04565b34801561084157600080fd5b5061033a610850366004614247565b611b91565b34801561086157600080fd5b5060075473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610320565b3480156108ad57600080fd5b5061037d611be9565b3480156108c257600080fd5b5061033a7f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b3480156108f657600080fd5b506104e86109053660046145f6565b6006602052600090815260409020546fffffffffffffffffffffffffffffffff1681565b34801561093557600080fd5b506102ed6109443660046142d7565b611c09565b34801561095557600080fd5b5061033a6109643660046146eb565b611d01565b34801561097557600080fd5b506102ed6109843660046142d7565b611d22565b34801561099557600080fd5b506103ce6109a4366004614717565b7ff23a6e610000000000000000000000000000000000000000000000000000000095945050505050565b3480156109da57600080fd5b5061033a6109e93660046142d7565b5069152d02c7e14af680000090565b348015610a0457600080fd5b5061087c7f0000000000000000000000000cec1a9154ff802e7934fc916ed7ca50bde6844e81565b6000610a4d60075473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b6000610a5d82611e1a565b92915050565b6000610a758989898989898989611e70565b9998505050505050505050565b606060008054610a9190614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610abd90614780565b8015610b0a5780601f10610adf57610100808354040283529160200191610b0a565b820191906000526020600020905b815481529060010190602001808311610aed57829003601f168201915b5050505050905090565b600080610b2386868686611b91565b90506004610b30826111f1565b6007811115610b4157610b4161436e565b14610bd3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c206e6f742073756363657373667560448201527f6c0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600754604080517f6a42b8f8000000000000000000000000000000000000000000000000000000008152905160009273ffffffffffffffffffffffffffffffffffffffff1691636a42b8f89160048083019260209291908290030181865afa158015610c43573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6791906147d3565b610c71904261481b565b9050610cc4610c7f82612160565b60008481526008602052604090209081547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff91909116179055565b60005b8751811015610f6457600754885173ffffffffffffffffffffffffffffffffffffffff9091169063f2b06537908a9084908110610d0657610d0661482e565b6020026020010151898481518110610d2057610d2061482e565b6020026020010151898581518110610d3a57610d3a61482e565b602002602001015186604051602001610d56949392919061485d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610d8a91815260200190565b602060405180830381865afa158015610da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcb91906148b1565b15610e7e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f476f7665726e6f7254696d656c6f636b436f6d706f756e643a206964656e746960448201527f63616c2070726f706f73616c20616374696f6e20616c7265616479207175657560648201527f6564000000000000000000000000000000000000000000000000000000000000608482015260a401610bca565b600754885173ffffffffffffffffffffffffffffffffffffffff90911690633a66f901908a9084908110610eb457610eb461482e565b6020026020010151898481518110610ece57610ece61482e565b6020026020010151898581518110610ee857610ee861482e565b6020026020010151866040518563ffffffff1660e01b8152600401610f10949392919061485d565b6020604051808303816000875af1158015610f2f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5391906147d3565b50610f5d816148d3565b9050610cc7565b5060408051838152602081018390527f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892910160405180910390a15095945050505050565b600080610fb786868686611b91565b90506000610fc4826111f1565b90506004816007811115610fda57610fda61436e565b1480610ff757506005816007811115610ff557610ff561436e565b145b611083576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c206e6f742073756363657373667560448201527f6c000000000000000000000000000000000000000000000000000000000000006064820152608401610bca565b60008281526001602081815260409283902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690921790915590518381527f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f910160405180910390a16110ff82888888886121fe565b61110c82888888886122c7565b61111982888888886122d4565b5095945050505050565b600081815260016020908152604080832081519283019091525467ffffffffffffffff16908190525b67ffffffffffffffff1692915050565b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff8516606082015260009081906111c9906111c1906080015b60405160208183030381529060405280519060200120612327565b868686612390565b90506111e6878288604051806020016040528060008152506123ae565b979650505050505050565b6000610a5d826123da565b60008033905061121d848285604051806020016040528060008152506123ae565b949350505050565b6000803390506111e687828888888080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508a92506124d8915050565b611277610a2c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a206f6e6c79476f7665726e616e636500000000000000006044820152606401610bca565b30611314610a2c565b73ffffffffffffffffffffffffffffffffffffffff161461135e576000803660405161134192919061490b565b604051809103902090505b80611357600261268c565b0361134c57505b61136781612749565b50565b6000803390506113b286828787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123ae92505050565b9695505050505050565b60006113c6611945565b6113d53361096460014361491b565b1015611463576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f476f7665726e6f723a2070726f706f73657220766f7465732062656c6f77207060448201527f726f706f73616c207468726573686f6c640000000000000000000000000000006064820152608401610bca565b60006114788686868680519060200120611b91565b9050845186511461150b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e677460448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610bca565b835186511461159c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e677460448201527f68000000000000000000000000000000000000000000000000000000000000006064820152608401610bca565b6000865111611607576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a20656d7074792070726f706f73616c00000000000000006044820152606401610bca565b6000818152600160209081526040918290208251918201909252815467ffffffffffffffff1690819052156116be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c726561647920657869737460448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610bca565b60006116d16116cc60095490565b612160565b6116da43612160565b6116e4919061492e565b905060006116f46116cc600a5490565b6116fe908361492e565b83547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff841617845590506001830180547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff83161790557f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e084338b8b8d5167ffffffffffffffff8111156117a7576117a7613e01565b6040519080825280602002602001820160405280156117da57816020015b60608152602001906001900390816117c55790505b508c88888e6040516117f499989796959493929190614a2c565b60405180910390a15091979650505050505050565b600061181684848461278a565b90505b9392505050565b611828610a2c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146118bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a206f6e6c79476f7665726e616e636500000000000000006044820152606401610bca565b306118c5610a2c565b73ffffffffffffffffffffffffffffffffffffffff161461190f57600080366040516118f292919061490b565b604051809103902090505b80611908600261268c565b036118fd57505b6113678161285c565b600081815260086020908152604080832081519283019091525467ffffffffffffffff169081905261114c565b6000610a4d600b5490565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119ba57600080fd5b505af11580156119ce573d6000803e3d6000fd5b50505050565b600081815260016020818152604080842081519283019091529091015467ffffffffffffffff169081905261114c565b611a0c610a2c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611aa0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a206f6e6c79476f7665726e616e636500000000000000006044820152606401610bca565b30611aa9610a2c565b73ffffffffffffffffffffffffffffffffffffffff1614611af35760008036604051611ad692919061490b565b604051809103902090505b80611aec600261268c565b03611ae157505b6000808573ffffffffffffffffffffffffffffffffffffffff16858585604051611b1e92919061490b565b60006040518083038185875af1925050503d8060008114611b5b576040519150601f19603f3d011682016040523d82523d6000602084013e611b60565b606091505b5091509150611b888282604051806060016040528060288152602001614cf7602891396128f7565b50505050505050565b600084848484604051602001611baa9493929190614b49565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052805160209091012095945050505050565b6060604051806060016040528060328152602001614d1f60329139905090565b611c11610a2c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ca5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a206f6e6c79476f7665726e616e636500000000000000006044820152606401610bca565b30611cae610a2c565b73ffffffffffffffffffffffffffffffffffffffff1614611cf85760008036604051611cdb92919061490b565b604051809103902090505b80611cf1600261268c565b03611ce657505b61136781612910565b60006118198383611d1d60408051602081019091526000815290565b61278a565b611d2a610a2c565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dbe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f476f7665726e6f723a206f6e6c79476f7665726e616e636500000000000000006044820152606401610bca565b30611dc7610a2c565b73ffffffffffffffffffffffffffffffffffffffff1614611e115760008036604051611df492919061490b565b604051809103902090505b80611e0a600261268c565b03611dff57505b611367816129e1565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f6e665ced000000000000000000000000000000000000000000000000000000001480610a5d5750610a5d82612a22565b6000845160401480611e8157508451155b611f33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604360248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20696e766160448201527f6c696420706172616d7320666f72207369676e61747572652d6261736564207660648201527f6f74650000000000000000000000000000000000000000000000000000000000608482015260a401610bca565b6000611fb36111c17fb3b3f3b703cd84ce352197dcff232b1b5d3cfb2025ce47cf04742d0651f1af888c8c8c8c604051611f6e92919061490b565b60405180910390208b805190602001206040516020016111a6959493929190948552602085019390935260ff9190911660408401526060830152608082015260a00190565b9050855160400361210e5760408681015173ffffffffffffffffffffffffffffffffffffffff83166000908152600660205291909120546fffffffffffffffffffffffffffffffff9182169116811461208e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a207369676e60448201527f61747572652068617320616c7265616479206265656e207573656400000000006064820152608401610bca565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260066020526040812080546fffffffffffffffffffffffffffffffff16916120d183614b94565b91906101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055505060308752505b6121528a828b8b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508d92506124d8915050565b9a9950505050505050505050565b600067ffffffffffffffff8211156121fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201527f34206269747300000000000000000000000000000000000000000000000000006064820152608401610bca565b5090565b30612207610a2c565b73ffffffffffffffffffffffffffffffffffffffff16146122c05760005b84518110156122be573073ffffffffffffffffffffffffffffffffffffffff168582815181106122575761225761482e565b602002602001015173ffffffffffffffffffffffffffffffffffffffff16036122ae576122ae83828151811061228f5761228f61482e565b6020026020010151805190602001206002612b5190919063ffffffff16565b6122b7816148d3565b9050612225565b505b5050505050565b6122c08585858585612ba3565b306122dd610a2c565b73ffffffffffffffffffffffffffffffffffffffff16146122c057600254600f81810b700100000000000000000000000000000000909204900b13156122c05760006002556122c0565b6000610a5d612334612d77565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006123a187878787612eab565b9150915061111981612f9a565b60006123d1858585856123cc60408051602081019091526000815290565b6124d8565b95945050505050565b6000806123e68361314d565b905060048160078111156123fc576123fc61436e565b146124075792915050565b600061241284611918565b905080600003612423575092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a06db7dc6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124b491906147d3565b6124be908261481b565b42106124ce575060069392505050565b5060059392505050565b60008581526001602081905260408220906124f2886111f1565b60078111156125035761250361436e565b14612590576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201527f69766500000000000000000000000000000000000000000000000000000000006064820152608401610bca565b6040805160208101909152815467ffffffffffffffff16908190526000906125ba9088908661278a565b90506125c98888888488613299565b835160000361262b578673ffffffffffffffffffffffffffffffffffffffff167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48988848960405161261e9493929190614bc3565b60405180910390a26111e6565b8673ffffffffffffffffffffffffffffffffffffffff167fe2babfbac5889a709b63bb7f598b324e08bc5a4fb9ec647fb3cbc9ec07eb87128988848989604051612679959493929190614beb565b60405180910390a2979650505050505050565b60006126b48254600f81810b700100000000000000000000000000000000909204900b131590565b156126eb576040517f3db2a12a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b508054600f0b6000818152600180840160205260408220805492905583547fffffffffffffffffffffffffffffffff000000000000000000000000000000001692016fffffffffffffffffffffffffffffffff169190911790915590565b60095460408051918252602082018390527fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93910160405180910390a1600955565b6040517f782d6fe100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490526000917f0000000000000000000000000cec1a9154ff802e7934fc916ed7ca50bde6844e9091169063782d6fe190604401602060405180830381865afa158015612822573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128469190614c31565b6bffffffffffffffffffffffff16949350505050565b6007546040805173ffffffffffffffffffffffffffffffffffffffff928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60608315612906575081611819565b611819838361342c565b600081116129a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f476f7665726e6f7253657474696e67733a20766f74696e6720706572696f642060448201527f746f6f206c6f77000000000000000000000000000000000000000000000000006064820152608401610bca565b600a5460408051918252602082018390527f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828910160405180910390a1600a55565b600b5460408051918252602082018390527fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461910160405180910390a1600b55565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fbf26d897000000000000000000000000000000000000000000000000000000001480612ab557507fffffffff0000000000000000000000000000000000000000000000000000000082167f79dd796f00000000000000000000000000000000000000000000000000000000145b80612b0157507fffffffff0000000000000000000000000000000000000000000000000000000082167f4e2312e000000000000000000000000000000000000000000000000000000000145b80610a5d57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610a5d565b815470010000000000000000000000000000000090819004600f0b6000818152600180860160205260409091209390935583546fffffffffffffffffffffffffffffffff908116939091011602179055565b6000612bae86611918565b905060008111612c40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f476f7665726e6f7254696d656c6f636b436f6d706f756e643a2070726f706f7360448201527f616c206e6f7420796574207175657565640000000000000000000000000000006064820152608401610bca565b600754612c639073ffffffffffffffffffffffffffffffffffffffff1634613470565b60005b8551811015611b8857600754865173ffffffffffffffffffffffffffffffffffffffff90911690630825f38f90889084908110612ca557612ca561482e565b6020026020010151878481518110612cbf57612cbf61482e565b6020026020010151878581518110612cd957612cd961482e565b6020026020010151866040518563ffffffff1660e01b8152600401612d01949392919061485d565b6000604051808303816000875af1158015612d20573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052612d669190810190614c5f565b50612d70816148d3565b9050612c66565b60003073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008a907de47e00830a2b742db65e938a3ea1070a2e16148015612ddd57507f000000000000000000000000000000000000000000000000000000000000000146145b15612e0757507f05a75835065130731d82b9360cd7905a8471be9cfa7a034eb5b444112ec73af590565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fc04c4f8803eb38ec8a53cd39f612fff625c8ffcc529297799209112ef3f57e99828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612ee25750600090506003612f91565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f36573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116612f8a57600060019250925050612f91565b9150600090505b94509492505050565b6000816004811115612fae57612fae61436e565b03612fb65750565b6001816004811115612fca57612fca61436e565b03613031576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610bca565b60028160048111156130455761304561436e565b036130ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610bca565b60038160048111156130c0576130c061436e565b03611367576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610bca565b6000818152600160205260408120600281015460ff16156131715750600792915050565b6002810154610100900460ff161561318c5750600292915050565b600061319784611123565b905080600003613203576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c2069640000006044820152606401610bca565b438110613214575060009392505050565b600061321f856119d4565b905043811061323357506001949350505050565b61323c856135cf565b801561327e57506000858152600460205260409020546fffffffffffffffffffffffffffffffff80821670010000000000000000000000000000000090920416115b1561328e57506004949350505050565b506003949350505050565b60008211613329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a206e6f207760448201527f65696768740000000000000000000000000000000000000000000000000000006064820152608401610bca565b600085815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff881684529091529020546fffffffffffffffffffffffffffffffff1682116133f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20616c6c2060448201527f77656967687420636173740000000000000000000000000000000000000000006064820152608401610bca565b60006134048361363e565b905081516000036134205761341b868683876136e0565b6122be565b6122be86868385613a07565b81511561343c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bca9190614038565b804710156134da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610bca565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114613534576040519150601f19603f3d011682016040523d82523d6000602084013e613539565b606091505b50509050806135ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610bca565b505050565b600081815260046020526040812060018101548154613617916fffffffffffffffffffffffffffffffff90811691700100000000000000000000000000000000900416614ccd565b6fffffffffffffffffffffffffffffffff166136356109e985611123565b11159392505050565b60006fffffffffffffffffffffffffffffffff8211156121fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203160448201527f32382062697473000000000000000000000000000000000000000000000000006064820152608401610bca565b600084815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091529020546fffffffffffffffffffffffffffffffff16156137af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20766f746560448201527f20776f756c6420657863656564207765696768740000000000000000000000006064820152608401610bca565b600084815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452909152902080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff841617905560ff811661388b57600084815260046020526040812080548492906138509084906fffffffffffffffffffffffffffffffff16614ccd565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506119ce565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60ff8216016138fc576000848152600460205260409020805483919060109061385090849070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16614ccd565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe60ff82160161395957600084815260046020526040812060010180548492906138509084906fffffffffffffffffffffffffffffffff16614ccd565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152605460248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20696e766160448201527f6c696420737570706f72742076616c75652c206d75737420626520696e636c7560648201527f64656420696e20566f74655479706520656e756d000000000000000000000000608482015260a401610bca565b8051603014613a98576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20696e766160448201527f6c696420766f74654461746100000000000000000000000000000000000000006064820152608401610bca565b60208181015160408084015160008881526005855282812073ffffffffffffffffffffffffffffffffffffffff8916825290945290832054608083811c946fffffffffffffffffffffffffffffffff948516949390911c92909116908183613b00868861481b565b613b0a919061481b565b613b14919061481b565b9050866fffffffffffffffffffffffffffffffff16811115613bb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f476f7665726e6f72436f756e74696e674672616374696f6e616c3a20766f746560448201527f20776f756c6420657863656564207765696768740000000000000000000000006064820152608401610bca565b600089815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff8c168452825280832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff868116919091179091558c8452600483529281902081516060808201845282548087168352700100000000000000000000000000000000900486169482019490945260019190910154909316838201528051918201905281518190613c82908990614ccd565b6fffffffffffffffffffffffffffffffff168152602001868360200151613ca99190614ccd565b6fffffffffffffffffffffffffffffffff168152602001858360400151613cd09190614ccd565b6fffffffffffffffffffffffffffffffff90811690915260009b8c526004602090815260409c8d902083519184015183167001000000000000000000000000000000000291831691909117815591909b01516001909101805491909b167fffffffffffffffffffffffffffffffff0000000000000000000000000000000090911617909955505050505050505050565b600060208284031215613d7257600080fd5b81357fffffffff000000000000000000000000000000000000000000000000000000008116811461181957600080fd5b803560ff81168114613db357600080fd5b919050565b60008083601f840112613dca57600080fd5b50813567ffffffffffffffff811115613de257600080fd5b602083019150836020828501011115613dfa57600080fd5b9250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613e7757613e77613e01565b604052919050565b600067ffffffffffffffff821115613e9957613e99613e01565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b6000613ed8613ed384613e7f565b613e30565b9050828152838383011115613eec57600080fd5b828260208301376000602084830101529392505050565b600082601f830112613f1457600080fd5b61181983833560208501613ec5565b60008060008060008060008060e0898b031215613f3f57600080fd5b88359750613f4f60208a01613da2565b9650604089013567ffffffffffffffff80821115613f6c57600080fd5b613f788c838d01613db8565b909850965060608b0135915080821115613f9157600080fd5b50613f9e8b828c01613f03565b945050613fad60808a01613da2565b925060a0890135915060c089013590509295985092959890939650565b60005b83811015613fe5578181015183820152602001613fcd565b50506000910152565b60008151808452614006816020860160208601613fca565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006118196020830184613fee565b73ffffffffffffffffffffffffffffffffffffffff8116811461136757600080fd5b6000806000806080858703121561408357600080fd5b843561408e8161404b565b9350602085013561409e8161404b565b925060408501359150606085013567ffffffffffffffff8111156140c157600080fd5b6140cd87828801613f03565b91505092959194509250565b600067ffffffffffffffff8211156140f3576140f3613e01565b5060051b60200190565b600082601f83011261410e57600080fd5b8135602061411e613ed3836140d9565b82815260059290921b8401810191818101908684111561413d57600080fd5b8286015b848110156141615780356141548161404b565b8352918301918301614141565b509695505050505050565b600082601f83011261417d57600080fd5b8135602061418d613ed3836140d9565b82815260059290921b840181019181810190868411156141ac57600080fd5b8286015b8481101561416157803583529183019183016141b0565b600082601f8301126141d857600080fd5b813560206141e8613ed3836140d9565b82815260059290921b8401810191818101908684111561420757600080fd5b8286015b8481101561416157803567ffffffffffffffff81111561422b5760008081fd5b6142398986838b0101613f03565b84525091830191830161420b565b6000806000806080858703121561425d57600080fd5b843567ffffffffffffffff8082111561427557600080fd5b614281888389016140fd565b9550602087013591508082111561429757600080fd5b6142a38883890161416c565b945060408701359150808211156142b957600080fd5b506142c6878288016141c7565b949793965093946060013593505050565b6000602082840312156142e957600080fd5b5035919050565b6000806040838503121561430357600080fd5b8235915060208301356143158161404b565b809150509250929050565b600080600080600060a0868803121561433857600080fd5b8535945061434860208701613da2565b935061435660408701613da2565b94979396509394606081013594506080013592915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60208101600883106143d8577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b600080604083850312156143f157600080fd5b8235915061440160208401613da2565b90509250929050565b60008060008060006080868803121561442257600080fd5b8535945061443260208701613da2565b9350604086013567ffffffffffffffff8082111561444f57600080fd5b61445b89838a01613db8565b9095509350606088013591508082111561447457600080fd5b5061448188828901613f03565b9150509295509295909350565b600080600080606085870312156144a457600080fd5b843593506144b460208601613da2565b9250604085013567ffffffffffffffff8111156144d057600080fd5b6144dc87828801613db8565b95989497509550505050565b600080600080608085870312156144fe57600080fd5b843567ffffffffffffffff8082111561451657600080fd5b614522888389016140fd565b9550602087013591508082111561453857600080fd5b6145448883890161416c565b9450604087013591508082111561455a57600080fd5b614566888389016141c7565b9350606087013591508082111561457c57600080fd5b508501601f8101871361458e57600080fd5b6140cd87823560208401613ec5565b6000806000606084860312156145b257600080fd5b83356145bd8161404b565b925060208401359150604084013567ffffffffffffffff8111156145e057600080fd5b6145ec86828701613f03565b9150509250925092565b60006020828403121561460857600080fd5b81356118198161404b565b600080600080600060a0868803121561462b57600080fd5b85356146368161404b565b945060208601356146468161404b565b9350604086013567ffffffffffffffff8082111561466357600080fd5b61466f89838a0161416c565b9450606088013591508082111561468557600080fd5b61469189838a0161416c565b9350608088013591508082111561447457600080fd5b600080600080606085870312156146bd57600080fd5b84356146c88161404b565b935060208501359250604085013567ffffffffffffffff8111156144d057600080fd5b600080604083850312156146fe57600080fd5b82356147098161404b565b946020939093013593505050565b600080600080600060a0868803121561472f57600080fd5b853561473a8161404b565b9450602086013561474a8161404b565b93506040860135925060608601359150608086013567ffffffffffffffff81111561477457600080fd5b61448188828901613f03565b600181811c9082168061479457607f821691505b6020821081036147cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b6000602082840312156147e557600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115610a5d57610a5d6147ec565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff8516815283602082015260a06040820152600060a082015260c0606082015260006148a060c0830185613fee565b905082608083015295945050505050565b6000602082840312156148c357600080fd5b8151801515811461181957600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614904576149046147ec565b5060010190565b8183823760009101908152919050565b81810381811115610a5d57610a5d6147ec565b67ffffffffffffffff81811683821601908082111561494f5761494f6147ec565b5092915050565b600081518084526020808501945080840160005b8381101561499c57815173ffffffffffffffffffffffffffffffffffffffff168752958201959082019060010161496a565b509495945050505050565b600081518084526020808501945080840160005b8381101561499c578151875295820195908201906001016149bb565b600081518084526020808501808196508360051b8101915082860160005b85811015614a1f578284038952614a0d848351613fee565b988501989350908401906001016149f5565b5091979650505050505050565b60006101208b8352602073ffffffffffffffffffffffffffffffffffffffff8c1681850152816040850152614a638285018c614956565b91508382036060850152614a77828b6149a7565b915083820360808501528189518084528284019150828160051b850101838c0160005b83811015614ae6577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0878403018552614ad4838351613fee565b94860194925090850190600101614a9a565b505086810360a0880152614afa818c6149d7565b945050505050614b1660c084018767ffffffffffffffff169052565b67ffffffffffffffff851660e0840152828103610100840152614b398185613fee565b9c9b505050505050505050505050565b608081526000614b5c6080830187614956565b8281036020840152614b6e81876149a7565b90508281036040840152614b8281866149d7565b91505082606083015295945050505050565b60006fffffffffffffffffffffffffffffffff808316818103614bb957614bb96147ec565b6001019392505050565b84815260ff841660208201528260408201526080606082015260006113b26080830184613fee565b85815260ff8516602082015283604082015260a060608201526000614c1360a0830185613fee565b8281036080840152614c258185613fee565b98975050505050505050565b600060208284031215614c4357600080fd5b81516bffffffffffffffffffffffff8116811461181957600080fd5b600060208284031215614c7157600080fd5b815167ffffffffffffffff811115614c8857600080fd5b8201601f81018413614c9957600080fd5b8051614ca7613ed382613e7f565b818152856020838501011115614cbc57600080fd5b6123d1826020830160208601613fca565b6fffffffffffffffffffffffffffffffff81811683821601908082111561494f5761494f6147ec56fe476f7665726e6f723a2072656c617920726576657274656420776974686f7574206d657373616765737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e26706172616d733d6672616374696f6e616ca26469706673582212209d993783ee1f50b7a5007ebb8ec739ec17a1223ed80701edc0b146982f1c554764736f6c63430008120033

Deployed Bytecode Sourcemap

918:4466:33:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3749:4:0;3726:11;:9;:11::i;:::-;:28;;;3718:37;;;;;;918:4466:33;;;;;2695:222;;;;;;;;;;-1:-1:-1;2695:222:33;;;;;:::i;:::-;;:::i;:::-;;;516:14:36;;509:22;491:41;;479:2;464:18;2695:222:33;;;;;;;;1271:108:4;;;;;;;;;;-1:-1:-1;1359:13:4;;1271:108;;;689:25:36;;;677:2;662:18;1271:108:4;543:177:36;3008:403:33;;;;;;;;;;-1:-1:-1;3008:403:33;;;;;:::i;:::-;;:::i;4623:98:0:-;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;19868:200::-;;;;;;;;;;-1:-1:-1;19868:200:0;;;;;:::i;:::-;20031:30;19868:200;;;;;;;;;;5384:66:36;5372:79;;;5354:98;;5342:2;5327:18;19868:200:0;5210:248:36;5191:924:35;;;;;;;;;;-1:-1:-1;5191:924:35;;;;;:::i;:::-;;:::i;10757:867:0:-;;;;;;:::i;:::-;;:::i;7171:163::-;;;;;;;;;;-1:-1:-1;7171:163:0;;;;;:::i;:::-;;:::i;1341:147::-;;;;;;;;;;;;1400:88;1341:147;;2888:159:32;;;;;;;;;;-1:-1:-1;2888:159:32;;;;;:::i;:::-;2970:7;2994:37;;;:25;:37;;;;;;;;:46;;;;;;;;;;;;;;;;2888:159;;;;9716:34:36;9704:47;;;9686:66;;9674:2;9659:18;2888:159:32;9540:218:36;1101:106:4;;;;;;;;;;-1:-1:-1;1188:12:4;;1101:106;;15821:427:0;;;;;;;;;;-1:-1:-1;15821:427:0;;;;;:::i;:::-;;:::i;3773:206:33:-;;;;;;;;;;-1:-1:-1;3773:206:33;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;2505:173:32:-;;;;;;;;;;-1:-1:-1;2505:173:32;;;;;:::i;:::-;2598:4;2621:37;;;:25;:37;;;;;;;;:46;;;;;;;;;;;;;;;:50;;;2505:173;3119:389;;;;;;;;;;-1:-1:-1;3119:389:32;;;;;:::i;:::-;3236:20;3381:26;;;:14;:26;;;;;3425:25;;;3475;;;;3425;;;;;3452:21;;;;;;;3475:25;;;3119:389;;;;;11025:25:36;;;11081:2;11066:18;;11059:34;;;;11109:18;;;11102:34;11013:2;10998:18;3119:389:32;10823:319:36;4780:99:0;;;;;;;;;;-1:-1:-1;4862:10:0;;;;;;;;;;;;;;;;;4780:99;;14831:198;;;;;;;;;;-1:-1:-1;14831:198:0;;;;;:::i;:::-;;:::i;15444:312::-;;;;;;;;;;-1:-1:-1;15444:312:0;;;;;:::i;:::-;;:::i;1738:126:4:-;;;;;;;;;;-1:-1:-1;1738:126:4;;;;;:::i;:::-;;:::i;15099:266:0:-;;;;;;;;;;-1:-1:-1;15099:266:0;;;;;:::i;:::-;;:::i;9290:1408::-;;;;;;;;;;-1:-1:-1;9290:1408:0;;;;;:::i;:::-;;:::i;14544:227::-;;;;;;;;;;-1:-1:-1;14544:227:0;;;;;:::i;:::-;;:::i;9467:130:35:-;;;;;;;;;;-1:-1:-1;9467:130:35;;;;;:::i;:::-;;:::i;4963:156::-;;;;;;;;;;-1:-1:-1;4963:156:35;;;;;:::i;:::-;;:::i;3502:180:33:-;;;;;;;;;;;;;:::i;8293:66:35:-;;;;;;;;;;;;;:::i;20444:247:0:-;;;;;;;;;;-1:-1:-1;20444:247:0;;;;;:::i;:::-;20648:36;20444:247;;;;;;;;7402:161;;;;;;;;;;-1:-1:-1;7402:161:0;;;;;:::i;:::-;;:::i;19182:326::-;;;;;;:::i;:::-;;:::i;5824:308::-;;;;;;;;;;-1:-1:-1;5824:308:0;;;;;:::i;:::-;;:::i;4780:103:35:-;;;;;;;;;;-1:-1:-1;4868:9:35;;;;4780:103;;;16573:42:36;16561:55;;;16543:74;;16531:2;16516:18;4780:103:35;16397:226:36;2291:154:32;;;;;;;;;;;;;:::i;1240:95:0:-;;;;;;;;;;;;1282:53;1240:95;;2118:54:32;;;;;;;;;;-1:-1:-1;2118:54:32;;;;;:::i;:::-;;;;;;;;;;;;;;;;2039:130:4;;;;;;;;;;-1:-1:-1;2039:130:4;;;;;:::i;:::-;;:::i;14298:176:0:-;;;;;;;;;;-1:-1:-1;14298:176:0;;;;;:::i;:::-;;:::i;2354:150:4:-;;;;;;;;;;-1:-1:-1;2354:150:4;;;;;:::i;:::-;;:::i;20144:219:0:-;;;;;;;;;;-1:-1:-1;20144:219:0;;;;;:::i;:::-;20325:31;20144:219;;;;;;;;4185:88:33;;;;;;;;;;-1:-1:-1;4185:88:33;;;;;:::i;:::-;-1:-1:-1;1882:10:33;;4185:88;409:37:6;;;;;;;;;;;;;;;5200:182:33;5317:7;5341:36;4868:9:35;;;;;4780:103;5341:36:33;5334:43;;5200:182;:::o;2695:222::-;2836:4;2857:55;2900:11;2857:42;:55::i;:::-;2850:62;2695:222;-1:-1:-1;;2695:222:33:o;3008:403::-;3267:7;3289:117;3356:10;3368:7;3377:6;;3385;3393:1;3396;3399;3289:59;:117::i;:::-;3282:124;3008:403;-1:-1:-1;;;;;;;;;3008:403:33:o;4623:98:0:-;4677:13;4709:5;4702:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4623:98;:::o;5191:924:35:-;5361:7;5376:18;5397:57;5410:7;5419:6;5427:9;5438:15;5397:12;:57::i;:::-;5376:78;-1:-1:-1;5490:23:35;5469:17;5475:10;5469:5;:17::i;:::-;:44;;;;;;;;:::i;:::-;;5461:90;;;;;;;18837:2:36;5461:90:35;;;18819:21:36;18876:2;18856:18;;;18849:30;18915:34;18895:18;;;18888:62;18986:3;18966:18;;;18959:31;19007:19;;5461:90:35;;;;;;;;;5590:9;;:17;;;;;;;;5558:11;;5590:9;;;:15;;:17;;;;;;;;;;;;;;:9;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5572:35;;:15;:35;:::i;:::-;5558:49;;5613:64;5662:14;:3;:12;:14::i;:::-;5613:30;;;;:18;:30;;;;;;449:27:23;;;;;;;;;;;;366:117;5613:64:35;5688:9;5683:361;5707:7;:14;5703:1;:18;5683:361;;;5754:9;;5815:10;;5754:9;;;;;:28;;5815:7;;5823:1;;5815:10;;;;;;:::i;:::-;;;;;;;5827:6;5834:1;5827:9;;;;;;;;:::i;:::-;;;;;;;5842;5852:1;5842:12;;;;;;;;:::i;:::-;;;;;;;5856:3;5804:56;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;5794:67;;;;;;5754:117;;;;;;;;;;;;;689:25:36;;677:2;662:18;;543:177;5754:117:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;5753:118;5736:221;;;;;;;20886:2:36;5736:221:35;;;20868:21:36;20925:2;20905:18;;;20898:30;20964:34;20944:18;;;20937:62;21035:34;21015:18;;;21008:62;21107:4;21086:19;;;21079:33;21129:19;;5736:221:35;20684:470:36;5736:221:35;5965:9;;5992:10;;5965:9;;;;;:26;;5992:7;;6000:1;;5992:10;;;;;;:::i;:::-;;;;;;;6004:6;6011:1;6004:9;;;;;;;;:::i;:::-;;;;;;;6019;6029:1;6019:12;;;;;;;;:::i;:::-;;;;;;;6033:3;5965:72;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;5723:3:35;;;:::i;:::-;;;5683:361;;;-1:-1:-1;6055:31:35;;;21722:25:36;;;21778:2;21763:18;;21756:34;;;6055:31:35;;21695:18:36;6055:31:35;;;;;;;-1:-1:-1;6100:10:35;5191:924;-1:-1:-1;;;;;5191:924:35:o;10757:867:0:-;10955:7;10974:18;10995:57;11008:7;11017:6;11025:9;11036:15;10995:12;:57::i;:::-;10974:78;;11063:20;11086:17;11092:10;11086:5;:17::i;:::-;11063:40;-1:-1:-1;11144:23:0;11134:6;:33;;;;;;;;:::i;:::-;;:67;;;-1:-1:-1;11181:20:0;11171:6;:30;;;;;;;;:::i;:::-;;11134:67;11113:147;;;;;;;18837:2:36;11113:147:0;;;18819:21:36;18876:2;18856:18;;;18849:30;18915:34;18895:18;;;18888:62;18986:3;18966:18;;;18959:31;19007:19;;11113:147:0;18635:397:36;11113:147:0;11270:22;;;;11304:4;11270:22;;;;;;;;;:31;;:38;;;;;;;;;;11324:28;;689:25:36;;;11324:28:0;;662:18:36;11324:28:0;;;;;;;11363:71;11378:10;11390:7;11399:6;11407:9;11418:15;11363:14;:71::i;:::-;11444:65;11453:10;11465:7;11474:6;11482:9;11493:15;11444:8;:65::i;:::-;11519:70;11533:10;11545:7;11554:6;11562:9;11573:15;11519:13;:70::i;:::-;-1:-1:-1;11607:10:0;10757:867;-1:-1:-1;;;;;10757:867:0:o;7171:163::-;7255:7;7281:22;;;:10;:22;;;;;;;;:44;;;;;;;;;;;;;;;:46;7274:53;;;7171:163;-1:-1:-1;;7171:163:0:o;15821:427::-;16078:48;;;1282:53;16078:48;;;21999:25:36;22040:18;;;22033:34;;;22115:4;22103:17;;22083:18;;;22076:45;15989:7:0;;;;16024:159;;16051:77;;21972:18:36;;16078:48:0;;;;;;;;;;;;;16068:59;;;;;;16051:16;:77::i;:::-;16142:1;16157;16172;16024:13;:159::i;:::-;16008:175;;16200:41;16210:10;16222:5;16229:7;16200:41;;;;;;;;;;;;:9;:41::i;:::-;16193:48;15821:427;-1:-1:-1;;;;;;;15821:427:0:o;3773:206:33:-;3902:13;3932:42;3963:10;3932:30;:42::i;14831:198:0:-;14917:7;;719:10:20;14936:28:0;;14981:41;14991:10;15003:5;15010:7;14981:41;;;;;;;;;;;;:9;:41::i;:::-;14974:48;14831:198;-1:-1:-1;;;;14831:198:0:o;15444:312::-;15632:7;;719:10:20;15651:28:0;;15696:53;15706:10;15718:5;15725:7;15734:6;;15696:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15742:6:0;;-1:-1:-1;15696:9:0;;-1:-1:-1;;15696:53:0:i;1738:126:4:-;3023:11:0;:9;:11::i;:::-;3007:27;;719:10:20;3007:27:0;;;2999:64;;;;;;;22334:2:36;2999:64:0;;;22316:21:36;22373:2;22353:18;;;22346:30;22412:26;22392:18;;;22385:54;22456:18;;2999:64:0;22132:348:36;2999:64:0;3100:4;3077:11;:9;:11::i;:::-;:28;;;3073:277;;3121:19;;793:14:20;3143:21:0;;;;;;;:::i;:::-;;;;;;;;3121:43;;3288:52;3325:11;3295:26;:15;:24;:26::i;:::-;:41;3288:52;;3107:243;3073:277;1826:31:4::1;1842:14;1826:15;:31::i;:::-;1738:126:::0;:::o;15099:266:0:-;15249:7;;719:10:20;15268:28:0;;15313:45;15323:10;15335:5;15342:7;15351:6;;15313:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15313:9:0;;-1:-1:-1;;;15313:45:0:i;:::-;15306:52;15099:266;-1:-1:-1;;;;;;15099:266:0:o;9290:1408::-;9482:7;9566:19;:17;:19::i;:::-;9522:40;719:10:20;9545:16:0;9560:1;9545:12;:16;:::i;9522:40::-;:63;;9501:159;;;;;;;23096:2:36;9501:159:0;;;23078:21:36;23135:2;23115:18;;;23108:30;23174:34;23154:18;;;23147:62;23245:19;23225:18;;;23218:47;23282:19;;9501:159:0;22894:413:36;9501:159:0;9671:18;9692:71;9705:7;9714:6;9722:9;9749:11;9733:29;;;;;;9692:12;:71::i;:::-;9671:92;;9800:6;:13;9782:7;:14;:31;9774:77;;;;;;;23514:2:36;9774:77:0;;;23496:21:36;23553:2;23533:18;;;23526:30;23592:34;23572:18;;;23565:62;23663:3;23643:18;;;23636:31;23684:19;;9774:77:0;23312:397:36;9774:77:0;9887:9;:16;9869:7;:14;:34;9861:80;;;;;;;23514:2:36;9861:80:0;;;23496:21:36;23553:2;23533:18;;;23526:30;23592:34;23572:18;;;23565:62;23663:3;23643:18;;;23636:31;23684:19;;9861:80:0;23312:397:36;9861:80:0;9976:1;9959:7;:14;:18;9951:55;;;;;;;23916:2:36;9951:55:0;;;23898:21:36;23955:2;23935:18;;;23928:30;23994:26;23974:18;;;23967:54;24038:18;;9951:55:0;23714:348:36;9951:55:0;10017:29;10049:22;;;:10;:22;;;;;;;;;10089:26;;;;;;;;;;;;;;;;1600:20:23;10081:74:0;;;;;;;24269:2:36;10081:74:0;;;24251:21:36;24308:2;24288:18;;;24281:30;24347:34;24327:18;;;24320:62;24418:3;24398:18;;;24391:31;24439:19;;10081:74:0;24067:397:36;10081:74:0;10166:15;10210:24;:13;1188:12:4;;;1101:106;10210:13:0;:22;:24::i;:::-;10184:23;:12;:21;:23::i;:::-;:50;;;;:::i;:::-;10166:68;;10244:15;10273:25;:14;1359:13:4;;;1271:108;10273:25:0;10262:36;;:8;:36;:::i;:::-;449:27:23;;;;;;;;;;10244:54:0;-1:-1:-1;10359:16:0;;;449:27:23;;;;;;;;;;10413:250:0;10442:10;719::20;10492:7:0;10513:6;10546:7;:14;10533:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10575:9;10598:8;10620;10642:11;10413:250;;;;;;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;10681:10:0;;9290:1408;-1:-1:-1;;;;;;;9290:1408:0:o;14544:227::-;14699:7;14725:39;14735:7;14744:11;14757:6;14725:9;:39::i;:::-;14718:46;;14544:227;;;;;;:::o;9467:130:35:-;3023:11:0;:9;:11::i;:::-;3007:27;;719:10:20;3007:27:0;;;2999:64;;;;;;;22334:2:36;2999:64:0;;;22316:21:36;22373:2;22353:18;;;22346:30;22412:26;22392:18;;;22385:54;22456:18;;2999:64:0;22132:348:36;2999:64:0;3100:4;3077:11;:9;:11::i;:::-;:28;;;3073:277;;3121:19;;793:14:20;3143:21:0;;;;;;;:::i;:::-;;;;;;;;3121:43;;3288:52;3325:11;3295:26;:15;:24;:26::i;:::-;:41;3288:52;;3107:243;3073:277;9564:28:35::1;9580:11;9564:15;:28::i;4963:156::-:0;5042:7;5064:30;;;:18;:30;;;;;;;;:48;;;;;;;;;;;;;;;:50;1170:117:23;3502:180:33;3617:7;3641:36;1540:18:4;;;1447:118;8293:66:35;8331:9;;;;;;;;;;;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8293:66::o;7402:161:0:-;7486:7;7512:22;;;:10;:22;;;;;;;;:42;;;;;;;;:30;;;:42;;;;;;;:44;1170:117:23;19182:326:0;3023:11;:9;:11::i;:::-;3007:27;;719:10:20;3007:27:0;;;2999:64;;;;;;;22334:2:36;2999:64:0;;;22316:21:36;22373:2;22353:18;;;22346:30;22412:26;22392:18;;;22385:54;22456:18;;2999:64:0;22132:348:36;2999:64:0;3100:4;3077:11;:9;:11::i;:::-;:28;;;3073:277;;3121:19;;793:14:20;3143:21:0;;;;;;;:::i;:::-;;;;;;;;3121:43;;3288:52;3325:11;3295:26;:15;:24;:26::i;:::-;:41;3288:52;;3107:243;3073:277;19330:12:::1;19344:23:::0;19371:6:::1;:11;;19390:5;19397:4;;19371:31;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19329:73;;;;19412:89;19437:7;19446:10;19412:89;;;;;;;;;;;;;;;;;:24;:89::i;:::-;;19319:189;;19182:326:::0;;;;:::o;5824:308::-;6024:7;6079;6088:6;6096:9;6107:15;6068:55;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;6058:66;;6068:55;6058:66;;;;;5824:308;-1:-1:-1;;;;;5824:308:0:o;2291:154:32:-;2354:13;2379:59;;;;;;;;;;;;;;;;;;;2291:154;:::o;2039:130:4:-;3023:11:0;:9;:11::i;:::-;3007:27;;719:10:20;3007:27:0;;;2999:64;;;;;;;22334:2:36;2999:64:0;;;22316:21:36;22373:2;22353:18;;;22346:30;22412:26;22392:18;;;22385:54;22456:18;;2999:64:0;22132:348:36;2999:64:0;3100:4;3077:11;:9;:11::i;:::-;:28;;;3073:277;;3121:19;;793:14:20;3143:21:0;;;;;;;:::i;:::-;;;;;;;;3121:43;;3288:52;3325:11;3295:26;:15;:24;:26::i;:::-;:41;3288:52;;3107:243;3073:277;2129:33:4::1;2146:15;2129:16;:33::i;14298:176:0:-:0;14392:7;14418:49;14428:7;14437:11;14450:16;9215:9;;;;;;;;;-1:-1:-1;9215:9:0;;;9134:97;14450:16;14418:9;:49::i;2354:150:4:-;3023:11:0;:9;:11::i;:::-;3007:27;;719:10:20;3007:27:0;;;2999:64;;;;;;;22334:2:36;2999:64:0;;;22316:21:36;22373:2;22353:18;;;22346:30;22412:26;22392:18;;;22385:54;22456:18;;2999:64:0;22132:348:36;2999:64:0;3100:4;3077:11;:9;:11::i;:::-;:28;;;3073:277;;3121:19;;793:14:20;3143:21:0;;;;;;;:::i;:::-;;;;;;;;3121:43;;3288:52;3325:11;3295:26;:15;:24;:26::i;:::-;:41;3288:52;;3107:243;3073:277;2454:43:4::1;2476:20;2454:21;:43::i;3534:246:35:-:0;3658:4;3685:50;;;3700:35;3685:50;;:90;;;3739:36;3763:11;3739:23;:36::i;10851:2683:32:-;11099:7;11475:6;:13;11492:2;11475:19;:41;;;-1:-1:-1;11498:13:32;;:18;11475:41;11456:151;;;;;;;29246:2:36;11456:151:32;;;29228:21:36;29285:2;29265:18;;;29258:30;29324:34;29304:18;;;29297:62;29395:34;29375:18;;;29368:62;29467:5;29446:19;;;29439:34;29490:19;;11456:151:32;29044:471:36;11456:151:32;11618:13;11634:423;11661:341;1400:88:0;11812:10:32;11848:7;11897:6;;11881:24;;;;;;;:::i;:::-;;;;;;;;11941:6;11931:17;;;;;;11726:244;;;;;;;;;;;29775:25:36;;;29831:2;29816:18;;29809:34;;;;29891:4;29879:17;;;;29874:2;29859:18;;29852:45;29928:2;29913:18;;29906:34;29971:3;29956:19;;29949:35;29762:3;29747:19;;29520:470;11634:423:32;11618:439;;12222:6;:13;12239:2;12222:19;12218:1239;;13013:4;13001:17;;;12720:314;13093:26;;;12327:13;13093:26;;;:19;:26;;;;;;;12615:21;12384:664;;;;13093:26;:35;;13072:143;;;;;;;30197:2:36;13072:143:32;;;30179:21:36;30236:2;30216:18;;;30209:30;30275:34;30255:18;;;30248:62;30346:29;30326:18;;;30319:57;30393:19;;13072:143:32;29995:423:36;13072:143:32;13228:26;;;;;;;:19;:26;;;;;:28;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;13430:4;13422:6;13415:20;13401:46;12218:1239;13474:53;13484:10;13496:5;13503:7;13512:6;;13474:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13520:6:32;;-1:-1:-1;13474:9:32;;-1:-1:-1;;13474:53:32:i;:::-;13467:60;10851:2683;-1:-1:-1;;;;;;;;;;10851:2683:32:o;13216:187:29:-;13272:6;13307:16;13298:25;;;13290:76;;;;;;;30856:2:36;13290:76:29;;;30838:21:36;30895:2;30875:18;;;30868:30;30934:34;30914:18;;;30907:62;31005:8;30985:18;;;30978:36;31031:19;;13290:76:29;30654:402:36;13290:76:29;-1:-1:-1;13390:5:29;13216:187::o;12360:499:0:-;12622:4;12599:11;:9;:11::i;:::-;:28;;;12595:258;;12648:9;12643:200;12667:7;:14;12663:1;:18;12643:200;;;12732:4;12710:27;;:7;12718:1;12710:10;;;;;;;;:::i;:::-;;;;;;;:27;;;12706:123;;12761:49;12796:9;12806:1;12796:12;;;;;;;;:::i;:::-;;;;;;;12786:23;;;;;;12761:15;:24;;:49;;;;:::i;:::-;12683:3;;;:::i;:::-;;;12643:200;;;;12595:258;12360:499;;;;;:::o;4364:340:33:-;4609:90;4643:10;4655:7;4664:6;4672:9;4683:15;4609:33;:90::i;12928:396:0:-;13201:4;13178:11;:9;:11::i;:::-;:28;;;13174:144;;13227:15;5880:12:30;;;;;5866:10;;;;;;:26;;13222:86:0;;5236:1:30;13270:15:0;5247:14:30;13270:23:0;5159:109:30;4348:165:25;4425:7;4451:55;4473:20;:18;:20::i;:::-;4495:10;8470:57:24;;35204:66:36;8470:57:24;;;35192:79:36;35287:11;;;35280:27;;;35323:12;;;35316:28;;;8434:7:24;;35360:12:36;;8470:57:24;;;;;;;;;;;;8460:68;;;;;;8453:75;;8341:194;;;;;6696:270;6819:7;6839:17;6858:18;6880:25;6891:4;6897:1;6900;6903;6880:10;:25::i;:::-;6838:67;;;;6915:18;6927:5;6915:11;:18::i;17425:255:0:-;17582:7;17608:65;17618:10;17630:7;17639;17648:6;17656:16;9215:9;;;;;;;;;-1:-1:-1;9215:9:0;;;9134:97;17656:16;17608:9;:65::i;:::-;17601:72;17425:255;-1:-1:-1;;;;;17425:255:0:o;4246:455:35:-;4360:13;4383:20;4406:23;4418:10;4406:11;:23::i;:::-;4383:46;-1:-1:-1;4450:23:35;4440:6;:33;;;;;;;;:::i;:::-;;4436:52;;4482:6;4246:455;-1:-1:-1;;4246:455:35:o;4436:52::-;4495:11;4509:23;4521:10;4509:11;:23::i;:::-;4495:37;;4542:3;4549:1;4542:8;4538:158;;-1:-1:-1;4559:6:35;4246:455;-1:-1:-1;;4246:455:35:o;4538:158::-;4605:9;;;;;;;;;;;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4599:29;;:3;:29;:::i;:::-;4580:15;:48;4576:120;;-1:-1:-1;4637:21:35;;4246:455;-1:-1:-1;;;4246:455:35:o;4576:120::-;-1:-1:-1;4676:20:35;;4246:455;-1:-1:-1;;;4246:455:35:o;17962:769:0:-;18148:7;18199:22;;;:10;:22;;;;;;;;18239:17;18245:10;18239:5;:17::i;:::-;:41;;;;;;;;:::i;:::-;;18231:89;;;;;;;31263:2:36;18231:89:0;;;31245:21:36;31302:2;31282:18;;;31275:30;31341:34;31321:18;;;31314:62;31412:5;31392:18;;;31385:33;31435:19;;18231:89:0;31061:399:36;18231:89:0;18367:30;;;;;;;;;;;;;;;;;-1:-1:-1;;18348:60:0;;18358:7;;18401:6;18348:9;:60::i;:::-;18331:77;;18418:56;18429:10;18441:7;18450;18459:6;18467;18418:10;:56::i;:::-;18489:6;:13;18506:1;18489:18;18485:216;;18537:7;18528:54;;;18546:10;18558:7;18567:6;18575;18528:54;;;;;;;;;:::i;:::-;;;;;;;;18485:216;;;18637:7;18618:72;;;18646:10;18658:7;18667:6;18675;18683;18618:72;;;;;;;;;;:::i;:::-;;;;;;;;18718:6;17962:769;-1:-1:-1;;;;;;;17962:769:0:o;3287:324:30:-;3351:13;3380:12;3386:5;5880:12;;;;;5866:10;;;;;;:26;;;5777:122;3380:12;3376:32;;;3401:7;;;;;;;;;;;;;;3376:32;-1:-1:-1;3438:12:30;;;;3418:17;3468:23;;;3438:12;3468:11;;;:23;;;;;;;3501:30;;;3565:29;;;;3580:14;;3565:29;;;;;;;;;3468:23;3287:324::o;2622:171:4:-;2718:12;;2703:44;;;21722:25:36;;;21778:2;21763:18;;21756:34;;;2703:44:4;;21695:18:36;2703:44:4;;;;;;;2757:12;:29;2622:171::o;644:226:6:-;822:41;;;;;:19;32713:55:36;;;822:41:6;;;32695:74:36;32785:18;;;32778:34;;;796:7:6;;822:5;:19;;;;;;32668:18:36;;822:41:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;815:48;;;644:226;-1:-1:-1;;;;644:226:6:o;9931:169:35:-;10033:9;;10010:56;;;10033:9;;;;33359:34:36;;33429:15;;;33424:2;33409:18;;33402:43;10010:56:35;;33271:18:36;10010:56:35;;;;;;;10072:9;:23;;;;;;;;;;;;;;;9931:169::o;8315:295:19:-;8461:12;8489:7;8485:119;;;-1:-1:-1;8519:10:19;8512:17;;8485:119;8560:33;8568:10;8580:12;8560:7;:33::i;2913:316:4:-;3074:1;3056:15;:19;3048:71;;;;;;;33658:2:36;3048:71:4;;;33640:21:36;33697:2;33677:18;;;33670:30;33736:34;33716:18;;;33709:62;33807:9;33787:18;;;33780:37;33834:19;;3048:71:4;33456:403:36;3048:71:4;3150:13;;3134:47;;;21722:25:36;;;21778:2;21763:18;;21756:34;;;3134:47:4;;21695:18:36;3134:47:4;;;;;;;3191:13;:31;2913:316::o;3359:213::-;3473:18;;3452:62;;;21722:25:36;;;21778:2;21763:18;;21756:34;;;3452:62:4;;21695:18:36;3452:62:4;;;;;;;3524:18;:41;3359:213::o;3829:738:0:-;3931:4;4153:232;;;4181:203;4153:232;;:290;;-1:-1:-1;4401:42:0;;;4416:27;4401:42;4153:290;:355;;;-1:-1:-1;4459:49:0;;;4474:34;4459:49;4153:355;:407;;;-1:-1:-1;952:25:26;937:40;;;;4524:36:0;829:155:26;2088:226:30;2187:10;;;;;;;;;2168:16;2207:22;;;:11;;;;:22;;;;;;:30;;;;2271:26;;;;;;2284:13;;;;2271:26;;;;;2088:226::o;6228:1014:35:-;6428:11;6442:23;6454:10;6442:11;:23::i;:::-;6428:37;;6485:1;6479:3;:7;6471:69;;;;;;;34066:2:36;6471:69:35;;;34048:21:36;34105:2;34085:18;;;34078:30;34144:34;34124:18;;;34117:62;34215:19;34195:18;;;34188:47;34252:19;;6471:69:35;33864:413:36;6471:69:35;7075:9;;7041:57;;7075:9;;7088;7041:17;:57::i;:::-;7109:9;7104:134;7128:7;:14;7124:1;:18;7104:134;;;7157:9;;7186:10;;7157:9;;;;;:28;;7186:7;;7194:1;;7186:10;;;;;;:::i;:::-;;;;;;;7198:6;7205:1;7198:9;;;;;;;;:::i;:::-;;;;;;;7213;7223:1;7213:12;;;;;;;;:::i;:::-;;;;;;;7227:3;7157:74;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;7144:3:35;;;:::i;:::-;;;7104:134;;3152:308:25;3205:7;3236:4;3228:29;3245:12;3228:29;;:66;;;;;3278:16;3261:13;:33;3228:66;3224:230;;;-1:-1:-1;3317:24:25;;3152:308::o;3224:230::-;-1:-1:-1;3642:73:25;;;3401:10;3642:73;;;;39332:25:36;;;;3413:12:25;39373:18:36;;;39366:34;3427:15:25;39416:18:36;;;39409:34;3686:13:25;39459:18:36;;;39452:34;3709:4:25;39502:19:36;;;;39495:84;;;;3642:73:25;;;;;;;;;;39304:19:36;;;;3642:73:25;;;3632:84;;;;;;5200:182:33:o;5069:1494:24:-;5195:7;;6119:66;6106:79;;6102:161;;;-1:-1:-1;6217:1:24;;-1:-1:-1;6221:30:24;6201:51;;6102:161;6374:24;;;6357:14;6374:24;;;;;;;;;35610:25:36;;;35683:4;35671:17;;35651:18;;;35644:45;;;;35705:18;;;35698:34;;;35748:18;;;35741:34;;;6374:24:24;;35582:19:36;;6374:24:24;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;6374:24:24;;;;;;-1:-1:-1;;6412:20:24;;;6408:101;;6464:1;6468:29;6448:50;;;;;;;6408:101;6527:6;-1:-1:-1;6535:20:24;;-1:-1:-1;5069:1494:24;;;;;;;;:::o;570:511::-;647:20;638:5;:29;;;;;;;;:::i;:::-;;634:441;;570:511;:::o;634:441::-;743:29;734:5;:38;;;;;;;;:::i;:::-;;730:345;;788:34;;;;;35988:2:36;788:34:24;;;35970:21:36;36027:2;36007:18;;;36000:30;36066:26;36046:18;;;36039:54;36110:18;;788:34:24;35786:348:36;730:345:24;852:35;843:5;:44;;;;;;;;:::i;:::-;;839:236;;903:41;;;;;36341:2:36;903:41:24;;;36323:21:36;36380:2;36360:18;;;36353:30;36419:33;36399:18;;;36392:61;36470:18;;903:41:24;36139:355:36;839:236:24;974:30;965:5;:39;;;;;;;;:::i;:::-;;961:114;;1020:44;;;;;36701:2:36;1020:44:24;;;36683:21:36;36740:2;36720:18;;;36713:30;36779:34;36759:18;;;36752:62;36850:4;36830:18;;;36823:32;36872:19;;1020:44:24;36499:398:36;6189:914:0;6262:13;6319:22;;;:10;:22;;;;;6356:17;;;;;;6352:77;;;-1:-1:-1;6396:22:0;;6189:914;-1:-1:-1;;6189:914:0:o;6352:77::-;6443:17;;;;;;;;;6439:77;;;-1:-1:-1;6483:22:0;;6189:914;-1:-1:-1;;6189:914:0:o;6439:77::-;6526:16;6545:28;6562:10;6545:16;:28::i;:::-;6526:47;;6588:8;6600:1;6588:13;6584:83;;6617:39;;;;;37104:2:36;6617:39:0;;;37086:21:36;37143:2;37123:18;;;37116:30;37182:31;37162:18;;;37155:59;37231:18;;6617:39:0;36902:353:36;6584:83:0;6693:12;6681:8;:24;6677:83;;-1:-1:-1;6728:21:0;;6189:914;-1:-1:-1;;;6189:914:0:o;6677:83::-;6770:16;6789:28;6806:10;6789:16;:28::i;:::-;6770:47;;6844:12;6832:8;:24;6828:82;;-1:-1:-1;6879:20:0;;6189:914;-1:-1:-1;;;;6189:914:0:o;6828:82::-;6924:26;6939:10;6924:14;:26::i;:::-;:56;;;;-1:-1:-1;4047:4:32;4099:26;;;:14;:26;;;;;4167:25;;;;;4143:21;;;;;:49;6954:26:0;6920:177;;;-1:-1:-1;7003:23:0;;6189:914;-1:-1:-1;;;;6189:914:0:o;6920:177::-;-1:-1:-1;7064:22:0;;6189:914;-1:-1:-1;;;;6189:914:0:o;5200:714:32:-;5420:1;5406:11;:15;5398:65;;;;;;;37462:2:36;5398:65:32;;;37444:21:36;37501:2;37481:18;;;37474:30;37540:34;37520:18;;;37513:62;37611:7;37591:18;;;37584:35;37636:19;;5398:65:32;37260:401:36;5398:65:32;5477:37;;;;:25;:37;;;;;;;;:46;;;;;;;;;;;;;:61;-1:-1:-1;5473:143:32;;5552:53;;;;;37868:2:36;5552:53:32;;;37850:21:36;37907:2;37887:18;;;37880:30;37946:34;37926:18;;;37919:62;38017:13;37997:18;;;37990:41;38048:19;;5552:53:32;37666:407:36;5473:143:32;5626:23;5652:31;5671:11;5652:18;:31::i;:::-;5626:57;;5698:8;:15;5717:1;5698:20;5694:214;;5734:64;5752:10;5764:7;5773:15;5790:7;5734:17;:64::i;:::-;5694:214;;;5829:68;5850:10;5862:7;5871:15;5888:8;5829:20;:68::i;8616:540:19:-;8775:17;;:21;8771:379;;9003:10;8997:17;9059:15;9046:10;9042:2;9038:19;9031:44;8771:379;9126:12;9119:20;;;;;;;;;;;:::i;2412:312::-;2526:6;2501:21;:31;;2493:73;;;;;;;38280:2:36;2493:73:19;;;38262:21:36;38319:2;38299:18;;;38292:30;38358:31;38338:18;;;38331:59;38407:18;;2493:73:19;38078:353:36;2493:73:19;2578:12;2596:9;:14;;2618:6;2596:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2577:52;;;2647:7;2639:78;;;;;;;38848:2:36;2639:78:19;;;38830:21:36;38887:2;38867:18;;;38860:30;38926:34;38906:18;;;38899:62;38997:28;38977:18;;;38970:56;39043:19;;2639:78:19;38646:422:36;2639:78:19;2483:241;2412:312;;:::o;3573:276:32:-;3657:4;3709:26;;;:14;:26;;;;;3817:25;;;;3793:21;;:49;;3817:25;;;;;3793:21;;;;:49;:::i;:::-;3753:89;;:36;3760:28;3777:10;3760:16;:28::i;3753:36::-;:89;;;3573:276;-1:-1:-1;;;3573:276:32:o;9088:192:29:-;9145:7;9181:17;9172:26;;;9164:78;;;;;;;39994:2:36;9164:78:29;;;39976:21:36;40033:2;40013:18;;;40006:30;40072:34;40052:18;;;40045:62;40143:9;40123:18;;;40116:37;40170:19;;9164:78:29;39792:403:36;6195:962:32;6373:37;;;;:25;:37;;;;;;;;:46;;;;;;;;;;;;;:51;6352:150;;;;;;;40402:2:36;6352:150:32;;;40384:21:36;40441:2;40421:18;;;40414:30;40480:34;40460:18;;;40453:62;40551:22;40531:18;;;40524:50;40591:19;;6352:150:32;40200:416:36;6352:150:32;6513:37;;;;:25;:37;;;;;;;;:46;;;;;;;;;;:60;;;;;;;;;;6588:61;;;6584:567;;6665:26;;;;:14;:26;;;;;:54;;6708:11;;6665:26;:54;;6708:11;;6665:54;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;6584:567;;;6740:57;;;;;6736:415;;6813:26;;;;:14;:26;;;;;:50;;6852:11;;6813:26;:35;;:50;;6852:11;;6813:50;;;;;;:::i;6736:415::-;6884:61;;;;;6880:271;;6961:26;;;;:14;:26;;;;;:39;;:54;;7004:11;;6961:26;:54;;7004:11;;6961:54;;;:::i;6880:271::-;7046:94;;;;;40823:2:36;7046:94:32;;;40805:21:36;40862:2;40842:18;;;40835:30;40901:34;40881:18;;;40874:62;40972:34;40952:18;;;40945:62;41044:22;41023:19;;;41016:51;41084:19;;7046:94:32;40621:488:36;8210:1196:32;8386:8;:15;8405:2;8386:21;8378:78;;;;;;;41316:2:36;8378:78:32;;;41298:21:36;41355:2;41335:18;;;41328:30;41394:34;41374:18;;;41367:62;41465:14;41445:18;;;41438:42;41497:19;;8378:78:32;41114:408:36;8378:78:32;10026:4;10012:19;;;10006:26;10170:4;10156:19;;;10150:26;8468:21;8600:37;;;:25;:37;;;;;:46;;;;;;;;;;;;10001:3;9997:36;;;;10062:21;10058:54;;;;10141:36;;;;;8600:46;;;;;10141:36;8677:34;10058:54;9997:36;8677:34;:::i;:::-;:50;;;;:::i;:::-;:68;;;;:::i;:::-;8656:89;;8778:11;8764:25;;:10;:25;;8756:90;;;;;;;40402:2:36;8756:90:32;;;40384:21:36;40441:2;40421:18;;;40414:30;40480:34;40460:18;;;40453:62;40551:22;40531:18;;;40524:50;40591:19;;8756:90:32;40200:416:36;8756:90:32;8997:37;;;;:25;:37;;;;;;;;:46;;;;;;;;;;:68;;;;;;;;;;;;;;;9112:26;;;:14;:26;;;;;;9076:62;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9076:62:32;;;;;;;;;;;;9164:182;;;;;;;9190:26;;9164:182;;9190:42;;9219:13;;9190:42;:::i;:::-;9164:182;;;;;;9271:9;9246:13;:22;;;:34;;;;:::i;:::-;9164:182;;;;;;9323:13;9294;:26;;;:42;;;;:::i;:::-;9164:182;;;;;;;9357:26;;;;:14;:26;;;;;;;;;:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;8210:1196:32:o;14:332:36:-;72:6;125:2;113:9;104:7;100:23;96:32;93:52;;;141:1;138;131:12;93:52;180:9;167:23;230:66;223:5;219:78;212:5;209:89;199:117;;312:1;309;302:12;725:156;791:20;;851:4;840:16;;830:27;;820:55;;871:1;868;861:12;820:55;725:156;;;:::o;886:348::-;938:8;948:6;1002:3;995:4;987:6;983:17;979:27;969:55;;1020:1;1017;1010:12;969:55;-1:-1:-1;1043:20:36;;1086:18;1075:30;;1072:50;;;1118:1;1115;1108:12;1072:50;1155:4;1147:6;1143:17;1131:29;;1207:3;1200:4;1191:6;1183;1179:19;1175:30;1172:39;1169:59;;;1224:1;1221;1214:12;1169:59;886:348;;;;;:::o;1239:184::-;1291:77;1288:1;1281:88;1388:4;1385:1;1378:15;1412:4;1409:1;1402:15;1428:334;1499:2;1493:9;1555:2;1545:13;;1560:66;1541:86;1529:99;;1658:18;1643:34;;1679:22;;;1640:62;1637:88;;;1705:18;;:::i;:::-;1741:2;1734:22;1428:334;;-1:-1:-1;1428:334:36:o;1767:245::-;1815:4;1848:18;1840:6;1837:30;1834:56;;;1870:18;;:::i;:::-;-1:-1:-1;1927:2:36;1915:15;1932:66;1911:88;2001:4;1907:99;;1767:245::o;2017:336::-;2081:5;2110:52;2126:35;2154:6;2126:35;:::i;:::-;2110:52;:::i;:::-;2101:61;;2185:6;2178:5;2171:21;2225:3;2216:6;2211:3;2207:16;2204:25;2201:45;;;2242:1;2239;2232:12;2201:45;2291:6;2286:3;2279:4;2272:5;2268:16;2255:43;2345:1;2338:4;2329:6;2322:5;2318:18;2314:29;2307:40;2017:336;;;;;:::o;2358:220::-;2400:5;2453:3;2446:4;2438:6;2434:17;2430:27;2420:55;;2471:1;2468;2461:12;2420:55;2493:79;2568:3;2559:6;2546:20;2539:4;2531:6;2527:17;2493:79;:::i;2583:978::-;2713:6;2721;2729;2737;2745;2753;2761;2769;2822:3;2810:9;2801:7;2797:23;2793:33;2790:53;;;2839:1;2836;2829:12;2790:53;2875:9;2862:23;2852:33;;2904:36;2936:2;2925:9;2921:18;2904:36;:::i;:::-;2894:46;;2991:2;2980:9;2976:18;2963:32;3014:18;3055:2;3047:6;3044:14;3041:34;;;3071:1;3068;3061:12;3041:34;3110:59;3161:7;3152:6;3141:9;3137:22;3110:59;:::i;:::-;3188:8;;-1:-1:-1;3084:85:36;-1:-1:-1;3276:2:36;3261:18;;3248:32;;-1:-1:-1;3292:16:36;;;3289:36;;;3321:1;3318;3311:12;3289:36;;3344:51;3387:7;3376:8;3365:9;3361:24;3344:51;:::i;:::-;3334:61;;;3414:37;3446:3;3435:9;3431:19;3414:37;:::i;:::-;3404:47;;3498:3;3487:9;3483:19;3470:33;3460:43;;3550:3;3539:9;3535:19;3522:33;3512:43;;2583:978;;;;;;;;;;;:::o;3566:250::-;3651:1;3661:113;3675:6;3672:1;3669:13;3661:113;;;3751:11;;;3745:18;3732:11;;;3725:39;3697:2;3690:10;3661:113;;;-1:-1:-1;;3808:1:36;3790:16;;3783:27;3566:250::o;3821:330::-;3863:3;3901:5;3895:12;3928:6;3923:3;3916:19;3944:76;4013:6;4006:4;4001:3;3997:14;3990:4;3983:5;3979:16;3944:76;:::i;:::-;4065:2;4053:15;4070:66;4049:88;4040:98;;;;4140:4;4036:109;;3821:330;-1:-1:-1;;3821:330:36:o;4156:220::-;4305:2;4294:9;4287:21;4268:4;4325:45;4366:2;4355:9;4351:18;4343:6;4325:45;:::i;4381:154::-;4467:42;4460:5;4456:54;4449:5;4446:65;4436:93;;4525:1;4522;4515:12;4540:665;4635:6;4643;4651;4659;4712:3;4700:9;4691:7;4687:23;4683:33;4680:53;;;4729:1;4726;4719:12;4680:53;4768:9;4755:23;4787:31;4812:5;4787:31;:::i;:::-;4837:5;-1:-1:-1;4894:2:36;4879:18;;4866:32;4907:33;4866:32;4907:33;:::i;:::-;4959:7;-1:-1:-1;5013:2:36;4998:18;;4985:32;;-1:-1:-1;5068:2:36;5053:18;;5040:32;5095:18;5084:30;;5081:50;;;5127:1;5124;5117:12;5081:50;5150:49;5191:7;5182:6;5171:9;5167:22;5150:49;:::i;:::-;5140:59;;;4540:665;;;;;;;:::o;5463:183::-;5523:4;5556:18;5548:6;5545:30;5542:56;;;5578:18;;:::i;:::-;-1:-1:-1;5623:1:36;5619:14;5635:4;5615:25;;5463:183::o;5651:737::-;5705:5;5758:3;5751:4;5743:6;5739:17;5735:27;5725:55;;5776:1;5773;5766:12;5725:55;5812:6;5799:20;5838:4;5862:60;5878:43;5918:2;5878:43;:::i;5862:60::-;5956:15;;;6042:1;6038:10;;;;6026:23;;6022:32;;;5987:12;;;;6066:15;;;6063:35;;;6094:1;6091;6084:12;6063:35;6130:2;6122:6;6118:15;6142:217;6158:6;6153:3;6150:15;6142:217;;;6238:3;6225:17;6255:31;6280:5;6255:31;:::i;:::-;6299:18;;6337:12;;;;6175;;6142:217;;;-1:-1:-1;6377:5:36;5651:737;-1:-1:-1;;;;;;5651:737:36:o;6393:662::-;6447:5;6500:3;6493:4;6485:6;6481:17;6477:27;6467:55;;6518:1;6515;6508:12;6467:55;6554:6;6541:20;6580:4;6604:60;6620:43;6660:2;6620:43;:::i;6604:60::-;6698:15;;;6784:1;6780:10;;;;6768:23;;6764:32;;;6729:12;;;;6808:15;;;6805:35;;;6836:1;6833;6826:12;6805:35;6872:2;6864:6;6860:15;6884:142;6900:6;6895:3;6892:15;6884:142;;;6966:17;;6954:30;;7004:12;;;;6917;;6884:142;;7060:886;7112:5;7165:3;7158:4;7150:6;7146:17;7142:27;7132:55;;7183:1;7180;7173:12;7132:55;7219:6;7206:20;7245:4;7269:60;7285:43;7325:2;7285:43;:::i;7269:60::-;7363:15;;;7449:1;7445:10;;;;7433:23;;7429:32;;;7394:12;;;;7473:15;;;7470:35;;;7501:1;7498;7491:12;7470:35;7537:2;7529:6;7525:15;7549:368;7565:6;7560:3;7557:15;7549:368;;;7651:3;7638:17;7687:18;7674:11;7671:35;7668:125;;;7747:1;7776:2;7772;7765:14;7668:125;7818:56;7870:3;7865:2;7851:11;7843:6;7839:24;7835:33;7818:56;:::i;:::-;7806:69;;-1:-1:-1;7895:12:36;;;;7582;;7549:368;;7951:897;8121:6;8129;8137;8145;8198:3;8186:9;8177:7;8173:23;8169:33;8166:53;;;8215:1;8212;8205:12;8166:53;8255:9;8242:23;8284:18;8325:2;8317:6;8314:14;8311:34;;;8341:1;8338;8331:12;8311:34;8364:61;8417:7;8408:6;8397:9;8393:22;8364:61;:::i;:::-;8354:71;;8478:2;8467:9;8463:18;8450:32;8434:48;;8507:2;8497:8;8494:16;8491:36;;;8523:1;8520;8513:12;8491:36;8546:63;8601:7;8590:8;8579:9;8575:24;8546:63;:::i;:::-;8536:73;;8662:2;8651:9;8647:18;8634:32;8618:48;;8691:2;8681:8;8678:16;8675:36;;;8707:1;8704;8697:12;8675:36;;8730:61;8783:7;8772:8;8761:9;8757:24;8730:61;:::i;:::-;7951:897;;;;-1:-1:-1;8720:71:36;;8838:2;8823:18;8810:32;;-1:-1:-1;;;7951:897:36:o;8853:180::-;8912:6;8965:2;8953:9;8944:7;8940:23;8936:32;8933:52;;;8981:1;8978;8971:12;8933:52;-1:-1:-1;9004:23:36;;8853:180;-1:-1:-1;8853:180:36:o;9220:315::-;9288:6;9296;9349:2;9337:9;9328:7;9324:23;9320:32;9317:52;;;9365:1;9362;9355:12;9317:52;9401:9;9388:23;9378:33;;9461:2;9450:9;9446:18;9433:32;9474:31;9499:5;9474:31;:::i;:::-;9524:5;9514:15;;;9220:315;;;;;:::o;9763:458::-;9854:6;9862;9870;9878;9886;9939:3;9927:9;9918:7;9914:23;9910:33;9907:53;;;9956:1;9953;9946:12;9907:53;9992:9;9979:23;9969:33;;10021:36;10053:2;10042:9;10038:18;10021:36;:::i;:::-;10011:46;;10076:36;10108:2;10097:9;10093:18;10076:36;:::i;:::-;9763:458;;;;-1:-1:-1;10066:46:36;;10159:2;10144:18;;10131:32;;-1:-1:-1;10210:3:36;10195:19;10182:33;;9763:458;-1:-1:-1;;9763:458:36:o;10226:184::-;10278:77;10275:1;10268:88;10375:4;10372:1;10365:15;10399:4;10396:1;10389:15;10415:403;10565:2;10550:18;;10598:1;10587:13;;10577:201;;10634:77;10631:1;10624:88;10735:4;10732:1;10725:15;10763:4;10760:1;10753:15;10577:201;10787:25;;;10415:403;:::o;11147:250::-;11213:6;11221;11274:2;11262:9;11253:7;11249:23;11245:32;11242:52;;;11290:1;11287;11280:12;11242:52;11326:9;11313:23;11303:33;;11355:36;11387:2;11376:9;11372:18;11355:36;:::i;:::-;11345:46;;11147:250;;;;;:::o;11402:769::-;11507:6;11515;11523;11531;11539;11592:3;11580:9;11571:7;11567:23;11563:33;11560:53;;;11609:1;11606;11599:12;11560:53;11645:9;11632:23;11622:33;;11674:36;11706:2;11695:9;11691:18;11674:36;:::i;:::-;11664:46;;11761:2;11750:9;11746:18;11733:32;11784:18;11825:2;11817:6;11814:14;11811:34;;;11841:1;11838;11831:12;11811:34;11880:59;11931:7;11922:6;11911:9;11907:22;11880:59;:::i;:::-;11958:8;;-1:-1:-1;11854:85:36;-1:-1:-1;12046:2:36;12031:18;;12018:32;;-1:-1:-1;12062:16:36;;;12059:36;;;12091:1;12088;12081:12;12059:36;;12114:51;12157:7;12146:8;12135:9;12131:24;12114:51;:::i;:::-;12104:61;;;11402:769;;;;;;;;:::o;12176:549::-;12263:6;12271;12279;12287;12340:2;12328:9;12319:7;12315:23;12311:32;12308:52;;;12356:1;12353;12346:12;12308:52;12392:9;12379:23;12369:33;;12421:36;12453:2;12442:9;12438:18;12421:36;:::i;:::-;12411:46;;12508:2;12497:9;12493:18;12480:32;12535:18;12527:6;12524:30;12521:50;;;12567:1;12564;12557:12;12521:50;12606:59;12657:7;12648:6;12637:9;12633:22;12606:59;:::i;:::-;12176:549;;;;-1:-1:-1;12684:8:36;-1:-1:-1;;;;12176:549:36:o;12730:1157::-;12910:6;12918;12926;12934;12987:3;12975:9;12966:7;12962:23;12958:33;12955:53;;;13004:1;13001;12994:12;12955:53;13044:9;13031:23;13073:18;13114:2;13106:6;13103:14;13100:34;;;13130:1;13127;13120:12;13100:34;13153:61;13206:7;13197:6;13186:9;13182:22;13153:61;:::i;:::-;13143:71;;13267:2;13256:9;13252:18;13239:32;13223:48;;13296:2;13286:8;13283:16;13280:36;;;13312:1;13309;13302:12;13280:36;13335:63;13390:7;13379:8;13368:9;13364:24;13335:63;:::i;:::-;13325:73;;13451:2;13440:9;13436:18;13423:32;13407:48;;13480:2;13470:8;13467:16;13464:36;;;13496:1;13493;13486:12;13464:36;13519:61;13572:7;13561:8;13550:9;13546:24;13519:61;:::i;:::-;13509:71;;13633:2;13622:9;13618:18;13605:32;13589:48;;13662:2;13652:8;13649:16;13646:36;;;13678:1;13675;13668:12;13646:36;-1:-1:-1;13701:24:36;;13756:4;13748:13;;13744:27;-1:-1:-1;13734:55:36;;13785:1;13782;13775:12;13734:55;13808:73;13873:7;13868:2;13855:16;13850:2;13846;13842:11;13808:73;:::i;13892:523::-;13978:6;13986;13994;14047:2;14035:9;14026:7;14022:23;14018:32;14015:52;;;14063:1;14060;14053:12;14015:52;14102:9;14089:23;14121:31;14146:5;14121:31;:::i;:::-;14171:5;-1:-1:-1;14223:2:36;14208:18;;14195:32;;-1:-1:-1;14278:2:36;14263:18;;14250:32;14305:18;14294:30;;14291:50;;;14337:1;14334;14327:12;14291:50;14360:49;14401:7;14392:6;14381:9;14377:22;14360:49;:::i;:::-;14350:59;;;13892:523;;;;;:::o;14420:278::-;14510:6;14563:2;14551:9;14542:7;14538:23;14534:32;14531:52;;;14579:1;14576;14569:12;14531:52;14618:9;14605:23;14637:31;14662:5;14637:31;:::i;14703:1071::-;14857:6;14865;14873;14881;14889;14942:3;14930:9;14921:7;14917:23;14913:33;14910:53;;;14959:1;14956;14949:12;14910:53;14998:9;14985:23;15017:31;15042:5;15017:31;:::i;:::-;15067:5;-1:-1:-1;15124:2:36;15109:18;;15096:32;15137:33;15096:32;15137:33;:::i;:::-;15189:7;-1:-1:-1;15247:2:36;15232:18;;15219:32;15270:18;15300:14;;;15297:34;;;15327:1;15324;15317:12;15297:34;15350:61;15403:7;15394:6;15383:9;15379:22;15350:61;:::i;:::-;15340:71;;15464:2;15453:9;15449:18;15436:32;15420:48;;15493:2;15483:8;15480:16;15477:36;;;15509:1;15506;15499:12;15477:36;15532:63;15587:7;15576:8;15565:9;15561:24;15532:63;:::i;:::-;15522:73;;15648:3;15637:9;15633:19;15620:33;15604:49;;15678:2;15668:8;15665:16;15662:36;;;15694:1;15691;15684:12;15779:613;15867:6;15875;15883;15891;15944:2;15932:9;15923:7;15919:23;15915:32;15912:52;;;15960:1;15957;15950:12;15912:52;15999:9;15986:23;16018:31;16043:5;16018:31;:::i;:::-;16068:5;-1:-1:-1;16120:2:36;16105:18;;16092:32;;-1:-1:-1;16175:2:36;16160:18;;16147:32;16202:18;16191:30;;16188:50;;;16234:1;16231;16224:12;16880:315;16948:6;16956;17009:2;16997:9;16988:7;16984:23;16980:32;16977:52;;;17025:1;17022;17015:12;16977:52;17064:9;17051:23;17083:31;17108:5;17083:31;:::i;:::-;17133:5;17185:2;17170:18;;;;17157:32;;-1:-1:-1;;;16880:315:36:o;17200:734::-;17304:6;17312;17320;17328;17336;17389:3;17377:9;17368:7;17364:23;17360:33;17357:53;;;17406:1;17403;17396:12;17357:53;17445:9;17432:23;17464:31;17489:5;17464:31;:::i;:::-;17514:5;-1:-1:-1;17571:2:36;17556:18;;17543:32;17584:33;17543:32;17584:33;:::i;:::-;17636:7;-1:-1:-1;17690:2:36;17675:18;;17662:32;;-1:-1:-1;17741:2:36;17726:18;;17713:32;;-1:-1:-1;17796:3:36;17781:19;;17768:33;17824:18;17813:30;;17810:50;;;17856:1;17853;17846:12;17810:50;17879:49;17920:7;17911:6;17900:9;17896:22;17879:49;:::i;18193:437::-;18272:1;18268:12;;;;18315;;;18336:61;;18390:4;18382:6;18378:17;18368:27;;18336:61;18443:2;18435:6;18432:14;18412:18;18409:38;18406:218;;18480:77;18477:1;18470:88;18581:4;18578:1;18571:15;18609:4;18606:1;18599:15;18406:218;;18193:437;;;:::o;19037:184::-;19107:6;19160:2;19148:9;19139:7;19135:23;19131:32;19128:52;;;19176:1;19173;19166:12;19128:52;-1:-1:-1;19199:16:36;;19037:184;-1:-1:-1;19037:184:36:o;19226:::-;19278:77;19275:1;19268:88;19375:4;19372:1;19365:15;19399:4;19396:1;19389:15;19415:125;19480:9;;;19501:10;;;19498:36;;;19514:18;;:::i;19545:184::-;19597:77;19594:1;19587:88;19694:4;19691:1;19684:15;19718:4;19715:1;19708:15;19734:663;20078:42;20070:6;20066:55;20055:9;20048:74;20158:6;20153:2;20142:9;20138:18;20131:34;20201:3;20196:2;20185:9;20181:18;20174:31;20242:1;20236:3;20225:9;20221:19;20214:30;20280:3;20275:2;20264:9;20260:18;20253:31;20029:4;20301:46;20342:3;20331:9;20327:19;20319:6;20301:46;:::i;:::-;20293:54;;20384:6;20378:3;20367:9;20363:19;20356:35;19734:663;;;;;;;:::o;20402:277::-;20469:6;20522:2;20510:9;20501:7;20497:23;20493:32;20490:52;;;20538:1;20535;20528:12;20490:52;20570:9;20564:16;20623:5;20616:13;20609:21;20602:5;20599:32;20589:60;;20645:1;20642;20635:12;21348:195;21387:3;21418:66;21411:5;21408:77;21405:103;;21488:18;;:::i;:::-;-1:-1:-1;21535:1:36;21524:13;;21348:195::o;22485:271::-;22668:6;22660;22655:3;22642:33;22624:3;22694:16;;22719:13;;;22694:16;22485:271;-1:-1:-1;22485:271:36:o;22761:128::-;22828:9;;;22849:11;;;22846:37;;;22863:18;;:::i;24469:180::-;24536:18;24574:10;;;24586;;;24570:27;;24609:11;;;24606:37;;;24623:18;;:::i;:::-;24606:37;24469:180;;;;:::o;24654:484::-;24707:3;24745:5;24739:12;24772:6;24767:3;24760:19;24798:4;24827:2;24822:3;24818:12;24811:19;;24864:2;24857:5;24853:14;24885:1;24895:218;24909:6;24906:1;24903:13;24895:218;;;24974:13;;24989:42;24970:62;24958:75;;25053:12;;;;25088:15;;;;24931:1;24924:9;24895:218;;;-1:-1:-1;25129:3:36;;24654:484;-1:-1:-1;;;;;24654:484:36:o;25143:435::-;25196:3;25234:5;25228:12;25261:6;25256:3;25249:19;25287:4;25316:2;25311:3;25307:12;25300:19;;25353:2;25346:5;25342:14;25374:1;25384:169;25398:6;25395:1;25392:13;25384:169;;;25459:13;;25447:26;;25493:12;;;;25528:15;;;;25420:1;25413:9;25384:169;;25583:615;25634:3;25672:5;25666:12;25699:6;25694:3;25687:19;25725:4;25766:2;25761:3;25757:12;25791:11;25818;25811:18;;25868:6;25865:1;25861:14;25854:5;25850:26;25838:38;;25910:2;25903:5;25899:14;25931:1;25941:231;25955:6;25952:1;25949:13;25941:231;;;26026:5;26020:4;26016:16;26011:3;26004:29;26054:38;26087:4;26078:6;26072:13;26054:38;:::i;:::-;26150:12;;;;26046:46;-1:-1:-1;26115:15:36;;;;25977:1;25970:9;25941:231;;;-1:-1:-1;26188:4:36;;25583:615;-1:-1:-1;;;;;;;25583:615:36:o;26310:1966::-;26882:4;26911:3;26941:6;26930:9;26923:25;26967:2;27017:42;27009:6;27005:55;27000:2;26989:9;26985:18;26978:83;27097:2;27092;27081:9;27077:18;27070:30;27123:56;27175:2;27164:9;27160:18;27152:6;27123:56;:::i;:::-;27109:70;;27227:9;27219:6;27215:22;27210:2;27199:9;27195:18;27188:50;27261:44;27298:6;27290;27261:44;:::i;:::-;27247:58;;27354:9;27346:6;27342:22;27336:3;27325:9;27321:19;27314:51;27385:6;27420;27414:13;27451:6;27443;27436:22;27486:2;27478:6;27474:15;27467:22;;27545:2;27535:6;27532:1;27528:14;27520:6;27516:27;27512:36;27583:2;27575:6;27571:15;27604:1;27614:311;27628:6;27625:1;27622:13;27614:311;;;27714:66;27705:6;27697;27693:19;27689:92;27684:3;27677:105;27805:40;27838:6;27829;27823:13;27805:40;:::i;:::-;27903:12;;;;27795:50;-1:-1:-1;27868:15:36;;;;27650:1;27643:9;27614:311;;;27618:3;;27974:9;27966:6;27962:22;27956:3;27945:9;27941:19;27934:51;28008:42;28043:6;28035;28008:42;:::i;:::-;27994:56;;;;;;28059:46;28100:3;28089:9;28085:19;28077:6;26279:18;26268:30;26256:43;;26203:102;28059:46;26279:18;26268:30;;28155:3;28140:19;;26256:43;28209:9;28201:6;28197:22;28191:3;28180:9;28176:19;28169:51;28237:33;28263:6;28255;28237:33;:::i;:::-;28229:41;26310:1966;-1:-1:-1;;;;;;;;;;;;26310:1966:36:o;28281:758::-;28662:3;28651:9;28644:22;28625:4;28689:57;28741:3;28730:9;28726:19;28718:6;28689:57;:::i;:::-;28794:9;28786:6;28782:22;28777:2;28766:9;28762:18;28755:50;28828:44;28865:6;28857;28828:44;:::i;:::-;28814:58;;28920:9;28912:6;28908:22;28903:2;28892:9;28888:18;28881:50;28948:42;28983:6;28975;28948:42;:::i;:::-;28940:50;;;29026:6;29021:2;29010:9;29006:18;28999:34;28281:758;;;;;;;:::o;30423:226::-;30462:3;30490:34;30559:2;30552:5;30548:14;30586:2;30577:7;30574:15;30571:41;;30592:18;;:::i;:::-;30641:1;30628:15;;30423:226;-1:-1:-1;;;30423:226:36:o;31465:442::-;31694:6;31683:9;31676:25;31749:4;31741:6;31737:17;31732:2;31721:9;31717:18;31710:45;31791:6;31786:2;31775:9;31771:18;31764:34;31834:3;31829:2;31818:9;31814:18;31807:31;31657:4;31855:46;31896:3;31885:9;31881:19;31873:6;31855:46;:::i;31912:604::-;32187:6;32176:9;32169:25;32242:4;32234:6;32230:17;32225:2;32214:9;32210:18;32203:45;32284:6;32279:2;32268:9;32264:18;32257:34;32327:3;32322:2;32311:9;32307:18;32300:31;32150:4;32354:46;32395:3;32384:9;32380:19;32372:6;32354:46;:::i;:::-;32449:9;32441:6;32437:22;32431:3;32420:9;32416:19;32409:51;32477:33;32503:6;32495;32477:33;:::i;:::-;32469:41;31912:604;-1:-1:-1;;;;;;;;31912:604:36:o;32823:296::-;32892:6;32945:2;32933:9;32924:7;32920:23;32916:32;32913:52;;;32961:1;32958;32951:12;32913:52;32993:9;32987:16;33043:26;33036:5;33032:38;33025:5;33022:49;33012:77;;33085:1;33082;33075:12;34282:647;34361:6;34414:2;34402:9;34393:7;34389:23;34385:32;34382:52;;;34430:1;34427;34420:12;34382:52;34463:9;34457:16;34496:18;34488:6;34485:30;34482:50;;;34528:1;34525;34518:12;34482:50;34551:22;;34604:4;34596:13;;34592:27;-1:-1:-1;34582:55:36;;34633:1;34630;34623:12;34582:55;34662:2;34656:9;34687:48;34703:31;34731:2;34703:31;:::i;34687:48::-;34758:2;34751:5;34744:17;34798:7;34793:2;34788;34784;34780:11;34776:20;34773:33;34770:53;;;34819:1;34816;34809:12;34770:53;34832:67;34896:2;34891;34884:5;34880:14;34875:2;34871;34867:11;34832:67;:::i;39590:197::-;39658:34;39712:10;;;39724;;;39708:27;;39747:11;;;39744:37;;;39761:18;;:::i

Swarm Source

ipfs://9d993783ee1f50b7a5007ebb8ec739ec17a1223ed80701edc0b146982f1c5547

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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