{"file_path":"lib/mento-core-2.2.0/contracts/tokens/StableTokenV2.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity 0.8.18;\n\nimport { ERC20PermitUpgradeable } from \"./patched/ERC20PermitUpgradeable.sol\";\nimport { ERC20Upgradeable } from \"./patched/ERC20Upgradeable.sol\";\n\nimport { IStableTokenV2 } from \"../interfaces/IStableTokenV2.sol\";\nimport { CalledByVm } from \"../common/CalledByVm.sol\";\n\n/**\n * @title ERC20 token with minting and burning permissioned to a broker and validators.\n */\ncontract StableTokenV2 is ERC20PermitUpgradeable, IStableTokenV2, CalledByVm {\n  address public validators;\n  address public broker;\n  address public exchange;\n\n  event TransferComment(string comment);\n  event BrokerUpdated(address broker);\n  event ValidatorsUpdated(address validators);\n  event ExchangeUpdated(address exchange);\n\n  /**\n   * @dev Restricts a function so it can only be executed by an address that's allowed to mint.\n   * Currently that's the broker, validators, or exchange.\n   */\n  modifier onlyMinter() {\n    address sender = _msgSender();\n    require(sender == broker || sender == validators || sender == exchange, \"StableTokenV2: not allowed to mint\");\n    _;\n  }\n\n  /**\n   * @dev Restricts a function so it can only be executed by an address that's allowed to burn.\n   * Currently that's the broker or exchange.\n   */\n  modifier onlyBurner() {\n    address sender = _msgSender();\n    require(sender == broker || sender == exchange, \"StableTokenV2: not allowed to burn\");\n    _;\n  }\n\n  /**\n   * @notice The constructor for the StableTokenV2 contract.\n   * @dev Should be called with disable=true in deployments when\n   * it's accessed through a Proxy.\n   * Call this with disable=false during testing, when used\n   * without a proxy.\n   * @param disable Set to true to run `_disableInitializers()` inherited from\n   * openzeppelin-contracts-upgradeable/Initializable.sol\n   */\n  constructor(bool disable) {\n    if (disable) {\n      _disableInitializers();\n    }\n  }\n\n  /**\n   * @notice Initializes a StableTokenV2.\n   * It keeps the same signature as the original initialize() function\n   * in legacy/StableToken.sol\n   * @param _name The name of the stable token (English)\n   * @param _symbol A short symbol identifying the token (e.g. \"cUSD\")\n   * deprecated-param decimals Tokens are divisible to this many decimal places.\n   * deprecated-param registryAddress Address of the Registry contract.\n   * deprecated-param inflationRate Weekly inflation rate.\n   * deprecated-param inflationFactorUpdatePeriod How often the inflation factor is updated, in seconds.\n   * @param initialBalanceAddresses Array of addresses with an initial balance.\n   * @param initialBalanceValues Array of balance values corresponding to initialBalanceAddresses.\n   * deprecated-param exchangeIdentifier String identifier of exchange in registry (for specific fiat pairs)\n   */\n  function initialize(\n    string calldata _name,\n    string calldata _symbol,\n    uint8, // deprecated: decimals\n    address, // deprecated: registryAddress,\n    uint256, // deprecated: inflationRate,\n    uint256, // deprecated:  inflationFactorUpdatePeriod,\n    address[] calldata initialBalanceAddresses,\n    uint256[] calldata initialBalanceValues,\n    string calldata // deprecated: exchangeIdentifier\n  ) external initializer {\n    __ERC20_init_unchained(_name, _symbol);\n    __ERC20Permit_init(_symbol);\n    _transferOwnership(_msgSender());\n\n    require(initialBalanceAddresses.length == initialBalanceValues.length, \"Array length mismatch\");\n    for (uint256 i = 0; i < initialBalanceAddresses.length; i += 1) {\n      _mint(initialBalanceAddresses[i], initialBalanceValues[i]);\n    }\n  }\n\n  /**\n   * @notice Initializes a StableTokenV2 contract\n   * when upgrading from legacy/StableToken.sol.\n   * It sets the addresses that were previously read from the Registry.\n   * It runs the ERC20PermitUpgradeable initializer.\n   * @dev This function is only callable once.\n   * @param _broker The address of the Broker contract.\n   * @param _validators The address of the Validators contract.\n   * @param _exchange The address of the Exchange contract.\n   */\n  function initializeV2(\n    address _broker,\n    address _validators,\n    address _exchange\n  ) external reinitializer(2) onlyOwner {\n    _setBroker(_broker);\n    _setValidators(_validators);\n    _setExchange(_exchange);\n    __ERC20Permit_init(symbol());\n  }\n\n  /**\n   * @notice Sets the address of the Broker contract.\n   * @dev This function is only callable by the owner.\n   * @param _broker The address of the Broker contract.\n   */\n  function setBroker(address _broker) external onlyOwner {\n    _setBroker(_broker);\n  }\n\n  /**\n   * @notice Sets the address of the Validators contract.\n   * @dev This function is only callable by the owner.\n   * @param _validators The address of the Validators contract.\n   */\n  function setValidators(address _validators) external onlyOwner {\n    _setValidators(_validators);\n  }\n\n  /**\n   * @notice Sets the address of the Exchange contract.\n   * @dev This function is only callable by the owner.\n   * @param _exchange The address of the Exchange contract.\n   */\n  function setExchange(address _exchange) external onlyOwner {\n    _setExchange(_exchange);\n  }\n\n  /**\n   * @notice Transfer token for a specified address\n   * @param to The address to transfer to.\n   * @param value The amount to be transferred.\n   * @param comment The transfer comment.\n   * @return True if the transaction succeeds.\n   */\n  function transferWithComment(\n    address to,\n    uint256 value,\n    string calldata comment\n  ) external returns (bool) {\n    emit TransferComment(comment);\n    return transfer(to, value);\n  }\n\n  /**\n   * @notice Mints new StableToken and gives it to 'to'.\n   * @param to The account for which to mint tokens.\n   * @param value The amount of StableToken to mint.\n   */\n  function mint(address to, uint256 value) external onlyMinter returns (bool) {\n    _mint(to, value);\n    return true;\n  }\n\n  /**\n   * @notice Burns StableToken from the balance of msg.sender.\n   * @param value The amount of StableToken to burn.\n   */\n  function burn(uint256 value) external onlyBurner returns (bool) {\n    _burn(msg.sender, value);\n    return true;\n  }\n\n  /**\n   * @notice Set the address of the Broker contract and emit an event\n   * @param _broker The address of the Broker contract.\n   */\n  function _setBroker(address _broker) internal {\n    broker = _broker;\n    emit BrokerUpdated(_broker);\n  }\n\n  /**\n   * @notice Set the address of the Validators contract and emit an event\n   * @param _validators The address of the Validators contract.\n   */\n  function _setValidators(address _validators) internal {\n    validators = _validators;\n    emit ValidatorsUpdated(_validators);\n  }\n\n  /**\n   * @notice Set the address of the Exchange contract and emit an event\n   * @param _exchange The address of the Exchange contract.\n   */\n  function _setExchange(address _exchange) internal {\n    exchange = _exchange;\n    emit ExchangeUpdated(_exchange);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function transferFrom(\n    address from,\n    address to,\n    uint256 amount\n  ) public override(ERC20Upgradeable, IStableTokenV2) returns (bool) {\n    return ERC20Upgradeable.transferFrom(from, to, amount);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function transfer(address to, uint256 amount) public override(ERC20Upgradeable, IStableTokenV2) returns (bool) {\n    return ERC20Upgradeable.transfer(to, amount);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function balanceOf(address account) public view override(ERC20Upgradeable, IStableTokenV2) returns (uint256) {\n    return ERC20Upgradeable.balanceOf(account);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function approve(address spender, uint256 amount) public override(ERC20Upgradeable, IStableTokenV2) returns (bool) {\n    return ERC20Upgradeable.approve(spender, amount);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function allowance(address owner, address spender)\n    public\n    view\n    override(ERC20Upgradeable, IStableTokenV2)\n    returns (uint256)\n  {\n    return ERC20Upgradeable.allowance(owner, spender);\n  }\n\n  /// @inheritdoc ERC20Upgradeable\n  function totalSupply() public view override(ERC20Upgradeable, IStableTokenV2) returns (uint256) {\n    return ERC20Upgradeable.totalSupply();\n  }\n\n  /// @inheritdoc ERC20PermitUpgradeable\n  function permit(\n    address owner,\n    address spender,\n    uint256 value,\n    uint256 deadline,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) public override(ERC20PermitUpgradeable, IStableTokenV2) {\n    ERC20PermitUpgradeable.permit(owner, spender, value, deadline, v, r, s);\n  }\n\n  /**\n   * @notice Reserve balance for making payments for gas in this StableToken currency.\n   * @param from The account to reserve balance from\n   * @param value The amount of balance to reserve\n   * @dev Note that this function is called by the protocol when paying for tx fees in this\n   * currency. After the tx is executed, gas is refunded to the sender and credited to the\n   * various tx fee recipients via a call to `creditGasFees`.\n   */\n  function debitGasFees(address from, uint256 value) external onlyVm {\n    _burn(from, value);\n  }\n\n  /**\n   * @notice Alternative function to credit balance after making payments\n   * for gas in this StableToken currency.\n   * @param from The account to debit balance from\n   * @param feeRecipient Coinbase address\n   * @param gatewayFeeRecipient Gateway address\n   * @param communityFund Community fund address\n   * @param refund amount to be refunded by the VM\n   * @param tipTxFee Coinbase fee\n   * @param baseTxFee Community fund fee\n   * @param gatewayFee Gateway fee\n   * @dev Note that this function is called by the protocol when paying for tx fees in this\n   * currency. Before the tx is executed, gas is debited from the sender via a call to\n   * `debitGasFees`.\n   */\n  function creditGasFees(\n    address from,\n    address feeRecipient,\n    address gatewayFeeRecipient,\n    address communityFund,\n    uint256 refund,\n    uint256 tipTxFee,\n    uint256 gatewayFee,\n    uint256 baseTxFee\n  ) external onlyVm {\n    uint256 amountToBurn;\n    _mint(from, refund + tipTxFee + gatewayFee + baseTxFee);\n\n    if (feeRecipient != address(0)) {\n      _transfer(from, feeRecipient, tipTxFee);\n    } else if (tipTxFee > 0) {\n      amountToBurn += tipTxFee;\n    }\n\n    if (gatewayFeeRecipient != address(0)) {\n      _transfer(from, gatewayFeeRecipient, gatewayFee);\n    } else if (gatewayFee > 0) {\n      amountToBurn += gatewayFee;\n    }\n\n    if (communityFund != address(0)) {\n      _transfer(from, communityFund, baseTxFee);\n    } else if (baseTxFee > 0) {\n      amountToBurn += baseTxFee;\n    }\n\n    if (amountToBurn > 0) {\n      _burn(from, amountToBurn);\n    }\n  }\n}\n","deployed_bytecode":"0x608080604052600436101561001357600080fd5b60003560e01c90816306fdde031461171757508063095ea7b3146116f157806318160ddd146116d35780631e4f0e031461100757806323b872dd14610f1e5780632c3bb44a14610cfe57806330a0f76814610cd5578063313ce56714610cb95780633644e51514610c965780633950935114610c3757806340c10f1914610b5957806342966c6814610a9a57806358cf967214610a6b57806367b1f5df14610a425780636a30b2531461092957806370a08231146108e2578063715018a6146108645780637ecebe001461081d5780638da5cb5b146107e957806395d89b41146106ed578063a457c2d714610621578063a9059cbb146105fb578063abff0110146105c7578063bf0d02131461059e578063ca1e78191461056a578063d2f7265a14610536578063d505accf1461031f578063dd62ed3e146102c0578063e1d6aceb146102205763f2fde38b1461016957600080fd5b3461021b57602060031936011261021b57610182611802565b61018a612187565b73ffffffffffffffffffffffffffffffffffffffff8116156101b1576101af906121ec565b005b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b600080fd5b3461021b57606060031936011261021b57610239611802565b6044359067ffffffffffffffff821161021b577fe5d4e30fb8364e57bc4d662a07d0cf36f4c34552004c4c3624620a2c1d1c03dc60406102806102b594369060040161188e565b9190601f19601f8484519586946020865281602087015286860137600085828601015201168101030190a16024359033611c86565b602060405160018152f35b3461021b57604060031936011261021b576102d9611802565b6102e1611848565b9073ffffffffffffffffffffffffffffffffffffffff8091166000526007602052604060002091166000526020526020604060002054604051908152f35b3461021b5760e060031936011261021b57610338611802565b610340611848565b6044359060643560843560ff8116810361021b578142116104f25773ffffffffffffffffffffffffffffffffffffffff908186169283600052606960205260406000208054906001820190556040519160208301917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98352866040850152858816606085015288608085015260a084015260c083015260c0825260e082019167ffffffffffffffff92818110848211176104c357604052519020610402612440565b906040519060208201927f1901000000000000000000000000000000000000000000000000000000000000845260228301526042820152604281526080810192818410908411176104c357610470936104689360405260c4359260a435925190206123a4565b919091612259565b160361047f576101af92612046565b606460405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b606460405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152fd5b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609e5416604051908152f35b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609c5416604051908152f35b3461021b57602060031936011261021b576101af6105ba611802565b6105c2612187565b611a30565b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609d5416604051908152f35b3461021b57604060031936011261021b576102b5610617611802565b6024359033611c86565b3461021b57604060031936011261021b5761063a611802565b60243590336000526007602052604060002073ffffffffffffffffffffffffffffffffffffffff821660005260205260406000205491808310610683576102b592039033612046565b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b3461021b57600060031936011261021b57604051600060035461070f81611c33565b808452906001908181169081156107a45750600114610749575b610745846107398186038261197a565b604051918291826117ba565b0390f35b6003600090815292507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061078c57505050810160200161073982610729565b80546020858701810191909152909301928101610774565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208087019190915292151560051b850190920192506107399150839050610729565b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff61084b611802565b1660005260696020526020604060002054604051908152f35b3461021b57600060031936011261021b5761087d612187565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff610910611802565b1660005260056020526020604060002054604051908152f35b3461021b5761010060031936011261021b57610943611802565b61094b611848565b61095361186b565b61095b611825565b60a4359260c43560e435936109703315611b77565b60009561099561098f8761098a8661098a866084356119e4565b6119e4565b89611e49565b73ffffffffffffffffffffffffffffffffffffffff9380851615610a2d57906109be9189611c86565b80831615610a0f57906109d19187611c86565b8116156109f357906109e39184611c86565b806109ea57005b6101af91611ef9565b5080610a00575b506109e3565b610a09916119e4565b826109fa565b5080610a1c575b506109d1565b610a2691946119e4565b9285610a16565b5080610a3a575b506109be565b955087610a34565b3461021b57602060031936011261021b576101af610a5e611802565b610a66612187565b611b0a565b3461021b57604060031936011261021b576101af610a87611802565b610a913315611b77565b60243590611ef9565b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff80609d54163314908115610b4b575b5015610ae1576102b560043533611ef9565b608460405162461bcd60e51b815260206004820152602260248201527f537461626c65546f6b656e56323a206e6f7420616c6c6f77656420746f20627560448201527f726e0000000000000000000000000000000000000000000000000000000000006064820152fd5b9050609e5416331481610acf565b3461021b57604060031936011261021b57610b72611802565b73ffffffffffffffffffffffffffffffffffffffff80609d54163314908115610c28575b8115610c1a575b5015610bb0576102b59060243590611e49565b608460405162461bcd60e51b815260206004820152602260248201527f537461626c65546f6b656e56323a206e6f7420616c6c6f77656420746f206d6960448201527f6e740000000000000000000000000000000000000000000000000000000000006064820152fd5b9050609e5416331482610b9d565b809150609c5416331490610b96565b3461021b57604060031936011261021b576102b5610c53611802565b336000526007602052604060002073ffffffffffffffffffffffffffffffffffffffff8216600052602052610c8f6024356040600020546119e4565b9033612046565b3461021b57600060031936011261021b576020610cb1612440565b604051908152f35b3461021b57600060031936011261021b57602060405160128152f35b3461021b57602060031936011261021b576101af610cf1611802565b610cf9612187565b611a9d565b3461021b57606060031936011261021b57610d90610d1a611802565b610a66610d25611848565b610cf9610d3061186b565b9375010200000000000000000000000000000000000000007fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff60005460ff8160a81c161580610f0d575b610d83906118ed565b16176000556105c2612187565b604051600090600354610da281611c33565b91828152602093848201936001938481169081600014610ed75750600114610e86575b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498867fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff878787610e178189038261197a565b6000549260ff8460a81c1691610e2c83611bc2565b60405193610e398561195e565b8452610e6a878501937f31000000000000000000000000000000000000000000000000000000000000008552611bc2565b51902091519020906035556036551660005560405160028152a1005b6003600090815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b818310610ec45750508101840181610dc5565b8054848401880152918601918401610eb1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016865250151560051b82018501905081610dc5565b50600260a082901c60ff1610610d7a565b3461021b57606060031936011261021b57610f37611802565b610f3f611848565b6044359073ffffffffffffffffffffffffffffffffffffffff83166000526007602052604060002033600052602052604060002054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8403610fa7575b6102b59350611c86565b828410610fc357610fbe836102b595033383612046565b610f9d565b606460405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b3461021b5761012060031936011261021b5760043567ffffffffffffffff811161021b5761103990369060040161188e565b60243567ffffffffffffffff811161021b5761105990369060040161188e565b9260443560ff81160361021b5761106e611825565b5060c43567ffffffffffffffff811161021b5761108f9036906004016118bc565b94909260e43567ffffffffffffffff811161021b576110b29036906004016118bc565b929093610104359067ffffffffffffffff821161021b576110da61114c92369060040161188e565b50506000549760ff8960a81c16159889809a6116c3575b80156116a8575b611101906118ed565b89740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff831617600055611665575b50369161199d565b61115736838561199d565b9061116960ff60005460a81c16611bc2565b80519067ffffffffffffffff82116104c3578190611188600254611c33565b601f81116115f8575b50602090601f83116001146115555760009261154a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916176002555b80519067ffffffffffffffff82116104c3576111f8600354611c33565b601f81116114ab575b50602090601f83116001146114025761125a94939291600091836113f7575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916176003555b369161199d565b9460ff60005460a81c1661126d81611bc2565b6040519061127a8261195e565b6001978883526112b060208401927f31000000000000000000000000000000000000000000000000000000000000008452611bc2565b6020815191012091519020906035556036556112cb336121ec565b8181036113b35760005b8181106113395786866112e457005b60207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498917fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff60005416600055604051908152a1005b6113448183876119f1565b3573ffffffffffffffffffffffffffffffffffffffff8116810361021b57611378906113718386886119f1565b3590611e49565b868101809111156112d5575b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b606460405162461bcd60e51b815260206004820152601560248201527f4172726179206c656e677468206d69736d6174636800000000000000000000006044820152fd5b015190508a80611220565b90601f1983169160036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9260005b818110611493575091600193918561125a989796941061145c575b505050811b01600355611253565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558a808061144e565b92936020600181928786015181550195019301611433565b6003600052601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0160208410611523575b601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181106115175750611201565b600081556001016114e2565b507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b6114e2565b015190508a806111a8565b91601f19169160026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9260005b8181106115e057509084600195949392106115a9575b505050811b016002556111db565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558a808061159b565b92936020600181928786015181550195019301611585565b90915060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c81016020851061165e575b90849392915b601f830160051c8201811061164f575050611191565b60008155859450600101611639565b5080611633565b7fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff167501010000000000000000000000000000000000000000176000558a611144565b50303b1580156110f8575060a081901c60ff166001146110f8565b50600160ff8260a01c16106110f1565b3461021b57600060031936011261021b576020600654604051908152f35b3461021b57604060031936011261021b576102b561170d611802565b6024359033612046565b3461021b57600060031936011261021b57600060025461173681611c33565b808452906001908181169081156107a4575060011461175f57610745846107398186038261197a565b6002600090815292507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106117a257505050810160200161073982610729565b8054602085870181019190915290930192810161178a565b60208082528251818301819052939260005b8581106117ee57505050601f19601f8460006040809697860101520116010190565b8181018301518482016040015282016117cc565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6064359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020838186019501011161021b57565b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020808501948460051b01011161021b57565b156118f457565b608460405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152fd5b6040810190811067ffffffffffffffff8211176104c357604052565b90601f601f19910116810190811067ffffffffffffffff8211176104c357604052565b92919267ffffffffffffffff82116104c357604051916119c76020601f19601f840116018461197a565b82948184528183011161021b578281602093846000960137010152565b9190820180921161138457565b9190811015611a015760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602073ffffffffffffffffffffffffffffffffffffffff7f865dab7821134b6eb27cba259b40e33bbc1b898e970a535a18a83147f380a51f9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609d541617609d55604051908152a1565b602073ffffffffffffffffffffffffffffffffffffffff7f34edb180d960e50e3657f8fba1bf1f35c399c2bbad42b7e0f6561e6fb4ae3d7c9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609c541617609c55604051908152a1565b602073ffffffffffffffffffffffffffffffffffffffff7f403871c8d404db2d13402bd857192acd8f680acd7f2d6e1e5bf2128d013d7eaa9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609e541617609e55604051908152a1565b15611b7e57565b606460405162461bcd60e51b815260206004820152601060248201527f4f6e6c7920564d2063616e2063616c6c000000000000000000000000000000006044820152fd5b15611bc957565b608460405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152fd5b90600182811c92168015611c7c575b6020831014611c4d57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611c42565b73ffffffffffffffffffffffffffffffffffffffff809116918215611ddf5716918215611d755760008281526005602052604081205491808310611d0b57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95876020965260058652038282205586815220818154019055604051908152a3565b608460405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff16908115611eb5577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602082611e986000946006546119e4565b6006558484526005825260408420818154019055604051908152a3565b606460405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff168015611fdc5780600052600560205260406000205491808310611f72576020817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92600095858752600584520360408620558060065403600655604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff80911691821561211e57169182156120b45760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6000541633036121a857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b6005811015612375578061226a5750565b600181036122b657606460405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b6002810361230257606460405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b60031461230b57565b608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116124345791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561242757815173ffffffffffffffffffffffffffffffffffffffff811615612421579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b6035546036546040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176104c3576040525190209056fea164736f6c6343000812000a","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"paris","libraries":{"lib/mento-core-2.0.0/contracts/common/linkedlists/AddressLinkedList.sol:AddressLinkedList":"0x6200f54d73491d56b8d7a975c9ee18efb4d518df","lib/mento-core-2.0.0/contracts/common/linkedlists/AddressSortedLinkedListWithMedian.sol:AddressSortedLinkedListWithMedian":"0xed477a99035d0c1e11369f1d7a4e587893cc002b"},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":10000},"remappings":[":celo-foundry/=lib/celo-foundry/src/",":contracts/=contracts/",":ds-test/=lib/celo-foundry/lib/forge-std/lib/ds-test/src/",":forge-std-next/=lib/mento-core-2.2.0/lib/forge-std-next/src/",":forge-std/=lib/celo-foundry/lib/forge-std/src/",":mento-core-2.0.0/=lib/mento-core-2.0.0/contracts/",":mento-core-2.1.0/=lib/mento-core-2.1.0/contracts/",":mento-core-2.2.0/=lib/mento-core-2.2.0/contracts/",":openzeppelin-contracts-next/=lib/mento-core-2.2.0/lib/openzeppelin-contracts-next/",":openzeppelin-contracts-upgradeable/=lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/",":openzeppelin-contracts/=lib/mento-core-2.0.0/lib/openzeppelin-contracts/contracts/",":openzeppelin-solidity/=lib/mento-core-2.0.0/lib/openzeppelin-contracts/",":test/=lib/mento-core-2.0.0/test/"],"viaIR":true},"optimization_runs":10000,"sourcify_repo_url":"https://repo.sourcify.dev/contracts/partial_match/42220/0x434563B0604BE100F04B7Ae485BcafE3c9D8850E/","decoded_constructor_args":[["true",{"internalType":"bool","name":"disable","type":"bool"}]],"compiler_version":"0.8.18+commit.87f61d96","is_verified_via_verifier_alliance":false,"verified_at":"2025-01-22T14:17:44.645554Z","implementations":[],"proxy_type":null,"external_libraries":[{"name":"lib/mento-core-2.0.0/contracts/common/linkedlists/AddressLinkedList.sol:AddressLinkedList","address_hash":"0x6200F54D73491d56b8d7A975C9ee18EFb4D518Df"},{"name":"lib/mento-core-2.0.0/contracts/common/linkedlists/AddressSortedLinkedListWithMedian.sol:AddressSortedLinkedListWithMedian","address_hash":"0xED477A99035d0c1e11369F1D7A4e587893cc002B"}],"creation_bytecode":"0x6080346200017757601f6200264c38819003918201601f19168301916001600160401b038311848410176200017c578084926020946040528339810103126200017757518015158103620001775760008054336001600160a01b031982168117808455604051929490939091906001600160a01b038616907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3620000b1575b6040516124b99081620001938239f35b60ff8260a81c1662000125575060ff809160a01c1610620000d5575b8080620000a1565b6001600160a81b0319163360ff60a01b19161760ff60a01b1760005560405160ff81527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb384740249890602090a138620000cd565b62461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c90816306fdde031461171757508063095ea7b3146116f157806318160ddd146116d35780631e4f0e031461100757806323b872dd14610f1e5780632c3bb44a14610cfe57806330a0f76814610cd5578063313ce56714610cb95780633644e51514610c965780633950935114610c3757806340c10f1914610b5957806342966c6814610a9a57806358cf967214610a6b57806367b1f5df14610a425780636a30b2531461092957806370a08231146108e2578063715018a6146108645780637ecebe001461081d5780638da5cb5b146107e957806395d89b41146106ed578063a457c2d714610621578063a9059cbb146105fb578063abff0110146105c7578063bf0d02131461059e578063ca1e78191461056a578063d2f7265a14610536578063d505accf1461031f578063dd62ed3e146102c0578063e1d6aceb146102205763f2fde38b1461016957600080fd5b3461021b57602060031936011261021b57610182611802565b61018a612187565b73ffffffffffffffffffffffffffffffffffffffff8116156101b1576101af906121ec565b005b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b600080fd5b3461021b57606060031936011261021b57610239611802565b6044359067ffffffffffffffff821161021b577fe5d4e30fb8364e57bc4d662a07d0cf36f4c34552004c4c3624620a2c1d1c03dc60406102806102b594369060040161188e565b9190601f19601f8484519586946020865281602087015286860137600085828601015201168101030190a16024359033611c86565b602060405160018152f35b3461021b57604060031936011261021b576102d9611802565b6102e1611848565b9073ffffffffffffffffffffffffffffffffffffffff8091166000526007602052604060002091166000526020526020604060002054604051908152f35b3461021b5760e060031936011261021b57610338611802565b610340611848565b6044359060643560843560ff8116810361021b578142116104f25773ffffffffffffffffffffffffffffffffffffffff908186169283600052606960205260406000208054906001820190556040519160208301917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98352866040850152858816606085015288608085015260a084015260c083015260c0825260e082019167ffffffffffffffff92818110848211176104c357604052519020610402612440565b906040519060208201927f1901000000000000000000000000000000000000000000000000000000000000845260228301526042820152604281526080810192818410908411176104c357610470936104689360405260c4359260a435925190206123a4565b919091612259565b160361047f576101af92612046565b606460405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b606460405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152fd5b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609e5416604051908152f35b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609c5416604051908152f35b3461021b57602060031936011261021b576101af6105ba611802565b6105c2612187565b611a30565b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff609d5416604051908152f35b3461021b57604060031936011261021b576102b5610617611802565b6024359033611c86565b3461021b57604060031936011261021b5761063a611802565b60243590336000526007602052604060002073ffffffffffffffffffffffffffffffffffffffff821660005260205260406000205491808310610683576102b592039033612046565b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152fd5b3461021b57600060031936011261021b57604051600060035461070f81611c33565b808452906001908181169081156107a45750600114610749575b610745846107398186038261197a565b604051918291826117ba565b0390f35b6003600090815292507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b82841061078c57505050810160200161073982610729565b80546020858701810191909152909301928101610774565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660208087019190915292151560051b850190920192506107399150839050610729565b3461021b57600060031936011261021b57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff61084b611802565b1660005260696020526020604060002054604051908152f35b3461021b57600060031936011261021b5761087d612187565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff610910611802565b1660005260056020526020604060002054604051908152f35b3461021b5761010060031936011261021b57610943611802565b61094b611848565b61095361186b565b61095b611825565b60a4359260c43560e435936109703315611b77565b60009561099561098f8761098a8661098a866084356119e4565b6119e4565b89611e49565b73ffffffffffffffffffffffffffffffffffffffff9380851615610a2d57906109be9189611c86565b80831615610a0f57906109d19187611c86565b8116156109f357906109e39184611c86565b806109ea57005b6101af91611ef9565b5080610a00575b506109e3565b610a09916119e4565b826109fa565b5080610a1c575b506109d1565b610a2691946119e4565b9285610a16565b5080610a3a575b506109be565b955087610a34565b3461021b57602060031936011261021b576101af610a5e611802565b610a66612187565b611b0a565b3461021b57604060031936011261021b576101af610a87611802565b610a913315611b77565b60243590611ef9565b3461021b57602060031936011261021b5773ffffffffffffffffffffffffffffffffffffffff80609d54163314908115610b4b575b5015610ae1576102b560043533611ef9565b608460405162461bcd60e51b815260206004820152602260248201527f537461626c65546f6b656e56323a206e6f7420616c6c6f77656420746f20627560448201527f726e0000000000000000000000000000000000000000000000000000000000006064820152fd5b9050609e5416331481610acf565b3461021b57604060031936011261021b57610b72611802565b73ffffffffffffffffffffffffffffffffffffffff80609d54163314908115610c28575b8115610c1a575b5015610bb0576102b59060243590611e49565b608460405162461bcd60e51b815260206004820152602260248201527f537461626c65546f6b656e56323a206e6f7420616c6c6f77656420746f206d6960448201527f6e740000000000000000000000000000000000000000000000000000000000006064820152fd5b9050609e5416331482610b9d565b809150609c5416331490610b96565b3461021b57604060031936011261021b576102b5610c53611802565b336000526007602052604060002073ffffffffffffffffffffffffffffffffffffffff8216600052602052610c8f6024356040600020546119e4565b9033612046565b3461021b57600060031936011261021b576020610cb1612440565b604051908152f35b3461021b57600060031936011261021b57602060405160128152f35b3461021b57602060031936011261021b576101af610cf1611802565b610cf9612187565b611a9d565b3461021b57606060031936011261021b57610d90610d1a611802565b610a66610d25611848565b610cf9610d3061186b565b9375010200000000000000000000000000000000000000007fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff60005460ff8160a81c161580610f0d575b610d83906118ed565b16176000556105c2612187565b604051600090600354610da281611c33565b91828152602093848201936001938481169081600014610ed75750600114610e86575b7f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498867fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff878787610e178189038261197a565b6000549260ff8460a81c1691610e2c83611bc2565b60405193610e398561195e565b8452610e6a878501937f31000000000000000000000000000000000000000000000000000000000000008552611bc2565b51902091519020906035556036551660005560405160028152a1005b6003600090815291507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b818310610ec45750508101840181610dc5565b8054848401880152918601918401610eb1565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016865250151560051b82018501905081610dc5565b50600260a082901c60ff1610610d7a565b3461021b57606060031936011261021b57610f37611802565b610f3f611848565b6044359073ffffffffffffffffffffffffffffffffffffffff83166000526007602052604060002033600052602052604060002054927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8403610fa7575b6102b59350611c86565b828410610fc357610fbe836102b595033383612046565b610f9d565b606460405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152fd5b3461021b5761012060031936011261021b5760043567ffffffffffffffff811161021b5761103990369060040161188e565b60243567ffffffffffffffff811161021b5761105990369060040161188e565b9260443560ff81160361021b5761106e611825565b5060c43567ffffffffffffffff811161021b5761108f9036906004016118bc565b94909260e43567ffffffffffffffff811161021b576110b29036906004016118bc565b929093610104359067ffffffffffffffff821161021b576110da61114c92369060040161188e565b50506000549760ff8960a81c16159889809a6116c3575b80156116a8575b611101906118ed565b89740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff831617600055611665575b50369161199d565b61115736838561199d565b9061116960ff60005460a81c16611bc2565b80519067ffffffffffffffff82116104c3578190611188600254611c33565b601f81116115f8575b50602090601f83116001146115555760009261154a575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916176002555b80519067ffffffffffffffff82116104c3576111f8600354611c33565b601f81116114ab575b50602090601f83116001146114025761125a94939291600091836113f7575b50507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8260011b9260031b1c1916176003555b369161199d565b9460ff60005460a81c1661126d81611bc2565b6040519061127a8261195e565b6001978883526112b060208401927f31000000000000000000000000000000000000000000000000000000000000008452611bc2565b6020815191012091519020906035556036556112cb336121ec565b8181036113b35760005b8181106113395786866112e457005b60207f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498917fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff60005416600055604051908152a1005b6113448183876119f1565b3573ffffffffffffffffffffffffffffffffffffffff8116810361021b57611378906113718386886119f1565b3590611e49565b868101809111156112d5575b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b606460405162461bcd60e51b815260206004820152601560248201527f4172726179206c656e677468206d69736d6174636800000000000000000000006044820152fd5b015190508a80611220565b90601f1983169160036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9260005b818110611493575091600193918561125a989796941061145c575b505050811b01600355611253565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558a808061144e565b92936020600181928786015181550195019301611433565b6003600052601f830160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0160208410611523575b601f820160051c7fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0181106115175750611201565b600081556001016114e2565b507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b6114e2565b015190508a806111a8565b91601f19169160026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9260005b8181106115e057509084600195949392106115a9575b505050811b016002556111db565b01517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60f88460031b161c191690558a808061159b565b92936020600181928786015181550195019301611585565b90915060026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace601f840160051c81016020851061165e575b90849392915b601f830160051c8201811061164f575050611191565b60008155859450600101611639565b5080611633565b7fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff167501010000000000000000000000000000000000000000176000558a611144565b50303b1580156110f8575060a081901c60ff166001146110f8565b50600160ff8260a01c16106110f1565b3461021b57600060031936011261021b576020600654604051908152f35b3461021b57604060031936011261021b576102b561170d611802565b6024359033612046565b3461021b57600060031936011261021b57600060025461173681611c33565b808452906001908181169081156107a4575060011461175f57610745846107398186038261197a565b6002600090815292507f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b8284106117a257505050810160200161073982610729565b8054602085870181019190915290930192810161178a565b60208082528251818301819052939260005b8581106117ee57505050601f19601f8460006040809697860101520116010190565b8181018301518482016040015282016117cc565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6064359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b6044359073ffffffffffffffffffffffffffffffffffffffff8216820361021b57565b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020838186019501011161021b57565b9181601f8401121561021b5782359167ffffffffffffffff831161021b576020808501948460051b01011161021b57565b156118f457565b608460405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152fd5b6040810190811067ffffffffffffffff8211176104c357604052565b90601f601f19910116810190811067ffffffffffffffff8211176104c357604052565b92919267ffffffffffffffff82116104c357604051916119c76020601f19601f840116018461197a565b82948184528183011161021b578281602093846000960137010152565b9190820180921161138457565b9190811015611a015760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602073ffffffffffffffffffffffffffffffffffffffff7f865dab7821134b6eb27cba259b40e33bbc1b898e970a535a18a83147f380a51f9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609d541617609d55604051908152a1565b602073ffffffffffffffffffffffffffffffffffffffff7f34edb180d960e50e3657f8fba1bf1f35c399c2bbad42b7e0f6561e6fb4ae3d7c9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609c541617609c55604051908152a1565b602073ffffffffffffffffffffffffffffffffffffffff7f403871c8d404db2d13402bd857192acd8f680acd7f2d6e1e5bf2128d013d7eaa9216807fffffffffffffffffffffffff0000000000000000000000000000000000000000609e541617609e55604051908152a1565b15611b7e57565b606460405162461bcd60e51b815260206004820152601060248201527f4f6e6c7920564d2063616e2063616c6c000000000000000000000000000000006044820152fd5b15611bc957565b608460405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152fd5b90600182811c92168015611c7c575b6020831014611c4d57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b91607f1691611c42565b73ffffffffffffffffffffffffffffffffffffffff809116918215611ddf5716918215611d755760008281526005602052604081205491808310611d0b57604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95876020965260058652038282205586815220818154019055604051908152a3565b608460405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff16908115611eb5577fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602082611e986000946006546119e4565b6006558484526005825260408420818154019055604051908152a3565b606460405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff168015611fdc5780600052600560205260406000205491808310611f72576020817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92600095858752600584520360408620558060065403600655604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff80911691821561211e57169182156120b45760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260078252604060002085600052825280604060002055604051908152a3565b608460405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff6000541633036121a857565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b6000549073ffffffffffffffffffffffffffffffffffffffff80911691827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b6005811015612375578061226a5750565b600181036122b657606460405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152fd5b6002810361230257606460405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152fd5b60031461230b57565b608460405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116124345791608094939160ff602094604051948552168484015260408301526060820152600093849182805260015afa1561242757815173ffffffffffffffffffffffffffffffffffffffff811615612421579190565b50600190565b50604051903d90823e3d90fd5b50505050600090600390565b6035546036546040519060208201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8452604083015260608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176104c3576040525190209056fea164736f6c6343000812000a0000000000000000000000000000000000000000000000000000000000000001","name":"StableTokenV2","is_blueprint":false,"license_type":"none","is_fully_verified":false,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"paris","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":true,"additional_sources":[{"file_path":"lib/mento-core-2.2.0/contracts/common/CalledByVm.sol","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.5.13 <0.8.19;\n\ncontract CalledByVm {\n  modifier onlyVm() {\n    require(msg.sender == address(0), \"Only VM can call\");\n    _;\n  }\n}\n"},{"file_path":"lib/mento-core-2.2.0/contracts/interfaces/IStableTokenV2.sol","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity >=0.5.17 <0.8.19;\n\ninterface IStableTokenV2 {\n  function totalSupply() external view returns (uint256);\n\n  function balanceOf(address account) external view returns (uint256);\n\n  function transfer(address recipient, uint256 amount) external returns (bool);\n\n  function allowance(address owner, address spender) external view returns (uint256);\n\n  function approve(address spender, uint256 amount) external returns (bool);\n\n  function transferFrom(\n    address sender,\n    address recipient,\n    uint256 amount\n  ) external returns (bool);\n\n  function mint(address, uint256) external returns (bool);\n\n  function burn(uint256) external returns (bool);\n\n  function permit(\n    address owner,\n    address spender,\n    uint256 value,\n    uint256 deadline,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) external;\n\n  /**\n   * @notice Transfer token for a specified address\n   * @param to The address to transfer to.\n   * @param value The amount to be transferred.\n   * @param comment The transfer comment.\n   * @return True if the transaction succeeds.\n   */\n  function transferWithComment(\n    address to,\n    uint256 value,\n    string calldata comment\n  ) external returns (bool);\n\n  /**\n   * @notice Initializes a StableTokenV2.\n   * It keeps the same signature as the original initialize() function\n   * in legacy/StableToken.sol\n   * @param _name The name of the stable token (English)\n   * @param _symbol A short symbol identifying the token (e.g. \"cUSD\")\n   * deprecated-param decimals Tokens are divisible to this many decimal places.\n   * deprecated-param registryAddress Address of the Registry contract.\n   * deprecated-param inflationRate Weekly inflation rate.\n   * deprecated-param inflationFactorUpdatePeriod How often the inflation factor is updated, in seconds.\n   * @param initialBalanceAddresses Array of addresses with an initial balance.\n   * @param initialBalanceValues Array of balance values corresponding to initialBalanceAddresses.\n   * deprecated-param exchangeIdentifier String identifier of exchange in registry (for specific fiat pairs)\n   */\n  function initialize(\n    string calldata _name,\n    string calldata _symbol,\n    uint8, // deprecated: decimals\n    address, // deprecated: registryAddress,\n    uint256, // deprecated: inflationRate,\n    uint256, // deprecated:  inflationFactorUpdatePeriod,\n    address[] calldata initialBalanceAddresses,\n    uint256[] calldata initialBalanceValues,\n    string calldata // deprecated: exchangeIdentifier\n  ) external;\n\n  /**\n   * @notice Initializes a StableTokenV2 contract\n   * when upgrading from legacy/StableToken.sol.\n   * It sets the addresses that were previously read from the Registry.\n   * It runs the ERC20PermitUpgradeable initializer.\n   * @dev This function is only callable once.\n   * @param _broker The address of the Broker contract.\n   * @param _validators The address of the Validators contract.\n   * @param _exchange The address of the Exchange contract.\n   */\n  function initializeV2(\n    address _broker,\n    address _validators,\n    address _exchange\n  ) external;\n\n  /**\n   * @notice Gets the address of the Broker contract.\n   */\n  function broker() external returns (address);\n\n  function debitGasFees(address from, uint256 value) external;\n\n  function creditGasFees(\n    address from,\n    address feeRecipient,\n    address gatewayFeeRecipient,\n    address communityFund,\n    uint256 refund,\n    uint256 tipTxFee,\n    uint256 gatewayFee,\n    uint256 baseTxFee\n  ) external;\n}\n"},{"file_path":"lib/mento-core-2.2.0/contracts/tokens/patched/ERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/extensions/draft-ERC20Permit.sol)\n/*\n * 🔥 MentoLabs: This is a copied file from v4.8.0 of OZ-Upgradable,\n * and only changes the import of ERC20Upgradeable to be the local one\n * which is modified in order to keep storage variables consistent\n * with the pervious implementation of StableToken.\n * See ./README.md for more details.\n */\n\npragma solidity ^0.8.0;\n\nimport \"./ERC20Upgradeable.sol\";\n\nimport \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/utils/CountersUpgradeable.sol\";\n\n/**\n * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 51\n */\nabstract contract ERC20PermitUpgradeable is ERC20Upgradeable, IERC20PermitUpgradeable, EIP712Upgradeable {\n  using CountersUpgradeable for CountersUpgradeable.Counter;\n\n  mapping(address => CountersUpgradeable.Counter) private _nonces;\n\n  // solhint-disable-next-line var-name-mixedcase\n  bytes32 private constant _PERMIT_TYPEHASH =\n    keccak256(\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\");\n  /**\n   * @dev In previous versions `_PERMIT_TYPEHASH` was declared as `immutable`.\n   * However, to ensure consistency with the upgradeable transpiler, we will continue\n   * to reserve a slot.\n   * @custom:oz-renamed-from _PERMIT_TYPEHASH\n   */\n  // solhint-disable-next-line var-name-mixedcase\n  bytes32 private _PERMIT_TYPEHASH_DEPRECATED_SLOT;\n\n  /**\n   * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `\"1\"`.\n   *\n   * It's a good idea to use the same `name` that is defined as the ERC20 token name.\n   */\n  function __ERC20Permit_init(string memory name) internal onlyInitializing {\n    __EIP712_init_unchained(name, \"1\");\n  }\n\n  function __ERC20Permit_init_unchained(string memory) internal onlyInitializing {}\n\n  /**\n   * @dev See {IERC20Permit-permit}.\n   */\n  function permit(\n    address owner,\n    address spender,\n    uint256 value,\n    uint256 deadline,\n    uint8 v,\n    bytes32 r,\n    bytes32 s\n  ) public virtual override {\n    require(block.timestamp <= deadline, \"ERC20Permit: expired deadline\");\n\n    bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));\n\n    bytes32 hash = _hashTypedDataV4(structHash);\n\n    address signer = ECDSAUpgradeable.recover(hash, v, r, s);\n    require(signer == owner, \"ERC20Permit: invalid signature\");\n\n    _approve(owner, spender, value);\n  }\n\n  /**\n   * @dev See {IERC20Permit-nonces}.\n   */\n  function nonces(address owner) public view virtual override returns (uint256) {\n    return _nonces[owner].current();\n  }\n\n  /**\n   * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.\n   */\n  // solhint-disable-next-line func-name-mixedcase\n  function DOMAIN_SEPARATOR() external view override returns (bytes32) {\n    return _domainSeparatorV4();\n  }\n\n  /**\n   * @dev \"Consume a nonce\": return the current value and increment.\n   *\n   * _Available since v4.1._\n   */\n  function _useNonce(address owner) internal virtual returns (uint256 current) {\n    CountersUpgradeable.Counter storage nonce = _nonces[owner];\n    current = nonce.current();\n    nonce.increment();\n  }\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[49] private __gap;\n}\n"},{"file_path":"lib/mento-core-2.2.0/contracts/tokens/patched/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol)\n/*\n * 🔥 MentoLabs: This is a copied file from v4.8.0 of OZ-Upgradable, which only changes\n * the ordering of storage variables to keep it consistent with the existing\n * StableToken, so this can act as a new implementation for the proxy.\n * See ./README.md for more details.\n */\n\npragma solidity ^0.8.0;\n\nimport \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol\";\nimport \"openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol\";\nimport \"openzeppelin-contracts-next/contracts/access/Ownable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Ownable, Initializable, IERC20Upgradeable, IERC20MetadataUpgradeable {\n  address private __deprecated_registry_storage_slot__;\n  string private _name;\n  string private _symbol;\n  uint8 private __deprecated_decimals_storage_slot__;\n\n  mapping(address => uint256) private _balances;\n  uint256 private _totalSupply;\n  mapping(address => mapping(address => uint256)) private _allowances;\n\n  uint256[4] private __deprecated_inflationState_storage_slot__;\n  bytes32 private __deprecated_exchangeRegistryId_storage_slot__;\n\n  /**\n   * @dev Sets the values for {name} and {symbol}.\n   *\n   * The default value of {decimals} is 18. To select a different value for\n   * {decimals} you should overload it.\n   *\n   * All two of these values are immutable: they can only be set once during\n   * construction.\n   */\n  function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {\n    __ERC20_init_unchained(name_, symbol_);\n  }\n\n  function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {\n    _name = name_;\n    _symbol = symbol_;\n  }\n\n  /**\n   * @dev Returns the name of the token.\n   */\n  function name() public view virtual override returns (string memory) {\n    return _name;\n  }\n\n  /**\n   * @dev Returns the symbol of the token, usually a shorter version of the\n   * name.\n   */\n  function symbol() public view virtual override returns (string memory) {\n    return _symbol;\n  }\n\n  /**\n   * @dev Returns the number of decimals used to get its user representation.\n   * For example, if `decimals` equals `2`, a balance of `505` tokens should\n   * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n   *\n   * Tokens usually opt for a value of 18, imitating the relationship between\n   * Ether and Wei. This is the value {ERC20} uses, unless this function is\n   * overridden;\n   *\n   * NOTE: This information is only used for _display_ purposes: it in\n   * no way affects any of the arithmetic of the contract, including\n   * {IERC20-balanceOf} and {IERC20-transfer}.\n   */\n  function decimals() public view virtual override returns (uint8) {\n    return 18;\n  }\n\n  /**\n   * @dev See {IERC20-totalSupply}.\n   */\n  function totalSupply() public view virtual override returns (uint256) {\n    return _totalSupply;\n  }\n\n  /**\n   * @dev See {IERC20-balanceOf}.\n   */\n  function balanceOf(address account) public view virtual override returns (uint256) {\n    return _balances[account];\n  }\n\n  /**\n   * @dev See {IERC20-transfer}.\n   *\n   * Requirements:\n   *\n   * - `to` cannot be the zero address.\n   * - the caller must have a balance of at least `amount`.\n   */\n  function transfer(address to, uint256 amount) public virtual override returns (bool) {\n    address owner = _msgSender();\n    _transfer(owner, to, amount);\n    return true;\n  }\n\n  /**\n   * @dev See {IERC20-allowance}.\n   */\n  function allowance(address owner, address spender) public view virtual override returns (uint256) {\n    return _allowances[owner][spender];\n  }\n\n  /**\n   * @dev See {IERC20-approve}.\n   *\n   * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n   * `transferFrom`. This is semantically equivalent to an infinite approval.\n   *\n   * Requirements:\n   *\n   * - `spender` cannot be the zero address.\n   */\n  function approve(address spender, uint256 amount) public virtual override returns (bool) {\n    address owner = _msgSender();\n    _approve(owner, spender, amount);\n    return true;\n  }\n\n  /**\n   * @dev See {IERC20-transferFrom}.\n   *\n   * Emits an {Approval} event indicating the updated allowance. This is not\n   * required by the EIP. See the note at the beginning of {ERC20}.\n   *\n   * NOTE: Does not update the allowance if the current allowance\n   * is the maximum `uint256`.\n   *\n   * Requirements:\n   *\n   * - `from` and `to` cannot be the zero address.\n   * - `from` must have a balance of at least `amount`.\n   * - the caller must have allowance for ``from``'s tokens of at least\n   * `amount`.\n   */\n  function transferFrom(\n    address from,\n    address to,\n    uint256 amount\n  ) public virtual override returns (bool) {\n    address spender = _msgSender();\n    _spendAllowance(from, spender, amount);\n    _transfer(from, to, amount);\n    return true;\n  }\n\n  /**\n   * @dev Atomically increases the allowance granted to `spender` by the caller.\n   *\n   * This is an alternative to {approve} that can be used as a mitigation for\n   * problems described in {IERC20-approve}.\n   *\n   * Emits an {Approval} event indicating the updated allowance.\n   *\n   * Requirements:\n   *\n   * - `spender` cannot be the zero address.\n   */\n  function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n    address owner = _msgSender();\n    _approve(owner, spender, allowance(owner, spender) + addedValue);\n    return true;\n  }\n\n  /**\n   * @dev Atomically decreases the allowance granted to `spender` by the caller.\n   *\n   * This is an alternative to {approve} that can be used as a mitigation for\n   * problems described in {IERC20-approve}.\n   *\n   * Emits an {Approval} event indicating the updated allowance.\n   *\n   * Requirements:\n   *\n   * - `spender` cannot be the zero address.\n   * - `spender` must have allowance for the caller of at least\n   * `subtractedValue`.\n   */\n  function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n    address owner = _msgSender();\n    uint256 currentAllowance = allowance(owner, spender);\n    require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n    unchecked {\n      _approve(owner, spender, currentAllowance - subtractedValue);\n    }\n\n    return true;\n  }\n\n  /**\n   * @dev Moves `amount` of tokens from `from` to `to`.\n   *\n   * This internal function is equivalent to {transfer}, and can be used to\n   * e.g. implement automatic token fees, slashing mechanisms, etc.\n   *\n   * Emits a {Transfer} event.\n   *\n   * Requirements:\n   *\n   * - `from` cannot be the zero address.\n   * - `to` cannot be the zero address.\n   * - `from` must have a balance of at least `amount`.\n   */\n  function _transfer(\n    address from,\n    address to,\n    uint256 amount\n  ) internal virtual {\n    require(from != address(0), \"ERC20: transfer from the zero address\");\n    require(to != address(0), \"ERC20: transfer to the zero address\");\n\n    _beforeTokenTransfer(from, to, amount);\n\n    uint256 fromBalance = _balances[from];\n    require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n    unchecked {\n      _balances[from] = fromBalance - amount;\n      // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n      // decrementing then incrementing.\n      _balances[to] += amount;\n    }\n\n    emit Transfer(from, to, amount);\n\n    _afterTokenTransfer(from, to, amount);\n  }\n\n  /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n   * the total supply.\n   *\n   * Emits a {Transfer} event with `from` set to the zero address.\n   *\n   * Requirements:\n   *\n   * - `account` cannot be the zero address.\n   */\n  function _mint(address account, uint256 amount) internal virtual {\n    require(account != address(0), \"ERC20: mint to the zero address\");\n\n    _beforeTokenTransfer(address(0), account, amount);\n\n    _totalSupply += amount;\n    unchecked {\n      // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n      _balances[account] += amount;\n    }\n    emit Transfer(address(0), account, amount);\n\n    _afterTokenTransfer(address(0), account, amount);\n  }\n\n  /**\n   * @dev Destroys `amount` tokens from `account`, reducing the\n   * total supply.\n   *\n   * Emits a {Transfer} event with `to` set to the zero address.\n   *\n   * Requirements:\n   *\n   * - `account` cannot be the zero address.\n   * - `account` must have at least `amount` tokens.\n   */\n  function _burn(address account, uint256 amount) internal virtual {\n    require(account != address(0), \"ERC20: burn from the zero address\");\n\n    _beforeTokenTransfer(account, address(0), amount);\n\n    uint256 accountBalance = _balances[account];\n    require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n    unchecked {\n      _balances[account] = accountBalance - amount;\n      // Overflow not possible: amount <= accountBalance <= totalSupply.\n      _totalSupply -= amount;\n    }\n\n    emit Transfer(account, address(0), amount);\n\n    _afterTokenTransfer(account, address(0), amount);\n  }\n\n  /**\n   * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n   *\n   * This internal function is equivalent to `approve`, and can be used to\n   * e.g. set automatic allowances for certain subsystems, etc.\n   *\n   * Emits an {Approval} event.\n   *\n   * Requirements:\n   *\n   * - `owner` cannot be the zero address.\n   * - `spender` cannot be the zero address.\n   */\n  function _approve(\n    address owner,\n    address spender,\n    uint256 amount\n  ) internal virtual {\n    require(owner != address(0), \"ERC20: approve from the zero address\");\n    require(spender != address(0), \"ERC20: approve to the zero address\");\n\n    _allowances[owner][spender] = amount;\n    emit Approval(owner, spender, amount);\n  }\n\n  /**\n   * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n   *\n   * Does not update the allowance amount in case of infinite allowance.\n   * Revert if not enough allowance is available.\n   *\n   * Might emit an {Approval} event.\n   */\n  function _spendAllowance(\n    address owner,\n    address spender,\n    uint256 amount\n  ) internal virtual {\n    uint256 currentAllowance = allowance(owner, spender);\n    if (currentAllowance != type(uint256).max) {\n      require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n      unchecked {\n        _approve(owner, spender, currentAllowance - amount);\n      }\n    }\n  }\n\n  /**\n   * @dev Hook that is called before any transfer of tokens. This includes\n   * minting and burning.\n   *\n   * Calling conditions:\n   *\n   * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n   * will be transferred to `to`.\n   * - when `from` is zero, `amount` tokens will be minted for `to`.\n   * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n   * - `from` and `to` are never both zero.\n   *\n   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n   */\n  function _beforeTokenTransfer(\n    address from,\n    address to,\n    uint256 amount\n  ) internal virtual {}\n\n  /**\n   * @dev Hook that is called after any transfer of tokens. This includes\n   * minting and burning.\n   *\n   * Calling conditions:\n   *\n   * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n   * has been transferred to `to`.\n   * - when `from` is zero, `amount` tokens have been minted for `to`.\n   * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n   * - `from` and `to` are never both zero.\n   *\n   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n   */\n  function _afterTokenTransfer(\n    address from,\n    address to,\n    uint256 amount\n  ) internal virtual {}\n\n  /**\n   * @dev This empty reserved space is put in place to allow future versions to add new\n   * variables without shifting down storage in the inheritance chain.\n   * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n   */\n  uint256[40] private __gap;\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-next/contracts/access/Ownable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-next/contracts/utils/Context.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol)\n\npragma solidity ^0.8.2;\n\nimport \"../../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be\n * reused. This mechanism prevents re-execution of each \"step\" but allows the creation of new initialization steps in\n * case an upgrade adds a module that needs to be initialized.\n *\n * For example:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * contract MyToken is ERC20Upgradeable {\n *     function initialize() initializer public {\n *         __ERC20_init(\"MyToken\", \"MTK\");\n *     }\n * }\n * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {\n *     function initializeV2() reinitializer(2) public {\n *         __ERC20Permit_init(\"MyToken\");\n *     }\n * }\n * ```\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n *\n * [CAUTION]\n * ====\n * Avoid leaving a contract uninitialized.\n *\n * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation\n * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke\n * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:\n *\n * [.hljs-theme-light.nopadding]\n * ```\n * /// @custom:oz-upgrades-unsafe-allow constructor\n * constructor() {\n *     _disableInitializers();\n * }\n * ```\n * ====\n */\nabstract contract Initializable {\n    /**\n     * @dev Indicates that the contract has been initialized.\n     * @custom:oz-retyped-from bool\n     */\n    uint8 private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Triggered when the contract has been initialized or reinitialized.\n     */\n    event Initialized(uint8 version);\n\n    /**\n     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,\n     * `onlyInitializing` functions can be used to initialize parent contracts.\n     *\n     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a\n     * constructor.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier initializer() {\n        bool isTopLevelCall = !_initializing;\n        require(\n            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),\n            \"Initializable: contract is already initialized\"\n        );\n        _initialized = 1;\n        if (isTopLevelCall) {\n            _initializing = true;\n        }\n        _;\n        if (isTopLevelCall) {\n            _initializing = false;\n            emit Initialized(1);\n        }\n    }\n\n    /**\n     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the\n     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be\n     * used to initialize parent contracts.\n     *\n     * A reinitializer may be used after the original initialization step. This is essential to configure modules that\n     * are added through upgrades and that require initialization.\n     *\n     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`\n     * cannot be nested. If one is invoked in the context of another, execution will revert.\n     *\n     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in\n     * a contract, executing them in the right order is up to the developer or operator.\n     *\n     * WARNING: setting the version to 255 will prevent any future reinitialization.\n     *\n     * Emits an {Initialized} event.\n     */\n    modifier reinitializer(uint8 version) {\n        require(!_initializing && _initialized < version, \"Initializable: contract is already initialized\");\n        _initialized = version;\n        _initializing = true;\n        _;\n        _initializing = false;\n        emit Initialized(version);\n    }\n\n    /**\n     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the\n     * {initializer} and {reinitializer} modifiers, directly or indirectly.\n     */\n    modifier onlyInitializing() {\n        require(_initializing, \"Initializable: contract is not initializing\");\n        _;\n    }\n\n    /**\n     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.\n     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized\n     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called\n     * through proxies.\n     *\n     * Emits an {Initialized} event the first time it is successfully executed.\n     */\n    function _disableInitializers() internal virtual {\n        require(!_initializing, \"Initializable: contract is initializing\");\n        if (_initialized < type(uint8).max) {\n            _initialized = type(uint8).max;\n            emit Initialized(type(uint8).max);\n        }\n    }\n\n    /**\n     * @dev Returns the highest version that has been initialized. See {reinitializer}.\n     */\n    function _getInitializedVersion() internal view returns (uint8) {\n        return _initialized;\n    }\n\n    /**\n     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.\n     */\n    function _isInitializing() internal view returns (bool) {\n        return _initializing;\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `from` to `to` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/IERC20MetadataUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20Upgradeable.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20MetadataUpgradeable is IERC20Upgradeable {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-IERC20PermitUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n */\ninterface IERC20PermitUpgradeable {\n    /**\n     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n     * given ``owner``'s signed approval.\n     *\n     * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n     * ordering also apply here.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `deadline` must be a timestamp in the future.\n     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n     * over the EIP712-formatted function arguments.\n     * - the signature must use ``owner``'s current nonce (see {nonces}).\n     *\n     * For more information on the signature format, see the\n     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n     * section].\n     */\n    function permit(\n        address owner,\n        address spender,\n        uint256 value,\n        uint256 deadline,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) external;\n\n    /**\n     * @dev Returns the current nonce for `owner`. This value must be\n     * included whenever a signature is generated for {permit}.\n     *\n     * Every successful call to {permit} increases ``owner``'s nonce by one. This\n     * prevents a signature from being used multiple times.\n     */\n    function nonces(address owner) external view returns (uint256);\n\n    /**\n     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n     */\n    // solhint-disable-next-line func-name-mixedcase\n    function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\n\npragma solidity ^0.8.1;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     *\n     * [IMPORTANT]\n     * ====\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\n     *\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\n     * constructor.\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize/address.code.length, which returns 0\n        // for contracts in construction, since the code is only stored at the end\n        // of the constructor execution.\n\n        return account.code.length > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        (bool success, ) = recipient.call{value: amount}(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain `call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value\n    ) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(\n        address target,\n        bytes memory data,\n        uint256 value,\n        string memory errorMessage\n    ) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(\n        address target,\n        bytes memory data,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\n     *\n     * _Available since v4.8._\n     */\n    function verifyCallResultFromTarget(\n        address target,\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal view returns (bytes memory) {\n        if (success) {\n            if (returndata.length == 0) {\n                // only check isContract if the call was successful and the return data is empty\n                // otherwise we already know that it was a contract\n                require(isContract(target), \"Address: call to non-contract\");\n            }\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    /**\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\n     * revert reason or using the provided one.\n     *\n     * _Available since v4.3._\n     */\n    function verifyCallResult(\n        bool success,\n        bytes memory returndata,\n        string memory errorMessage\n    ) internal pure returns (bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            _revert(returndata, errorMessage);\n        }\n    }\n\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\n        // Look for revert reason and bubble it up if present\n        if (returndata.length > 0) {\n            // The easiest way to bubble the revert reason is using memory via assembly\n            /// @solidity memory-safe-assembly\n            assembly {\n                let returndata_size := mload(returndata)\n                revert(add(32, returndata), returndata_size)\n            }\n        } else {\n            revert(errorMessage);\n        }\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/CountersUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @title Counters\n * @author Matt Condon (@shrugs)\n * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number\n * of elements in a mapping, issuing ERC721 ids, or counting request ids.\n *\n * Include with `using Counters for Counters.Counter;`\n */\nlibrary CountersUpgradeable {\n    struct Counter {\n        // This variable should never be directly accessed by users of the library: interactions must be restricted to\n        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n        // this feature: see https://github.com/ethereum/solidity/issues/4637\n        uint256 _value; // default: 0\n    }\n\n    function current(Counter storage counter) internal view returns (uint256) {\n        return counter._value;\n    }\n\n    function increment(Counter storage counter) internal {\n        unchecked {\n            counter._value += 1;\n        }\n    }\n\n    function decrement(Counter storage counter) internal {\n        uint256 value = counter._value;\n        require(value > 0, \"Counter: decrement overflow\");\n        unchecked {\n            counter._value = value - 1;\n        }\n    }\n\n    function reset(Counter storage counter) internal {\n        counter._value = 0;\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/StringsUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./math/MathUpgradeable.sol\";\n\n/**\n * @dev String operations.\n */\nlibrary StringsUpgradeable {\n    bytes16 private constant _SYMBOLS = \"0123456789abcdef\";\n    uint8 private constant _ADDRESS_LENGTH = 20;\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\n     */\n    function toString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            uint256 length = MathUpgradeable.log10(value) + 1;\n            string memory buffer = new string(length);\n            uint256 ptr;\n            /// @solidity memory-safe-assembly\n            assembly {\n                ptr := add(buffer, add(32, length))\n            }\n            while (true) {\n                ptr--;\n                /// @solidity memory-safe-assembly\n                assembly {\n                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\n                }\n                value /= 10;\n                if (value == 0) break;\n            }\n            return buffer;\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\n     */\n    function toHexString(uint256 value) internal pure returns (string memory) {\n        unchecked {\n            return toHexString(value, MathUpgradeable.log256(value) + 1);\n        }\n    }\n\n    /**\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\n     */\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\n        bytes memory buffer = new bytes(2 * length + 2);\n        buffer[0] = \"0\";\n        buffer[1] = \"x\";\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\n            buffer[i] = _SYMBOLS[value & 0xf];\n            value >>= 4;\n        }\n        require(value == 0, \"Strings: hex length insufficient\");\n        return string(buffer);\n    }\n\n    /**\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\n     */\n    function toHexString(address addr) internal pure returns (string memory) {\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/ECDSAUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../StringsUpgradeable.sol\";\n\n/**\n * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.\n *\n * These functions can be used to verify that a message was signed by the holder\n * of the private keys of a given address.\n */\nlibrary ECDSAUpgradeable {\n    enum RecoverError {\n        NoError,\n        InvalidSignature,\n        InvalidSignatureLength,\n        InvalidSignatureS,\n        InvalidSignatureV // Deprecated in v4.8\n    }\n\n    function _throwError(RecoverError error) private pure {\n        if (error == RecoverError.NoError) {\n            return; // no error: do nothing\n        } else if (error == RecoverError.InvalidSignature) {\n            revert(\"ECDSA: invalid signature\");\n        } else if (error == RecoverError.InvalidSignatureLength) {\n            revert(\"ECDSA: invalid signature length\");\n        } else if (error == RecoverError.InvalidSignatureS) {\n            revert(\"ECDSA: invalid signature 's' value\");\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature` or error string. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     *\n     * Documentation for signature generation:\n     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]\n     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {\n        if (signature.length == 65) {\n            bytes32 r;\n            bytes32 s;\n            uint8 v;\n            // ecrecover takes the signature parameters, and the only way to get them\n            // currently is to use assembly.\n            /// @solidity memory-safe-assembly\n            assembly {\n                r := mload(add(signature, 0x20))\n                s := mload(add(signature, 0x40))\n                v := byte(0, mload(add(signature, 0x60)))\n            }\n            return tryRecover(hash, v, r, s);\n        } else {\n            return (address(0), RecoverError.InvalidSignatureLength);\n        }\n    }\n\n    /**\n     * @dev Returns the address that signed a hashed message (`hash`) with\n     * `signature`. This address can then be used for verification purposes.\n     *\n     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:\n     * this function rejects them by requiring the `s` value to be in the lower\n     * half order, and the `v` value to be either 27 or 28.\n     *\n     * IMPORTANT: `hash` _must_ be the result of a hash operation for the\n     * verification to be secure: it is possible to craft signatures that\n     * recover to arbitrary addresses for non-hashed data. A safe way to ensure\n     * this is by receiving a hash of the original message (which may otherwise\n     * be too long), and then calling {toEthSignedMessageHash} on it.\n     */\n    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, signature);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.\n     *\n     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address, RecoverError) {\n        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);\n        uint8 v = uint8((uint256(vs) >> 255) + 27);\n        return tryRecover(hash, v, r, s);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.\n     *\n     * _Available since v4.2._\n     */\n    function recover(\n        bytes32 hash,\n        bytes32 r,\n        bytes32 vs\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, r, vs);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     *\n     * _Available since v4.3._\n     */\n    function tryRecover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address, RecoverError) {\n        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature\n        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines\n        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most\n        // signatures from current libraries generate a unique signature with an s-value in the lower half order.\n        //\n        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value\n        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or\n        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept\n        // these malleable signatures as well.\n        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {\n            return (address(0), RecoverError.InvalidSignatureS);\n        }\n\n        // If the signature is valid (and not malleable), return the signer address\n        address signer = ecrecover(hash, v, r, s);\n        if (signer == address(0)) {\n            return (address(0), RecoverError.InvalidSignature);\n        }\n\n        return (signer, RecoverError.NoError);\n    }\n\n    /**\n     * @dev Overload of {ECDSA-recover} that receives the `v`,\n     * `r` and `s` signature fields separately.\n     */\n    function recover(\n        bytes32 hash,\n        uint8 v,\n        bytes32 r,\n        bytes32 s\n    ) internal pure returns (address) {\n        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);\n        _throwError(error);\n        return recovered;\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from a `hash`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {\n        // 32 is the length in bytes of hash,\n        // enforced by the type signature above\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n32\", hash));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Message, created from `s`. This\n     * produces hash corresponding to the one signed with the\n     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]\n     * JSON-RPC method as part of EIP-191.\n     *\n     * See {recover}.\n     */\n    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19Ethereum Signed Message:\\n\", StringsUpgradeable.toString(s.length), s));\n    }\n\n    /**\n     * @dev Returns an Ethereum Signed Typed Data, created from a\n     * `domainSeparator` and a `structHash`. This produces hash corresponding\n     * to the one signed with the\n     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]\n     * JSON-RPC method as part of EIP-712.\n     *\n     * See {recover}.\n     */\n    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {\n        return keccak256(abi.encodePacked(\"\\x19\\x01\", domainSeparator, structHash));\n    }\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./ECDSAUpgradeable.sol\";\nimport \"../../proxy/utils/Initializable.sol\";\n\n/**\n * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.\n *\n * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,\n * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding\n * they need in their contracts using a combination of `abi.encode` and `keccak256`.\n *\n * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding\n * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA\n * ({_hashTypedDataV4}).\n *\n * The implementation of the domain separator was designed to be as efficient as possible while still properly updating\n * the chain id to protect against replay attacks on an eventual fork of the chain.\n *\n * NOTE: This contract implements the version of the encoding known as \"v4\", as implemented by the JSON RPC method\n * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].\n *\n * _Available since v3.4._\n *\n * @custom:storage-size 52\n */\nabstract contract EIP712Upgradeable is Initializable {\n    /* solhint-disable var-name-mixedcase */\n    bytes32 private _HASHED_NAME;\n    bytes32 private _HASHED_VERSION;\n    bytes32 private constant _TYPE_HASH = keccak256(\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\");\n\n    /* solhint-enable var-name-mixedcase */\n\n    /**\n     * @dev Initializes the domain separator and parameter caches.\n     *\n     * The meaning of `name` and `version` is specified in\n     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:\n     *\n     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.\n     * - `version`: the current major version of the signing domain.\n     *\n     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart\n     * contract upgrade].\n     */\n    function __EIP712_init(string memory name, string memory version) internal onlyInitializing {\n        __EIP712_init_unchained(name, version);\n    }\n\n    function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing {\n        bytes32 hashedName = keccak256(bytes(name));\n        bytes32 hashedVersion = keccak256(bytes(version));\n        _HASHED_NAME = hashedName;\n        _HASHED_VERSION = hashedVersion;\n    }\n\n    /**\n     * @dev Returns the domain separator for the current chain.\n     */\n    function _domainSeparatorV4() internal view returns (bytes32) {\n        return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());\n    }\n\n    function _buildDomainSeparator(\n        bytes32 typeHash,\n        bytes32 nameHash,\n        bytes32 versionHash\n    ) private view returns (bytes32) {\n        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));\n    }\n\n    /**\n     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this\n     * function returns the hash of the fully encoded EIP712 message for this domain.\n     *\n     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:\n     *\n     * ```solidity\n     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(\n     *     keccak256(\"Mail(address to,string contents)\"),\n     *     mailTo,\n     *     keccak256(bytes(mailContents))\n     * )));\n     * address signer = ECDSA.recover(digest, signature);\n     * ```\n     */\n    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {\n        return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);\n    }\n\n    /**\n     * @dev The hash of the name parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712NameHash() internal virtual view returns (bytes32) {\n        return _HASHED_NAME;\n    }\n\n    /**\n     * @dev The hash of the version parameter for the EIP712 domain.\n     *\n     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs\n     * are a concern.\n     */\n    function _EIP712VersionHash() internal virtual view returns (bytes32) {\n        return _HASHED_VERSION;\n    }\n\n    /**\n     * @dev This empty reserved space is put in place to allow future versions to add new\n     * variables without shifting down storage in the inheritance chain.\n     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps\n     */\n    uint256[50] private __gap;\n}\n"},{"file_path":"lib/mento-core-2.2.0/lib/openzeppelin-contracts-upgradeable/contracts/utils/math/MathUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary MathUpgradeable {\n    enum Rounding {\n        Down, // Toward negative infinity\n        Up, // Toward infinity\n        Zero // Toward zero\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a > b ? a : b;\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return a < b ? a : b;\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds up instead\n     * of rounding down.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b - 1) / b can overflow on addition, so we distribute.\n        return a == 0 ? 0 : (a - 1) / b + 1;\n    }\n\n    /**\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\n     * with further edits by Uniswap Labs also under MIT license.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator\n    ) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2^256 + prod0.\n            uint256 prod0; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod0 := mul(x, y)\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\n            require(denominator > prod1);\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\n            // See https://cs.stackexchange.com/q/138556/92363.\n\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\n            uint256 twos = denominator & (~denominator + 1);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv = 1 mod 2^4.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\n            // in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(\n        uint256 x,\n        uint256 y,\n        uint256 denominator,\n        Rounding rounding\n    ) internal pure returns (uint256) {\n        uint256 result = mulDiv(x, y, denominator);\n        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\n            result += 1;\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\n     *\n     * Inspired by Henry S. Warren, Jr.'s \"Hacker's Delight\" (Chapter 11).\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        if (a == 0) {\n            return 0;\n        }\n\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\n        //\n        // We know that the \"msb\" (most significant bit) of our target number `a` is a power of 2 such that we have\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\n        //\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\n        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\n        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\n        //\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\n        uint256 result = 1 << (log2(a) >> 1);\n\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\n        // into the expected uint128 result.\n        unchecked {\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            result = (result + a / result) >> 1;\n            return min(result, a / result);\n        }\n    }\n\n    /**\n     * @notice Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 128;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 64;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 32;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 16;\n            }\n            if (value >> 8 > 0) {\n                value >>= 8;\n                result += 8;\n            }\n            if (value >> 4 > 0) {\n                value >>= 4;\n                result += 4;\n            }\n            if (value >> 2 > 0) {\n                value >>= 2;\n                result += 2;\n            }\n            if (value >> 1 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10**64) {\n                value /= 10**64;\n                result += 64;\n            }\n            if (value >= 10**32) {\n                value /= 10**32;\n                result += 32;\n            }\n            if (value >= 10**16) {\n                value /= 10**16;\n                result += 16;\n            }\n            if (value >= 10**8) {\n                value /= 10**8;\n                result += 8;\n            }\n            if (value >= 10**4) {\n                value /= 10**4;\n                result += 4;\n            }\n            if (value >= 10**2) {\n                value /= 10**2;\n                result += 2;\n            }\n            if (value >= 10**1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256, rounded down, of a positive value.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >> 128 > 0) {\n                value >>= 128;\n                result += 16;\n            }\n            if (value >> 64 > 0) {\n                value >>= 64;\n                result += 8;\n            }\n            if (value >> 32 > 0) {\n                value >>= 32;\n                result += 4;\n            }\n            if (value >> 16 > 0) {\n                value >>= 16;\n                result += 2;\n            }\n            if (value >> 8 > 0) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);\n        }\n    }\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"bool","name":"disable","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"broker","type":"address"}],"name":"BrokerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"exchange","type":"address"}],"name":"ExchangeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"comment","type":"string"}],"name":"TransferComment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"validators","type":"address"}],"name":"ValidatorsUpdated","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"broker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"feeRecipient","type":"address"},{"internalType":"address","name":"gatewayFeeRecipient","type":"address"},{"internalType":"address","name":"communityFund","type":"address"},{"internalType":"uint256","name":"refund","type":"uint256"},{"internalType":"uint256","name":"tipTxFee","type":"uint256"},{"internalType":"uint256","name":"gatewayFee","type":"uint256"},{"internalType":"uint256","name":"baseTxFee","type":"uint256"}],"name":"creditGasFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"debitGasFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchange","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address[]","name":"initialBalanceAddresses","type":"address[]"},{"internalType":"uint256[]","name":"initialBalanceValues","type":"uint256[]"},{"internalType":"string","name":"","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_broker","type":"address"},{"internalType":"address","name":"_validators","type":"address"},{"internalType":"address","name":"_exchange","type":"address"}],"name":"initializeV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_broker","type":"address"}],"name":"setBroker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_exchange","type":"address"}],"name":"setExchange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_validators","type":"address"}],"name":"setValidators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"comment","type":"string"}],"name":"transferWithComment","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"validators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":true,"constructor_args":"0000000000000000000000000000000000000000000000000000000000000001"}